Salvatore Piccione
unread,Mar 14, 2012, 11:25:13 AM3/14/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to OrientDB ML
Hello,
I'm working with the latest OrientDB 1.0rc9-SNAPSHOT and I've noticed a strange behaviour of OServerAdmin.createDatabase(iDatabaseType,iStorageMode).
In the Javadoc, you state that iDatabaseType must be either graph or document but if I pass one of those values as argument(e.g. OServerAdmin.createDatabase("graph","local")), I get the following exception trace:
GRAVE: Cannot create the remote storage: corenet-partner-search-test
java.lang.IllegalArgumentException: Cannot create database: storage mode 'graph' is not supported.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.createException(OChannelBinary.java:396)
at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.handleStatus(OChannelBinary.java:349)
at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynch.beginResponse(OChannelBinaryAsynch.java:126)
at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynch.beginResponse(OChannelBinaryAsynch.java:58)
at com.orientechnologies.orient.client.remote.OStorageRemote.beginResponse(OStorageRemote.java:1412)
at com.orientechnologies.orient.client.remote.OStorageRemote.getResponse(OStorageRemote.java:1434)
at com.orientechnologies.orient.client.remote.OServerAdmin.createDatabase(OServerAdmin.java:183)
at it.txt.graph.OrientGraphCreator.createGraphDatabase(OrientGraphCreator.java:56)
at it.txt.graph.OrientGraphCreator.main(OrientGraphCreator.java:97)
com.orientechnologies.orient.core.exception.OStorageException: Cannot create the remote storage: corenet-partner-search-test
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.orientechnologies.common.log.OLogManager.error(OLogManager.java:117)
at com.orientechnologies.orient.client.remote.OServerAdmin.createDatabase(OServerAdmin.java:188)
at it.txt.graph.OrientGraphCreator.createGraphDatabase(OrientGraphCreator.java:56)
at it.txt.graph.OrientGraphCreator.main(OrientGraphCreator.java:97)
Caused by: java.lang.IllegalArgumentException: Cannot create database: storage mode 'graph' is not supported.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.createException(OChannelBinary.java:396)
at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.handleStatus(OChannelBinary.java:349)
at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynch.beginResponse(OChannelBinaryAsynch.java:126)
at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynch.beginResponse(OChannelBinaryAsynch.java:58)
at com.orientechnologies.orient.client.remote.OStorageRemote.beginResponse(OStorageRemote.java:1412)
at com.orientechnologies.orient.client.remote.OStorageRemote.getResponse(OStorageRemote.java:1434)
at com.orientechnologies.orient.client.remote.OServerAdmin.createDatabase(OServerAdmin.java:183)
... 2 more
The method works fine only if I pass as iDatabaseType a valid engine type (i.e. remote, local, or memory). What is wrong here: the name of the parameter and its Javadoc or the checks performed on that parameters (i.e. iDatabaseType is considered as an engine type rather than a database type)?
TIA,
Salvatore