Hi, Good we've an issue less ;-) Lvc@
On 15 April 2014 17:37, Leny Turmel <[email protected]> wrote: > Seems to be solved. > Probably the DB was corrupted. I deleted the DB and created a new one. Now > the commit works. > > Sorry for the inconvenient. > > Le mardi 15 avril 2014 16:46:18 UTC+2, Leny Turmel a écrit : > >> For information... >> >> When I try to insert elements to the graph without using the >> transactional graph, it works well. >> >>> @Test >>> >>> public void testCreateVertexNoTx() { >>> >>> >>>> >>>> OrientGraphFactory factory = new OrientGraphFactory( >>> >>> "remote:debian-dev-svr/test"); >>> >>> OrientBaseGraph graph = factory.get(); >>> >>> >>>> >>>> Vertex luca = graph.addVertex(null); >>> >>> luca.setProperty("name", "Luca"); >>> >>> >>>> Vertex marko = graph.addVertex(null); >>> >>> >>>> marko.setProperty("name", "Marko"); >>> >>> logger.info("DONE"); >>> >>> >>>> } >>> >>> >>> >> The problem comes from using the transaction. The call to commit blocks >> the execution of the test. >> Coud you please tell me if you have any of the problem? >> >> Le mardi 15 avril 2014 15:49:07 UTC+2, Leny Turmel a écrit : >>> >>> Hi, >>> >>> I install the OirentDB server on a Debian server (hosted by VirtualBox). >>> >>> For my first tests of OrientDB, I followed the tutorial on >>> GitHub<https://github.com/orientechnologies/orientdb/wiki/Graph-Database-Tinkerpop> >>> I wrote this simple JUnit test case: >>> /** >>> * Test the DB creation (URL: debian-dev-svr, DB name: test) >>> */ >>> @Test >>> public void testCreate() { >>> OrientGraphFactory factory = new OrientGraphFactory( >>> "remote:debian-dev-svr/test"); >>> logger.info("DB has been created"); >>> } >>> >>> /** >>> * Get instance to the remote DB "test" Add vertices and edges >>> */ >>> @Test >>> public void testCreateVertex() { >>> //Get an instance of the existing DB "test" on remote URL debian-dev-svr >>> OrientGraphFactory factory = new OrientGraphFactory( >>> "remote:debian-dev-svr/test"); >>> OrientGraph graph = factory.getTx(); >>> //try to add element to the graph or rollback >>> try { >>> Vertex luca = graph.addVertex(null); >>> luca.setProperty("name", "Luca"); >>> Vertex marko = graph.addVertex(null); >>> marko.setProperty("name", "Marko"); >>> Edge lucaKnowsMarko = graph.addEdge(null, luca, marko, "knows"); >>> graph.commit(); >>> } catch (Exception e) { >>> graph.rollback(); >>> logger.error("ROLLBACK"); >>> } >>> >>> logger.info("DONE"); >>> } >>> >>> When I run the test case, the test method "testCreate" runs well. >>> But "testCreateVertex" keeps being blocked by the Commit. >>> >>> More I have a lot of warning message: >>> >>>> avr. 15, 2014 3:39:49 PM com.orientechnologies.common.log.OLogManager >>>> log >>> >>> WARNING: Update of collection pointer is received but collection is not >>>> registered >>> >>> >>> Not sure to understand where is the error... >>> Is there any problem about the way I get a reference to the existing DB >>> using OrientGraphFactory ? >>> Could you please help me ? >>> >>> >>> -- > > --- > 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. > -- --- 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.
