hi sir,
i get a quite "Strange" exception, i would like to know how to due with it?
i am running my application on MySQL 4.0.12
but it interpret my 'false' boolean value as a column name
the sql statement look like this one
String sql = "SELECT chu FROM hk.hku.csis.wsr.database.table.ConfigHasUUId as chu, " +
"hk.hku.csis.wsr.database.table.UUIdMessageId as UUIdMessageId WHERE " +
"chu.conversationId = '" + conversationId + "' AND " +
"UUIdMessageId.uuId = chu.uuId AND " +
"UUIdMessageId.delivered = " + false + " AND " +
"UUIdMessageId.outgoing = " + false;
I also tried the following one
String sql = "SELECT chu FROM hk.hku.csis.wsr.database.table.ConfigHasUUId as chu, " +
"hk.hku.csis.wsr.database.table.UUIdMessageId as UUIdMessageId WHERE " +
"chu.conversationId = '" + conversationId + "' AND " +
"UUIdMessageId.uuId = chu.uuId AND " +
"UUIdMessageId.delivered = false AND " +
"UUIdMessageId.outgoing = false";
the 2 statements above run perfect in postgresql 7.3.4
THX
wsr
- SQL Error: 1054, SQLState: S0022
- Column not found, message from server: "Unknown column 'false' in 'where clause'"
- Could not execute query
java.sql.SQLException: Column not found, message from server: "Unknown column 'false' in 'where clause'"
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1905)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1109)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1203)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2090)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1496)
at net.sf.hibernate.impl.BatcherImpl.getResultSet(BatcherImpl.java:71)
at net.sf.hibernate.loader.Loader.getResultSet(Loader.java:551)
at net.sf.hibernate.loader.Loader.doFind(Loader.java:140)
at net.sf.hibernate.loader.Loader.find(Loader.java:620)
at net.sf.hibernate.hql.QueryTranslator.find(QueryTranslator.java:928)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1343)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1322)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1314)
at hk.hku.csis.wsr.database.MessageIdMappingHibernateImpl.getTEntry(MessageIdMappingHibernateImpl.java:403)
at hk.hku.csis.wsr.database.MessageIdMappingHibernateImpl.getUUIdMessageId(MessageIdMappingHibernateImpl.java:195)
at hk.hku.csis.wsr.database.MessageIdMappingHibernateImpl.getWSRMMessageId(MessageIdMappingHibernateImpl.java:60)
at hk.hku.csis.wsr.database.WSRMMessageStoreHibernateImpl.getWSRMMessageId(WSRMMessageStoreHibernateImpl.java:1196)
at hk.hku.csis.wsr.client.handler.WSRMServiceFacadeImpl1_1.receive(WSRMServiceFacadeImpl1_1.java:134)
at hk.hku.csis.wsr.client.handler.WSRMService.receive(WSRMService.java:82)
at hk.hku.csis.wsr.client.handler.WSRMService.main(WSRMService.java:232)
hk.hku.csis.wsr.data.WSRMException: hk.hku.csis.wsr.database.WSRMPersistenceException: Could not execute query: Column not found, message from server: "Unknown column 'false' in 'where clause'"
at hk.hku.csis.wsr.client.handler.WSRMServiceFacadeImpl1_1.receive(WSRMServiceFacadeImpl1_1.java:138)
at hk.hku.csis.wsr.client.handler.WSRMService.receive(WSRMService.java:82)
at hk.hku.csis.wsr.client.handler.WSRMService.main(WSRMService.java:232)
Caused by: hk.hku.csis.wsr.database.WSRMPersistenceException: Could not execute query: Column not found, message from server: "Unknown column 'false' in 'where clause'"
at hk.hku.csis.wsr.database.MessageIdMappingHibernateImpl.getTEntry(MessageIdMappingHibernateImpl.java:410)
at hk.hku.csis.wsr.database.MessageIdMappingHibernateImpl.getUUIdMessageId(MessageIdMappingHibernateImpl.java:195)
at hk.hku.csis.wsr.database.MessageIdMappingHibernateImpl.getWSRMMessageId(MessageIdMappingHibernateImpl.java:60)
at hk.hku.csis.wsr.database.WSRMMessageStoreH
|