NullPointerException « Query « JPA Q&A





1. nullpointerexception during Hibernate Envers find method    stackoverflow.com

I have not been using envers for very long, and i have hit a problem i just cant seem to find the answer to anywhere. I have tried googling the stack ...

2. JPQL Subquery NullPointerException    coderanch.com

Good day. May I know what could be causing the error below. Everytime I include the subquery, my EntityManager throws a NullPointerException. However, the subquery works just fine. By the way, I am using JPA here, and the code below is my JPQL. select count(*) from CaseInformation c where c.courtCase.status \= \:documentStatus and c.courtCase.division.id \= \:divisionId and c.courtCase.lawyer.id IS NULL and ...

4. NullPointerException in find after java.sql.SQLException    forum.hibernate.org

Hi guys. Can't figure this out. I try to do an insert. If it fails I want to check that it failed because of a duplicate entry. In pseudo code: try{ session.connect(); session.save(object); session.flush(); }catch(Exception){ query="look for the object with name=object.getName()" session.find(myquery). }finally{ session.disconnect(); } The find throws a nullpointer exception.??? If I close and reopen the connection before the find, ...

5. NullPointerException trying to use Collection in ORDER BY    forum.hibernate.org

I'm getting a NullPointerException from PathExpressionParser when trying to issue the following HQL query: "select o.id, o.name, o.phones[0].areaCode, o.phones[0].exchange from Individual o where o.source = 'foo' order by o.name, o.phones[0].areaCode, o.phones[0].exchange" I'm guessing that this is happening because Hibernate doesn't understand how to follow the collection references in the order by clause. Is that correct? If so, are there any plans ...

6. NullPointerException when querying in Hibernate + JBX    forum.hibernate.org

Hibernate version:2.1.3 Mapping documents: Code between sessionFactory.openSession() and session.close(): Full stack trace of any exception that occurs: Name and version of the database you are using:MySQL Debug level Hibernate log excerpt: Hi,everyone! I use JBX + Hibernate to write a query method, and show the result in a JTable. Here is my code: Code: String rowData[][] = new String[255][5]; UserInfo users[] ...

8. Query gives java.lang.NullPointerException    forum.hibernate.org





10. Getting a NullPointerException when doing query    forum.hibernate.org

The Publisher table has only one row. When I do a get everything is fine. I can insert and update. I just can't do a query. I am getting this problem with other tables as well. I picked the simplest table to show the problem. I am using Hybernate Syncronizer to generate the framework. Hibernate version:3.1.2 Mapping documents: Code: ...

11. NullpointerException on simple update query    forum.hibernate.org

I experience a similar problem, code worked fine with 3.0.5, but after upgrading to 3.2.2 I get this problem. I have read the migration guide, but didnt find any obvious solution. Hibernate version: core-3.2.2GA, 3.0.5 Full stack trace of any exception that occurs: java.lang.NullPointerException at org.hibernate.hql.ast.util.SessionFactoryHelper.findSQLFunction(SessionFactoryHelper.java:342) at org.hibernate.hql.ast.tree.IdentNode.getDataType(IdentNode.java:266) at org.hibernate.hql.ast.tree.BinaryLogicOperatorNode.extractDataType(BinaryLogicOperatorNode.java:168) at org.hibernate.hql.ast.tree.BinaryLogicOperatorNode.initialize(BinaryLogicOperatorNode.java:34) at org.hibernate.hql.ast.HqlSqlWalker.prepareLogicOperator(HqlSqlWalker.java:1007) at org.hibernate.hql.antlr.HqlSqlBaseWalker.comparisonExpr(HqlSqlBaseWalker.java:3992) at org.hibernate.hql.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:1762) at org.hibernate.hql.antlr.HqlSqlBaseWalker.whereClause(HqlSqlBaseWalker.java:776) at ...

12. NullPointerException when using criteria with projection    forum.hibernate.org

Need help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp Hibernate version: 3.2.0cr2 Mapping documents: using annotation mapping Code between sessionFactory.openSession() and session.close(): Code: DetachedCriteria dc = DetachedCriteria.forClass(Debt.class); dc.add(Restrictions.eq("client", getClient())); ...

13. Null pointer exception while parsing the query!!    forum.hibernate.org

Hi All, I am getting Null pointer exception when the query is being parsed by Hibernate. The query is little complicate and I am not sure whether Hibernate supports it or not. Need help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp [b]hibernate3.jar[/b] [b]Mapping documents:[/b] [b] Configuration cfg = new Configuration(); SessionFactory sessions = cfg.configure().buildSessionFactory(); Session session = sessions.openSession(); String SQL_QUERY ...

14. NullPointerException thrown for Projections    forum.hibernate.org

15. NullPointerExceptions with my query    forum.hibernate.org

I am a JPA/Hib noob. I've got a table with some numeric columns, but I need to do some string comparisons using the LIKE phrase. So I've got a query like: Code: SELECT re FROM ResEntity re WHERE (CAST(re.x AS string) LIKE :match) OR (CAST(re.y AS string) LIKE :match) While Hibernate will accept this query, calling q.set("match", "123%") only sets the ...

16. NullPointerException while using Criteria Query in DB2    forum.hibernate.org

Hi, We are getting a Null Pointer Exception when trying to retrieve data from a DB2 database (v8.1) on z/OS. Has anyone faced this before? Any help in this matter is appreciated. java.lang.NullPointerException at java.util.Hashtable.getEntry(Hashtable.java:468) at java.util.Hashtable.containsKey(Hashtable.java:354) at com.ibm.db2.jcc.b.sf.setCursorName(sf.java:763) at com.ibm.websphere.rsadapter.DB2UniversalDataStoreHelper.doStatementCleanup(DB2UniversalDataStoreHelper.java:225) at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.closeWrapper(WSJdbcPreparedStatement.java:435) at com.ibm.ws.rsadapter.jdbc.WSJccPreparedStatement.closeWrapper(WSJccPreparedStatement.java:274) at com.ibm.ws.rsadapter.jdbc.WSJdbcObject.close(WSJdbcObject.java:185) at com.ibm.ws.rsadapter.jdbc.WSJdbcObject.close(WSJdbcObject.java:144) at org.hibernate.jdbc.AbstractBatcher.closePreparedStatement(AbstractBatcher.java:563) at org.hibernate.jdbc.AbstractBatcher.closeStatement(AbstractBatcher.java:291) at org.hibernate.jdbc.AbstractBatcher.closeQueryStatement(AbstractBatcher.java:307) at org.hibernate.jdbc.AbstractBatcher.closeQueryStatement(AbstractBatcher.java:234) at org.hibernate.loader.Loader.doQuery(Loader.java:749) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259) ...