New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OrientDB database cannot be opened after trying to access it through sample code. #359
Comments
hi @tsohil the DB is not corrupted. You are trying to open a database from a different JVM process meanwhile the db is locked by the server process. If you shutdown the server you will be able to run your code. Thanks |
Hi @maggiolo00, I have mentioned that I am able to access database through code, but not able to login through OrientDB Studio and during that login its throwing errors[mentioned in previous comment]. What to do if I want to access database again through Studio? |
hi @tsohil |
Hi @maggiolo00 , I tried using remote as per what you suggested. Here are the combinations of urls I tried[as mentioned in one of groups Here], please correct me if I am wrong anywhere. remote:localhost:2480/StudioDemo2 Still no luck! |
which exception do you get with remote? |
Here is a console out.
|
hi @tsohil can you try with 2424 port. |
Here you go @maggiolo00
|
is the server running? can you post here the log of the server? |
Here is dump from orient-server.log.0
|
did you try to connect with console.sh? ./console.sh then
fill your credential if you changed it |
Yes through
|
mmm strange. can you try with the same url in GraphApi
|
Seems like going into endless loop, tried with GraphApi... here is code part and console out.
Console out -- not printing anything and never ending, I had to kill it
|
hi @tsohil which version are you using on the client? Do you have a pom based project? |
Seems that you are using 2.2.x client |
Here is dependency hierarchy from my pom.
|
you should change the version of Orientdb in 2.1.12 |
Thanks @maggiolo00 I made changes and also added some more dependencies required for REMOTE, I created fresh database and able to access it but still not able to access old database which I once accessed with plocal.
|
what do you mean you are not able to access it in plocal? |
I said
i.e. If you can recall initially I started this thread saying I am not able to access database. Then after looking at my code you suggested I should use remote instead of plocal. Even using remote has not resolved that issue. But if I create fresh new database then I am able to access it with remote. Therefore problem remains same just that dependency issues resolved. |
@tsohil if you have opened once the db with 2.2. client in plocal you will not able to open it again with 2.1.12 as the format probably changed |
Ohh Ok, got it. @maggiolo00 , does this also means there is no way to recover it or use it through client with different version. |
In plocal and in the server you can open a db created with a previous version of OrientDB as we guarantee backwards compatibility at binary level. http://orientdb.com/docs/2.1/Backward-compatibility.html But if you create a db with a newer version of ODB probably you cannot open it with a old version as some structure could have been changed. |
i Think you created the db with studio with version 2.1.12 then from your code you opened it with 2.2.0-beta and then again you tried to open it with 2.1.12 |
@maggiolo00 you are right at above comment, so due to this particular approach current state of that db can safely be called as corrupted ? since I am also not able to access it with Studio ver 2.1.12. |
It is not corrupted, you should be able to open it by downloading OrientDB 2.2.0-beta and copy the db folder under the databases folder of the distribution. |
Yes I am able to access it with OrientDB 2.2.0-beta. Thanks @maggiolo00 |
@maggiolo00 I am able to connect from my java code to orient db please help me out. my pom.xml:-
test please help |
sorry I am not able to connect |
@maggiolo00 |
OrientDB database getting corrupted after trying to access it through sample code.
Steps to reproduce --
Step1 - Create a database through Studio
Step2 - access it through any sample code[java]
Step3 - Now try to access it through Studio - Gets Err
Sample Code -
OrientGraphFactory oGraphFactory = new OrientGraphFactory("plocal:C:/Users/sam/Documents/Couture/orientdb-2.1.12/databases/StudioDemo2").setupPool(1, 10);
OrientGraph graph = oGraphFactory.getTx();
NOTE - Still able to access through code but Studio is throwing error.
CONSOLE ERROR --
2016-03-10 15:49:54:507 SEVER {db=StudioDemo2} Internal server error: com.orientechnologies.orient.core.exception.OStorageException: Cannot open local storage 'C:/Users/sam/Documents/Couture/orientdb-2.1.12/databases/StudioDemo2' with mode=rw --> com.orientechnologies.orient.core.exception.OSerializationException: Cannot load database's configuration. The database seems corrupted --> java.io.IOException: The process cannot access the file because another process has locked a portion of the file [ONetworkProtocolHttpDb]
Current OrientDB version -- Running on Windows 7
Studio version : 2.1
OrientDB version : 2.1.12
The text was updated successfully, but these errors were encountered: