This discussion is archived
7 Replies Latest reply: Feb 22, 2013 8:52 AM by Munna 502 RSS

NumberFormatException

Munna 502 Newbie
Currently Being Moderated
Hi Gurus,
I am new in adf and using jdev 11.1.2.2.0

I have create the application module and add some views on it. Now i want to implement find/execute feature on my page. but when i press find button i found the this exception. below is complete stack trace but the line which i am seeing that

oracle.jbo.domain.DataCreationException: JBO-25009: Cannot create an object of type:oracle.jbo.domain.Number from type:java.lang.String with value:AppModule_ItemMasterView1.__DefaultViewCriteria__._DefaultViewCriteria_Row_

Please advice me how can i solve this issue. i am not converting any value from string to number. Below is complete stack trace....



<Utils> <buildFacesMessage> ADF: Adding the following JSF error message: java.lang.NumberFormatException
java.lang.NumberFormatException
     at java.math.BigDecimal.<init>(BigDecimal.java:459)
     at java.math.BigDecimal.<init>(BigDecimal.java:728)
     at oracle.sql.NUMBER.toBytes(NUMBER.java:1688)
     at oracle.sql.NUMBER.stringToBytes(NUMBER.java:3514)
     at oracle.sql.NUMBER.<init>(NUMBER.java:302)
     at oracle.jbo.domain.Number.<init>(Number.java:293)
     at oracle.jbo.domain.Number$1.convert(Number.java:64)
     at oracle.jbo.domain.TypeFactory.get(TypeFactory.java:869)
     at oracle.jbo.domain.TypeFactory.getInstance(TypeFactory.java:116)
     at oracle.jbo.server.AttributeDefImpl.convertToJava(AttributeDefImpl.java:2220)
     at oracle.jbo.server.ViewRowSetImpl.prepKeyForFind(ViewRowSetImpl.java:5377)
     at oracle.jbo.server.ViewRowSetImpl.findByKey(ViewRowSetImpl.java:5394)
     at oracle.jbo.server.ViewRowSetImpl.findByKey(ViewRowSetImpl.java:5296)
     at oracle.jbo.server.ViewRowSetImpl.findByKey(ViewRowSetImpl.java:5290)
     at oracle.jbo.server.ViewObjectImpl.findByKey(ViewObjectImpl.java:11628)
     at oracle.adf.model.bc4j.DCJboDataControl.getListBindingDef(DCJboDataControl.java:2219)
     at oracle.adf.model.bean.DCBeanDataControl.getListBindingDef(DCBeanDataControl.java:2859)
     at oracle.jbo.uicli.binding.JUCtrlListDef.initListBindingDef(JUCtrlListDef.java:335)
     at oracle.jbo.uicli.binding.JUCtrlListBinding.initDefFromServerBinding(JUCtrlListBinding.java:2993)
     at oracle.jbo.uicli.binding.JUCtrlListBinding.initFromServerBinding(JUCtrlListBinding.java:595)
     at oracle.jbo.uicli.binding.JUCtrlListBinding.setupListItems(JUCtrlListBinding.java:697)
     at oracle.jbo.uicli.binding.JUCtrlListBinding.refreshFromServerListBinding(JUCtrlListBinding.java:2581)
     at oracle.jbo.uicli.binding.JUCtrlListBinding.updateValuesFromRow(JUCtrlListBinding.java:2622)
     at oracle.jbo.uicli.binding.JUIteratorBinding.updateValuesFromRows(JUIteratorBinding.java:349)
     at oracle.adf.model.binding.DCIteratorBinding.setupRSIstate(DCIteratorBinding.java:867)
     at oracle.adf.model.binding.DCIteratorBinding.refreshControlAndNotifyDCE(DCIteratorBinding.java:707)
     at oracle.adf.model.binding.DCIteratorBinding.rangeRefreshed(DCIteratorBinding.java:914)
     at oracle.adf.model.binding.DCIteratorBinding.setFindMode(DCIteratorBinding.java:2082)
     at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1002)
     at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2169)
     at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:731)
     at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.executeEvent(PageLifecycleImpl.java:402)
     at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding._execute(FacesCtrlActionBinding.java:252)
     at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding.execute(FacesCtrlActionBinding.java:185)
     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:597)
     at com.sun.el.parser.AstValue.invoke(Unknown Source)
     at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
     at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
     at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1545)
     at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
     at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:130)
     at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:461)
     at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:134)
     at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:112)
     at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:130)
     at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:461)
     at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:134)
     at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:106)
     at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:159)
     at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:112)
     at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:130)
     at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:461)
     at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:134)
     at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:106)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1134)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:358)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:207)
     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:508)
     at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
     at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
     at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
     at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at oracle.adf.share.http.ServletADFFilter.doFilter(ServletADFFilter.java:65)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
     at Syncreon.Aosc.model.test.DynamicJDBCBindingFilter.doFilter(DynamicJDBCBindingFilter.java:138)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:125)
     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
     at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
     at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:180)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
     at java.security.AccessController.doPrivileged(Native Method)
     at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
     at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
     at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
     at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
     at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
     at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
     at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
     at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
     at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
     at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
     at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
     at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
     at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
<UIXRegion> <_warn> Error processing viewId: /index URI: /index.jspx actual-URI: /ItemMaster.jsff.
oracle.jbo.domain.DataCreationException: JBO-25009: Cannot create an object of type:oracle.jbo.domain.Number from type:java.lang.String with value:AppModule_ItemMasterView1.__DefaultViewCriteria__._DefaultViewCriteria_Row_


Please adive me how i can solve this issue..
  • 1. Re: NumberFormatException
    761876 Newbie
    Currently Being Moderated
    Hi

    Can you check on which parameter you are performing Search operation.

    here, it seems that your search string is getting converted to Number for the search operation. Also check for any datatype mismatch for that variable in your database and VO.

    regards,
    Rajan

    It is considered good etiquette to reward answerers with points (as "helpful" - 5 pts - or "correct" - 10pts).
    https://forums.oracle.com/forums/ann.jspa?annID=893
  • 2. Re: NumberFormatException
    Munna 502 Newbie
    Currently Being Moderated
    Thanks for your reply.

    I am not performaning any search on parameters. For now it just go into find mode. and when i press the find button it raise the exception.
  • 3. Re: NumberFormatException
    Frank Nimphius Employee ACE
    Currently Being Moderated
    Hi,

    the error statement is obvious

    oracle.jbo.domain.DataCreationException: JBO-25009: Cannot create an object of type:oracle.jbo.domain.Number from type:java.lang.String with value:AppModule_ItemMasterView1.__DefaultViewCriteria__._DefaultViewCriteria_Row_

    you pass a String object to an argument that expects oracle.jbo.domain.Number, What is not so obvious is how you implemented the search functionality, which is important to give you a hint on why things don't work as you expect

    Frank
  • 4. Re: NumberFormatException
    761876 Newbie
    Currently Being Moderated
    Hi,

    Can you please share the code of the find function. How have you implemented it?

    regards,
    Rajan
  • 5. Re: NumberFormatException
    Munna 502 Newbie
    Currently Being Moderated
    i have not written any code for find function. i have just drag the find operation from AppModule DataControl and drop it on the jsg page.
  • 6. Re: NumberFormatException
    761876 Newbie
    Currently Being Moderated
    Hi,

    When you drag the method on your page, the method gets added to the Page definition file. Go to the PageDef file of your adf page and check the properties of the find method there. the method will be listed under bindings column.
    Check if you have any property bouded there and if it is having required data type.

    regards,
    Rajan
  • 7. Re: NumberFormatException
    Munna 502 Newbie
    Currently Being Moderated
    there is only two line for find and execute function

    <action IterBinding="ItemMasterView1Iterator" id="Find" RequiresUpdateModel="true" Action="iteratorFind"/>
    <action IterBinding="ItemMasterView1Iterator" id="Execute" RequiresUpdateModel="true" Action="iteratorExecute"/>

    thanks

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points