-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: SAPDBDialect problem with booleans in Hibernate 3.1
PostPosted: Thu Jan 12, 2006 11:05 am 
Newbie

Joined: Thu Jan 12, 2006 10:51 am
Posts: 1
Using Hibernate 3.1 against SAP DB v7.4.3.

Running an HQL query such as "from Product where active = true", Hibernate throws an exception:

Code:
org.hibernate.exception.GenericJDBCException: could not execute query
   at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:91)
   at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:79)
   at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
   at org.hibernate.loader.Loader.doList(Loader.java:2153)
   at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
   at org.hibernate.loader.Loader.list(Loader.java:2024)
   at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:369)
   at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:300)
   at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:146)
   at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1093)
   at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
   at com.brightpoint.direct.HqlTest.main(HqlTest.java:23)
Caused by: com.sap.dbtech.jdbc.exceptions.DatabaseException: [-8006] (at 389): Data types must be compatible
   at com.sap.dbtech.jdbc.packet.ReplyPacket.createException(ReplyPacket.java:69)
   at com.sap.dbtech.jdbc.ConnectionSapDB.throwSQLError(ConnectionSapDB.java:763)
   at com.sap.dbtech.jdbc.ConnectionSapDB.execute(ConnectionSapDB.java:429)
   at com.sap.dbtech.jdbc.CallableStatementSapDB.sendCommand(CallableStatementSapDB.java:1528)
   at com.sap.dbtech.jdbc.StatementSapDB.sendSQL(StatementSapDB.java:723)
   at com.sap.dbtech.jdbc.CallableStatementSapDB.doParse(CallableStatementSapDB.java:224)
   at com.sap.dbtech.jdbc.CallableStatementSapDB.constructor(CallableStatementSapDB.java:175)
   at com.sap.dbtech.jdbc.CallableStatementSapDB.<init>(CallableStatementSapDB.java:79)
   at com.sap.dbtech.jdbc.ConnectionSapDB.prepareStatement(ConnectionSapDB.java:655)
   at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:442)
   at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:368)
   at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:105)
   at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1561)
   at org.hibernate.loader.Loader.doQuery(Loader.java:661)
   at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
   at org.hibernate.loader.Loader.doList(Loader.java:2150)


Stepping in through debug, the issue seems to be that LiteralProcessor makes a call to the Dialect's toBooleanValueString() in order to convert boolean literals.

Has anyone else seen this issue?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.