Cannot create database

105 views
Skip to first unread message

Kevin Watkins

unread,
Aug 1, 2023, 6:02:48 PM8/1/23
to HyperGraphDB
I keep getting an exception raised when I create a database. Windows 11, HyperGraphDB 1.3, Java 8, 10, 20. Code from the website below. I'm at a loss, does anyone have any idea what is going wrong?

import org.hypergraphdb.*; // top-level API classes are in this package
public class HGDBCreateSample
{
    public static void main(String [] args)
    {
        String databaseLocation = args[0];
         // ...
        try
    {
HGConfiguration config = new HGConfiguration();
config.setTransactional(false);
config.setSkipOpenedEvent(true);
        HyperGraph graph = HGEnvironment.get(databaseLocation, config);
HGHandle handle = graph.add("This is now persistent");
        graph.close();
        }
        catch (Throwable t)
        {
System.out.println("In transaction");
     System.out.println(t.toString());                
            //t.printStackTrace();
        }
        finally
        {
        }
    }
}

Borislav Iordanov

unread,
Aug 1, 2023, 6:08:44 PM8/1/23
to hyperg...@googlegroups.com
Hi,

Can you post the exception?

I should note that even though 1.3 is the latest non-snapshot release,
it's better to use take 2.0-snapshot (master branch) with the caveat
that you'd have to build it yourself locally. That version has some
important fixes and has been updated to compile and work with Java 11
and up.

Best,
Boris
> --
> 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 view this discussion on the web visit https://groups.google.com/d/msgid/hypergraphdb/314bfc4e-160c-45d5-bd4c-87907dcf389cn%40googlegroups.com.



--

"Damn! The world is big!"

-- Heleni Daly

John Morris

unread,
Aug 7, 2024, 12:45:31 AM8/7/24
to HyperGraphDB
Hi Boris,

Possibly similar situation as Kevin doing the tutorials, but on MacOS running Java 21. The error I get is "There is 1 existing transaction opened against the Environment.
Aborting open transactions," which has perpetuated across multiple different starting cases.

I'm game to build the 2.0 snapshot but don't see it on the master branch, which for me is just showing 1.3 (latest commit was 6 months ago). I do see a 1.4 branch, but nothing indicating 2.0.

What am I missing?

Thanks in advance,
- John

Borislav Iordanov

unread,
Sep 14, 2024, 1:20:11 AM9/14/24
to hyperg...@googlegroups.com
Hi John,

Apologies for the very late reply.

2.0-snapshot is the master branch at the moment and has been for the
past 2 years, not sure why you are seeing something different. I just
pushed a small fix to point to httos://hyperpgraphdb.org/maven instead
of http://hypergraphdb.org (legacy, non SSL).

The error you are experiencing I have seen happening when there is an
existing process still alive and holding an open transaction, and also
if something goes wrong during startup, but I don't exactly remember
what :(

A stacktrace always has a better chance of giving enough context to
troubleshoot. I don't have enough to go on like this...

Best,
Boris
> To view this discussion on the web visit https://groups.google.com/d/msgid/hypergraphdb/c307be2b-1e9c-4e1a-9d75-9a782fffbbc7n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages