This discussion is archived
3 Replies Latest reply: Nov 28, 2012 6:44 AM by gimbal2 RSS

java.math.BigDecimal cannot be cast to oracle.jbo.domain.Number

adf009 Explorer
Currently Being Moderated
hi i have class like this
public class testOfficials {
    public testOfficials() {
        super();
    }
private Number dentitynumber;
    public void setDentitynumber(Number dentitynumber) {
        this.dentitynumber = dentitynumber;
    }

    public Number getDentitynumber() {
        return dentitynumber;
    }
i call the setter like this,this is where am geting the error i do haveimport oracle.jbo.domain.Number;
rt.setDentitynumber((Number)r.getAttribute("dentitynumber"));

but am geting this error
Caused by: javax.faces.el.EvaluationException: java.lang.ClassCastException: java.math.BigDecimal cannot be cast to oracle.jbo.domain.Number
     at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:51)
     at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
     at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
     at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
     at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
     at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
     at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
     at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
     at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
     at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
     at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)
     at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1018)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:386)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:194)
     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
     ... 38 more
Caused by: java.lang.ClassCastException: java.math.BigDecimal cannot be cast to oracle.jbo.domain.Number
     at .getNextAction(OrgDetails.java:342)
     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.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:46)
     ... 53 more

Edited by: adf0994 on 2012/11/28 3:56 PM

Legend

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