jlowenz / hypergraphdb

Automatically exported from code.google.com/p/hypergraphdb
0 stars 0 forks source link

create HyperGraph occure error "There is 1 existing transaction opened against" #103

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I am using hypergraphed and JSON Component in my program,version is 
hypergraphdb-1.2, When I open the database like this:

HyperGraph graph = HGEnvironment.getExistingOnly(location);
if (null == graph){
  HGConfiguration config = new HGConfiguration();
  config.getTypeConfiguration().addSchema(new JsonTypeSchema());    
  graph = HGEnvironment.get(location,config);
}
HyperNodeJson jsonNode = new HyperNodeJson(graph);

print on screen like this:

checkpoint kbytes:0
checkpoint minutes:0
java.lang.IllegalStateException: There is 1 existing transaction opened against
the Environment.
Aborting open transactions ...
aborting <Transaction id="28">
        at com.sleepycat.je.Environment.close(Environment.java:383)
        at org.hypergraphdb.storage.bje.BJEStorageImplementation.shutdown(BJEStorageImplementation.java:178)
        at org.hypergraphdb.HGStore.close(HGStore.java:372)
        at org.hypergraphdb.HyperGraph.open(HyperGraph.java:389)
        at org.hypergraphdb.HyperGraph.open(HyperGraph.java:210)
        at org.hypergraphdb.HyperGraph.<init>(HyperGraph.java:197)
        at org.hypergraphdb.HGEnvironment.getExistingOnly(HGEnvironment.java:135)
        at com.geospatialsmart.db.SmartDatabase.open(SmartDatabase.java:63)
        at com.monkey.imagery.ImageryIndexBuilder.execute(ImageryIndexBuilder.java:130)
        at com.monkey.imagery.Test.case8(Test.java:194)
        at com.monkey.imagery.Test.main(Test.java:38)

my program run on Windows7 64,the location floder is empty when initialization. 
This error only occur when I running the program but not debugging the 
program,on the google saied meybe BERKELEYDB error an version je-5.0.34, I use 
new version instend, but error still occurs.
What happenend in my program? 

Original issue reported on code.google.com by gisdrea...@gmail.com on 8 Nov 2013 at 9:27

GoogleCodeExporter commented 9 years ago
I doesn't look like your folder is empty when you are running the program. It 
seems like HGDB is detecting the presence of the je.lck file there and that is 
why it's trying to open the database within the getExistingOnly method.

I've seen this type of behavior when some other error happens during opening, 
which causes it to immediately try and close, but then some transaction remains 
open. Do you see any other exception on the console? The exception you are 
showing here, is it output by HGDB or by your program?

Finally, is it possible for you to try to latest code? If you don't have maven 
installed or don't want to bother building it, I can build the jars for your. 
The version should be 1.3-SNAPSHOT in Maven. 

Original comment by borislav...@gmail.com on 8 Nov 2013 at 8:22

GoogleCodeExporter commented 9 years ago

Original comment by borislav...@gmail.com on 8 Dec 2014 at 10:05