About NoResultException

api-jpa

javax.persistence.NoResultException

Thrown by the persistence provider when Query.getSingleResult() or TypedQuery.getSingleResult()is executed on a query and there is no result to return.(Exception of JPA)

 
manual

Running JPA Queries

Explains how to use JPA to run Java Persistence Query Language (JPQL) queries.... On the other hand, if there are no results at all a NoResultException javax.persistence.NoResultException JPA exception Thrown by the persistence provider ...

 
api-jpa

JPA Exceptions

Reference (JavaDoc) of the JPA exception classes, including PersistenceException, EntityExistsException, EntityNotFoundException, LockTimeoutException, NonUniqueResultException, NoResultException, OptimisticLockException, PessimisticLockException, QueryTimeoutException, RollbackException, TransactionRequiredException.... javax.persistence.NoResultException ... javax.persistence.NoResultException javax.persistence.QueryTimeoutException ...

 
api-jpa

NoResultException()

Constructs a new NoResultException exception with null as its detail message.(Constructor of javax.persistence.NoResultException)

 
api-jpa

NoResultException(message)

Constructs a new NoResultException exception with the specified detail message.(Constructor of javax.persistence.NoResultException)

 
issue

NoResultException: No matching results for a unique query

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): ... I am very often getting a "com.objectdb.o._NoResultException: No matching results for a unique query" when modifying my ... of that exception? It is clear that you get a NoResultException that you do not expect. A test case that demonstrates it ...

 
forum_thread

Criteria Query results in a NoResultException instead of returning object

When I run the following code    ... java.lang.RuntimeException: com.objectdb.o._NoResultException: No matching results for a unique query at ... by: com.objectdb.o._NoResultException: No matching results for a unique query at ...

 
api-jpa

javax.persistence.PersistenceException

Thrown by the persistence provider when a problem occurs.(Exception of JPA)

 
api-jpa

javax.persistence.TypedQuery

Interface used to control the execution of typed queries.(Interface of JPA)

 
forum_thread

Optimistic lock failed

Hi, I frequently see exceptions during development such as com.objectdb.o._RollbackException: Failed to commit transaction: Optimistic lock failed for object com.example.MyEntity#3 (object has version 1 instead of 3) Could you please explain what this means, and what I can do about it. Thanks you, Carl     ... LockTimeoutException, NonUniqueResultException, NoResultException, OptimisticLockException, PessimisticLockException, ...