Problem when trying to create a Titan DB (using Berkeley as back-end)

1,000 views
Skip to first unread message

Pablo Pareja

unread,
Feb 11, 2013, 10:46:34 AM2/11/13
to aureliu...@googlegroups.com
Hi,

It's the first time I'm trying to create a Titan DB using Berkeley as back-end and I'm getting the following exception:

SEVERE: null
java.lang.IllegalArgumentException: Could not instantiate storage manager class com.thinkaurelius.titan.diskstorage.berkeleydb.j       e.BerkeleyJEStorageAdapter
        at com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.getStorageManager(GraphDatabaseConfiguration       .java:395)
        at com.thinkaurelius.titan.graphdb.database.StandardTitanGraph.<init>(StandardTitanGraph.java:82)
        at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:60)
        at com.era7.bioinfo.bio4j.titan.programs.InitBio4jTitan.main(InitBio4jTitan.java:66)
        at com.era7.bioinfo.bio4j.titan.programs.InitBio4jTitan.execute(InitBio4jTitan.java:46)
        at com.era7.lib.bioinfo.bioinfoutil.ExecuteFromFile.main(ExecuteFromFile.java:66)
        at com.era7.bioinfo.bio4j.tools.ExecuteBio4jTool.main(ExecuteBio4jTool.java:28)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
        at com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.getStorageManager(GraphDatabaseConfiguration       .java:384)
        ... 6 more
Caused by: java.lang.NoSuchMethodError: com.sleepycat.je.cleaner.PackedObsoleteInfo.writePackedLong(J)Lcom/sleepycat/bind/tuple/       TupleOutput;
        at com.sleepycat.je.cleaner.PackedObsoleteInfo.addObsoleteInfo(PackedObsoleteInfo.java:47)
        at com.sleepycat.je.tree.IN.trackProvisionalObsolete(IN.java:3678)
        at com.sleepycat.je.tree.IN.afterLogCommon(IN.java:3602)
        at com.sleepycat.je.tree.BIN.afterLog(BIN.java:1157)
        at com.sleepycat.je.recovery.Checkpointer.logSiblings(Checkpointer.java:1480)
        at com.sleepycat.je.recovery.Checkpointer.flushIN(Checkpointer.java:1198)
        at com.sleepycat.je.recovery.Checkpointer.flushDirtyNodes(Checkpointer.java:951)
        at com.sleepycat.je.recovery.Checkpointer.doCheckpoint(Checkpointer.java:735)
        at com.sleepycat.je.dbi.EnvironmentImpl.invokeCheckpoint(EnvironmentImpl.java:1951)
        at com.sleepycat.je.recovery.RecoveryManager.recover(RecoveryManager.java:299)
        at com.sleepycat.je.dbi.EnvironmentImpl.finishInit(EnvironmentImpl.java:610)
        at com.sleepycat.je.dbi.DbEnvPool.getEnvironment(DbEnvPool.java:210)
        at com.sleepycat.je.Environment.makeEnvironmentImpl(Environment.java:246)
        at com.sleepycat.je.Environment.<init>(Environment.java:227)
        at com.sleepycat.je.Environment.<init>(Environment.java:170)
        at com.thinkaurelius.titan.diskstorage.berkeleydb.je.BerkeleyJEStorageManager.initialize(BerkeleyJEStorageManager.java:8       9)
        at com.thinkaurelius.titan.diskstorage.berkeleydb.je.BerkeleyJEStorageManager.<init>(BerkeleyJEStorageManager.java:70)
        at com.thinkaurelius.titan.diskstorage.berkeleydb.je.BerkeleyJEStorageAdapter.<init>(BerkeleyJEStorageAdapter.java:15)
        ... 11 more

Any ideas about the possible cause?

Thanks!

Pablo

--
Pablo Pareja Tobes 

Matthias Broecheler

unread,
Feb 11, 2013, 3:56:06 PM2/11/13
to aureliu...@googlegroups.com
Hey Pablo,

is there a potential conflict with an older version of BerkeleyDB? I have never seen this exception before, but the NoSuchMethodError indicates that an older version of a class is found on the classpath which causes the problem.

Best,
Matthias

--
You received this message because you are subscribed to the Google Groups "Aurelius" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aureliusgraph...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Matthias Broecheler
http://www.matthiasb.com

Pablo Pareja

unread,
Feb 14, 2013, 9:44:50 AM2/14/13
to aureliu...@googlegroups.com
Hey, 

I don't want to bother you guys but I still cannot find the cause for this exception.
Any kind of help would be much appreciated.
Thanks!

Cheers,

Pablo

Matthias Broecheler

unread,
Feb 14, 2013, 2:39:30 PM2/14/13
to aureliu...@googlegroups.com
Hey Pablo,
Have you analyzed your dependency tree? The most likely explanation for this exception is a duplicate dependency to an older version or newer version with incompatible API.

Thanks,
Matthias

--
You received this message because you are subscribed to the Google Groups "Aurelius" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aureliusgraph...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Pablo Pareja

unread,
Feb 18, 2013, 4:16:19 AM2/18/13
to aureliu...@googlegroups.com
Hi Matthias,

Thanks for your answers.
For some reason I don't know (I don't remember changing that myself... :| ) I had the notifications preferences for the group set up for no e-mail updates at all and thus I thought I had not received any response up till now that I checked the group site by chance... Sorry for that.

You were right and I had a library that was using another library where an old version of Berkeley DB was added as a dependency. I changed that and now things seem to work (at least partially).

I've realized that I need to create the folder myself prior to the DB creation (I saw in other message that that behavior is on purpose for security reasons). However my problem now is that everytime I try to modify an existing DB I keep getting this exception:

java.lang.IllegalArgumentException: Could not instantiate storage manager class com.thinkaurelius.titan.diskstorage.berkeleyje.BerkeleyJEStoreManager
        at com.thinkaurelius.titan.diskstorage.Backend.getStorageManager(Backend.java:215)
        at com.thinkaurelius.titan.diskstorage.Backend.<init>(Backend.java:97)
        at com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.getBackend(GraphDatabaseConfiguration.java:398)
        at com.thinkaurelius.titan.graphdb.database.StandardTitanGraph.<init>(StandardTitanGraph.java:78)
        at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:60)
        at com.era7.bioinfo.bio4j.titan.programs.ImportEnzymeDBTitan.main(ImportEnzymeDBTitan.java:84)
        at com.era7.bioinfo.bio4j.titan.programs.ImportEnzymeDBTitan.execute(ImportEnzymeDBTitan.java:62)
        at com.era7.lib.bioinfo.bioinfoutil.ExecuteFromFile.main(ExecuteFromFile.java:66)
        at com.era7.bioinfo.bio4j.tools.ExecuteBio4jTool.main(ExecuteBio4jTool.java:28)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
        at com.thinkaurelius.titan.diskstorage.Backend.getStorageManager(Backend.java:204)
        ... 8 more
Caused by: java.lang.IllegalArgumentException: Cannot open or write to directory: enzyme.dat
        at com.google.common.base.Preconditions.checkArgument(Preconditions.java:92)
        at com.thinkaurelius.titan.diskstorage.berkeleyje.BerkeleyJEStoreManager.<init>(BerkeleyJEStoreManager.java:45)
        ... 13 more

Maybe I have to change the Configuration object prior to opening the DB?
Here's the piece of code I'm using at the beginning of my program:

            Configuration conf = new BaseConfiguration();
            conf.setProperty("storage.directory", "folderName");
            conf.setProperty("storage.backend", "local");

            TitanGraph graph = TitanFactory.open(conf);
            BatchGraph bGraph = new BatchGraph(graph, BatchGraph.IdType.STRING, 1000);

Thanks in advance.

Cheers,

Pablo

Pablo Pareja

unread,
Feb 18, 2013, 7:04:28 AM2/18/13
to aureliu...@googlegroups.com
Hey,

I just found out that the cause of this last error simply was a mistake in the order of the parameters for the program.

Cheers,

Pablo

Benjamin D

unread,
Mar 4, 2013, 7:49:54 PM3/4/13
to aureliu...@googlegroups.com
Actually I am able to instantiate the db but not able to use the already existing db, each time I call the TitanFactory.open(conf); it creates a new db? Can anyone suggest something to fix it please?

Thanks,
Ben

On Monday, March 4, 2013 7:30:07 PM UTC-5, Benjamin D wrote:
Hi Pablo,

I am getting the same problem, can you tell me the right order? I see that using the conf cannot create a new db but can only open an already existing db. Is that correct?

Thanks,
Ben

Pablo Pareja

unread,
Mar 5, 2013, 4:43:22 AM3/5/13
to aureliu...@googlegroups.com
Hi Ben,

You can create a new DB using TitanFactory.open(conf) method, just make sure the folder where your DB will be created exists prior to that call. 
If you use that same method but passing a folder where a DB has already been created, it won't create a new DB but rather use the existing one.

Cheers,

Pablo

Ben

unread,
Mar 5, 2013, 9:54:24 AM3/5/13
to aureliu...@googlegroups.com
Hi Pablo,
But each time it is creating a new db instead of opening it. I have started a new thread and posted some code here:https://groups.google.com/forum/?fromgroups=#!topic/aureliusgraphs/oSCtvw6HKEM

Thanks!
Ben
Reply all
Reply to author
Forward
0 new messages