0

what does this error message mean?

2016-01-23 19:07:24,914  WARN ta.neo4j.mapping.Neo4jPersistentProperty:  73 - Owning ClassInfo is null for field: private java.lang.Long com.xenoterracide.rpf.AbstractPersistable.id and propertyDescriptor: org.springframework.beans.GenericTypeAwarePropertyDescriptor[name=id]

here's this class

public abstract class AbstractPersistable implements Identified<Long> {

    private Long id;

    @Override
    public Long getId() {
        return this.id;
    }
}
2
  • Please post the full code of how are using this Abstract class. It is a warning and not an error. Seems like Spring is expecting the ID field to be annotated with @GraphId but in case you have other fields in your entity annotated with @GraphId, then you can ignore this warning.
    – Sumit
    Commented Jan 24, 2016 at 3:35
  • @Sumit I don't have other fields annotated with it, and I tried adding it, didn't make the warning go away. I get the same warning on other fields too Commented Jan 24, 2016 at 17:27

1 Answer 1

1

I restructured my packages, and the component scan for Neo4j as defined in my config, was no longer correct. So if you get this error make sure that the class is within the scan path of the neo4j session.

@Configuration
@Profile( Strings.Profiles.EMBEDDED )
class EmbeddedConfig extends Neo4jConfiguration {

    @Bean
    @Override
    @Scope( value = "session", proxyMode = ScopedProxyMode.TARGET_CLASS )
    public Session getSession() throws Exception {
        return super.getSession();
    }

    @Bean
    @Override
    public Neo4jServer neo4jServer() {
        return new InProcessServer();
    }

    @Bean
    @Override
    public SessionFactory getSessionFactory() {
        return new SessionFactory( Strings.PackagePaths.getModelPackages() );
    }
}

Not the answer you're looking for? Browse other questions tagged or ask your own question.