Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Ibatis with Spring

843859Mar 19 2009 — edited Mar 24 2009
Hi everybody,
I'm using Ibatis with Spring for Java Database Connectivity and persistence and I have the following stackTrace when I try to insert some data in a table:

org.springframework.jdbc.UncategorizedSQLException: SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [HY004]; error code [0];
--- The error occurred in com/domain/dao/sqlmap/Errori.xml.
--- The error occurred while applying a parameter map.
--- Check the Errori.insertErrori-InlineParameterMap.
--- Check the parameter mapping for the 'fg_consmod' property.
--- Cause: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]The specified SQL type is not supported by this driver.; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in com/domain/dao/sqlmap/Errori.xml.
--- The error occurred while applying a parameter map.
--- Check the Errori.insertErrori-InlineParameterMap.
--- Check the parameter mapping for the 'fg_consmod' property.
--- Cause: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]The specified SQL type is not supported by this driver.
at java.lang.Throwable.<init>(Throwable.java)
at java.lang.Throwable.<init>(Throwable.java)
at org.springframework.core.NestedRuntimeException.<init>(NestedRuntimeException.java:58)
at org.springframework.dao.DataAccessException.<init>(DataAccessException.java:55)
at org.springframework.jdbc.UncategorizedSQLException.<init>(UncategorizedSQLException.java:43)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:212)
at org.springframework.orm.ibatis.SqlMapClientTemplate.insert(SqlMapClientTemplate.java:397)
at com.persistence.sqlmapdao.ErroriSqlMapDao.insertErrori(ErroriSqlMapDao.java:34)
at com.service.impl.SisErroriServiceImpl.insertErrori(SisErroriServiceImpl.java:36)
at com.sysdat.servlet.SysdatHttpServlet.doPost(SysdatHttpServlet.java:77)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:983)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:564)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:672)

This is the xml file with thw queries
<sqlMap namespace="Errori">
	<typeAlias alias="errori" type="com.domain.Errori"/>
<insert id="insertErrori" parameterClass="errori">
  	insert into Errori (cod_err, des_err, tp_err, fg_consmod, fg_reg, lang, help, orig_err, dt_ins, id_help, modulo, livelo, cod_ute, flag_ins) 
  	values (#cod_err#, #des_err#, #tp_err#, #fg_consmod#, #fg_reg#, #lang#, #help#, #orig_err#, #dt_ins#, #id_help#, #modulo#, #livelo#, #cod_ute#, #flag_ins#)
  </insert>  
</sqlMap>
The following code is part of the Javabean with the field for wich I get problems:
private String fg_consmod;
My version of Ibatis is 2.3.0
Can you help me?
Thanks and regards

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Apr 21 2009
Added on Mar 19 2009
2 comments
3,047 views