Subject Firebird iBatis error
Author Sunil Sreedharan
I am using firebird embedded and iBatis to build a small application. My sql
Map looks like this

<select id="validateUser" parameterClass="com.esq.intr.to.UserTo"
resultClass="java.lang.String">
SELECT USER_F_NAME from USER_MASTER where USER_ID = #userId#
</select>

On execution, I get the below error
SEVERE: Servlet.service() for servlet jsp threw exception
com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in sql/Common.sql.
--- The error occurred while executing query.
--- Check the SELECT user_F_NAME from USER_MASTER where USER_ID =
? .
--- Check the SQL Statement (preparation failed).
--- Cause: org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544854. No
message for code 335544854 found.
null
Caused by: org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544854. No
message for code 335544854 found.
null
at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWith
Callback(GeneralStatement.java:185)
at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForO
bject(GeneralStatement.java:104)
at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapEx
ecutorDelegate.java:561)
at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapEx
ecutorDelegate.java:536)
at
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForObject(SqlMapSession
Impl.java:93)
at
com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForObject(SqlMapClientIm
pl.java:70)
at com.esquire.intranet.test.Test.main1(Test.java:16)
at org.apache.jsp.pages.Welcome_jsp._jspService(Welcome_jsp.java:57)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
89)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:319)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:270)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:191)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:227)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:174)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127
)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104
)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:108)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:211)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:817)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http
11Protocol.java:623)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:444)
at java.lang.Thread.run(Unknown Source)
Caused by: org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544854. No
message for code 335544854 found.
null
at
org.firebirdsql.jdbc.AbstractPreparedStatement.<init>(AbstractPreparedStatem
ent.java:118)
at
org.firebirdsql.jdbc.FBPreparedStatement.<init>(FBPreparedStatement.java:40)
at
org.firebirdsql.jdbc.AbstractConnection.prepareStatement(AbstractConnection.
java:849)
at
org.firebirdsql.jdbc.AbstractConnection.prepareStatement(AbstractConnection.
java:812)
at
org.firebirdsql.jdbc.AbstractConnection.prepareStatement(AbstractConnection.
java:805)
at
org.firebirdsql.jdbc.AbstractConnection.prepareStatement(AbstractConnection.
java:286)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
com.ibatis.common.jdbc.SimpleDataSource$SimplePooledConnection.invoke(Simple
DataSource.java:946)
at $Proxy0.prepareStatement(Unknown Source)
at
com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.java
:167)
at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.sqlExecuteQuery(
GeneralStatement.java:205)
at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWith
Callback(GeneralStatement.java:173)

If I remove the "WHERE" clause completely the query executes and returns me
the data.

Please help in resolving the issue.

Regards,
Sunil Sreedharan



[Non-text portions of this message have been removed]