Hi Max,

You've got to supply the packages to be scanned for domain metadata to the
SessionFactory. "ogm-monolith.domain" doesn't contain Resource- change to

SessionFactory sf = new SessionFactory("org.springdot.ogm.eval.entities");

and that should do it.

Regards
Luanne

On Wed, Aug 19, 2015 at 3:58 AM, Max Spring <maximilian.spr...@gmail.com>
wrote:

> Trying to use the Neo4j OGM library <https://github.com/neo4j/neo4j-ogm>
> with a standalone Java app, I run into a problem.
>
> Having a simple entity:
>
> @NodeEntity
> public class Resource{
>     @GraphId private Long graphId;
>     @Property private String name;
>     ... constructor / getter / setter
> }
>
> Trying to save an instance:
>
> SessionFactory sf = new SessionFactory("ogm-monolith.domain");
> Session session = sf.openSession("http://localhost:7474";);
> session.save(new Resource("one"));
>
> I get:
>
> 15:26:09.653 [main] INFO  o.n.o.m.info.ClassFileProcessor - Starting
> Post-processing phase
> 15:26:09.656 [main] INFO  o.n.o.m.info.ClassFileProcessor - Building
> annotation class map
> 15:26:09.656 [main] INFO  o.n.o.m.info.ClassFileProcessor - Building
> interface class map for 0 classes
> 15:26:09.656 [main] INFO  o.n.o.m.info.ClassFileProcessor - Registering
> default type converters...
> 15:26:09.656 [main] INFO  o.n.o.m.info.ClassFileProcessor -
> Post-processing complete
> 15:26:09.656 [main] INFO  o.n.o.m.info.ClassFileProcessor - 0 classes
> loaded in 7 milliseconds
> 15:26:09.680 [main] INFO  org.neo4j.ogm.session.Neo4jSession -
> org.springdot.ogm.eval.entities.Resource is not an instance of a
> persistable class
>
> I'm probably missing something very fundamentally, but can't figure it out.
>
> (Example project is on Github <https://github.com/m2spring/ogm-eval>.)
>
> -Max
>
> --
> You received this message because you are subscribed to the Google Groups
> "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to neo4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to