Hi to @ll, I'm working with Hibernate3, I'm retrieving properties from several objects:
select a.property1, a.property2, b.property1.... from a, b
with HQL query.
I've created a plain class for get this property in a specific DTO:
Code:
List myList = query.list("select new myDTOClass(a.property, b.property1) from a, b ....");
but I'm getting this error:
06/10/12 15:00:10 java.lang.NullPointerException
06/10/12 15:00:10 at java.lang.Class.forName0(Native Method)
06/10/12 15:00:10 at java.lang.Class.forName(Class.java:164)
...
...
org.hibernate.QueryException: Incorrect query syntax [select new FisImpuestoDto(bi.codigoImpuesto, io.nombre, io.codigoFormulario) from gt.gob.sat.jfisat.jpista.backend.dto.FisBaImpuestoDto bi, gt.gob.sat.jfisat.jpista.backend.dto.FgImpuestoObligacion2Dto io where io.codigoImpObl = bi.codigoImpuesto and io.codigoTabla is not null and io.tipo = bi.tipo and io.tipo = 'I']
at org.hibernate.hql.classic.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:208)
...
...
Caused by: java.lang.NullPointerException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
Anyone got the same error?
Thanks in advance