Hi All -- I am new to this, so sorry if this is a repeat - I did look for 
similar issue and could not find any. My sample code is below. The code 
does create a Vertex because I am able to see them with the 
*getVerticies()*call. My issue is when I use the 'cmd console', or 'web 
console', I cannot 
see them in the DB -- or rather sometimes they appear, sometime the do 
not.. sporadically I get errors in my Eclipse console:

'Dec 20, 2013 8:55:19 AM com.orientechnologies.common.log.OLogManager log
WARNING: segment file 'database.ocf' was not closed correctly last time
Dec 20, 2013 8:55:20 AM com.orientechnologies.common.log.OLogManager log
WARNING: Storage casrs was not closed properly. Will try to restore from 
write ahead log.
Dec 20, 2013 8:55:20 AM com.orientechnologies.common.log.OLogManager log
SEVERE: Restore is not possible because write ahead log is empty.
Dec 20, 2013 8:55:20 AM com.orientechnologies.common.log.OLogManager log
INFO: Storage data restore was completed'

I am using: 

   - orientdb-community-1.6.2
   - tinkerpop (blueprints-orient-graph-2.5.0-20131216.164251-22)
   - Win 7
   - Java 7
   

I try the below code..... 

public static void main(String[] args) {

OrientTransactionalGraph graph = null;
try{ 
graph = new 
OrientGraph("plocal:E:/orientdb-community-1.6.2/databases/test","admin","admin");
graph.addVertex( "class:Customer", "name", "Alex", "age", 20, "city", 
"Ottawa", "born", "Houston, TX" );
 
 graph.commit();
 System.out.println("after graph commit - in try");
 
 for( Vertex v : graph.getVertices() ) {
  System.out.println(v.getProperty("name"));
}

} catch (Exception e) {
graph.rollback();
System.out.println("after rollback - in catch");
graph.shutdown();
System.out.println("after shudown - in catch");
 }//catch
finally{
graph.shutdown();
System.out.println("after graph shutdown - in finally");
}//finally
 }

*--I think--* it is a threading / simultaneous access thing... in that I 
cannot have a connection to the DB with the console (Web or CMD) and my 
Java code at the same time... but I don't know, and wanted to check here 
first.. before iI really start pulling my hair out :)

thanks - Rob

-- 

--- 
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/groups/opt_out.

Reply via email to