-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 
Author Message
 Post subject: 'Numeric value out of range' with DB2 on BIGINIT column
PostPosted: Sun Feb 22, 2004 12:08 am 
Newbie

Joined: Sat Feb 21, 2004 10:37 am
Posts: 4
Location: USA, FL
Hi All,
I'm getting the TRAS0014I: The following exception was logged COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver] CLI0111E Numeric value out of range. SQLSTATE=22003

at the following code if I use Long type for the argument. However it works OK if I use Integer. If I use pure JDBC calls it works fine as well.

My database is DB2 8.1 fp3

Code:
Session session = AuthFilter.getSession();
         Transaction tx= session.beginTransaction();
         List list = session.find("select user from User as user where user.lUserId=?",new Long(34),Hibernate.LONG);      
   for (Iterator it = list.iterator(); it.hasNext();)  //<-crashes here
{   User user = (User) it.next();
   System.out.println("User: " + user.getStLoginName() );
         }


Here is the mapping file for my class:
    <hibernate-mapping>
    <class name="ibsi.crm.entities.User" table="USERS" schema="DB2ADMIN">
    <!-- A 32 hex character is our surrogate key. It's automatically
    generated by Hibernate with the UUID pattern. -->
    <id name="lUserId">
    <column name="USER_ID" sql-type="BIGINT" not-null="true"/>
    <generator class="uuid.hex"/>
    </id>
    <property name="stLoginName">
    <column name="LOGINNAME" sql-type="varchar(20)" not-null="true"/>
    </property>
    </class>
    </hibernate-mapping>

    04 21:26:01:109 EST] 30d130d1 JDBCException W net.sf.hibernate.util.JDBCExceptionReporter SQL Error: -99999, SQLState: 22003
    [2/21/04 21:26:01:140 EST] 30d130d1 JDBCException E net.sf.hibernate.util.JDBCExceptionReporter [IBM][CLI Driver] CLI0111E Numeric value out of range. SQLSTATE=22003
    [2/21/04 21:26:01:140 EST] 30d130d1 JDBCException W net.sf.hibernate.util.JDBCExceptionReporter SQL Error: -99999, SQLState: 22003
    [2/21/04 21:26:01:156 EST] 30d130d1 JDBCException E net.sf.hibernate.util.JDBCExceptionReporter [IBM][CLI Driver] CLI0111E Numeric value out of range. SQLSTATE=22003
    [2/21/04 21:26:01:156 EST] 30d130d1 JDBCException E net.sf.hibernate.util.JDBCExceptionReporter Could not execute query
    [2/21/04 21:26:01:203 EST] 30d130d1 JDBCException E net.sf.hibernate.util.JDBCExceptionReporter TRAS0014I: The following exception was logged COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver] CLI0111E Numeric value out of range. SQLSTATE=22003
    at java.lang.Throwable.<init>(Throwable.java)
    at java.lang.Throwable.<init>(Throwable.java)
    at java.sql.SQLException.<init>(SQLException.java:52)
    at COM.ibm.db2.jdbc.DB2Exception.<init>(Unknown Source)
    at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(Unknown Source)
    at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(Unknown Source)
    at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_return_code(Unknown Source)
    at COM.ibm.db2.jdbc.app.DB2PreparedStatement.execute2(Unknown Source)
    at COM.ibm.db2.jdbc.app.DB2PreparedStatement.executeQuery(Unknown Source)
    at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.executeQuery(WSJdbcPreparedStatement.java:426)
    at net.sf.hibernate.impl.BatcherImpl.getResultSet(BatcherImpl.java:87)
    at net.sf.hibernate.loader.Loader.getResultSet(Loader.java:795)
    at net.sf.hibernate.loader.Loader.doQuery(Loader.java:189)
    at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133)
    at net.sf.hibernate.loader.Loader.doList(Loader.java:950)
    at net.sf.hibernate.loader.Loader.list(Loader.java:941)
    at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:834)
    at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1512)
    at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1491)
    at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1487)
    at ibsi.crm.command.TestCommand.execute(TestCommand.java:43)
    at ibsi.crm.servlets.FrontController.performTask(FrontController.java:48)
    at ibsi.crm.servlets.FrontController.doGet(FrontController.java:23)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    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.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:76)
    at ibsi.crm.servlets.filters.AuthFilter.doFilter(AuthFilter.java:61)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:965)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:555)
    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:593)
    .
    COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver] CLI0111E Numeric value out of range. SQLSTATE=22003
    at java.lang.Throwable.<init>(Throwable.java)
    at java.lang.Throwable.<init>(Throwable.java)
    at java.sql.SQLException.<init>(SQLException.java:52)
    at COM.ibm.db2.jdbc.DB2Exception.<init>(Unknown Source)
    at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(Unknown Source)
    at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(Unknown Source)
    at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_return_code(Unknown Source)
    at COM.ibm.db2.jdbc.app.DB2PreparedStatement.execute2(Unknown Source)
    at COM.ibm.db2.jdbc.app.DB2PreparedStatement.executeQuery(Unknown Source)
    at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.executeQuery(WSJdbcPreparedStatement.java:426)
    at net.sf.hibernate.impl.BatcherImpl.getResultSet(BatcherImpl.java:87)
    at net.sf.hibernate.loader.Loader.getResultSet(Loader.java:795)
    at net.sf.hibernate.loader.Loader.doQuery(Loader.java:189)
    at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133)
    at net.sf.hibernate.loader.Loader.doList(Loader.java:950)
    at net.sf.hibernate.loader.Loader.list(Loader.java:941)
    at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:834)
    at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1512)
    at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1491)
    at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1487)
    at ibsi.crm.command.TestCommand.execute(TestCommand.java:43)
    at ibsi.crm.servlets.FrontController.performTask(FrontController.java:48)
    at ibsi.crm.servlets.FrontController.doGet(FrontController.java:23)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    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.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:76)
    at ibsi.crm.servlets.filters.AuthFilter.doFilter(AuthFilter.java:61)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:965)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:555)
    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:593)

    net.sf.hibernate.JDBCException: Could not execute query
    at java.lang.Throwable.<init>(Throwable.java)
    at java.lang.Throwable.<init>(Throwable.java)
    at net.sf.hibernate.exception.NestableException.<init>(NestableException.java:180)
    at net.sf.hibernate.JDBCException.<init>(JDBCException.java:35)
    at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1515)
    at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1491)
    at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1487)
    at ibsi.crm.command.TestCommand.execute(TestCommand.java:43)
    at ibsi.crm.servlets.FrontController.performTask(FrontController.java:48)
    at ibsi.crm.servlets.FrontController.doGet(FrontController.java:23)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    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.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:76)
    at ibsi.crm.servlets.filters.AuthFilter.doFilter(AuthFilter.java:61)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:965)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:555)
    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:593)
    Caused by: COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver] CLI0111E Numeric value out of range. SQLSTATE=22003
    at java.lang.Throwable.<init>(Throwable.java)
    at java.lang.Throwable.<init>(Throwable.java)
    at java.sql.SQLException.<init>(SQLException.java:52)
    at COM.ibm.db2.jdbc.DB2Exception.<init>(Unknown Source)
    at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(Unknown Source)
    at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(Unknown Source)
    at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_return_code(Unknown Source)
    at COM.ibm.db2.jdbc.app.DB2PreparedStatement.execute2(Unknown Source)
    at COM.ibm.db2.jdbc.app.DB2PreparedStatement.executeQuery(Unknown Source)
    at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.executeQuery(WSJdbcPreparedStatement.java:426)
    at net.sf.hibernate.impl.BatcherImpl.getResultSet(BatcherImpl.java:87)
    at net.sf.hibernate.loader.Loader.getResultSet(Loader.java:795)
    at net.sf.hibernate.loader.Loader.doQuery(Loader.java:189)
    at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133)
    at net.sf.hibernate.loader.Loader.doList(Loader.java:950)
    at net.sf.hibernate.loader.Loader.list(Loader.java:941)
    at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:834)
    at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1512)
    at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1491)
    at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1487)
    at ibsi.crm.command.TestCommand.execute(TestCommand.java:43)
    at ibsi.crm.servlets.FrontController.performTask(FrontController.java:48)
    at ibsi.crm.servlets.FrontController.doGet(FrontController.java:23)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    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.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:76)
    at ibsi.crm.servlets.filters.AuthFilter.doFilter(AuthFilter.java:61)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:965)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:555)
    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:593)


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 22, 2004 10:09 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
You are aware that uuid.hex generates String ids? Won't work particulary well with a BIGINT column.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 22, 2004 10:46 am 
Newbie

Joined: Sat Feb 21, 2004 10:37 am
Posts: 4
Location: USA, FL
Thanks for the reply.

I tried replacing generator with the code below with no result.
    <generator class="hilo">
    <param name="table">KEYS</param>
    <param name="column">COUNTER</param>
    <param name="max_lo">100000</param>
    </generator>


It crashes at the same line with the same excheption.
I need to use BIGINT because I'm expecting a large amount of records in this table.

Please help.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 22, 2004 1:25 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Hm, no idea why this should not work. How does the generated SQL and the Table definition look like?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 22, 2004 8:09 pm 
Newbie

Joined: Sat Feb 21, 2004 10:37 am
Posts: 4
Location: USA, FL
Here is the SQL generated by Hibernate
    [2/22/04 19:05:24:515 EST] 30d130d1 SystemOut O Hibernate: select user0_.USER_ID as USER_ID, user0_.LOGINNAME as LOGINNAME from DB2ADMIN.USERS user0_ where (user0_.USER_ID=? )
    [2/22/04 19:05:24:531 EST] 30d130d1 JDBCException W net.sf.hibernate.util.JDBCExceptionReporter SQL Error: -99999, SQLState: 22003
    [2/22/04 19:05:24:531 EST] 30d130d1 JDBCException E net.sf.hibernate.util.JDBCExceptionReporter [IBM][CLI Driver] CLI0111E Numeric value out of range. SQLSTATE=22003
    [2/22/04 19:05:24:546 EST] 30d130d1 JDBCException W net.sf.hibernate.util.JDBCExceptionReporter SQL Error: -99999, SQLState: 22003
    [2/22/04 19:05:24:546 EST] 30d130d1 JDBCException E net.sf.hibernate.util.JDBCExceptionReporter [IBM][CLI Driver] CLI0111E Numeric value out of range. SQLSTATE=22003
    [2/22/04 19:05:24:562 EST] 30d130d1 JDBCException E net.sf.hibernate.util.JDBCExceptionReporter Could not execute query
    [2/22/04 19:05:24:640 EST] 30d130d1 JDBCException E net.sf.hibernate.util.JDBCExceptionReporter TRAS0014I: The following exception was logged COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver] CLI0111E Numeric value out of range. SQLSTATE=22003

and here is my DB2 table definition

Code:
CREATE TABLE "DB2ADMIN"."USERS"  (
        "USER_ID" BIGINT NOT NULL ,
        "LOGINNAME" VARCHAR(20) NOT NULL ,
        "PWD" VARCHAR(50) ,
        "LASTNAME" VARCHAR(30) NOT NULL ,
        "FIRSTNAME" VARCHAR(30) NOT NULL ,
        "MI" VARCHAR(5) ,
        "ORG_ID" BIGINT NOT NULL WITH DEFAULT 10)   
       IN "USERSPACE1" ;
ALTER TABLE "DB2ADMIN"."USERS"
   ADD CONSTRAINT "PK_USERID" PRIMARY KEY
      ("USER_ID");
ALTER TABLE "DB2ADMIN"."USERS"
   ADD CONSTRAINT "FK_ORGID" FOREIGN KEY
      ("ORG_ID")
   REFERENCES "DB2ADMIN"."ORGANIZATIONS"
      ("ORG_ID")
   ON DELETE RESTRICT
   ON UPDATE NO ACTION;


thanks a lot for your assistance


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 23, 2004 7:26 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Try setting the type of the id explicitly with type="java.lang.Integer".If this does not help, enable a higher logging level and check the bind parameters.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 24, 2004 10:31 pm 
Newbie

Joined: Sat Feb 21, 2004 10:37 am
Posts: 4
Location: USA, FL
Finally, the problem solved.

I was using DB2 8.1 client while server was v 7.2. It worked fine with client and server at the same level.

Thanks everyone for assistance.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.