NullPointerException « Map « JPA Q&A





1. Hibernate - NullPointerException when accessing a child element of one-to-many association    stackoverflow.com

There is a Java SE project with Hibernate ORM. I feel that the problem is trivial, but need some help. There is a code snippet:

    SessionFactory factory = new ...

2. Inheritance and NullPointerException    forum.hibernate.org

I have a User class which is mapped to User.hbm.xml. I am adding a new class called UserHistory which is mapped in UserHistory.hbm.xml. UserHistory extends User and has the identical columns. When I do a Select on the User object, Hibernate now throws the following exception: Code: java.lang.NullPointerException at org.hibernate.hql.ast.HqlSqlWalker.createFromJoinElement(HqlSqlWalker.java:312) at org.hibernate.hql.antlr.HqlSqlBaseWalker.joinElement(HqlSqlBaseWalker.java:3275) at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElement(HqlSqlBaseWalker.java:3067) at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElementList(HqlSqlBaseWalker.java:2945) at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromClause(HqlSqlBaseWalker.java:688) at org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:544) at ...

3. Mapping resource tag generating nullpointerexception    forum.hibernate.org

Hi, Adding mapping resource tag to the hibernate config file throws the following stacktrace: Code: Root cause of ServletException. javax.el.ELException: java.lang.NullPointerException at javax.el.BeanELResolver.getValue(BeanELResolver.java:266) at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143) at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72) at com.sun.el.parser.AstValue.getValue(AstValue.java:118) at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:192) Truncated. see log file for complete stacktrace Caused By: java.lang.NullPointerException ...

4. Known override equals() - NullPointerException workaround?    forum.hibernate.org

Referring to the known bug in hibernate -http://hibernate.org/117.html#A14 where overriding equals() or using a custom comparator in a SortedSet - I know the listed workaround is setting the collection to be lazy. But my application needs to load the data all at once, inside a transaction, so just having the collection lazily initialized is not going to work. I have an ...

5. NullPointerException when considering< many to one map>    forum.hibernate.org

Beginner Joined: Wed Mar 24, 2004 8:43 am Posts: 42 18:47:33,179 INFO ReflectHelper:149 - reflection optimizer disabled for: test.h ibernate.data.OrderItem, NullPointerException: null i am using hibernate 2.1 and mysql hi i am new to thr hibernate, so i am doing some simple application, so i have 3 tables. here are the 3 tables. CREATE TABLE ORDERS( ID VARCHAR NOT NULL PRIMARY ...

6. NullPointerException on adding Order.asc to child class    forum.hibernate.org

Newbie Joined: Thu Apr 29, 2004 11:40 am Posts: 11 Hibernate works perfectly until I try and execute: searchCriteria.addOrder( Order.asc( "pc.intranetId" ) ); which cause a NullPointerException... Any thoughts? I've got no clue on this one. Thanks in advance Many details below! Hibernate version: 2.1.7c Mapping documents: