Update on this: I've modified the example code you sent, but am so far
unable to replicate your issue. The messages.log should contain useful info
though. If it does not, I might need your help to put together a
stand-alone piece of code that recreates the problem.

Best,
Jake


On Fri, Feb 7, 2014 at 12:25 PM, Jacob Hansson <[email protected]>wrote:

> Thanks for bumping this David, it fell off my radar, sorry.
>
> Im gonna have a look at your original sample code, and Ill get back to you.
>
> in the mean time, would you be able to send me the messages.log file that
> neo puts in its database folder? If you are running the server, thats in
> data/graph.db/, otherwise its whatever folder you tell the embedded
> database to use.
>
> jake
>
> Sent from my phone, please excuse typos and brevity.
> On Feb 6, 2014 2:19 PM, "M. David Allen" <[email protected]> wrote:
>
>> I don't mean to be a pest, but I would really appreciate some feedback on
>> this from the devs.  It's something I've been wrestling with since I made
>> the move to 2.0.0, and I'd really like to figure it out.
>>
>> I am more than willing to run any sample code or test cases that will
>> help diagnose this, or provide any additional information that would be
>> useful to get to the bottom of this.
>>
>> Thanks.
>>
>> On Wednesday, February 5, 2014 10:24:09 AM UTC-5, M. David Allen wrote:
>>>
>>> No, not that I can see.
>>>
>>> I removed the catch code and re-ran to see what else it might come up
>>> with, and below is what I got:
>>>
>>> Exception in thread "main" org.neo4j.graphdb.TransactionFailureException:
>>> Unable to commit transaction
>>>     at org.neo4j.kernel.TopLevelTransaction.close(
>>> TopLevelTransaction.java:134)
>>>     at org.mitre.provenance.db.neo4j.Neo4JStorage.getMembers(
>>> Neo4JStorage.java:545)
>>>     at org.mitre.provenance.test.Stub.main(Stub.java:17)
>>> Caused by: javax.transaction.RollbackException: Failed to commit,
>>> transaction rolled back
>>>     at org.neo4j.kernel.impl.transaction.TxManager.
>>> rollbackCommit(TxManager.java:623)
>>>     at org.neo4j.kernel.impl.transaction.TxManager.commit(
>>> TxManager.java:402)
>>>     at org.neo4j.kernel.impl.transaction.TransactionImpl.
>>> commit(TransactionImpl.java:122)
>>>     at org.neo4j.kernel.TopLevelTransaction.close(
>>> TopLevelTransaction.java:124)
>>>     ... 2 more
>>>
>>>
>>> On Wednesday, February 5, 2014 10:13:55 AM UTC-5, Jacob Hansson wrote:
>>>>
>>>> David, are there any additional cause exceptions available for that
>>>> stack trace?
>>>>
>>>> Sent from my phone, please excuse typos and brevity.
>>>> On Feb 5, 2014 3:56 PM, "M. David Allen" <[email protected]> wrote:
>>>>
>>>>> I'm running into exceptions where my transactions fail to commit, even
>>>>> though they're read-only cypher queries.   I created a small test database
>>>>> that's attached to some software I've written (running embedded DB). I'm
>>>>> attaching messages.log for a lot of diagnostics.    I ran some simple stub
>>>>> code to populate the test database, then do some querying on it using
>>>>> methods I wrote.
>>>>>
>>>>> I'm hoping to find some help with why this is happening.  I can
>>>>> actually safely ignore these transaction exceptions, and nothing seems to
>>>>> go horribly wrong, but they just shouldn't be there and I don't want to
>>>>> ignore them as my strategy.   Below I'm providing what the exceptions look
>>>>> like, and the code of the method that's creating these exceptions.  In
>>>>> other parts of my code base I have other similar queries (always read-only
>>>>> cypher queries wrapped in transactions) that have the same problems.   I
>>>>> ran this stub to try to illustrate the problem in one specific compact 
>>>>> way.
>>>>>
>>>>> The exception dumps --
>>>>>
>>>>> SEVERE: Failed transaction: Unable to commit transaction
>>>>> org.neo4j.graphdb.TransactionFailureException: Unable to commit
>>>>> transaction
>>>>>     at org.neo4j.kernel.TopLevelTransaction.close(
>>>>> TopLevelTransaction.java:134)
>>>>>     at org.mitre.provenance.db.neo4j.Neo4JStorage.getMembers(
>>>>> Neo4JStorage.java:545)
>>>>>     at org.mitre.provenance.test.Stub.main(Stub.java:17)
>>>>> Caused by: javax.transaction.RollbackException: Failed to commit,
>>>>> transaction rolled back
>>>>>     at org.neo4j.kernel.impl.transaction.TxManager.
>>>>> rollbackCommit(TxManager.java:623)
>>>>>     at org.neo4j.kernel.impl.transaction.TxManager.commit(
>>>>> TxManager.java:402)
>>>>>     at org.neo4j.kernel.impl.transaction.TransactionImpl.
>>>>> commit(TransactionImpl.java:122)
>>>>>     at org.neo4j.kernel.TopLevelTransaction.close(
>>>>> TopLevelTransaction.java:124)
>>>>>
>>>>> The code that's throwing the exception:
>>>>>
>>>>>     public static ProvenanceCollection getMembers(PLUSWorkflow wf,
>>>>> User user, int maximum) {
>>>>>         ViewedCollection d = new ViewedCollection(user);
>>>>>         if(db == null) initialize();
>>>>>
>>>>>         if(maximum <= 0 || maximum > Neo4JPLUSObjectFactory.MAX_
>>>>> OBJECTS)
>>>>>             maximum = 100;
>>>>>
>>>>>         Map<String,Object>params = new HashMap<String,Object>();
>>>>>         params.put("wf", wf.getId());
>>>>>         String query = "start 
>>>>> r=relationship:relationship_auto_index(workflow={wf})
>>>>> " +
>>>>>                 "return r " +
>>>>>                 "limit " + maximum;
>>>>>
>>>>>         try (Transaction tx = db.beginTx()) {
>>>>>             ResourceIterator<Relationship> rs =
>>>>> Neo4JStorage.execute(query, params).columnAs("r");
>>>>>
>>>>>             try {
>>>>>                 while(rs.hasNext()) {
>>>>>                     Relationship r = rs.next();
>>>>>
>>>>>                     d.addNode(Neo4JPLUSObjectFactory.
>>>>> newObject(r.getStartNode()));
>>>>>                     d.addNode(Neo4JPLUSObjectFactory.
>>>>> newObject(r.getEndNode()));
>>>>>                     d.addEdge(Neo4JPLUSObjectFactory.newEdge(r));
>>>>>
>>>>>                 }
>>>>>             } catch(PLUSException exc) {
>>>>>                 exc.printStackTrace();
>>>>>             }
>>>>>
>>>>>             rs.close();
>>>>>             tx.success();
>>>>>         } catch(TransactionFailureException exc) {
>>>>>             log.severe("Failed transaction: " + exc.getMessage());
>>>>>             exc.printStackTrace();
>>>>>         }
>>>>>
>>>>>         return d;
>>>>>     } // End getMembers
>>>>>
>>>>> Another relevant method (Neo4JStorage.execute):  (db is a
>>>>> GraphDatabaseService)
>>>>>
>>>>>     public static ExecutionResult execute(String cypherQuery,
>>>>> Map<String,Object>params) {
>>>>>         if(db == null) initialize();
>>>>>
>>>>>         ExecutionEngine engine = new ExecutionEngine(db);
>>>>>
>>>>>         assert(db.index().getNodeAutoIndexer().isEnabled());
>>>>>
>>>>>         StringBuffer sb = new StringBuffer("");
>>>>>         for(String k : params.keySet()) sb.append(" " + k + "=" +
>>>>> params.get(k));
>>>>>
>>>>>         //log.info("EXECUTING: " + cypherQuery + " /" +sb);
>>>>>         return engine.execute(cypherQuery + " ", params);
>>>>>     }
>>>>>
>>>>>  --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "Neo4j" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to [email protected].
>>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>>
>>>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Neo4j" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>

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

Reply via email to