Hello,
I have the following file code and the following error pleas help me
thank you
Hibernate version:3
Mapping documents:
Rejet.hbm.xml :
<class name="com.report.persistence.pojos.Rejet" table="REJET" >
<composite-id> <key-many-to-one name="rejapouv" class="com.report.persistence.pojos.Rejapouv" column="S_MOTIF" /> <key-many-to-one name="tournee" class="com.report.persistence.pojos.Tournee" column="S_IDTOUR" /> </composite-id>
<property name="nQtcour" type="java.lang.Integer" column="N_QTCOUR" length="5" /> <property name="nQtpages" type="java.lang.Integer" column="N_QTPAGES" length="5" />
<!-- Associations --> <!-- derived association(s) for compound key --> <!-- end of derived association(s) -->
</class>
Rejapouv.hbm.xml : <class name="com.report.persistence.pojos.Rejapouv" table="REJAPOUV" >
<id name="code" type="java.lang.Integer" column="CODE" > <generator class="assigned" /> </id> <property name="description" type="java.lang.String" column="DESCRIPTION" not-null="true" unique="true" length="50" /> <property name="type" type="java.lang.String" column="TYPE" length="20" /> <property name="ordre" type="java.lang.Integer" column="ORDRE" length="3" />
<!-- Associations --> <set name="rejets" lazy="true" inverse="true" cascade="all" > <key> <column name="DESCRIPTION" /> </key> <one-to-many class="com.report.persistence.pojos.Rejet" /> </set>
</class>
Tournee.hbm.xml :
<class name="com.report.persistence.pojos.Tournee" table="TOURNEE" >
<id name="sIdtour" type="java.lang.String" column="S_IDTOUR" > <generator class="assigned" /> </id>
<property name="dtArrivtour" type="java.util.Date" column="DT_ARRIVTOUR" length="7" /> <!-- Associations --> <!-- bi-directional one-to-many association to Rejet --> <set name="rejets" lazy="true" inverse="true" cascade="all" > <key> <column name="S_IDTOUR" /> </key> <one-to-many class="com.report.persistence.pojos.Rejet" /> </set> </class>
Code between sessionFactory.openSession() and session.close():
When i Tried this query :
list = myHibernateSession.createQuery("from com.report.persistence.pojos.Rejet").list();
Full stack trace of any exception that occurs:
i got this error :
2005-09-08 15:33:50,484 [http-8080-Processor24] INFO com.report.web.actions.TraitRejetRetourAction - Les champs saisies sont : year= month= day= strDate=080905
Hibernate: select rejet0_.S_MOTIF as S1_, rejet0_.S_IDTOUR as S2_, rejet0_.N_QTCOUR as N3_5_, rejet0_.N_QTPAGES as N4_5_ from REJET rejet0_
2005-09-08 15:33:51,812 [http-8080-Processor24] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: 17059, SQLState: null
2005-09-08 15:33:51,812 [http-8080-Processor24] ERROR org.hibernate.util.JDBCExceptionReporter - Echec de conversion dans la représentation interne
2005-09-08 15:33:51,843 [http-8080-Processor24] ERROR com.report.persistence.managers.RejetPersistenceManagerImpl - La recherche de tous les Rejet à echoué
org.hibernate.exception.GenericJDBCException: could not execute query
at org.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java:92)
at org.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:80)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.loader.Loader.doList(Loader.java:1596)
at org.hibernate.loader.Loader.list(Loader.java:1577)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:395)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:271)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:844)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
at com.report.persistence.managers.RejetPersistenceManagerImpl.findAll(RejetPersistenceManagerImpl.java:70)
at com.report.web.businessLayer.TraitRejetRetourBL.getRejetRetourByDay(TraitRejetRetourBL.java:50)
at com.report.web.actions.TraitRejetRetourAction.execute(TraitRejetRetourAction.java:56)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.commons.filter.HibernateFilter.doFilter(HibernateFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)
Caused by: java.sql.SQLException: Echec de conversion dans la représentation interne
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
at oracle.jdbc.driver.OracleStatement.getIntValue(OracleStatement.java:4290)
at oracle.jdbc.driver.OracleResultSetImpl.getInt(OracleResultSetImpl.java:510)
at oracle.jdbc.driver.OracleResultSet.getInt(OracleResultSet.java:1528)
at com.mchange.v2.c3p0.impl.NewProxyResultSet.getInt(NewProxyResultSet.java:2728)
at org.hibernate.type.IntegerType.get(IntegerType.java:26)
at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:77)
at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:68)
at org.hibernate.type.ManyToOneType.hydrate(ManyToOneType.java:84)
at org.hibernate.type.ComponentType.hydrate(ComponentType.java:423)
at org.hibernate.type.ComponentType.nullSafeGet(ComponentType.java:182)
at org.hibernate.loader.Loader.getKeyFromResultSet(Loader.java:759)
at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:292)
at org.hibernate.loader.Loader.doQuery(Loader.java:412)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:218)
at org.hibernate.loader.Loader.doList(Loader.java:1593)
... 31 more
Name and version of the database you are using:
Oracle 8i
The generated SQL (show_sql=true):
select rejet0_.S_MOTIF as S1_, rejet0_.S_IDTOUR as S2_, rejet0_.N_QTCOUR as N3_5_, rejet0_.N_QTPAGES as N4_5_ from REJET rejet0_
|