Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

I got a Numeric Overflow error.

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello friends

I got the following Numeric Flow exception:

Error activating publication 1539-8560. Exception in 'findByCovIdGroupIdName' while using result set: 'weblogic.jdbc.wrapper.ResultSet_oracle_jdbc_driver_OracleResultSetImpl@d192' java.sql.SQLException: Numeric Overflow java.sql.SQLException: Numeric Overflow at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:227) at oracle.jdbc.driver.NumberCommonAccessor.throwOverflow(NumberCommonAccessor.java:6797) at oracle.jdbc.driver.NumberCommonAccessor.getInt(NumberCommonAccessor.java:121) at oracle.jdbc.driver.OracleResultSetImpl.getInt(OracleResultSetImpl.java:489) at weblogic.jdbc.wrapper.ResultSet_oracle_jdbc_driver_OracleResultSetImpl.getInt(Unknown Source) at com.ovid.links.admin.ejb.CoverageList_7wfl0x__WebLogic_CMP_RDBMS.__WL_getPKFromRS(CoverageList_7wfl0x__WebLogic_CMP_RDBMS.java:1376) at com.ovid.links.admin.ejb.CoverageList_7wfl0x__WebLogic_CMP_RDBMS.ejbFindByCovIdGroupIdName(CoverageList_7wfl0x__WebLogic_CMP_RDBMS.java:894) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.collectionFinder(RDBMSPersistenceManager.java:385) at weblogic.ejb20.manager.BaseEntityManager.collectionFinder(BaseEntityManager.java:1784) at weblogic.ejb20.manager.BaseEntityManager.collectionFinder(BaseEntityManager.java:1756) at weblogic.ejb20.internal.EntityEJBLocalHome.finder(EntityEJBLocalHome.java:547) at com.ovid.links.admin.ejb.CoverageList_7wfl0x_LocalHomeImpl.findByCovIdGroupIdName(CoverageList_7wfl0x_LocalHomeImpl.java:132) at com.ovid.links.admin.ejb.PublicationManagerEJB.enablePublication(PublicationManagerEJB.java:561) at com.ovid.links.admin.ejb.PublicationManager_ow57et_EOImpl.enablePublication(PublicationManager_ow57et_EOImpl.java:722) at com.ovid.links.admin.web.action.EnablePubAction.perform(EnablePubAction.java:102) at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1787) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1586) at com.ovid.links.admin.web.util.ControllerServlet.processRequest(ControllerServlet.java:186) at com.ovid.links.admin.web.util.ControllerServlet.doPost(ControllerServlet.java:86) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6722) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)

Please tell me what causes this exception.

Thanks
Mohnish

 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This means that the numeric value that you're querying or inserting is larger than the DB field can hold.
For example, trying to put 3000000000 in an Integer field while it can hold up max 2^32 (2147483647) will throw such an error.

 
Mohnish Saini
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But I am using CMP EJB:

This exception comes on this statement:

Iterator iter2 = clHome.findByCovIdGroupIdName(covId, groupId, bean.getCode()).iterator();

And the red part is not any function. It is defined in ejb-jar.xml:

<query>
<query-method>
<method-name>findByCovIdGroupIdName</method-name>
<method-params>
<method-param>java.lang.Integer</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
<ejb-ql>SELECT OBJECT(o) FROM CoverageList AS o WHERE o.coverageId = ?1 AND o.groupId = ?2 AND o.keyValue = ?3</ejb-ql>
</query>

Please tell me where it goes wrong.

Thanks
Mohnish
 
Mohamed Inayath
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you please share the CoverageList Table description.
I mean the column name and datatype defined.
 
Mohnish Saini
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
COVID NUMBER
GROUPID VARCHAR2(128)
KEYVAL VARCHAR2(128)
CONSTANTS VARCHAR2(1020) Y
RANGEMIN VARCHAR2(128) Y
RANGEMAX VARCHAR2(128) Y
DISPLAYMIN VARCHAR2(128) Y
DISPLAYMAX VARCHAR2(128) Y
PK NUMBER(38) 0
 
Evil is afoot. But this tiny ad is just an ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic