Java document API when database uses a non-standard remote port

32 views
Skip to first unread message

Jon Swinth

unread,
Dec 23, 2016, 9:56:47 PM12/23/16
to OrientDB
Hi All,

I have more than one instance of OrientDB on a server so the second instance runs on different ports, 34xx instead of 24xx.  This works fine for the REST API and console but the Java document API does not seem to accept the port specification.

I wanted to verify that I'm trying to connect correctly prior to assuming it will not work.  We are currently using version 2.1.16 (DB and API) and are trying to migrate to 2.2.x.

String orientUrl = "remote:solapp13:3424/PortalDS" ;
com
.orientechnologies.orient.core.db.document.ODatabaseDocumentTx database = new com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx(orientUrl).open(username,password);

Here is the useful parts of the stack trace:

com.orientechnologies.orient.core.exception.ODatabaseException: Cannot open database url=remote:solapp13:3424/PortalDS
  at com
.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.open(ODatabaseDocumentTx.java:281)
...
Caused by: java.lang.NullPointerException: Name is null
 at java
.lang.Enum.valueOf(Enum.java:235)
 at com
.orientechnologies.orient.core.config.OStorageClusterConfiguration$STATUS.valueOf(OStorageClusterConfiguration.java:24)
 at com
.orientechnologies.orient.core.config.OStorageConfiguration.fromStream(OStorageConfiguration.java:263)
 at com
.orientechnologies.orient.core.config.OStorageConfiguration.load(OStorageConfiguration.java:137)
 at com
.orientechnologies.orient.client.remote.OStorageRemote.open(OStorageRemote.java:223)
 at com
.orientechnologies.orient.client.remote.OStorageRemoteThread.open(OStorageRemoteThread.java:94)
 at com
.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.open(ODatabaseDocumentTx.java:248)
 
... 97 more


Thanks in advance.

Jon

Luca Garulli

unread,
Dec 27, 2016, 4:20:32 AM12/27/16
to OrientDB
Hi Jon,

Did you replaced the libraries in the client from 2.1.x to 2.2.x?

Best Regards,

Luca Garulli
Founder & CEO

--

---
You received this message because you are subscribed to the Google Groups "OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orient-database+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages