Java.lang.ClassCastException: java.lang.String cannot be cast to oracle.adf

Hi,
Please help me to understand why this error comes.
I have deployed ear file into glass fish server.
Using adf essential in Jdevelepor 11.1.2.3.0.
[#|2012-12-04T19:17:51.658+0530|INFO|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=21;_ThreadName=Thread-2;|PWC1412: WebModule[null] ServletContext.log():JspServlet error: Servlet unable to dispatch to the following requested page: The following exception occurred:java.lang.ClassCastException: java.lang.String cannot be cast to oracle.adf.view.rich.model.RegionModel|#]
[#|2012-12-04T19:17:51.658+0530|INFO|glassfish3.1.2|oracle.j2ee.jsp|_ThreadID=21;_ThreadName=Thread-2;|unable to dispatch JSP page: The following exception occurred:.
java.lang.ClassCastException: java.lang.String cannot be cast to oracle.adf.view.rich.model.RegionModel
     at oracle.adf.view.rich.component.fragment.UIXRegion.getValue(UIXRegion.java:1587)
     at oracle.adf.view.rich.component.fragment.UIXRegion.getRegionModel(UIXRegion.java:415)
     at oracle.adfinternal.view.faces.taglib.region.RegionTag.doStartTag(RegionTag.java:107)
     at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:50)
     at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
     at oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:87)
     at oracle.jsp.runtime.tree.OracleJspIterationTagNode.executeHandler(OracleJspIterationTagNode.java:45)
     at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
     at oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:87)
     at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:58)
     at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
Thanks for the help in advance..

It seems you have used a taskflow on a page and one of the binding.
It will be easy to point out if you paste the code of region tag *<af:region.......*.

Similar Messages

  • Facing java.lang.ClassCastException: DummyPagePhaseListener cannot be cast to oracle.adf.model.RegionController while am using master detail relationship by af:table

    Hi friends,
         We are in to new development in Oracle ADF and newbie to this technology.
         Created .jsf page and in corresponding pagedef, has "ControllerClass" with refering "DummyPagePhaseListener" and we have master-detail relationship using Viewlink(created using a SQL Query and  entity based view).
        Below exception raised when navigating from one  to another record in Master af:table. Any help will be appreciated. Thanks in Advance......
    java.lang.ClassCastException: DummyPagePhaseListener cannot be cast to oracle.adf.model.RegionController
    at oracle.adf.model.binding.DCBindingContainer.getRegionController(DCBindingContainer.java:5197)
    at oracle.adf.model.binding.DCBindingContainer.validate(DCBindingContainer.java:4247)
    at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.validateModelUpdates(PageLifecycleImpl.java:300)
    at oracle.adf.controller.faces.lifecycle.FacesPageLifecycle.validateModelUpdates(FacesPageLifecycle.java:70)
    at oracle.adf.controller.v2.lifecycle.Lifecycle$6.execute(Lifecycle.java:202)
    at oracle.adfinternal.controller.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:197)
    at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener.access$600(ADFPhaseListener.java:23)
    at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener$3.after(ADFPhaseListener.java:323)
    at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener.afterPhase(ADFPhaseListener.java:75)
    at oracle.adfinternal.controller.faces.lifecycle.ADFLifecyclePhaseListener.afterPhase(ADFLifecyclePhaseListener.java:53)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:447)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:202)
    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.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
    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)

    Hi timo,
    Thanks for ur reply...
    we are using unbounded taskflow.
    In Controller class(page def file), we refered the class that implements PagePhaseListener
    The following override methods has created
      public void afterPhase(PagePhaseEvent pagePhaseEvent) {
    //In this area we used to read the session object file which is written and sent by another application(application to application navigate).
    If session object file exists,will allow the user to navigate into the requested page else will navigate in to login(security aspect).
      public void beforePhase(PagePhaseEvent pagePhaseEvent) {
    Is we used Controller class wrongly ???
    Is there any relationship with region controller???
    Mani
    [email protected]

  • Oracle.jbo.uicli.binding.JUIteratorBinding cannot be cast to oracle.adf.

    HI ,
    I'm using ADF 11g,
    I'm working on individual work space. i have used oracle.adf.model.binding.DCControlBinding in my bean class and working fine .Now one day before i have taken svn version repository project and started working .I made simple jspx with adf table and tool bar button such as Add. When i fire add button i'm calling a method in bean class.
    public String createRecord() {
    // Add event code here... bank_add
    System.out.println("-- create record --");
    BindingContainer bindings2 = ADFUtils.getBindingContainer();
    DCControlBinding dcc = (DCControlBinding)bindings2.get("XbtBankSettlementVOIterator");
    return "banksettlement_add";
    surprisingly i got this error.when my fellow colleague is using same svn repository project and using oracle.adf.model.binding.DCControlBinding it is working fine.
    but why i'm getting this error below.i have followed the same steps to create View Object and Entity Object as previous .
    <ActionListenerImpl><processAction> java.lang.ClassCastException: oracle.jbo.uicli.binding.JUIteratorBinding cannot be cast to oracle.adf.model.binding.DCControlBinding
    javax.faces.el.EvaluationException: java.lang.ClassCastException: oracle.jbo.uicli.binding.JUIteratorBinding cannot be cast to oracle.adf.model.binding.DCControlBinding
         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.UIXRegion.broadcast(UIXRegion.java:148)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:90)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:309)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:94)
         at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:90)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:309)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:94)
         at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:812)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:292)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         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:292)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:70)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:159)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:326)
         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.run(WebAppServletContext.java:3592)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: java.lang.ClassCastException: oracle.jbo.uicli.binding.JUIteratorBinding cannot be cast to oracle.adf.model.binding.DCControlBinding
         at com.agile.xb.view.managed.BankSettlementDtlBean.createRecord(BankSettlementDtlBean.java:32)
         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(AstValue.java:157)
         at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
         at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:46)
         ... 51 more
    thanks in advance

    Hi Frank,
    I know that JUIteratorBinding is taking ,but how can i change and where could i find . I have import operation binding in my bean and creation of VO and EO object time as i did noraml way .
    sorry can i get some more information.
    thanks in advance .

  • Serialization error: java.lang.ClassCastException: [Ljava.lang.Object;

    hi
    i am accessing dot net web service from java using jax rpc dii. Input to web service is simple string and output is also string.
    i am getting following error
    serialization error: java.lang.ClassCastException: [Ljava.lang.Object;
    the above exception is coming from following code
    call.setProperty(ENCODING_STYLE_PROPERTY ,"");
    QName qts = new QName("http://www.w3.org/2001/XMLSchema", "string");
    call.addParameter("String_1", qts, ParameterMode.IN);
    call.setReturnType( qts);
    call.setOperationName( new QName(URI , "hello")); //hello mthd name
    TypeMappingRegistry dt=
    (TypeMappingRegistry)svc.getTypeMappingRegistry();
    Object[] inParams = new Object [] {"win"} ;
    String res = (String)call.invoke(inParams) ;
    i am not able to find out what the error is ??
    pls help.............

    I tried using
    String [] lparams = new String {"win"};
    but no success same eror
    serialization error: java.lang.ClassCastException
    do we have to register any serializer for the parameters we pass ??
    any solution will be of great help ...
    my code is as follows
    String URI ="http://tempuri.org/";
    String SOACT="http://tempuri.org/hello";
    QName qname=new QName(URI,"AddNumbers");
    ServiceFactory serviceFactory= ServiceFactory.newInstance();
    Service svc=serviceFactory.createService( qname );
    Call call=svc.createCall();
    call.setTargetEndpointAddress("http://samrat/service/addservice.asmx" );
    call.setProperty(Call.SOAPACTION_USE_PROPERTY, new Boolean(true));
    call.setProperty(Call.SOAPACTION_URI_PROPERTY, SOACT);
    String ENCODING_STYLE_PROPERTY = "javax.xml.rpc.encodingstyle.namespace.uri";
    call.setProperty(ENCODING_STYLE_PROPERTY ,"");
    call.setOperationName( new QName(URI , "hello"));
    TypeMappingRegistry dt=(TypeMappingRegistry)svc.getTypeMappingRegistry();
    Object inParams [] = new String [] {"win"} ;
    Object res = (String)call.invoke(inParams) ; <--here i am getting error
    i am accessing simple dot net web service servicename is hello which takes a string and returns same string ..
    Any way thanxs for your suggestions .. keep on replying hope to solve this error asap ..
    thanx once again
    Samrat.A.Barve

  • Error processing WSDL document: java.lang.ClassCastException: java.util.Ar

    Hi
    Program is giving unpredictable behaviour.
    Am trying to consume webservice using Axis Client.
    When running as stand alone Java programs its working fine.
    But when deployed on OC4J its giving problem
    Error processing WSDL document: java.lang.ClassCastException: java.util.ArrayList
    Could you please give some hint
    Regards
    Bajarang

    Here is the program
    QName serviceQN = new QName(targetNamespace,serviceName );
    System.out.println("After serviceQN "+ serviceQN);
    QName portQN = new QName( targetNamespace, portName );
    System.out.println("After port "+ portQN);
    // This Call object will be used the invocation
    Service service = new Service(implURI,serviceQN);
    System.out.println("After service "+ service);
    Call call = (Call) service.createCall();
    System.out.println("After call "+ call);
    // Now make the call...
    System.out.println("Invoking service>> " + serviceName + " <<...");
    call.setOperation(portQN,operationName);
    call.invoke( inputParams );
    System.out.println("Result returned from call to "+ serviceName+" ");
    Error while execution
    javax.xml.rpc.ServiceException: Error processing WSDL document:
    java.lang.ClassCastException: java.util.ArrayList

  • Java.lang.ClassCastException Ljava.lang.Object

    Hi everyone,
    I am a Software Engineer working in an enterprise application with the technologies Struts 2.0.11,EJB3.0 and Jasper reports3.0. In my enterprise application
    I got the Exception java.lang.ClassCastException Ljava.lang.Object while casting java.util.List of getResultList() method into java.util.List<customObjectType>. I am using JPQL. Is not possible to convert an Object List to its native customObjectType List from the getResultSet() method as the following snippet
    Query accountsQuery=accountsEntityManager.createQuery("select acc from BankAccount acc");
    //casting Object List into BankAccount entity POJO List and this shows the baove Exception
    java.util.List<BankAccount> accounts=(java.util.List<BankAccount>)accountsQuery.getResultList(); //BankAccount is an Entity POJO
    Please give me reason for this Exception and solution.
    Best Regards,
    Ramesh K

    Hi everyone,
    I am a Software Engineer working in an enterprise application with the technologies Struts 2.0.11,EJB3.0 and Jasper reports3.0. In my enterprise application
    I got the Exception java.lang.ClassCastException Ljava.lang.Object while casting java.util.List of getResultList() method into java.util.List<customObjectType>. I am using JPQL. Is not possible to convert an Object List to its native customObjectType List from the getResultSet() method as the following snippet
    Query accountsQuery=accountsEntityManager.createQuery("select acc from BankAccount acc");
    //casting Object List into BankAccount entity POJO List and this shows the baove Exception
    java.util.List<BankAccount> accounts=(java.util.List<BankAccount>)accountsQuery.getResultList(); //BankAccount is an Entity POJO
    Please give me reason for this Exception and solution.
    Best Regards,
    Ramesh K

  • Java.lang.ClassCastException: java.lang.Short

    It(He,She) gives me the exception java.lang. ClassCastException: java.lang. Short, the complete code is:
    java.lang.ClassCastException: java.lang.Short
         inventBD.EquipoBD.ConsultarEquipo(EquipoBD.java:36)
    In the line 36 what I have is:
         nuevo_equipo.setPart((Integer)traRes.getObject(4));
    The information that I spend(pass) this one to him(her) declared as an integer.
    Which can be the problem? Something on having done the casting?

    It(He,She) it
    gives me the exception java.lang.
    ClassCastException: java.lang. Short,So what does the API say this means? Ever bothered to have a look?
    the complete
    code is:
    java.lang.ClassCastException: java.lang.Short
         inventBD.EquipoBD.ConsultarEquipo(EquipoBD.java:36)
    In the line 36 what I have is:
         nuevo_equipo.setPart((Integer)traRes.getObject(4));
    The information that I spend(pass) this one to
    him(her) declared as an integer.You cast it to Integer. But it's a Short.

  • Java.lang.ClassCastException:java.lang.Double

    I am trying to troubleshoot this error but I am not sure what to look for, where to find it, and what to change it to.
    Error: 500
    Location:/jserv/Purchase/Frame6_CreditCardPayment_Step3.jsp Internal Servlet Error:
    javax.servlet.ServletException: java.lang.Double
    Root cause:
    java.lang.ClassCastException: java.lang.Double
    at Purchase._0002fPurchase_0002fFrame_00036_0005fCreditCardPayment_0005fStep_00033_0002ejspFrame6_0005fCreditCardPayment_0005fStep3_jsp_1._jspService(_0002fPurchase_0002fFrame_00036_0005fCreditCardPayment_0005fStep_00033_0002ejspFrame6_0005fCreditCardPay
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java, Compiled Code)

    Hi Dr,
    I followed your suggestion, but there was no casting to double in the JSP code, so I looked at the database and found 3 columns inadvertently created as "double default null" when the MSAccess mdb was exported to MySQL.
    I modified the database to make those columns text, and now the compiler does not throw the error.
    I'm still unclear why the error was thrown.

  • Oracle.sql.STRUCT cannot be cast to oracle.sql.STRUCT

    I met a problem,I use oracle spatial to store geometry,then get it like this:
    STRUCT dbObject = (oracle.sql.STRUCT)rs.getObject("shape");
    JGeometry geom = JGeometry.load(dbObject);
    tomcat 6 told me java.lang.ClassCastException: oracle.sql.STRUCT cannot be cast to oracle.sql.STRUCT
    does everyone knows this problem?thanks
    Edited by: 811014 on 2010-11-13 下午9:28
    Edited by: 811014 on 2010-11-13 下午9:28

    Hi, this is a known problem for most Spatial 10g Java APIs with WLS.
    WLS is only certified with 11g DB.
    Instead of using Weblogic JNDI Lookup for Datasource, try the following snippet to create your connection/datasource (with Oracle JDBC thin driver):
    String databaseUrl = jdbc:oracle:thin:@1.2.3.4:1521:yourdbname
    String databaseUser = dbusername
    String databasePassword = dbpassword
    DriverManager.registerDriver(new OracleDriver());
    Connection aConnection = DriverManager.getConnection(databaseUrl, databaseUser, databasePassword);
    For more information, see the following:
    Classcast Exception while using Oracle ARRAYs
    regards,
    jack

  • Javax.sql.rowset.serial.SerialBlob cannot be cast to oracle.sql.BLOB

    Hi there,
    I'm facing this exception.
    My code:
    final ReportTemplateAttachment rta = new ReportTemplateAttachment();
    FileBlob fb = new FileBlob();
    fb.setContentType(attachmentDto.getContentType().getValue());
    fb.setCreationDate(sysDate);
    fb.setCreationUser(userId);
    final SerialBlob blob = new SerialBlob(attachmentDto.getFileVal());//it's a  byte[]
    //SerialBlob is of type javax.sql.rowset.serial.SerialBlob
    fb.setFileData(blob);
    fb.setName(attachmentDto.getFileName());
    fb.setLastUpdateDate(sysDate);
    fb.setLastUpdateUser(userId);
    fb.setLength(blob.length());
    rta.setFileBlob(fb);and the object rta will be inserted into another object.
    The variable of interest in FileBlob hbm is defined as follows:
    <property name="fileData" type="blob">
                <column name="FILE_DATA" />
    </property>where the type blob is oracle.sql.BLOB
    If I change the oracle.sql.BLOB to javax.sql.rowset.serial.SerialBlob in the hbm, I can insert but when I try to get the blob back I get a deserialize exception so this change is not an option.
    but when I save the main Object (a cascade operation) I get the following exception:
    org.springframework.jdbc.UncategorizedSQLException:
    Hibernate flushing: could not insert: [pt.sc.data.entities.FileBlob];
    uncategorized SQLException for SQL
    [insert into WP_ADMIN.file_blob (name, content_type, length, file_data, status, creation_user, creation_date, last_update_user, last_update_date, id)
    values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)];
    SQL state [null];
    error code [0];
    An SQLException was provoked by the following failure: java.lang.ClassCastException:
    javax.sql.rowset.serial.SerialBlob cannot be cast to oracle.sql.BLOB;
    nested exception is java.sql.SQLException: An SQLException was provoked by the following failure:
    java.lang.ClassCastException: javax.sql.rowset.serial.SerialBlob cannot be cast to oracle.sql.BLOBAny light on the subject?
    Thanks in advance,
    mleiria

    You don't seem to understand the difference between an object model and a database. Hibernate, being an ORM package, works on the object model and will, based on what you request it to do, generate proper SQL statements to get the database part going. But you shouldn't be thinking about databases when using Hibernate; your main focus is the object model. There is no blob, only binary data. Binary data in Java is generally handled through a byte array.
    If you want to think in databases where blobs do exist, you should be using JDBC directly, not Hibernate.
    (I'm far from being an expert in Hibernate)I would really suggest taking a few hours and reading through the manual. You don't need to be an expert but you should at least know what kind of tool you're working with.

  • Exception:cannot be cast to oracle.jbo.uicli.binding.JUCtrlValueBindingRef

    Hi all,
    Please help -
    I got this exception when try to retrieve a table row from my backing bean:
    Caused by: java.lang.ClassCastException: oracle.adfinternal.view.faces.model.binding.FacesCtrlHierNodeBinding cannot be cast to oracle.jbo.uicli.binding.JUCtrlValueBindingRef
    The line of code in the backing bean caused the error:
    oracle.jbo.uicli.binding.JUCtrlValueBindingRef tableRowRef = (oracle.jbo.uicli.binding.JUCtrlValueBindingRef) this.getTable1().getRowData();
    What bugs me is that the same code works fine in another page's backing bean (see *1) and I can't find out the difference.
    My environment:
    I am using JDeveloper 11. The application I am working on was migrated from a JDeveloper 10g app, so the components are mostly Trinidad. We had to do a lot adjustment to get that app to work in 11g. The working page I mentioned above was done in 10g app (*1).
    I am now adding more things into this app. The app's setup is EJB session beans and Trinidad components now.
    In the jspx page, I have a table which was made up with a view from the database (NOT VO). I have a command link in a column in that table, and would like to get a Id from the row in the table. The line of code causes error above is in the command link's action method.
    Please help if you have any clue.
    Thanks a lot!
    Sophia
    Edited by: user12876081 on Jan 12, 2011 2:40 PM

    Thank you so much Frank! It's just that simple. This is my first post question, although I had always looked up the forum for answers before. I am a big fan of yours. This is such a great experience on my first post. I am having a much better day than yesterday. :-) Thanks again!

  • Exception:org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper cannot be cast to oracle.jdbc.OracleConnection

    Hi All,
    i am using jdev version 11.1.1.5.0
    and deployed my Adf application on Apache Tomcat 6.0.
    in my use case i have created simple adf application using adf business component. create a vo based on eo and drag-drop on jspx page.
    i have created JNDI data source in Apache server using edit context.xml file and add following line-
    <Resource name="jdbc/TestDB" auth="Container"
                  type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver"
                  url="jdbc:oracle:thin:@localhost:1521:dst"
                  username="jagrandb" password="jagrantest" maxActive="20" maxIdle="10"
                  maxWait="-1"  accessToUnderlyingConnectionAllowed="true" />
    3.using same data source in my adf applicatioin as -
      right click on AM --> Configuration-->edit-->select connection type jdbc datasource  -->java:/comp/env/jdbc/TestDB  
    4. after that i have deployed my application on apace server but when i have running application i have got following error-
    org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper cannot be cast to oracle.jdbc.OracleConnection
    i have goggling and find  following solution-
    oracle.jdbc.driver.OracleConnection delConn = (oracle.jdbc.driver.OracleConnection) ((org.apache.tomcat.dbcp.dbcp.DelegatingConnection)c_stmt.getConnection()).getDelegate();
    but my problem is that i'm using Adf Business Component so where i set following type casting.
    Is there any method on ADF BC which handle JNDI Data source setting or any other way to do this.
    thanks in Advance
    Manish

    Hi dvohra21,
    thanks for reply.
    i don't understand where i go to set accessToUnderlyingConnectionAllowed =true
    i have already set this property on context.xml file
    <Resource name="jdbc/TestDB" auth="Container"
                  type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver"
                  url="jdbc:oracle:thin:@localhost:1521:dst"
                  username="jagrandb" password="jagrantest" maxActive="20" maxIdle="10"
                  maxWait="-1"  accessToUnderlyingConnectionAllowed="true" />
    any other place where i set this propery
    please elaborate this steps how to Configuree DBCP

  • Cause: java.lang.ClassCastException...can not be casted to ModuleLocalHome

    Bom Dia
    Nesta solução NF-e do B2B  Outbound Attachment +Body  eu tive um problema ao testar o Module Gui  gerei o pacote .ear  fiz o deploy do mesmo no J2ee e
    acontece um erro quando testo o envio do e-mail
    Message processing failed. Cause: java.lang.ClassCastException: class com.sap.sdn.nfe.SetAttachmentNameLocalHomeImpl0_0 can not be casted to ModuleLocalHome or SModuleLocalHome
    1 - já tirei os .jar de referencia do ".ear"(Extrai usando o WinZip) mais não funcionou...
    .jar extraido do .EAR antes do deploy..!
    aii_af_cci.jar
    aii_af_ms_api.jar
    aii_af_trace.jar
    aii_af_cpa.jar
    aii_af_ms_spi.jar
    aii_af_mp.jar
    aii_af_svc.jar
    Alguém teria alguma dica doque poderia estar ocorrendo..?
    Agradeço desde já
    RONALDO DE MORAES

    Roberti ...,
    Eliminando as classes geradas e ajustando para as classes standard...!!
    Existiam alguns erros.....com.sap.sdn.nfe.SetAttachmentNameLocalhome quando na verdade deveria ser isso                                 com.sap.aii.af.mp.module.ModuleLocalHome
    esse erro  só notei quando  olhei  a doc   postada pelo  Roberti ...
    http://wiki.sdn.sap.com/wiki/pages/editpage.action?pageId=233474286
    Obrigado ...pela força Robert e Henrique

  • Error: java.lang.ClassCastException: java.util.Arrays$ArrayList

    Hi,
    How to solve this error?
    I get the error at this line of code in my program.
    java.util.ArrayList list= (java.util.ArrayList)obj;
    Please help how to solve this problem.
    Thanks,
    cmbl

    cmbl wrote:
    How to solve this error?
    I get the error at this line of code in my program.
    java.util.ArrayList list= (java.util.ArrayList)obj; Don't do this cast.
    Why are you doing this cast anyway? I think you need to show a small bit of compilable code (or almost compilable except perhaps for this error) and some more explanation.

  • Java.lang.ClassCastException: java.lang.OutOfMemoryError

    Hi everyone,
    I am having this exception when I want to run my application (not always so). I have to restart the server and il works again fine.
    But I don't see the relation between a ClassCastException and the OutOfMemoryError.
    Can anyone tell me ?
    Thanks

    you're right.
    I have a cast with Exception. I have not understood the OutOfMemoryError was not an exception.
    So I have 2 errors : the first one is the OutOfmemory and the second one is the cast.
    Do you agree ?

Maybe you are looking for

  • Had to uninstall iTunes, now it won't reinstall. Please help!

    Info: (iTunes 10.5) (iPod Touch 32G 3rd Gen iOS 5.0/5.1 (not entirely sure)) (Windows 7) (HP Pavilion dv6 Laptop, bought in May 2011) Ok, so I decided that I wanted a new game for my iPod Touch 32G 3rd Gen, 'Pocket Planes'. A free, no hassle download

  • CUPS printer sharing across subnets?

    I am trying to set up my local network printer so that everyone in the house can print from it. However I have two subnets in the house and I don't see how to connect to the Linux server through a Windows 7 client. My network is like so: Upstairs: [M

  • My carrier isnt showing on my new iPhone?

    I just got a new iphone, and everythings being put back on to the iphone, but my carrier isnt showing up. Therefore I can't send any texts please help!

  • HTML in Swing Tutorial/Help

    I'm looking for a tutorial or just help here on how to display an HTML file in a swing component.

  • Cannot find setting 'speakers'

    I cannot find the setting 'speakers' on my ipod nano 5th gen. I found it  a few days ago, but forgot.