Hi,
I have another problem with hibernate 3.2.0-cr3 and one-to-one associations. Here is my mapping files, my query and the error log. Hibernate complains about two operands that are identical
Seb
Hibernate version:
3.2.0-cr3
Mapping documents:
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.bodet.gtp.domaine.demande.demande_absence.ValideurAbsence" table="VALIDEUR_ABSENCE" lazy="true">
<id name="oid" column="VALIDEUR_ABSENCE_" type="com.bodet.open.types.hibernate.OidType">
<generator class="foreign">
<param name="property">utilisateur</param>
</generator>
</id>
<one-to-one name="utilisateur" class="com.bodet.commun.domaine.administration.utilisateur.Valideur" constrained="true" />
<many-to-one name="renvoiSiAbsent" class="com.bodet.gtp.domaine.demande.demande_absence.ValideurAbsence">
<column name="RENVOI_SI_ABSENT_" />
</many-to-one>
<many-to-one name="renvoiNiveauSuperieur" class="com.bodet.gtp.domaine.demande.demande_absence.ValideurAbsence">
<column name="RENVOI_NIVEAU_SUPERIEUR_" />
</many-to-one>
</class>
</hibernate-mapping>
Code between sessionFactory.openSession() and session.close():Code:
String FINDER_VALIDEUR_ABSENCE = " select valideur.utilisateur, valideur "
+ " from ValideurAbsence valideurAbsence, Valideur valideur "
+ " where valideurAbsence.utilisateur = valideur"
+ " order by valideur.utilisateur.nom, valideur.utilisateur.prenom ";
Full stack trace of any exception that occurs:Code:
2006-07-26 09:05:48,598 ERROR : Exception lors du traitement du getRecords pour commun.DSP_ListeValideur
org.springframework.orm.hibernate3.HibernateSystemException: left and right hand sides of a binary logic operator were incompatibile [com.bodet.commun.domaine.administration.utilisateur.Valideur : com.bodet.commun.domaine.administration.utilisateur.Valideur]; nested exception is org.hibernate.TypeMismatchException: left and right hand sides of a binary logic operator were incompatibile [com.bodet.commun.domaine.administration.utilisateur.Valideur : com.bodet.commun.domaine.administration.utilisateur.Valideur]
Caused by:
org.hibernate.TypeMismatchException: left and right hand sides of a binary logic operator were incompatibile [com.bodet.commun.domaine.administration.utilisateur.Valideur : com.bodet.commun.domaine.administration.utilisateur.Valideur]
at org.hibernate.hql.ast.tree.BinaryLogicOperatorNode.mutateRowValueConstructorSyntaxesIfNecessary(BinaryLogicOperatorNode.java:62)
at org.hibernate.hql.ast.tree.BinaryLogicOperatorNode.initialize(BinaryLogicOperatorNode.java:51)
at org.hibernate.hql.ast.HqlSqlWalker.prepareLogicOperator(HqlSqlWalker.java:1014)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.comparisonExpr(HqlSqlBaseWalker.java:3992)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:1762)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.whereClause(HqlSqlBaseWalker.java:776)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:577)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:281)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:229)
at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:228)
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:160)
at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:111)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:77)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:56)
at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:72)
at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133)
at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112)
at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1623)
at org.springframework.orm.hibernate3.HibernateTemplate$29.doInHibernate(HibernateTemplate.java:830)
at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:366)
at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:828)
at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:820)
at com.bodet.gtp.service.delphi.commun.DSP_ListeValideur.getRecords(DSP_ListeValideur.java:120)
at com.bodet.open.service.delphi.framework.service.implementation.KelioWebServiceImpl.getRecords(KelioWebServiceImpl.java:340)
at sun.reflect.GeneratedMethodAccessor85.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:589)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:266)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:100)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:209)
at $Proxy1.getRecords(Unknown Source)
at com.bodet.open.service.delphi.framework.service.KelioServlet.getRecords(KelioServlet.java:437)
at com.bodet.open.service.delphi.framework.service.KelioServlet.execute(KelioServlet.java:236)
at com.bodet.open.service.delphi.framework.service.KelioServlet.doGet(KelioServlet.java:118)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:702)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:644)
at java.lang.Thread.run(Thread.java:618)
Name and version of the database you are using:
Firebird 1.5.2