2

I am connecting to remote database as following using JDBC driver v2.2.13

Connection conn = (OrientJdbcConnection) DriverManager.getConnection("jdbc:orient:remote:"  + ip + ":" + port + ";" + ip + ":" + port2 + "/"
                    + appName, info);

I am getting the following below warning as server logs when creating edge

WARNI {db=Sun} Requested command 'create edge type '_F_ as subclass of 'E'' must be executed outside active transaction: the transactional will be committed and reopen right after it. To avoid this behavior execute it outside a transaction [OrientGraph]

From warning it looks like instance (Connection conn) of database is transactional.

One way to solve this is using OrientgraphNoTx database instance using Java API.

How can I do "non-transactional" commit or equivalent of OrientgraphNoTx for Orient JDBC driver

Prakash P
  • 3,582
  • 4
  • 38
  • 66
  • the command `create edge type '_F_ as subclass of 'E'` isn't a valid OrientDb sql command. To create an edge: `CREATE CLASS _F_ EXTENDS E` http://orientdb.com/docs/last/SQL-Create-Edge.html – Roberto Franchini Nov 16 '16 at 14:37
  • That is not a command but a server log. – Prakash P Nov 16 '16 at 14:45
  • can you show me the code of the jdbc command? I wrote this: ` Statement stmt = conn.createStatement(); stmt.execute("create class _F_ extends E"); stmt.close(); ` and it works – Roberto Franchini Nov 16 '16 at 14:51
  • I am successfully able to create Edges, Vertexes. If you could please read question again. – Prakash P Nov 16 '16 at 15:08
  • My problem is, In server log (linux terminal in which server.sh is running) I am getting warnning : `Requested command 'create edge type '_F_ as subclass of 'E'' must be executed outside active transaction: the transactional will be committed and reopen right after it. To avoid this behavior execute it outside a transaction [OrientGraph]` Possible way of solving this wraning is using non-transational instance of orientdb (OrientdbNoTx using java API). My question is how to do this using JDBC driver? Thanks? – Prakash P Nov 16 '16 at 15:09

0 Answers0