Unable to persist with entity manager using sesame module and sesame server 4

29 views
Skip to first unread message

Xavier Ñauñay

unread,
Mar 3, 2016, 3:23:07 PM3/3/16
to Empire
Hi, I have compiled the develop branch of Mike's Empire repo, and also both Complexible utils. Then, I have recreated successfully the example project using an OpenRdfEmpireModule and Sesame Server 4.
Now, I am able to find and query the data in my sesame server, but when I try to persist I get javax.persistence.PersistenceException: java.lang.NullPointerException in the EntityManager.

This is my properties file:
0.name = books
0.factory = sesame
0.repo = books

Anyone have idea on what could be wrong? Any help would be really appreciated.

Michael Grove

unread,
Mar 3, 2016, 3:24:13 PM3/3/16
to empir...@googlegroups.com
On Thu, Mar 3, 2016 at 3:22 PM, Xavier Ñauñay <xavie...@gmail.com> wrote:
Hi, I have compiled the develop branch of Mike's Empire repo, and also both Complexible utils. Then, I have recreated successfully the example project using an OpenRdfEmpireModule and Sesame Server 4.
Now, I am able to find and query the data in my sesame server, but when I try to persist I get javax.persistence.PersistenceException: java.lang.NullPointerException in the EntityManager.

I'd be easier to help if you provided the stack trace.

Cheers,

Mike
 

This is my properties file:
0.name = books
0.factory = sesame
0.repo = books

Anyone have idea on what could be wrong? Any help would be really appreciated.

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

Xavier Ñauñay

unread,
Mar 3, 2016, 4:05:37 PM3/3/16
to Empire
Here is the stack trace, but there isn't more info:

Exception in thread "main" javax.persistence.PersistenceException: java.lang.NullPointerException
at com.clarkparsia.empire.impl.EntityManagerImpl.cascadeOperation(EntityManagerImpl.java:533)
at com.clarkparsia.empire.impl.EntityManagerImpl.persist(EntityManagerImpl.java:375)
at com.ontology.test.Main.main(Main.java:73)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Caused by: java.lang.NullPointerException
at com.clarkparsia.empire.impl.EntityManagerImpl$MergeCascade.cascade(EntityManagerImpl.java:544)
at com.clarkparsia.empire.impl.EntityManagerImpl$CascadeAction.test(EntityManagerImpl.java:594)
at com.clarkparsia.empire.impl.EntityManagerImpl.cascadeOperation(EntityManagerImpl.java:530)
... 7 more

Cheers,

Xavier

Michael Grove

unread,
Mar 4, 2016, 6:56:46 AM3/4/16
to empir...@googlegroups.com
On Thu, Mar 3, 2016 at 4:05 PM, Xavier Ñauñay <xavie...@gmail.com> wrote:
Here is the stack trace, but there isn't more info:

Exception in thread "main" javax.persistence.PersistenceException: java.lang.NullPointerException
at com.clarkparsia.empire.impl.EntityManagerImpl.cascadeOperation(EntityManagerImpl.java:533)
at com.clarkparsia.empire.impl.EntityManagerImpl.persist(EntityManagerImpl.java:375)
at com.ontology.test.Main.main(Main.java:73)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Caused by: java.lang.NullPointerException
at com.clarkparsia.empire.impl.EntityManagerImpl$MergeCascade.cascade(EntityManagerImpl.java:544)
at com.clarkparsia.empire.impl.EntityManagerImpl$CascadeAction.test(EntityManagerImpl.java:594)
at com.clarkparsia.empire.impl.EntityManagerImpl.cascadeOperation(EntityManagerImpl.java:530)
... 7 more

After I fixed an incorrect check for language literals [1] the example ran just fine.

If you can isolate an example that reproduces the NPE, I can take a look.

Cheers,

Mike

Xavier Ñauñay

unread,
Mar 4, 2016, 9:34:58 AM3/4/16
to Empire
I pull your changes, but nothing appears to change, I have the test project code here:
Reply all
Reply to author
Forward
0 new messages