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;
    }
}
xenoterracide
  • 16,274
  • 24
  • 118
  • 243
  • 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 Jan 24 '16 at 03: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 – xenoterracide Jan 24 '16 at 17:27

1 Answers1

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() );
    }
}
xenoterracide
  • 16,274
  • 24
  • 118
  • 243