orientechnologies / orientdb

OrientDB is the most versatile DBMS supporting Graph, Document, Reactive, Full-Text and Geospatial models in one Multi-Model product. OrientDB can run distributed (Multi-Master), supports SQL, ACID Transactions, Full-Text indexing and Reactive Queries.
https://orientdb.dev
Apache License 2.0
4.73k stars 871 forks source link

Error When using orientdb in container environment #7854

Closed kamakay closed 3 years ago

kamakay commented 6 years ago

Dear orientdb team,

I am dealing with a strange issue when using a containerized environment on rancher. I have two containers, the first based on orientdb image and the second with a simple java web app that works in this way. Docker Image is the latest available OrientDb Apis used with gradle are: implementation 'com.orientechnologies:orientdb-core:2.2.29' implementation 'com.orientechnologies:orientdb-client:2.2.29' implementation 'com.orientechnologies:orientdb-enterprise:2.1.25' implementation 'com.orientechnologies:orientdb-graphdb:2.2.29'

OrientGraph graph = new OrientGraph("remote:orientdb1/MyDB", "root", "foo"); System.out.println("Vertices are:" + Lists.newArrayList(graph.getVertices().iterator()).size());

When I start the java web app container I receive this error

Exception in thread "main" java.lang.NoSuchMethodError: com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.readVersion()I at com.orientechnologies.orient.client.remote.OStorageRemote$9.execute(OStorageRemote.java:719) at com.orientechnologies.orient.client.remote.OStorageRemote$9.execute(OStorageRemote.java:691) at com.orientechnologies.orient.client.remote.OStorageRemote$2.execute(OStorageRemote.java:200) at com.orientechnologies.orient.client.remote.OStorageRemote.baseNetworkOperation(OStorageRemote.java:245) at com.orientechnologies.orient.client.remote.OStorageRemote.networkOperationRetry(OStorageRemote.java:197) at com.orientechnologies.orient.client.remote.OStorageRemote.networkOperation(OStorageRemote.java:208) at com.orientechnologies.orient.client.remote.OStorageRemote.readRecord(OStorageRemote.java:691) at com.orientechnologies.orient.core.config.OStorageConfiguration.load(OStorageConfiguration.java:219) at com.orientechnologies.orient.client.remote.OStorageRemote.open(OStorageRemote.java:362) at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.open(ODatabaseDocumentTx.java:259) at com.tinkerpop.blueprints.impls.orient.OrientBaseGraph.openOrCreate(OrientBaseGraph.java:1918) at com.tinkerpop.blueprints.impls.orient.OrientBaseGraph.(OrientBaseGraph.java:162) at com.tinkerpop.blueprints.impls.orient.OrientTransactionalGraph.(OrientTransactionalGraph.java:102) at com.tinkerpop.blueprints.impls.orient.OrientTransactionalGraph.(OrientTransactionalGraph.java:98) at com.tinkerpop.blueprints.impls.orient.OrientGraph.(OrientGraph.java:103) at roberto.Application.main(Application.java:12)

Here "orientdb1" is the name of container I've created an linked to web app container.

When I execute my code outside the web app container, and using the ip of the container, I can connect without any problem.

Can you help me to figure out how manage this issue?

Thanks Roberto

kamakay commented 6 years ago

Solved by myself: I need to remove this dependency that catch different orientdb core version (2.2.25) implementation 'com.orientechnologies:orientdb-enterprise:2.1.25'