larusba / doc2graph

Convert JSON from document-oriented DB to neo4j graph
Apache License 2.0
18 stars 4 forks source link

couchbase-neo4j-connector Compiling Error #7

Open joelrivas opened 6 years ago

joelrivas commented 6 years ago

After installing the dpc-client last version (0.19.0) inside of the couchbase-neo4j-connector folder, I got an error when executing mvn package:

[INFO] Scanning for projects...
[INFO] 
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Couchbase-Neo4j Connector - DCP client 1.0.0
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for com.couchbase.client:dcp-client:jar:0.8.0-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.221 s
[INFO] Finished at: 2018-07-31T12:54:26-06:00
[INFO] Final Memory: 6M/34M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project neo4j-connector: Could not resolve dependencies for project com.couchbase.client:neo4j-connector:jar:1.0.0: Could not find artifact com.couchbase.client:dcp-client:jar:0.8.0-SNAPSHOT -> [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/DependencyResolutionException

And using the dpc-client 0.8.0 version results in the same error. How or where should the dpc-client should be installed?

omarlarus commented 6 years ago

Hi @joelrivas , it seems that you have some trouble with this dependency:

<dependency>
   <groupId>com.couchbase.client</groupId>
   <artifactId>dcp-client</artifactId>
   <version>0.8.0-SNAPSHOT</version> 
</dependency>

When was developed there wasn't a stable version of that, so you can try to change the POM file with

<dependency>
    <groupId>com.couchbase.client</groupId>
    <artifactId>dcp-client</artifactId>
    <version>0.8.0</version>
</dependency>

We cannot ensure that it works with newer version of dcp client.

joelrivas commented 6 years ago

Hi @omarlarus,

I changed the dependency but I got a new error.

[INFO] Scanning for projects...
[INFO] 
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Couchbase-Neo4j Connector - DCP client 1.0.0
[INFO] ------------------------------------------------------------------------
Downloading: http://repo.maven.apache.org/maven2/com/couchbase/client/dcp-client/0.8.0/dcp-client-0.8.0.pom
Downloaded: http://repo.maven.apache.org/maven2/com/couchbase/client/dcp-client/0.8.0/dcp-client-0.8.0.pom (8 KB at 22.4 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/com/couchbase/client/dcp-client/0.8.0/dcp-client-0.8.0.jar
Downloaded: http://repo.maven.apache.org/maven2/com/couchbase/client/dcp-client/0.8.0/dcp-client-0.8.0.jar (210 KB at 622.4 KB/sec)
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ neo4j-connector ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ neo4j-connector ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 7 source files to /home/joel/Documentos/Jonajo/swap/neo4j/doc2graph/couchbase-neo4j-connector/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /home/joel/Documentos/Jonajo/swap/neo4j/doc2graph/couchbase-neo4j-connector/src/main/java/com/couchbase/client/neo4j/listener/Neo4jControlEventHandler.java:[69,47] cannot find symbol
  symbol:   class CompletableSubscriber
  location: class rx.Completable
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.236 s
[INFO] Finished at: 2018-08-01T17:40:54-06:00
[INFO] Final Memory: 16M/57M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:compile (default-compile) on project neo4j-connector: Compilation failure
[ERROR] /home/joel/Documentos/Jonajo/swap/neo4j/doc2graph/couchbase-neo4j-connector/src/main/java/com/couchbase/client/neo4j/listener/Neo4jControlEventHandler.java:[69,47] cannot find symbol
[ERROR] symbol:   class CompletableSubscriber
[ERROR] location: class rx.Completable

Do I have to install neo4j-json first? or those versions of neo4j and couchbase? I'm really confused right now on how to install and use this. Could you give me a more guided explanation on how to proceed with the installation?

omarlarus commented 6 years ago

Hi @joelrivas , this project is in an early stage. However, I tried with the 0.7.0 version and it compiles. The DCP client 0.8.0 version changed something from the 0.8.0-SNAPSHOT, so you had that error. Re-try with this version, to compile and package and let me know if it works.

                <dependency>
                        <groupId>com.couchbase.client</groupId>
                        <artifactId>dcp-client</artifactId>
                        <version>0.7.0</version>
                </dependency>

Thanks.

joelrivas commented 6 years ago

@omarlarus Thanks a lot!! It works!! :)

joelrivas commented 6 years ago

Got a new error running the connector:

java -jar target/neo4j-connector-1.0.0-jar-with-dependencies.jar -Dconf.file=neo4j-sync.propeties
Exception in thread "main" java.lang.NullPointerException: Use: -Dconf.file=<configuration_file>
    at org.apache.commons.lang3.Validate.notBlank(Validate.java:451)
    at com.couchbase.client.neo4j.Neo4jSync.main(Neo4jSync.java:50)

Do this connector work only for neo4j 3.0.X and couchbase 4.5.X? or as well with new versions?

omarlarus commented 6 years ago

Hi @joelrivas , the project was tested only for those versions. There's a typo on the documentation, please check the name of the properties file (neo4j-sync.propeties -> neo4j-sync.properties) and be sure that is in the current directory when you run the command.