Erreur d'execution requete HQL avec constructeur
Bonjour,
J'ai une classse ResultatFiscal :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| --------------------------------------------------------------
public class ResultatFiscal extends Declaration {
private Long id;
private TypeSociete typeSociete;
private TypeDeclaration typeDeclaration;
public ResultatFiscal( )
{ }
public ResultatFiscal(Long id, TypeSociete typeSociete , TypeDeclaration typeDeclaration)
{
this.setId(id);
this.setTypeSociete(typeSociete);
this.setTypeDeclaration(typeDeclaration);
}
-------------------------------------------------------------- |
Quand j'éxécute la requette :
Code:
1 2 3 4
| --------------------------------------------------------
select new ResultatFiscal(id, typeSociete, typeDeclaration)
from ResultatFiscal R where R.id = :id
-------------------------------------------------------- |
Le système me donnel'erreur suivante :
Code:
1 2 3 4 5 6
| Caused by: java.lang.ExceptionInInitializerError
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
Caused by: java.lang.NullPointerException
at org.hibernate.util.ReflectHelper.getConstructor(ReflectHelper.java:172)
at org.hibernate.hql.ast.tree.ConstructorNode.resolveConstructor(ConstructorNode.java:114) |
qu'est ce qui ne vas pas ?
Merci d'avance.