[Neo4j] [SDN] [Gremlin] Trying to return relationships from a Gremlin query with SDN

5 views
Skip to first unread message

Marc de Verdelhan

unread,
Mar 26, 2012, 3:49:22 PM3/26/12
to ne...@googlegroups.com
Hello dear graphistas,

I'm trying to execute a Gremlin query from a SDN repository but I get the following error:

-------------------------------------------------------------------------------
Test set: com.mygroup.myapp.service.UserProjectControllerTest
-------------------------------------------------------------------------------
Tests run: 4, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.619 sec <<< FAILURE!
testAddOrUpdateUserProject(com.mygroup.myapp.service.UserProjectControllerTest)  Time elapsed: 0.351 sec  <<< ERROR!
org.springframework.dao.InvalidDataAccessResourceUsageException: Error executing statement g.v(project).in('CREATED').outE('PARTICIPATES').filter{it.metaProjectId == g.v(project).objectId}; nested exception is java.lang.RuntimeException: Error executing statement g.v(project).in('CREATED').outE('PARTICIPATES').filter{it.metaProjectId == g.v(project).objectId}
    at org.springframework.data.neo4j.support.query.GremlinQueryEngine.query(GremlinQueryEngine.java:50)
    at org.springframework.data.neo4j.repository.query.GraphRepositoryQuery.dispatchQuery(GraphRepositoryQuery.java:91)
    at org.springframework.data.neo4j.repository.query.GraphRepositoryQuery.execute(GraphRepositoryQuery.java:70)
    at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:302)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:155)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
    at $Proxy44.findParticipations(Unknown Source)
    at com.mygroup.myapp.service.UserProjectControllerTest.testAddOrUpdateUserProject(UserProjectControllerTest.java:142)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    ...


I pasted my source code here: http://paste.pocoo.org/show/571667/
FYI: Gremlin 1.4, SDN 2.1.0, Spring 3.0.7, Neo4j 1.6.1

I think the problem arises because I try to return relationships from the request (because the other query, which returns NodeEntities, works fine).

Does anyone would have an idea?

Cheers,

MV

Michael Hunger

unread,
Mar 26, 2012, 5:35:03 PM3/26/12
to ne...@googlegroups.com
Can you please share the full stack-trace? Normally it should work.

Could you try to use Set<Relationship> as return type (just to check).


Thanks

Marc de Verdelhan

unread,
Mar 27, 2012, 3:19:25 AM3/27/12
to ne...@googlegroups.com
Erf. It seems  wasn't fully awake last night. I passed a null object to the query.

Thank you very much Michael for throwing light on my problem (which was not to have read the stack-trace until the end =/).

Cheers,

MV
Reply all
Reply to author
Forward
0 new messages