Troubles using TraversalDFS (DEX Java)

31 views
Skip to first unread message

gregorio...@gmail.com

unread,
Jul 9, 2013, 9:25:51 AM7/9/13
to dex...@googlegroups.com

I’m having troubles using TraversalDFS (I’m using DEX on java). I can create the graph successfully and then i use TraversalDFS and it works fine but when i try to close the session i’m getting this error:

Exception in thread “main” java.lang.RuntimeException: Session data still active when closing
at com.sparsity.dexjavawrapJNI.delete_dex_gdb_Session(Native Method)
at com.sparsity.dex.gdb.Session.delete(Session.java:32)
at com.sparsity.dex.gdb.Session.close(Session.java:40)

I checked everything many times and i think the code is fine because i use exactly the same code changing TraversalDFS by TraversalBFS and it works fine.

Please i need help

c3po.ac

unread,
Jul 9, 2013, 9:51:29 AM7/9/13
to dex...@googlegroups.com

Hi,

Which operating system are you using?

Could you please contact dam...@sparsity-technologies.com with more details?
We may need to know what other dex api methods are you using in the traversal, specially iterators and update operations.

Thanks.

El dimarts 9 de juliol de 2013 15:25:51 UTC+2, gregorio...@gmail.com va escriure:

gregorio...@gmail.com

unread,
Jul 9, 2013, 11:20:06 AM7/9/13
to dex...@googlegroups.com
My operating system is Linux (Ubuntu 12.04) but i'm running test on a Debian machine and i'm getting the same error in both.

This is the code that isn't working for me:

try
...

String path = "graphs/DB/dexdb/2";
DexConfig cfg = new DexConfig();
cfg.setLicense("XXXX-XXXX-XXXX");
Dex dex = new Dex(cfg);
Database db = dex.open(path+"/DexBD.dex", true); // Opening some graph created previously
Session sess = db.newSession();
Graph g = sess.getGraph();
int NodeType; //Node's ids
int NodeIdType; //Node Attribute's ids
            
NodeType = g.findType("NODE"); // I have only this type of nodes in the graph
NodeIdType = g.findAttribute(NodeType, "ID"); //All nodes have this attribute
            
String src = "252", dst = "685";
Value value = new Value();
long curr, dstO;
boolean found = false;
dstO = g.findObject(NodeIdType, value.setString(dst));
TraversalDFS dfs = new TraversalDFS(sess, g.findObject(NodeIdType, value.setString(src)));
dfs.addAllNodeTypes();
dfs.addAllEdgeTypes(EdgesDirection.Outgoing);
while (dfs.hasNext() && !found) {
         curr = dfs.next();
         if (curr == dstO) found = true;
}
dfs.close();
            
sess.close(); // HERE IS THE ERROR
db.close();
dex.close();

catch
...

c3po.ac

unread,
Jul 10, 2013, 6:14:17 AM7/10/13
to dex...@googlegroups.com

You are right!
There is a problem at the TraversalDFS close operation that is causing this error.
It should be fixed in the release 4.8.2 that will soon be published along with other minor bug fixes.

But, if you can't wait until the official publication of the 4.8.2 release, you can ask damaris@sparsity-technologies.com to send you a pre-release for your platform.

Best regards.

El dimarts 9 de juliol de 2013 17:20:06 UTC+2, gregorio...@gmail.com va escriure:

dex...@gmail.com

unread,
Jul 18, 2013, 5:49:40 AM7/18/13
to dex...@googlegroups.com
Hello,

We have published the release 4.8.2 containing minor bug fixing, including the close problem in the TraversalDFS solved. You can download it from here as usual.

Best Regards!,

DEXgdb team


El miércoles, 10 de julio de 2013 12:14:17 UTC+2, c3po.ac escribió:

You are right!
There is a problem at the TraversalDFS close operation that is causing this error.
It should be fixed in the release 4.8.2 that will soon be published along with other minor bug fixes.

But, if you can't wait until the official publication of the 4.8.2 release, you can ask dam...@sparsity-technologies.com to send you a pre-release for your platform.
Reply all
Reply to author
Forward
0 new messages