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

Commit issue with embedded server #681

Closed
PatriceMoreau56 opened this Issue Jan 10, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@PatriceMoreau56

PatriceMoreau56 commented Jan 10, 2018

Hi,

When I use the BIMserver as an embedded server in a Java Application, i'm able to create a project, checkin a file, retrieve the model, manipulate its objects or download it in an IFC file.
Unfortunatly i'm stuck when I try to commit some changes in the model. I basically try to reproduce one of your test and I'm facing two problems:
When I use a model retrieved with the option "deep" set to true, the following error raises:
org.bimserver.database.berkeley.BimserverConcurrentModificationDatabaseException: Key exists: pid: 2, oid: 47186640, rid: 2
at org.bimserver.database.berkeley.BerkeleyKeyValueStore.storeNoOverwrite(BerkeleyKeyValueStore.java:544)
at org.bimserver.database.DatabaseSession.save(DatabaseSession.java:2221)
at org.bimserver.database.actions.CommitTransactionDatabaseAction.execute(CommitTransactionDatabaseAction.java:187)
at org.bimserver.database.actions.CommitTransactionDatabaseAction.execute(CommitTransactionDatabaseAction.java:64)
at org.bimserver.database.DatabaseSession.executeAndCommitAction(DatabaseSession.java:727)
at org.bimserver.database.DatabaseSession.executeAndCommitAction(DatabaseSession.java:719)
at org.bimserver.webservices.impl.LowLevelServiceImpl.commitTransaction(LowLevelServiceImpl.java:109)
at org.bimserver.client.ClientIfcModel.commit(ClientIfcModel.java:242)
at test.Main.main(Main.java:176)
12:25:05.910 [main] ERROR org.bimserver.webservices.impl.LowLevelServiceImpl -
org.bimserver.BimserverDatabaseException: Too many conflicts, tried 10 times
at org.bimserver.database.DatabaseSession.executeAndCommitAction(DatabaseSession.java:800)
at org.bimserver.database.DatabaseSession.executeAndCommitAction(DatabaseSession.java:719)
at org.bimserver.webservices.impl.LowLevelServiceImpl.commitTransaction(LowLevelServiceImpl.java:109)
at org.bimserver.client.ClientIfcModel.commit(ClientIfcModel.java:242)
at test.Main.main(Main.java:176)

When I use a model retrieved with the option "deep" set to false, the following error raises:
12:02:06.388 [main] ERROR org.bimserver.BimServer -
java.lang.NullPointerException: null
at org.bimserver.database.actions.CommitTransactionDatabaseAction.execute(CommitTransactionDatabaseAction.java:220)
at org.bimserver.database.actions.CommitTransactionDatabaseAction.execute(CommitTransactionDatabaseAction.java:64)
at org.bimserver.database.DatabaseSession.executeAndCommitAction(DatabaseSession.java:727)
at org.bimserver.database.DatabaseSession.executeAndCommitAction(DatabaseSession.java:719)
at org.bimserver.webservices.impl.LowLevelServiceImpl.commitTransaction(LowLevelServiceImpl.java:109)
at test.Main.main(Main.java:160)

If I configure the BIMserver with localDev set to false, I'm having another error:
14:29:57.749 [main] DEBUG org.bimserver.longaction.LongActionManager - [MAN] Cleaning up topic 659 (Streaming download)
Not implemented
org.bimserver.shared.exceptions.UserException: Not implemented
at org.bimserver.changes.RemoveReferenceChange.execute(RemoveReferenceChange.java:64)
at org.bimserver.database.actions.CommitTransactionDatabaseAction.execute(CommitTransactionDatabaseAction.java:174)
at org.bimserver.database.actions.CommitTransactionDatabaseAction.execute(CommitTransactionDatabaseAction.java:64)
at org.bimserver.database.DatabaseSession.executeAndCommitAction(DatabaseSession.java:727)
at org.bimserver.database.DatabaseSession.executeAndCommitAction(DatabaseSession.java:719)
at org.bimserver.webservices.impl.LowLevelServiceImpl.commitTransaction(LowLevelServiceImpl.java:109)
at org.bimserver.client.ClientIfcModel.commit(ClientIfcModel.java:242)
at test.Main.main(Main.java:176)
14:29:57.790 [main] INFO org.bimserver.BimServer - Stopping BIMserver

So my question is what is the right configuration for the BIMserver to be used locally (when used locally I don't need webservices)? (I currently use the example configuration of your wiki page)
What are the right interfaces to be used to retrieve the model and then commit the changes to the database?

I used the BIMserver-1.5.92.

Thanks for your work.

rubendel pushed a commit that referenced this issue Jan 12, 2018

@rubendel

This comment has been minimized.

Show comment
Hide comment
@rubendel

rubendel Jan 12, 2018

Member

Hi, the specific test case has been fixed, not all calls were implemented after the latest refactoring. There could still be methods not working, but I hope this helps. Will be in 1.5.94.

Member

rubendel commented Jan 12, 2018

Hi, the specific test case has been fixed, not all calls were implemented after the latest refactoring. There could still be methods not working, but I hope this helps. Will be in 1.5.94.

@rubendel rubendel closed this Jan 19, 2018

@PatriceMoreau56

This comment has been minimized.

Show comment
Hide comment
@PatriceMoreau56

PatriceMoreau56 Feb 6, 2018

Thanks for your work, the commit works fine in the 1.5.95 version.

PatriceMoreau56 commented Feb 6, 2018

Thanks for your work, the commit works fine in the 1.5.95 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment