Skip to content

Error on releasing database in pool #34

@remi-parain

Description

@remi-parain

I'm facing a recurrent issue using OrientDB in remote mode (not embedded ). I don't understand what happens, some queries just fails : one time it works, one time it doesn't, it seems to be random.
I happens using OrientDbCrud built-in functions or custom queries.

There is only one instance of Wisdom server which access the DB. Both are on the same host.
Each webservice use the @async wisdom annotation.

I tested with orientDB version 2.1.0, 2.1.3 , 2.1.5 with the current (github) version of the wisdom-orientdb service.

Here is a stacktrace sample :

java code :

    @Override
    public List<POICategory> getPoiCategories() {
        return Lists.newArrayList(poicatCrud.findAll());
    }

stacktrace :

[ERROR]  c.o.o.o.d.OObjectDatabaseTxPooled {wisdom-system-executor-62} - Error on releasing database 'mrvoyage' in pool 
java.lang.IllegalStateException: Current database instance (com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx@673b0d80) is not active on current thread (Thread[wisdom-system-executor-62,5,iPOJO Extender]). Current active database is: com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx@69fceecf
    at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.checkIfActive(ODatabaseDocumentTx.java:3138) ~[na:na]
    at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.commit(ODatabaseDocumentTx.java:2557) ~[na:na]
    at com.orientechnologies.orient.object.db.OObjectDatabaseTx.commit(OObjectDatabaseTx.java:579) ~[com.orientechnologies.orientdb.object-2.1.3.jar:2.1.3]
    at com.orientechnologies.orient.object.db.OObjectDatabaseTxPooled.close(OObjectDatabaseTxPooled.java:110) ~[com.orientechnologies.orientdb.object-2.1.3.jar:2.1.3]
    at org.wisdom.orientdb.runtime.OrientDbTransactionManager.releaseDb(OrientDbTransactionManager.java:48) [org.wisdom.framework.wisdom.orientdb.object-0.3.1-SNAPSHOT.jar:na]
    at org.wisdom.orientdb.runtime.OrientDbCrudService.releaseDb(OrientDbCrudService.java:52) [org.wisdom.framework.wisdom.orientdb.object-0.3.1-SNAPSHOT.jar:na]
    at org.wisdom.orientdb.runtime.OrientDbCrudService.findAll(OrientDbCrudService.java:167) [org.wisdom.framework.wisdom.orientdb.object-0.3.1-SNAPSHOT.jar:na]
    at org.wisdom.orientdb.object.OrientDbCrud$$Proxy.findAll(Unknown Source) [na:na]
    at com.ubidreams.poi.service.PoiSrvImplOrient.__M_getPoiCategories(PoiSrvImplOrient.java:193) [com.ubidreams.mr.voyage.serveur-0.0.1-SNAPSHOT.jar:na]
    at com.ubidreams.poi.service.PoiSrvImplOrient.getPoiCategories(PoiSrvImplOrient.java) [com.ubidreams.mr.voyage.serveur-0.0.1-SNAPSHOT.jar:na]
    at com.ubidreams.poi.api.PoiService$$Proxy.getPoiCategories(Unknown Source) [na:na]
    at com.ubidreams.poi.controllers.POIController.__M_getPoiCategories(POIController.java:158) [com.ubidreams.mr.voyage.serveur-0.0.1-SNAPSHOT.jar:na]
    at com.ubidreams.poi.controllers.POIController.getPoiCategories(POIController.java) [com.ubidreams.mr.voyage.serveur-0.0.1-SNAPSHOT.jar:na]
    at sun.reflect.GeneratedMethodAccessor121.invoke(Unknown Source) ~[na:na]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_60]
    at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_60]
    at org.wisdom.router.RouteDelegate$EndOfChainInvoker.call(RouteDelegate.java:333) [router-0.10.0-SNAPSHOT.jar:na]
    at org.wisdom.api.interception.RequestContext.proceed(RequestContext.java:124) [wisdom-api-0.10.0-SNAPSHOT.jar:na]
    at org.wisdom.executors.AsyncInterceptor$1.__M_call(AsyncInterceptor.java:126) [wisdom-executors-0.10.0-SNAPSHOT.jar:na]
    at org.wisdom.executors.AsyncInterceptor$1.call(AsyncInterceptor.java) [wisdom-executors-0.10.0-SNAPSHOT.jar:na]
    at org.wisdom.executors.AsyncInterceptor$1.__M_call(AsyncInterceptor.java:123) [wisdom-executors-0.10.0-SNAPSHOT.jar:na]
    at org.wisdom.executors.AsyncInterceptor$1.call(AsyncInterceptor.java) [wisdom-executors-0.10.0-SNAPSHOT.jar:na]
    at org.wisdom.executors.Task$EnhancedCallable.call(Task.java:251) [wisdom-executors-0.10.0-SNAPSHOT.jar:na]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_60]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_60]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_60]
    at java.lang.Thread.run(Thread.java:745) [na:1.8.0_60]

Have anyone faced the same issue ?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions