ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marco Berri <marco.be...@bluestudio.it>
Subject Postres 8.1 and double precision
Date Fri, 08 Jun 2007 10:11:18 GMT
Hi,

I have a problem with Postgres 8.1, ibatis and jdbc
postgresql-8.1-409.jdbc3.jar


My update map is ...

<update id="updmenuforId">
UPDATE PUBLIC.MENU
	<dynamic prepend="SET">					<isNotNull prepend="," property="priority">
PRIORITY=#priority#
</isNotNull>

<isNotNull prepend="," property="item_id">
ITEM_ID=#item_id#
</isNotNull>

<isNotNull prepend="," property="att_name">
ATT_NAME=#att_name#
</isNotNull>

<isNotNull prepend="," property="att_value">
ATT_VALUE=#att_value#
</isNotNull>
</dynamic>

WHERE MENU_ID=#menu_id#
</update>

if i try using "updmenuforId"" with postgresql-8.1-409.jdbc3.jar the
error is:

Error Execute query:updmenuforId key:{att_value=Personajes,
menu_id=138201, att_name=title, priority=10, item_id=1}
com.ibatis.common.jdbc.exception.NestedSQLException:   
--- The error occurred while applying a parameter map.  
--- Check the updmenuforId-InlineParameterMap.  
--- Check the statement (update failed).  
--- Cause: org.postgresql.util.PSQLException: ERROR: column "priority"
is of type double precision but expression is of type character varying
        at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpdate(GeneralStatement.java:91)
        at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.insert(SqlMapExecutorDelegate.java:447)
        at
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.insert(SqlMapSessionImpl.java:82)
        at
com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.insert(SqlMapClientImpl.java:59)
        at org.tnes.storage.StorageService.save(StorageService.java:871)
        at org.tnes.object.ObjectService.update(ObjectService.java:1107)
        at org.tnes.action.java.Save.exec(Save.java:351)
        at
org.tnes.script.NativeScriptManager.eval(NativeScriptManager.java:66)
        at
org.tnes.script.AbstractScriptManager.eval(AbstractScriptManager.java:59)
        at
org.tnes.action.ActionService.executeAction(ActionService.java:578)
        at
org.tnes.action.ActionService.executeAction(ActionService.java:538)
        at org.tnes.kernel.Cycle.exec(Cycle.java:925)
        at org.tnes.kernel.Cycle.action(Cycle.java:882)
        at org.tnes.kernel.Cycle.service(Cycle.java:252)
        at org.tnes.main.TnesFilter.doFilter(TnesFilter.java:164)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.tnes.kernel.MicroKernelFilter.doFilter(MicroKernelFilter.java:182)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.tnes.kernel.MicroKernelFilter.doFilter(MicroKernelFilter.java:212)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
        at org.apache.coyote.http11.Http11Protocol
$Http11ConnectionHandler.process(Http11Protocol.java:634)
        at org.apache.tomcat.util.net.JIoEndpoint
$Worker.run(JIoEndpoint.java:445)
        at java.lang.Thread.run(Thread.java:595)
Caused by: org.postgresql.util.PSQLException: ERROR: column "priority"
is of type double precision but expression is of type character varying
        at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1531)
        at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1313)
        at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:188)
        at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
        at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:354)
        at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:347)
        at
org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:168)
        at
com.ibatis.sqlmap.engine.execution.SqlExecutor.executeUpdate(SqlExecutor.java:81)
        at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.sqlExecuteUpdate(GeneralStatement.java:200)
        at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpdate(GeneralStatement.java:78)
        ... 32 more







with postgresql-74_jdbc.jar this does not happed!

Thanks!





Mime
View raw message