Subject Firebird 1.5/Hibernate 2.0
Author Sturdevant, Jonathon
I seem to be having a problem searching our Firebird 1.5 database ...



I have a table with a column that is VARCHAR(300), let's call it NAME,
when I do a search on that column (programmatically, but not manually),
I always get back an exception ...



net.sf.hibernate.exception.GenericJDBCException: Unable to perform find

at
net.sf.hibernate.exception.SQLStateConverter.handledNonSpecificException
(SQLStateConverter.java:81)

at
net.sf.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.j
ava:70)

at
net.sf.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelp
er.java:30)

at
net.sf.hibernate.impl.SessionImpl.convert(SessionImpl.java:4110)

at
net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:3651)

at
net.sf.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:238)

at ourpackage.OurClass.search (OurClass.java:575)

at
ourpackage.OurStrutsAction.execute(OurStrutsAction.java:72)

at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr
ocessor.java:421)

at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
226)

at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)

at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)

at
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)

at
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:237)

at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:157)

at
edu.yale.its.tp.cas.client.filter.CASFilter.doFilter(CASFilter.java:366)

at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:186)

at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:157)

at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:214)

at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:104)

at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
20)

at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCon
textValve.java:198)

at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:152)

at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:104)

at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
20)

at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:137)

at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:104)

at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:118)

at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:102)

at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
20)

at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:109)

at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:104)

at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
20)

at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)

at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)

at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:79
9)

at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
onnection(Http11Protocol.java:705)

at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:57
7)

at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:683)

at java.lang.Thread.run(Thread.java:536)

Caused by: org.firebirdsql.jdbc.FBSQLException: GDS Exception.
335544321. arithmetic exception, numeric overflow, or string truncation

at
org.firebirdsql.jdbc.FBStatementFetcher.fetch(FBStatementFetcher.java:19
8)

at
org.firebirdsql.jdbc.FBStatementFetcher.next(FBStatementFetcher.java:110
)

at
org.firebirdsql.jdbc.FBResultSet.next(FBResultSet.java:223)

at net.sf.hibernate.loader.Loader.doQuery(Loader.java:280)

at
net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Lo
ader.java:133)

at net.sf.hibernate.loader.Loader.doList(Loader.java:1033)

at net.sf.hibernate.loader.Loader.list(Loader.java:1024)

at
net.sf.hibernate.loader.CriteriaLoader.list(CriteriaLoader.java:118)

at
net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:3648)

... 36 more



With further testing, it seems that I only get this exception when there
is a row in the table that has a NAME that is greater than 80
characters.



Any ideas on what is going wrong?



Thanks,

Jon



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