arjun dhar
2018-05-14 05:23:11 UTC
Hi,
*Summary*
Am on OrientDB 3.0.0 ; and am trying to avoid the use of Depreicated API
like: ODatabaseDocumentTx
However, when I replace it with
com.orientechnologies.orient.core.db.OrientDB ; for the same configs that
otherwise work fine it blows up.
Details below...
*Configuration*
```
odb.url=memory:neurosys_orientdb_odb
odb.username=admin
odb.password=admin
odb.maxPartitionSize=2
odb.maxPoolSize=10
```
*Spring Configs *using ODatabaseDocumentTx that work
```
<bean id="*dataSourceOdb*"
class="com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx"
init-method="create">
<constructor-arg value = "${odb.url}"/>
</bean>
<bean id="connectionPoolDataSourceOdb"
class="com.orientechnologies.orient.core.db.OPartitionedDatabasePool">
<constructor-arg value = "${odb.url}" index="0"/>
<constructor-arg value = "${odb.username}" index="1"/>
<constructor-arg value = "${odb.password}" index="2"/>
<constructor-arg value = "${odb.maxPartitionSize}" index="3"/>
<constructor-arg value = "${odb.maxPoolSize}" index="4"/>
</bean>
```
*Spring Configs *using com.orientechnologies.orient.core.db.OrientDB that
does *not *work
Simply replacing the `*dataSourceOdb*` bean.
```
<bean id="dataSourceOdbNew"
class="com.orientechnologies.orient.core.db.OrientDB">
<constructor-arg value = "${odb.url}"/>
<constructor-arg value = "${odb.username}" />
<constructor-arg value = "${odb.password}" />
<constructor-arg><null /></constructor-arg>
</bean>
```
*Exception thrown*
```
com.orientechnologies.orient.core.exception.ODatabaseException: Cannot open
database 'neurosys_orientdb_odb'
at
com.orientechnologies.orient.core.db.OrientDBEmbedded.open(OrientDBEmbedded.java:140)
at
com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.open(ODatabaseDocumentTx.java:908)
at
com.orientechnologies.orient.core.db.OPartitionedDatabasePool$DatabaseDocumentTxPooled.internalOpen(OPartitionedDatabasePool.java:441)
at
com.orientechnologies.orient.core.db.OPartitionedDatabasePool.openDatabase(OPartitionedDatabasePool.java:306)
at
com.orientechnologies.orient.core.db.OPartitionedDatabasePool.acquire(OPartitionedDatabasePool.java:261)
...
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: com.orientechnologies.orient.core.exception.OStorageException:
Cannot open the storage 'neurosys_orientdb_odb' because it does not exist
in path: D:\orientdb\./neurosys_orientdb_odb
at
com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.open(OAbstractPaginatedStorage.java:267)
at
com.orientechnologies.orient.core.db.OrientDBEmbedded.open(OrientDBEmbedded.java:131)
... 34 more
```
*Possible cause*
Looks like the path is getting messed up and assuming unix convention path
even for an in memory DB. Am on windows, but I dont see why that anyway
matters for an in-memory DB, plus it works with the deprecated one. *So I
assume this to be a bug, if not please let me know what Im missing.*
thanks,
Arjun
*Summary*
Am on OrientDB 3.0.0 ; and am trying to avoid the use of Depreicated API
like: ODatabaseDocumentTx
However, when I replace it with
com.orientechnologies.orient.core.db.OrientDB ; for the same configs that
otherwise work fine it blows up.
Details below...
*Configuration*
```
odb.url=memory:neurosys_orientdb_odb
odb.username=admin
odb.password=admin
odb.maxPartitionSize=2
odb.maxPoolSize=10
```
*Spring Configs *using ODatabaseDocumentTx that work
```
<bean id="*dataSourceOdb*"
class="com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx"
init-method="create">
<constructor-arg value = "${odb.url}"/>
</bean>
<bean id="connectionPoolDataSourceOdb"
class="com.orientechnologies.orient.core.db.OPartitionedDatabasePool">
<constructor-arg value = "${odb.url}" index="0"/>
<constructor-arg value = "${odb.username}" index="1"/>
<constructor-arg value = "${odb.password}" index="2"/>
<constructor-arg value = "${odb.maxPartitionSize}" index="3"/>
<constructor-arg value = "${odb.maxPoolSize}" index="4"/>
</bean>
```
*Spring Configs *using com.orientechnologies.orient.core.db.OrientDB that
does *not *work
Simply replacing the `*dataSourceOdb*` bean.
```
<bean id="dataSourceOdbNew"
class="com.orientechnologies.orient.core.db.OrientDB">
<constructor-arg value = "${odb.url}"/>
<constructor-arg value = "${odb.username}" />
<constructor-arg value = "${odb.password}" />
<constructor-arg><null /></constructor-arg>
</bean>
```
*Exception thrown*
```
com.orientechnologies.orient.core.exception.ODatabaseException: Cannot open
database 'neurosys_orientdb_odb'
at
com.orientechnologies.orient.core.db.OrientDBEmbedded.open(OrientDBEmbedded.java:140)
at
com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.open(ODatabaseDocumentTx.java:908)
at
com.orientechnologies.orient.core.db.OPartitionedDatabasePool$DatabaseDocumentTxPooled.internalOpen(OPartitionedDatabasePool.java:441)
at
com.orientechnologies.orient.core.db.OPartitionedDatabasePool.openDatabase(OPartitionedDatabasePool.java:306)
at
com.orientechnologies.orient.core.db.OPartitionedDatabasePool.acquire(OPartitionedDatabasePool.java:261)
...
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: com.orientechnologies.orient.core.exception.OStorageException:
Cannot open the storage 'neurosys_orientdb_odb' because it does not exist
in path: D:\orientdb\./neurosys_orientdb_odb
at
com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.open(OAbstractPaginatedStorage.java:267)
at
com.orientechnologies.orient.core.db.OrientDBEmbedded.open(OrientDBEmbedded.java:131)
... 34 more
```
*Possible cause*
Looks like the path is getting messed up and assuming unix convention path
even for an in memory DB. Am on windows, but I dont see why that anyway
matters for an in-memory DB, plus it works with the deprecated one. *So I
assume this to be a bug, if not please let me know what Im missing.*
thanks,
Arjun
--
---
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+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
---
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+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.