problems when creating a hypergraphdatabase

89 views
Skip to first unread message

I GUHA

unread,
May 21, 2014, 10:50:49 AM5/21/14
to hyperg...@googlegroups.com
 I am trying to create a hypergraph database using HyperGraphDB 1.2 under Eclipse ,but getting the following exceptions when running
I've already added db-5.3.15, hgbdbje-1.2,hgbdbnative-1.2,hgdb-1.2,hgdbp2p-1.2,je-5.0.34 on my classpath.

I try this code:

import org.hypergraphdb.*;

public class DBCreate 
{
 static HyperGraph graph;
public static void main(String args[])
{
String x="hello world";
try
{
graph=HGEnvironment.get("C:/temp/HGraph");
}
catch(Throwable t)
{
}
finally
{
graph.close();
}
}

And getting these exceptions

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.HGEnvironment.get(HGEnvironment.java:94)
at DBCreate.main(DBCreate.java:15)
Exception in thread "main" java.lang.NullPointerException
at DBCreate.main(DBCreate.java:25)

please help me.

Ingvar Bogdahn

unread,
May 21, 2014, 12:24:19 PM5/21/14
to hyperg...@googlegroups.com
Hi,
Also, you should not have both of the almost identical storage engines
Berkeley-Java Edition (bje...) and Berkeley native edition (bdbnative)
on your classpath. This leads to problems.
Generally, setting up hgdb with bje makes things much easier (pure
java), so remove db and the hgdbnative.

If that doesn't help, could it be possible that there are database
files in the directory /temp/HGraph? If so, delete them. Otherwhise
that error should not happen.

Also, you are using a verry old version. The snapshot from
http://code.google.com/p/hypergraphdb/downloads/list
is pretty stable.

hope that helps,
ingvar
> --
> You received this message because you are subscribed to the Google Groups
> "HyperGraphDB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to hypergraphdb...@googlegroups.com.
> To post to this group, send email to hyperg...@googlegroups.com.
> Visit this group at http://groups.google.com/group/hypergraphdb.
> For more options, visit https://groups.google.com/d/optout.

I GUHA

unread,
May 21, 2014, 11:42:57 PM5/21/14
to hyperg...@googlegroups.com
My problem is solved,Thank you very much.

mscsf...@pucit.edu.pk

unread,
Jul 21, 2018, 10:57:29 AM7/21/18
to HyperGraphDB
I am also trying the same code. It compiles successfully. But where are the results?

mscsf...@pucit.edu.pk

unread,
Jul 24, 2018, 9:16:43 AM7/24/18
to HyperGraphDB
Please someone help me to create hypergraph database. I am trying last few days but no progress.


On Wednesday, May 21, 2014 at 7:50:49 AM UTC-7, I GUHA wrote:

Borislav Iordanov

unread,
Jul 24, 2018, 11:30:41 AM7/24/18
to hyperg...@googlegroups.com
Hi,

Few points:

1) Best to use a Maven project with the latest code (1.4-SNAPSHOT), but at least use version 1.3 instead of 1.2.

2) You should add either the hgbdbje (Berkeley DB Java Edition) or hgbdbnative (Berkeley DB Native edition), but not both. If would suggest you use only hgbdbje (Java Edition) since you won’t have to worry about linking native libraries.

3) In the code below you are catching an exception with catch(Throwable t) {} but never reporting it. I think that’s why you are getting an NPE, the graph is never initialized and you are swallowing the exception so you don’t know why.

Hope this helps,
B
  
-- 
You received this message because you are subscribed to the Google Groups "HyperGraphDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hypergraphdb...@googlegroups.com.
To post to this group, send email to hyperg...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages