wisdom-framework / wisdom-orientdb

Wisdom OrientDB integration
Apache License 2.0
2 stars 3 forks source link

Remote database setup problem with version 0.2.7-SNAPSHOT #30

Closed ghost closed 8 years ago

ghost commented 9 years ago

Hi,

I use the last version of wisdom-orientdb-object but I've encountered some problem with the latest snapshot version. At the beginning of the week my orientdb setup was running correctly, but now I got error at runtime.

So I tried to check with a fresh copy of the sample and the error occurs as well:

it works when it use the memory database, it works (with an error at runtime) using the plocal database but fail when using the remote database setup. I use the 2.0.11 OrientDb version on mac OSX.

Here is my stack traces for the plocal database (the sample is working but i got this error at launch):

[INFO]   o.w.o.r.OrientDbCrudProvider {[iPOJO] pool-1-thread-1} - OrientDB Database configuration found for /todolist/model : WOrientConf{alias='test', url='plocal:database/todolist', user='admin', nameSpace='[todolist.model]', autolazyloading=true', txtype=OPTIMISTIC, poolmin='1', poolmax='20'} 
[ERROR]  o.w.o.r.OrientDbRepoCommandTracker {[iPOJO] pool-1-thread-1} - Cannot create OrientDBRepository for db test 
com.orientechnologies.orient.core.storage.ORecordDuplicatedException: Cannot index record OUser{name:admin,password:{SHA-256}8C6976E5B5410415BDE908BD4DEE15DFB167A9C873FC4BB8A81F6F2AB448A918,status:ACTIVE,roles:[1]}: found duplicated key 'admin' in index 'OUser.name' previously assigned to the record #5:0
    at com.orientechnologies.orient.core.index.OIndexTxAwareOneValue.checkEntry(OIndexTxAwareOneValue.java:225) ~[na:na]
    at com.orientechnologies.orient.core.index.OClassIndexManager.checkIndexedPropertiesOnCreation(OClassIndexManager.java:324) ~[na:na]
    at com.orientechnologies.orient.core.index.OClassIndexManager.checkIndexes(OClassIndexManager.java:568) ~[na:na]
    at com.orientechnologies.orient.core.index.OClassIndexManager.onRecordBeforeCreate(OClassIndexManager.java:393) ~[na:na]
    at com.orientechnologies.orient.core.hook.ODocumentHookAbstract.onTrigger(ODocumentHookAbstract.java:226) ~[na:na]
    at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.callbackHooks(ODatabaseDocumentTx.java:1030) ~[na:na]
    at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.executeSaveRecord(ODatabaseDocumentTx.java:1836) ~[na:na]
    at com.orientechnologies.orient.core.tx.OTransactionNoTx.saveRecord(OTransactionNoTx.java:150) ~[com.orientechnologies.orientdb.core-2.1-rc5.jar:2.1-rc5]
    at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.save(ODatabaseDocumentTx.java:2435) ~[na:na]
    at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.save(ODatabaseDocumentTx.java:120) ~[na:na]
    at com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:1710) ~[na:na]
    at com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:1706) ~[na:na]
    at com.orientechnologies.orient.core.metadata.security.OUser.save(OUser.java:287) ~[com.orientechnologies.orientdb.core-2.1-rc5.jar:2.1-rc5]
    at com.orientechnologies.orient.core.metadata.security.OSecurityShared.createUser(OSecurityShared.java:240) ~[com.orientechnologies.orientdb.core-2.1-rc5.jar:2.1-rc5]

And, when using the remote database (orientDB 2.0.11, with latest wisdom-orientdb snapshot), here is the error I encounter :

[INFO]   o.w.o.r.OrientDbCrudProvider {[iPOJO] pool-1-thread-1} - OrientDB Database configuration found for /todolist/model : WOrientConf{alias='test', url='remote:localhost/todolist', user='admin', nameSpace='[todolist.model]', autolazyloading=true', txtype=OPTIMISTIC, poolmin='1', poolmax='20'} 
[ERROR]  c.o.o.e.c.b.OChannelBinaryAsynchClient {[iPOJO] pool-1-thread-1} - Error during exception serialization. 
java.lang.ClassNotFoundException: com.orientechnologies.orient.core.sql.OCommandSQLParsingException
    at java.net.URLClassLoader$1.run(URLClassLoader.java:372) ~[na:1.8.0_11]
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361) ~[na:1.8.0_11]
    at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_11]
    at java.net.URLClassLoader.findClass(URLClassLoader.java:360) ~[na:1.8.0_11]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_11]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_11]
    at org.ow2.chameleon.core.utils.FrameworkClassLoader.loadClass(FrameworkClassLoader.java:190) ~[chameleon-core-1.10.7.jar:na]
    at org.apache.felix.framework.BundleWiringImpl.doImplicitBootDelegation(BundleWiringImpl.java:1765) ~[chameleon-core-1.10.7.jar:na]
    at org.apache.felix.framework.BundleWiringImpl.searchDynamicImports(BundleWiringImpl.java:1700) ~[chameleon-core-1.10.7.jar:na]
    at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1536) ~[chameleon-core-1.10.7.jar:na]
    at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79) ~[chameleon-core-1.10.7.jar:na]
    at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1998) ~[chameleon-core-1.10.7.jar:na]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_11]
    at java.lang.Class.forName0(Native Method) ~[na:1.8.0_11]

Can you help me ? Thanks in advance.

barjo commented 9 years ago

Thanks for opening the issue, I find several problem when moving to the version 2.1-rc5. I will try to fix it asap.

barjo commented 9 years ago

@darchaimbault I fixed some problem that occurred with the move to orientdb 2.1-rc5 in #29 I think it was an issue related to your, have you been able to run properly the sample and your application since then?

mnogueron commented 9 years ago

Hi, I'm experiencing the same issue with version 0.2.7-SNAPSHOT and wisdom version 0.9.1. I'm using the 2.1-rc3 OrientDB version for linux. Thanks.

barjo commented 9 years ago

Hi, have you try with 2.1-rc5 by any chance?

barjo commented 9 years ago

Does it happens when you try to connect to a remote orientdb db only?

barjo commented 9 years ago

Ok, I can reproduce with orientdb community 2.0.13 as remote and the last wisdom-orientdb snapshot which is based on 2.1-rc5

barjo commented 9 years ago

This is probably due to having a different client and server version.

The Client driver version is different than Server version: client=30, server=28.

This can lead to serialization problem. The server send back the serialized exception that cannot be deserialized.

barjo commented 9 years ago

I confirm, everything works well with orientdb 2.1-rc5 on the server side as well.

mnogueron commented 9 years ago

Strange thing, I've cloned a proper version of our project (without a route change, which cannot trigger such issues...) and everything works well, even with my changes.

Thanks, I keep in mind this fix if we encounter new problems !

barjo commented 9 years ago

Ok, let me know if there is any problem. I will make a new release once the version 2.1 is cut. Everything should be more stable.