neo4j-contrib / neo4j-tinkerpop-api-impl

Implementation of Apache Licensed Neo4j API for Tinkerpop3
Other
24 stars 15 forks source link

Update to Neo4j 3.2.2 - https://issues.apache.org/jira/browse/TINKERPOP-1692 #6

Closed robertdale closed 7 years ago

robertdale commented 7 years ago

It would be great if we could get an update to the latest Neo4j version which is 3.1.2 as of this writing. Would like to depend on this for TinkerPop 3.3. See https://issues.apache.org/jira/browse/TINKERPOP-1692

workingDog commented 7 years ago

yes it would be great to update. I also would like to use this for Neo4j-3.2.1

robertdale commented 7 years ago

@workingDog I actually meant to write 3.2.1. Thanks for poking the issue.

jexp commented 7 years ago

Hey @robertdale

does this look ok to you? I also updated TP to 3.2.5. Then I'd release these two versions to maven central. Could you try building & using these locally with an up to date tinkerpop build?

https://github.com/neo4j-contrib/neo4j-tinkerpop-api-impl/tree/3.1 https://github.com/neo4j-contrib/neo4j-tinkerpop-api-impl/tree/3.2

workingDog commented 7 years ago

with: https://github.com/neo4j-contrib/neo4j-tinkerpop-api-impl/tree/3.2 I followed the instructions and this is the result:

build tinkerpop3 branch with neo4j-gremlin updated

git clone https://github.com/jexp/incubator-tinkerpop ....ok cd incubator-tinkerpop ....ok git checkout neo4j-gremlin ....ok

mvn clean install -DskipTests ....

[WARNING] COMPILATION WARNING : [INFO] ------------------------------------------------------------- [WARNING] /Users/ringo/test3/incubator-tinkerpop/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/Neo4jVertexProperty.java: Some input files use unchecked or unsafe operations. [WARNING] /Users/ringo/test3/incubator-tinkerpop/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/Neo4jVertexProperty.java: Recompile with -Xlint:unchecked for details. [INFO] 2 warnings [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] /Users/ringo/test3/incubator-tinkerpop/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/step/sideEffect/Neo4jGraphStep.java:[136,57] no suitable method found for findNodes(java.lang.String,java.lang.Object) method org.neo4j.tinkerpop.api.Neo4jGraphAPI.findNodes(java.lang.String) is not applicable (actual and formal argument lists differ in length) method org.neo4j.tinkerpop.api.Neo4jGraphAPI.findNodes(java.lang.String,java.lang.String,java.lang.Object) is not applicable (actual and formal argument lists differ in length) [ERROR] /Users/ringo/test3/incubator-tinkerpop/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/step/sideEffect/Neo4jGraphStep.java:[146,57] cannot find symbol symbol: method findRelationships(java.lang.String,java.lang.Object) location: interface org.neo4j.tinkerpop.api.Neo4jGraphAPI [ERROR] /Users/ringo/test3/incubator-tinkerpop/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/step/sideEffect/Neo4jGraphStep.java:[182,26] cannot find symbol symbol: method hasAutoIndex(boolean,java.lang.String) location: variable baseGraph of type org.neo4j.tinkerpop.api.Neo4jGraphAPI [INFO] 3 errors [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] Apache TinkerPop: A Graph Computing Framework ...... SUCCESS [ 19.006 s] [INFO] Gremlin Shaded: Shades of Commonly Used Dependencies SUCCESS [ 2.318 s] [INFO] Gremlin Core: The Primary Components of TinkerPop3 . SUCCESS [ 18.860 s] [INFO] Gremlin Test: Gremlin Structure and Process Test Suite SUCCESS [ 10.550 s] [INFO] Gremlin Groovy: Gremlin for the Groovy Language .... SUCCESS [ 15.096 s] [INFO] Gremlin Groovy Test: Gremlin Structure and Process Test Suite SUCCESS [ 4.041 s] [INFO] TinkerGraph Gremlin: The Reference Implementation of TinkerPop3 SUCCESS [ 1.877 s] [INFO] Neo4j Gremlin: An Implementation of TinkerPop3 for the Neo4j Graph Database FAILURE [ 1.293 s] [INFO] Hadoop Gremlin: An Implementation of TinkerPop3 for Hadoop SKIPPED [INFO] Gremlin Driver: Connect to Gremlin Server with Java SKIPPED [INFO] Gremlin Server: Gremlin on the Server .............. SKIPPED [INFO] Gremlin Console: Gremlin Groovy REPL ............... SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 01:23 min [INFO] Finished at: 2017-07-11T12:55:04+09:00 [INFO] Final Memory: 52M/430M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project neo4j-gremlin: Compilation failure: Compilation failure: [ERROR] /Users/ringo/test3/incubator-tinkerpop/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/step/sideEffect/Neo4jGraphStep.java:[136,57] no suitable method found for findNodes(java.lang.String,java.lang.Object) [ERROR] method org.neo4j.tinkerpop.api.Neo4jGraphAPI.findNodes(java.lang.String) is not applicable [ERROR] (actual and formal argument lists differ in length) [ERROR] method org.neo4j.tinkerpop.api.Neo4jGraphAPI.findNodes(java.lang.String,java.lang.String,java.lang.Object) is not applicable [ERROR] (actual and formal argument lists differ in length) [ERROR] /Users/ringo/test3/incubator-tinkerpop/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/step/sideEffect/Neo4jGraphStep.java:[146,57] cannot find symbol [ERROR] symbol: method findRelationships(java.lang.String,java.lang.Object) [ERROR] location: interface org.neo4j.tinkerpop.api.Neo4jGraphAPI [ERROR] /Users/ringo/test3/incubator-tinkerpop/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/step/sideEffect/Neo4jGraphStep.java:[182,26] cannot find symbol [ERROR] symbol: method hasAutoIndex(boolean,java.lang.String) [ERROR] location: variable baseGraph of type org.neo4j.tinkerpop.api.Neo4jGraphAPI [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn -rf :neo4j-gremlin

build neo4j-tinkerpop-api

git clone github.com/neo4j-contrib/neo4j-tinkerpop-api fatal: repository 'github.com/neo4j-contrib/neo4j-tinkerpop-api' does not exist

build neo4j-tinkerpop-api-impl

git clone github.com/neo4j-contrib/neo4j-tinkerpop-api-binding fatal: repository 'github.com/neo4j-contrib/neo4j-tinkerpop-api-binding' does not exist

workingDog commented 7 years ago

Update, building neo4j-tinkerpop-api-impl

mvn clean install Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0 [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for org.neo4j:neo4j-tinkerpop-api-impl:jar:0.6-3.2.2 [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.neo4j:neo4j-tinkerpop-api:jar -> duplicate declaration of version 0.1 @ line 52, column 21 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [INFO]
[INFO] ------------------------------------------------------------------------ [INFO] Building Neo4j Tinkerpop API Implementation 0.6-3.2.2 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ neo4j-tinkerpop-api-impl --- [INFO] Deleting /Users/ringo/test3/neo4j-tinkerpop-api-impl/target [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ neo4j-tinkerpop-api-impl --- [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory /Users/ringo/test3/neo4j-tinkerpop-api-impl/src/main/resources [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ neo4j-tinkerpop-api-impl --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 8 source files to /Users/ringo/test3/neo4j-tinkerpop-api-impl/target/classes [WARNING] /Users/ringo/test3/neo4j-tinkerpop-api-impl/src/main/java/org/neo4j/tinkerpop/api/impl/Neo4jFactoryImpl.java: /Users/ringo/test3/neo4j-tinkerpop-api-impl/src/main/java/org/neo4j/tinkerpop/api/impl/Neo4jFactoryImpl.java uses or overrides a deprecated API. [WARNING] /Users/ringo/test3/neo4j-tinkerpop-api-impl/src/main/java/org/neo4j/tinkerpop/api/impl/Neo4jFactoryImpl.java: Recompile with -Xlint:deprecation for details. [WARNING] /Users/ringo/test3/neo4j-tinkerpop-api-impl/src/main/java/gremlin/Gremlin.java: /Users/ringo/test3/neo4j-tinkerpop-api-impl/src/main/java/gremlin/Gremlin.java uses unchecked or unsafe operations. [WARNING] /Users/ringo/test3/neo4j-tinkerpop-api-impl/src/main/java/gremlin/Gremlin.java: Recompile with -Xlint:unchecked for details. [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ neo4j-tinkerpop-api-impl --- [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory /Users/ringo/test3/neo4j-tinkerpop-api-impl/src/test/resources [INFO] [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ neo4j-tinkerpop-api-impl --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 3 source files to /Users/ringo/test3/neo4j-tinkerpop-api-impl/target/test-classes [WARNING] /Users/ringo/test3/neo4j-tinkerpop-api-impl/src/test/java/org/neo4j/tinkerpop/api/impl/BasicAPITest.java: /Users/ringo/test3/neo4j-tinkerpop-api-impl/src/test/java/org/neo4j/tinkerpop/api/impl/BasicAPITest.java uses unchecked or unsafe operations. [WARNING] /Users/ringo/test3/neo4j-tinkerpop-api-impl/src/test/java/org/neo4j/tinkerpop/api/impl/BasicAPITest.java: Recompile with -Xlint:unchecked for details. [INFO] [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ neo4j-tinkerpop-api-impl --- [INFO] Surefire report directory: /Users/ringo/test3/neo4j-tinkerpop-api-impl/target/surefire-reports


T E S T S

Running gremlin.GremlinTest Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.033 sec Running org.neo4j.tinkerpop.api.impl.BasicAPITest Creating and reading sample graph 10000 times took 6686 ms, 0.67 ms/run. Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 12.566 sec Running org.neo4j.tinkerpop.api.impl.Neo4jFactoryImplTest Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 40.405 sec <<< FAILURE! testCreateHighlyAvailableGraphDatabase(org.neo4j.tinkerpop.api.impl.Neo4jFactoryImplTest) Time elapsed: 40.401 sec <<< ERROR! java.lang.RuntimeException: Error starting org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory, /var/folders/y1/wkxrfk8j07g0pzgxczp92vm00000gn/T/tp-test-db4779065934043086257 at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:209) at org.neo4j.kernel.ha.HighlyAvailableGraphDatabase.(HighlyAvailableGraphDatabase.java:50) at org.neo4j.graphdb.factory.HighlyAvailableGraphDatabaseFactory$1.newDatabase(HighlyAvailableGraphDatabaseFactory.java:71) at org.neo4j.graphdb.factory.GraphDatabaseBuilder.newGraphDatabase(GraphDatabaseBuilder.java:193) at org.neo4j.tinkerpop.api.impl.Neo4jFactoryImpl.newGraphDatabase(Neo4jFactoryImpl.java:46) at org.neo4j.tinkerpop.api.impl.Neo4jFactoryImplTest.testCreateHighlyAvailableGraphDatabase(Neo4jFactoryImplTest.java:37) 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 org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112) 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 org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75) Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.cluster.client.ClusterJoin@4940a039' was successfully initialized, but failed to start. Please see the attached cause exception "Conversation-response mapping: {1/13#=ResponseFuture{conversationId='1/13#', initiatedByMessageType=join, response=null}}". at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:444) at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107) at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:434) at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107) at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:205) ... 34 more Caused by: java.util.concurrent.TimeoutException: Conversation-response mapping: {1/13#=ResponseFuture{conversationId='1/13#', initiatedByMessageType=join, response=null}} at org.neo4j.cluster.statemachine.StateMachineProxyFactory$ResponseFuture.get(StateMachineProxyFactory.java:315) at org.neo4j.cluster.client.ClusterJoin.joinByConfig(ClusterJoin.java:143) at org.neo4j.cluster.client.ClusterJoin.start(ClusterJoin.java:82) at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:434) ... 38 more

Results :

Tests in error: testCreateHighlyAvailableGraphDatabase(org.neo4j.tinkerpop.api.impl.Neo4jFactoryImplTest): Error starting org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory, /var/folders/y1/wkxrfk8j07g0pzgxczp92vm00000gn/T/tp-test-db4779065934043086257

Tests run: 5, Failures: 0, Errors: 1, Skipped: 0

[INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 59.901 s [INFO] Finished at: 2017-07-11T14:15:13+09:00 [INFO] Final Memory: 43M/385M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project neo4j-tinkerpop-api-impl: There are test failures. [ERROR] [ERROR] Please refer to /Users/ringo/test3/neo4j-tinkerpop-api-impl/target/surefire-reports for the individual test results. [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

robertdale commented 7 years ago

@jexp I won't be able to get to this for awhile but I did build the impl and let the tinkerpop test suite run over night and got some test suite errors. I'm pretty sure it will need my changes I've made in my neo4j-3.0 branch. I did notice that 3.2.2 seems to have changed GraphFactory class. Not sure if anything else is the same as above.

@workingDog Those instructions may be out of date. You shouldn't need to build api because I don't see any changes to it. Build the impl locally and install it so the next part can find it. Next look at my two branches I have updated. I updated the neo4j deps and added some excludes.

https://github.com/robertdale/tinkerpop/tree/neo4j-3.1.5 https://github.com/robertdale/tinkerpop/tree/neo4j-3.2.2

Then also look at changes I made to the test suite to make 3.0 pass at

https://github.com/robertdale/tinkerpop/tree/neo4j-3.0

You may be able to just cherry pick those.

To build neo4j-gremlin and run all tests, do
mvn clean install process-resources -DskipIntegrationTests=false -DincludeNeo4j -Dmaven.javadoc.skip=true

jexp commented 7 years ago

I'll work through the gremlin errors and will send a PR to the TP project .

Michael

robertdale commented 7 years ago

Release made:

<dependency>
    <groupId>org.neo4j</groupId>
    <artifactId>neo4j-tinkerpop-api-impl</artifactId>
    <version>0.7-3.2.3</version>
</dependency>