Uploaded my test code on https://github.com/jonam/SpringDataGraphSample
If I uncomment line 85 in GraphEngineTest.java, it breaks, as the relationships are not being sent in the format that I can expect. I am currently using <spring-data-neo4j.version>2.1.0.RC2</spring-data-neo4j.version>. But this did not work with 2.0.1.RELEASE either. Also tried tweaking around with versions of other packages like spring, and neo4j but did not help.
The error I see is below:
-------------------------------------------------------------------------------
Test set: com.graph.bio.GraphEngineTest
-------------------------------------------------------------------------------
Tests run: 4, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 12.256 sec <<< FAILURE!
proteinRelationship(com.graph.bio.GraphEngineTest) Time elapsed: 0.585 sec <<< ERROR!
java.lang.ClassCastException: org.springframework.data.neo4j.fieldaccess.GraphBa ckedEntityIterableWrapper cannot be cast to com.graph.bio.domain.ProteinInteraction
at com.graph.bio.GraphEngineTest.proteinRelationship( GraphEngineTest.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runRefle ctiveCall(FrameworkMethod.java:45)
at org.junit.internal.runners.model.ReflectiveCallabl e.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExpl osively(FrameworkMethod.java:42)
at org.junit.internal.runners.statements.InvokeMethod .evaluate(InvokeMethod.java:20)
at org.springframework.test.context.junit4.statements .RunBeforeTestMethodCallbacks.evaluate(RunBeforeTe stMethodCallbacks.java:74)
at org.springframework.test.context.junit4.statements .RunAfterTestMethodCallbacks.evaluate(RunAfterTest MethodCallbacks.java:83)
at org.springframework.test.context.junit4.statements .SpringRepeat.evaluate(SpringRepeat.java:72)
at org.springframework.test.context.junit4.SpringJUni t4ClassRunner.runChild(SpringJUnit4ClassRunner.jav a:231)
at org.junit.runners.BlockJUnit4ClassRunner.runChild( BlockJUnit4ClassRunner.java:47)
at org.junit.runners.ParentRunner$3.run(ParentRunner. java:231)
at org.junit.runners.ParentRunner$1.schedule(ParentRu nner.java:60)
at org.junit.runners.ParentRunner.runChildren(ParentR unner.java:229)
at org.junit.runners.ParentRunner.access$000(ParentRu nner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRu nner.java:222)
at org.springframework.test.context.junit4.statements .RunBeforeTestClassCallbacks.evaluate(RunBeforeTes tClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements .RunAfterTestClassCallbacks.evaluate(RunAfterTestC lassCallbacks.java:71)
at org.junit.runners.ParentRunner.run(ParentRunner.ja va:300)
at org.springframework.test.context.junit4.SpringJUni t4ClassRunner.run(SpringJUnit4ClassRunner.java:174 )
at org.apache.maven.surefire.junit4.JUnit4TestSet.exe cute(JUnit4TestSet.java:53)
at org.apache.maven.surefire.junit4.JUnit4Provider.ex ecuteTestSet(JUnit4Provider.java:123)
at org.apache.maven.surefire.junit4.JUnit4Provider.in voke(JUnit4Provider.java:104)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.util.ReflectionUtils.inv okeMethodWithArray(ReflectionUtils.java:164)
at org.apache.maven.surefire.booter.ProviderFactory$P roviderProxy.invoke(ProviderFactory.java:110)
at org.apache.maven.surefire.booter.SurefireStarter.i nvokeProvider(SurefireStarter.java:175)
at org.apache.maven.surefire.booter.SurefireStarter.r unSuitesInProcessWhenForked(SurefireStarter.java:1 07)
at org.apache.maven.surefire.booter.ForkedBooter.main (ForkedBooter.java:68)


Reply With Quote
