Hello,
I have this simple code:
ODatabaseDocumentTx db = new ODatabaseDocumentTx("SERVER_URL").open(
"USER_LOGIN","USER_PASS");
List<ODocument> result = db.query( new OSQLSynchQuery<ODocument>("select *
from V_User "));
...
Which works as far as the query is concerned, but, I get this error:
org.codehaus.jackson.map.JsonMappingException: Database instance is not set
> in current thread. Assure to set it with:
> ODatabaseRecordThreadLocal.INSTANCE.set(db); (through reference chain:
> com.orientechnologies.orient.core.record.impl.ODocument["locked"])
>
The solution - I think - is to use the pooled connection factory, but I
can't figure it out.
The documentation <http://orientdb.com/docs/last/Document-Database.html>
states:
// OPEN THE DATABASE
ODatabaseDocumentTx db =
ODatabaseDocumentPool.global().acquire("remote:localhost/petshop", "admin",
"admin");
try {
// YOUR CODE
...
} finally {
db.close();
}
BUT ODatabaseDocumentPool is deprecated. link
<https://github.com/orientechnologies/orientdb/issues/3524>
How am I supposed to initialize the factory and get an instance?
Thanks,
Mihai
--
---
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 [email protected].
For more options, visit https://groups.google.com/d/optout.