Home » Search

About NoResultException

11-20 of 28Refresh
JPA Doc
6

getSingleResult()

Method javax.persistence.TypedQuery X getSingleResult() Execute a SELECT query that returns a single result. Returns: the result Throws: NoResultException - if there is no result NonUniqueResultException - if more than one result IllegalStateException - if called for a Java Persistence query
JPA Doc
6

javax.persistence.Query

a single untyped result. Returns: the result Throws: NoResultException - if there is no result
Result
6

java.io.Serializable

, LockTimeoutException, LongIdentity, NonUniqueResultException, NoResultException, NullValue, ObjectIdentity
Forum
4

Duplicate Entity class names causes Exception in Query

{ return q.getSingleResult(); } catch (NoResultException e) { return null ... .getSingleResult(); } catch (javax.persistence.NoResultException ex) { return -1; } } private ... .persistence.NoResultException ex) {    return -1;   } } I will attempt to reproduce this in  a console app
Forum
3

Empty query results after JAR creation

.jar", I get either empty results or on some cases a "NoResultException" which appears to report ... file that can be distributed? Thanks for any help.   Empty results or NoResultException may be caused
Forum
3

Mismatch client-server protocol prefix

at.co.pjm.tracker.data.exceptions.NoResultException {         Query q = em.createQuery("SELECT t ... (Throwable ex) {             throw new at.co.pjm.tracker.data.exceptions.NoResultException("No unit
Forum
3

Visibility of changes in Transaction is not visible to a JPA QL Query

);   try {    return q.getSingleResult();   } catch (javax.persistence.NoResultException ex ... .class);   try {    return q.getSingleResult();   } catch (javax.persistence.NoResultException ex
Forum
3

Query can't see recently persisted object

.g. in the following code the NoResultException is correctly thrown on the first occasion ... (); } catch (NoResultException ex) { myObject = new MyObject(oid); mem.persist(myObject
Forum
2

Cannot catch a PersistenceException and continue the transaction

I try to create a factory that creates new objects just in case it doesn't find the relevant one in the DB. but because query.getSingleResult() fires NoResultException in that case it marks the transaction as one that need to be rolled back. I understood that I can overcome it in several ways
Forum
2

Conflicting modifiers .... (javax.persistence.Id, javax.persistence.ManyToOne)

.persistence.NoResultException ex) { return -1; } } } mport java.io.Serializable; import