Hi;
I had also same issue. There is a open connection different from current db 
connection so you get the following exception. To solve the problem first 
you can use remote access.

OrientGraphFactory factory = new 
OrientGraphFactory("remote:IPOfMachine/DBName","user","password").setupPool(1,10);
       db = factory.getTx();


Secondly, you can install orientdb again. But I offer to use first approch.
Best Regards.

30 Ocak 2015 Cuma 11:09:27 UTC+2 tarihinde Yong Chong, Long yazdı:
>
> Hi, I'm new to OrientDB, please bear with me.
>
> I'm trying to create and access an OrientDB instance inside a Spring bean: 
> implements InitializingBean, DisposableBean
>
> Roughly what I did was:
> @Override
> public void afterPropertiesSet() {
>     orientGraphFactory = new 
> OrientGraphFactory("plocal:path/to/myDB").setupPool(1, 10);
>     db = orientGraphFactory.getTx();
> }
>
> @Override
> public void destroy() {
>     db.shutdown();
>     orientGraphFactory.close();
> }
>
> Somehow, after the #destroy method is called and #afterPropertiesSet is 
> called for the second time, I hit this error:
> Invocation of init method failed; nested exception is 
> com.orientechnologies.orient.core.exception.OStorageException: Cannot open 
> local storage '/path/to/myDB' with mode=rw
> ...
> ..
> .
> Caused by: com.orientechnologies.common.concur.lock.OLockException: File 
> '/path/to/myDB/database.ocf' is locked by another process, maybe the 
> database is in use by another process. Use the remote mode with a OrientDB 
> server to allow multiple access to the same database.
>
> Why is the process still accessing the file after:
>     db.shutdown();
>     orientGraphFactory.close();
>
> Am I doing anything wrong?
>
> Thank you.
>

-- 

--- 
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.

Reply via email to