Hibernate version: 2
Mapping documents: all mapping documents are good
Code between sessionFactory.openSession() and session.close():
Logger log = Logger.getLogger(this.getClass()); Session session = newSession(NOMDESESSION); List listeAction; int ficheValidation = getCodeDocument(codeAction); try { StringBuffer requete = new StringBuffer(); requete.append("select new fr.bdpme.fcp.business.service.metier.Evenement("); requete.append(" teactfcp.nactfc, teactfcp.tedocfcp.ndocfc, teactfcp.ctactf,teactfcp.cetact,"); requete.append(" teactfcp.dcactf, teactfcp.hacfcp, teactfcp.dtacti, teactfcp.cmatriAffec, teactfcp.cmatriReal,"); requete.append(" teactfcp.cnprop, teactfcp.cnvali, teactfcp.ltcomm, teactfcp.telicrre.nlcref, "); requete.append(" teactfcp.udemaj, teactfcp.sdemaj) "); requete.append("from fr.bdpme.fcp.business.bean.Teactfcp as teactfcp"); requete.append(" where teactfcp.tedocfcp.ndocfc = "); requete.append(ficheValidation); requete.append(" and teactfcp.ctactf = "); requete.append(typeAction); requete.append(" order by teactfcp.dcactf, teactfcp.nactfc asc"); listeAction = session.find(requete.toString());
Iterator iter = listeAction.iterator();
while (iter.hasNext()) { Evenement evenement = (Evenement) iter.next(); Uti00708 uti00708 = (Uti00708) session.get(Uti00708.class, new Short(evenement.getCodeProposition())); if (null != uti00708) { evenement.setLibelleProposition(uti00708.getInprop()); } requete = new StringBuffer(); requete.append("select uti00693.invali from fr.bdpme.fcp.business.bean.Uti00693 as uti00693"); requete.append(" where uti00693.comp_id.cnvali = "); requete.append(evenement.getCodeMotif()); List motif = session.find(requete.toString()); if (!motif.isEmpty()) { evenement.setLibelleMotif((String) motif.get(0)); } } } catch (HibernateException ex) { log.error(ex.toString()); throw new RunTimeApplicationException(errorMsg.getString("errors.recherche")); } finally { try { session.close(); } catch (HibernateException ex) { log.error(ex.toString()); throw new RunTimeApplicationException(errorMsg.getString("errors.hibernate.connexion")); } }
Full stack trace of any exception that occurs: [26/10/04 17:08:53:117 CEST] 3a07644c SystemOut O Hibernate: select teactfcp0_.NACTFC as x0_0_, teactfcp0_.NDOCFC_DOCFCP as x1_0_, teactfcp0_.CTACTF as x2_0_, teactfcp0_.CETACT as x3_0_, teactfcp0_.DCACTF as x4_0_, teactfcp0_.HACFCP as x5_0_, teactfcp0_.DTACTI as x6_0_, teactfcp0_.CMATRI_AFFEC as x7_0_, teactfcp0_.CMATRI_REAL as x8_0_, teactfcp0_.CNPROP as x9_0_, teactfcp0_.CNVALI as x10_0_, teactfcp0_.LTCOMM as x11_0_, teactfcp0_.NLCREF_LICRRE as x12_0_, teactfcp0_.UDEMAJ as x13_0_, teactfcp0_.SDEMAJ as x14_0_ from DBM01.TEACTFCP teactfcp0_ where (teactfcp0_.NDOCFC_DOCFCP=1005769 )and(teactfcp0_.CTACTF=5 ) order by teactfcp0_.DCACTF , teactfcp0_.NACTFC asc [26/10/04 17:08:53:133 CEST] 3a07644c SystemOut O Hibernate: select uti007080_.cnprop as cnprop0_, uti007080_.inprop as inprop0_, uti007080_.lnprop as lnprop0_ from DBM01.Uti00708 uti007080_ where uti007080_.cnprop=? [26/10/04 17:08:53:133 CEST] 3a07644c SystemOut O Hibernate: select uti006930_.INVALI as x0_0_ from DBM01.UTI00693 uti006930_ where (uti006930_.CNVALI=0 )
[color=blue][26/10/04 17:08:53:133 CEST] 3a07644c SharedPool I J2CA0086W: La connexion partageable MCWrapper id 1f1a25e7 Managed connection com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl@6e0de5e7 State:STATE_TRAN_WRAPPER_INUSE utilis
|