vendredi 31 juillet 2015

java.lang.StackOverflowError when creating a list querry

Hi i want to compare two date in a querry i got the following error

EJB Exception: : java.lang.StackOverflowError at org.eclipse.persistence.internal.jpa.EntityManagerImpl.createQuery(EntityManagerImpl.java:1603) at org.eclipse.persistence.internal.jpa.EntityManagerImpl.createQuery(EntityManagerImpl.java:1625) at sun.reflect.GeneratedMethodAccessor523.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at weblogic.persistence.BasePersistenceContextProxyImpl.invoke(BasePersistenceContextProxyImpl.java:110) at weblogic.persistence.TransactionalEntityManagerProxyImpl.invoke(TransactionalEntityManagerProxyImpl.java:79) at weblogic.persistence.BasePersistenceContextProxyImpl.invoke(BasePersistenceContextProxyImpl.java:91) at com.sun.proxy.$Proxy218.createQuery(Unknown Source) at model.Services.SessionEJBDossierBean.getDossierFindAllParDepartementDBTECHandUrgen(SessionEJBDossierBean.java:67) at model.Services.SessionEJBDossierBean.getDossierFindAllParDepartementDBTECHandUrgen(SessionEJBDossierBean.java:73) at model.Services.SessionEJBDossierBean.getDossierFindAllParDepartementDBTECHandUrgen(SessionEJBDossierBean.java:73) at model.Services.SessionEJBDossierBean.getDossierFindAllParDepartementDBTECHandUrgen(SessionEJBDossierBean.java:73) at model.Services.SessionEJBDossierBean.getDossierFindAllParDepartementDBTECHandUrgen(SessionEJBDossierBean.java:73) at model.Services.SessionEJBDossierBean.getDossierFindAllParDepartementDBTECHandUrgen(SessionEJBDossierBean.java:73) model.Services.SessionEJBDossierBean.getDossierFindAllParDepartementDBTECHandUrgen(SessionEJBDossierBean.java:73) at model.Services.SessionEJBDossierBean.getDossierFindAllParDepartementDBTECHandUrgen(SessionEJBDossierBean.java:73) at model.Services.SessionEJBDossierBean.getDossierFindAllParDepartementDBTECHandUrgen(SessionEJBDossierBean.java:73) at model.Services.SessionEJBDossierBean.getDossierFindAllParDepartementDBTECHandUrgen(SessionEJBDossierBean.java:73) at model.Services.SessionEJBDossierBean.getDossierFindAllParDepartementDBTECHandUrgen(SessionEJBDossierBean.java:73)

here is my code

public List<Dossier> getDossierFindAllParDepartementDBTECHandUrgen() {
    Calendar myFiveDaysAhead;
    myFiveDaysAhead = Calendar.getInstance();
    myFiveDaysAhead.add(Calendar.DATE, 5);

    TypedQuery<Dossier> query;
    query =
        em.createQuery("SELECT d FROM Dossier d WHERE d.depid=1 AND d.typeDossier = :tpd AND " +
                       "d.dateCreation < :fiveDaysAhead", Dossier.class);

    query.setParameter("tpd", "Urgent");
    query.setParameter("fiveDaysAhead", myFiveDaysAhead, TemporalType.TIMESTAMP);
    return getDossierFindAllParDepartementDBTECHandUrgen();
}

Aucun commentaire:

Enregistrer un commentaire