Error List

Error List for the ‘JAVA-Hibernate’ Category

Thrown when an application tries to load in a class through its string name using:* The forName method in class Class. * The findSystemClass method in class ClassLoader . * The loadClass method in class ClassLoader.but no definition for the class with the specified name could be found.

Applies to:
Hibernate

Description:
Some third-party library is missing which Hibernate needs.

Cause:
You have tried to use Hibernate but some dependency is missing.

JAVA-Hibernate

ObjectNotFoundException: No row with the given identifier exists

Applies to:
Hibernate

Description:
Thrown when Session.load() fails to select a row with the given primary key (identifier value). This exception might not be thrown when load() is called, even if there was no row on the database, because load() returns a proxy if possible. Applications should use Session.get() to test if a row exists in the database.

Cause:
This might occur if you try to load a non-proxied object with session.load() or you load a proxied object and later access the proxy. It may also occur when loading mapped collections which are not eagerly fetched. Another cause are foreign key fields that are not protected with a foreign key constraint, and now contain bogus values.

JAVA-Hibernate , , , , , , , , , , , , , , , , , , , , , ,

InvalidObjectException: Could not find a SessionFactory named: null

Applies to:
Hibernate

Description:
Indicates that one or more deserialized objects failed validation tests. The argument should provide the reason for the failure.

Cause:
You have tried to serialize a disconnected Hibernate Session and deserialize it in a different VM, or, if the classloader has restarted, for example, during hot redeployment in your application server or web container. This is especially visible in Tomcat.

JAVA-Hibernate , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

org.hibernate.HibernateException: CGLIB Enhancement failed:

Applies to:
Hibernate

Description:
Occurs while using lazy-loading with proxies.

Cause:
If you have used lazy loading with proxies (default for all classes in Hibernate 3), Hibernate needs to subclass your class at runtime. It can’t do this if you have a private no-argument constructor. As per documentation, at least package visibility is required.

JAVA-Hibernate , , , , , , , , , , , , , , , , , , , , , , ,

NonUniqueObjectException

Applies to:
Hibernate

Description:
This exception is thrown when an operation would break session-scoped identity. This occurs if the user tries to associate two different instances of the same Java class with a particular identifier, in the scope of a single Session.


Cause:
You have called saveOrUpdate() or update().

JAVA-Hibernate , , , , , ,

ConstraintViolationException

Parsing XML: unknown system id

Applies to:
Hibernate

Description:
Occurs while loading a mapping document as a resource.

Cause:
You have tried to load a mapping document as a resource.

JAVA-Hibernate

PropertyAccessException or NullPointerException while using Hibernate

ClassCastException when using a composite identifier

Applies to:
Hibernate

Description:
Occurs while using a composite identifier.

Cause:
You have used a composite identifier

JAVA-Hibernate , , ,

ClassCastException when specifying a collection sort attribute.

Applies to:
Hibernate

Description:
Occurs while specifying a collection sort attribute.

Cause:
You have specified a collection sort attribute.

JAVA-Hibernate , ,