NullPointerException « Update « JPA Q&A





1. Hibernate saveOrUpdate() nullPointerException thrown on every second update    stackoverflow.com

I am having a problem with some hibernate code. I am calling the saveOrUpdate() method and every second time I try to do an update I get a NullPointerException. ...

2. java.lang.NullPointerException on Hibernate persistent class    stackoverflow.com

I have a persistent class Approvisionnement in my .hbm.xml file :

   <?xml version="1.0"?>
   <!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD//EN"
 "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >

   <hibernate-mapping package="com.afrikbrain.iard.srv.attestation">

   ...

3. NullPointerException on merge()    stackoverflow.com

Again I have a hibernate issue. When adding a new Entity to a persisted Collection by merge() I get a NullPointerException from somewhere inside of Hibernate that's the stacktrace:

java.lang.NullPointerException
    ...

4. NullPointerException in SessionImpl.dirty    forum.hibernate.org

Hi I'm using Hibernate 2.1.2 with jdk 1.3.1_09 I'm inserting an object that has an empty List. I commit the object and do a session.clear (). Using the same session I use the "find" method to obtain the object. When I get the collection and add an element using the "add" method I get: java.lang.NullPointerException void net.sf.hibernate.impl.SessionImpl.dirty(net.sf.hibernate.collection.PersistentCollection) SessionImpl.java:3190 void net.sf.hibernate.collection.PersistentCollection.write() PersistentCollection.java:86 ...

5. unbelievable NullPointerException getHashCode() on flush    forum.hibernate.org

Author Message Enri Post subject: unbelievable NullPointerException getHashCode() on flush Posted: Wed Feb 08, 2006 12:21 pm Newbie Joined: Wed Feb 08, 2006 11:52 am Posts: 5 Hibernate version: 3.0.5 Name and version of the database you are using: Oracle 9.2.0.4 Hi all, I'm executing this very simple and minimal test (with Spring 1.2.5): Code: public void ...

6. NullPointerException when flushing after save?    forum.hibernate.org

Beginner Joined: Tue Mar 21, 2006 5:49 pm Posts: 20 I get the following exception when trying to flush after I have called save..: Code: java.lang.NullPointerException at org.hibernate.engine.EntityEntry.getLoadedValue(EntityEntry.java:141) at org.hibernate.type.CollectionType.getKeyOfOwner(CollectionType.java:302) at org.hibernate.engine.Collections.processReachableCollection(Collections.java:137) at org.hibernate.event.def.FlushVisitor.processCollection(FlushVisitor.java:37) at org.hibernate.event.def.AbstractVisitor.processValue(AbstractVisitor.java:104) at org.hibernate.event.def.AbstractVisitor.processValue(AbstractVisitor.java:64) at org.hibernate.event.def.AbstractVisitor.processEntityPropertyValues(AbstractVisitor.java:58) ...