[hibernate-issues] [Hibernate-JIRA] Created: (HHH-7192) NullPointerException in QueryTranslatorImpl on erroneously typed delete query
Alex Cruise (JIRA)
noreply at atlassian.com
Tue Mar 20 19:45:48 EDT 2012
NullPointerException in QueryTranslatorImpl on erroneously typed delete query
-----------------------------------------------------------------------------
Key: HHH-7192
URL: https://hibernate.onjira.com/browse/HHH-7192
Project: Hibernate ORM
Issue Type: Bug
Components: query-hql
Affects Versions: 4.1.1, 4.1.0
Environment: Hibernate 4.1.1 (also affects 4.1.0), Postgresql
Reporter: Alex Cruise
Calling code:
val deleteFileQuery = "delete from FileInstanceEntity f where f.uri = 'file:/blah.txt'"
em.getTransaction.begin()
val q = em.createQuery(deleteFileQuery, classOf[FileInstanceEntity]) // FYI classOf[Foo] is the Scala equivalent of Java's Foo.class --
// and it's the presence of this parameter that causes problems
q.executeUpdate()
em.getTransaction.commit()
Stack trace:
Exception in thread "main" java.lang.NullPointerException
at org.hibernate.hql.internal.ast.QueryTranslatorImpl.getDynamicInstantiationResultType(QueryTranslatorImpl.java:571)
at org.hibernate.engine.query.spi.HQLQueryPlan.getDynamicInstantiationResultType(HQLQueryPlan.java:340)
at org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:313)
at com.example.JpaEntityTest$.main(JpaEntityTest.scala:178)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list