NoResultException: No matching results for a unique query

Type: BugPriority: NormalStatus: ClosedReplies: 6

I am very often getting a "com.objectdb.o._NoResultException: No matching results for a unique query" when modifying my already persisted entities within a transaction. I cannot replicate it however because it happens infrequently. The weird thing is that the entity nevertheless gets comitted perfectly right and all data is correctly written so I have no clue what's going on!??

Here's the stacktrace (copy+paste from debug output):





Funny enough, after restarting my application it works perfectly again.. so I really cannot replicate it so appreciate any help!!




The stack trace indicates a normal situation of executing a query that has no results, so more details are needed to understand the problem.

You wrote that this happens when a query is run after modifying entities in a transaction. By default, modifications of entities during transaction are usually (but not always) invisible to the query until commit. This behavior can be changed by modifying the flush mode. Which flush mode are using?

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)


I didn't change it so I am using the default Flush Mode (COMMIT). I don't get why this is happening, it just has happened again -> I simply modified an existing object within an active transaction and when comitting the transaction I get the given NoResult* exception eventhough changes are correctly comitted.

Could you please tell me why I do even get a NoResult* exception within a transaction commit that I've been using to modify something only? I've thought the NoResult* exception should happen on SELECT queries only???


thanks, this is really really annoying and turns the app quite unusable right now :(



More details are required. The stack trace in #1 indicates an exception during query execution and in #3 you refer to an exception during commit. Do you have a stack trace of that exception?

It is clear that you get a NoResultException that you do not expect. A test case that demonstrates it will be very helpful. If you cannot provide a test case - at least try provide all the details. This might not be sufficient for solving the problem but at least there will be a chance.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)

Haha okay funny enough - my fault after all. I am implementing my own find() function which was causing the failure because of a filter.. sorry!!



No problem and thank you for the update.

Isolating a problem by generating a simple test case is the best way to investigate and handle issues, either in ObjectDB or in applications that use ObjectDB.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)

Post Reply

To post a reply and/or subscribe to update notifications - please login