IllegalStateException: Operation cannot be executed because the enclosing transaction is closed

269 views
Skip to first unread message

fanc...@gmail.com

unread,
Jan 20, 2015, 5:32:15 AM1/20/15
to aureliu...@googlegroups.com

I am using titan-0.5.3 with hbase 0.98-hadoop2

my codes:

    for (Object o : graph.getVertices()) {

      TitanVertex tv = (TitanVertex) o;

      TitanTools.getAllStringValue(tv);

   }


Exception in thread "main" java.lang.IllegalStateException: Operation cannot be executed because the enclosing transaction is closed

        at com.thinkaurelius.titan.graphdb.transaction.StandardTitanTx.verifyOpen(StandardTitanTx.java:282)

        at com.thinkaurelius.titan.graphdb.transaction.StandardTitanTx.getVertex(StandardTitanTx.java:367)

        at com.thinkaurelius.titan.graphdb.vertices.AbstractVertex.it(AbstractVertex.java:40)

        at com.thinkaurelius.titan.graphdb.relations.CacheProperty.<init>(CacheProperty.java:26)

        at com.thinkaurelius.titan.graphdb.transaction.RelationConstructor.readRelation(RelationConstructor.java:79)

        at com.thinkaurelius.titan.graphdb.transaction.RelationConstructor.readRelation(RelationConstructor.java:62)

        at com.thinkaurelius.titan.graphdb.transaction.RelationConstructor$1$1.next(RelationConstructor.java:46)

        at com.thinkaurelius.titan.graphdb.transaction.RelationConstructor$1$1.next(RelationConstructor.java:34)

fanc...@gmail.com

unread,
Jan 20, 2015, 5:38:42 AM1/20/15
to aureliu...@googlegroups.com

  public static Set<String> getAllStringValue(TitanVertex tv){

    Set<String> set=new HashSet<>(3);

    for(TitanProperty tp:tv.getProperties("key")){

      set.add((String)tp.getValue());

    }

    return set;

Matthias Broecheler

unread,
Jan 20, 2015, 1:38:47 PM1/20/15
to aureliu...@googlegroups.com
It looks like the enclosing transaction was closed somewhere.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/aureliusgraphs/95d6a0ba-69ea-446c-9717-bd5ab25cf926%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



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

Li Li

unread,
Jan 20, 2015, 9:12:00 PM1/20/15
to aureliu...@googlegroups.com
it throws exception when cal getAllStringValue method. But I do not
close transaction in the for loop. And when I run it again, it's ok.
> You received this message because you are subscribed to a topic in the
> Google Groups "Aurelius" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/aureliusgraphs/CX--sAk0oPI/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> aureliusgraph...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/aureliusgraphs/CAEsQWxqoD3OTnBgNAi92Fe0hkQJAP6JAcS9Yu12-JwmV2vwLPg%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages