Invoke a FTP "Get File" operation throws java.lang.ClassCastException:

Hi there,
I am working on a very simple sample project that will pull the file from a ftp site. I create a partner link with FTP adpater with "Get File" operation.
When I deploy and run the SIMPLE project, it throws the following exception.
I am wondering if any of you experienced the same problem and how to resolve the issue. Your help will be greatly appreciated.
Here is the error message:
<messages><input><Invoke_1_Get_InputVariable><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Root-Element"><Root-Element xmlns="http://TargetNamespace.com/ftp_service"/>
</part></Invoke_1_Get_InputVariable></input><fault><bindingFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="summary"><summary>file:/C:/product/10.1.3.1/OracleAS_1/bpel/domains/default/tmp/.bpel_FTPProcess2_1.0_709914d835a81c407ed668866e080b9e.tmp/ftp_service.wsdl [ Get_ptt::Get(Root-Element) ] - WSIF JCA Execute of operation 'Get' failed due to: Could not instantiate InteractionSpec oracle.tip.adapter.ftp.inbound.FTPActivationSpec due to: oracle.tip.adapter.ftp.inbound.FTPActivationSpec; nested exception is:
     java.lang.ClassCastException: oracle.tip.adapter.ftp.inbound.FTPActivationSpec; nested exception is:
     org.collaxa.thirdparty.apache.wsif.WSIFException: Could not instantiate InteractionSpec oracle.tip.adapter.ftp.inbound.FTPActivationSpec due to: oracle.tip.adapter.ftp.inbound.FTPActivationSpec; nested exception is:
     java.lang.ClassCastException: oracle.tip.adapter.ftp.inbound.FTPActivationSpec</summary>
</part><part name="detail"><detail>org.collaxa.thirdparty.apache.wsif.WSIFException: Could not instantiate InteractionSpec oracle.tip.adapter.ftp.inbound.FTPActivationSpec due to: oracle.tip.adapter.ftp.inbound.FTPActivationSpec; nested exception is:
     java.lang.ClassCastException: oracle.tip.adapter.ftp.inbound.FTPActivationSpec</detail>
</part></bindingFault></fault></messages>

Take a look at the stack trace, it shows you exactly where the error is coming from:
java.lang.ClassCastException: org.theclass.candidate.view.SearchForm
org.theclass.candidate.view.CandidateListAction.execute(CandidateListAction.java:41)Line 41 in your CandidateListAction.
Probably it is failing on a cast of your action form.
Taking a closer look at your struts-config, you are "chaining" actions.
Your AddCandidateAction uses the candidateForm, and forwards to CandidateListAction.do
Your CandidateListAction uses the searchForm.
That will be the cause of your class cast exception.
<action path="/Add"
  name="candidateForm"
  type="org.theclass.candidate.view.AddCandidateAction"
  validate ="true"
  input="/jsp/addcandidate.jsp">
  <forward name="success" path="/CandidateList.do"/>
</action>
<action path="/CandidateList"
type="org.theclass.candidate.view.CandidateListAction"
name="searchForm"
scope="request" >
<forward name="failure" path="/jsp/list.jsp"/>
<forward name="success" path="/jsp/candidatelist.jsp"/>
</action>Check out: http://struts.apache.org/1.x/faqs/newbie.html#chaining
Solutions?
- don't chain actions ;-)
- use the same action form for both actions (possible?)
- make the actionForward a "redirect" one. That means a new request, and losing any request parameters/attributes but should prevent this class cast exception.
Hope this helps,
evnafets

Similar Messages

  • Getting a  BEA-000802   java.lang.ClassCastException: in cluster mode only

    Guys ,
              I get a <BEA-000802> java.lang.ClassCastException in cluster mode , but works fine on a local instance. Please take a look at the stack trace below .
              <Error> <Kernel> <BEA-000802> <ExecuteRequest failed
              java.lang.ClassCastException: cannot assign instance of com.ibm.ie.web.presentation.IEPresentationCommandProcessor_814_WLStub to field com.ibm.web.servlet.Environment.presentationCommandProcessor of type com.ibm.web.presentation.PresentationCommandProcessor in instance of com.ibm.ie.web.servlet.IEEnvironment.
              java.lang.ClassCastException: cannot assign instance of com.ibm.ie.web.presentation.IEPresentationCommandProcessor_814_WLStub to field com.ibm.web.servlet.Environment.presentationCommandProcessor of type com.ibm.web.presentation.PresentationCommandProcessor in instance of com.ibm.ie.web.servlet.IEEnvironment
                   at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108)
                   at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:137)
                   at weblogic.cluster.replication.ReplicationManager_814_WLStub.update(Unknown Source)
                   at weblogic.cluster.replication.ReplicationManager.updateSecondary(ReplicationManager.java:775)
                   at weblogic.servlet.internal.session.ReplicatedSessionData.syncSession(ReplicatedSessionData.java:490)
                   at weblogic.servlet.internal.session.ReplicatedSessionContext.sync(ReplicatedSessionContext.java:183)
                   at weblogic.servlet.internal.ServletRequestImpl.syncSession(ServletRequestImpl.java:2484)
                   at weblogic.servlet.internal.ServletRequestImpl.syncSession(ServletRequestImpl.java:2469)
                   at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3782)
                   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)
              Caused by: java.lang.ClassCastException: cannot assign instance of com.ibm.ie.web.presentation.IEPresentationCommandProcessor_814_WLStub to field com.ibm.web.servlet.Environment.presentationCommandProcessor of type com.ibm.web.presentation.PresentationCommandProcessor in instance of com.ibm.ie.web.servlet.IEEnvironment
                   at java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(ObjectStreamClass.java:1885)
                   at java.io.ObjectStreamClass.setObjFieldValues(ObjectStreamClass.java:1076)
                   at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1851)
                   at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
                   at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
                   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
                   at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
                   at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
                   at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
                   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
                   at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1603)
                   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1271)
                   at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
                   at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
                   at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
                   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
                   at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
                   at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
                   at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
                   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
                   at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
                   at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
                   at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
                   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
                   at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
                   at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
                   at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
                   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
                   at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
                   at java.util.HashMap.readObject(HashMap.java:1006)
                   at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                   at java.lang.reflect.Method.invoke(Method.java:324)
                   at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:838)
                   at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746)
                   at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
                   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
                   at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
                   at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
                   at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
                   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
                   at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
                   at weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:120)
                   at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:120)
                   at weblogic.cluster.replication.ReplicationManager_WLSkel.invoke(Unknown Source)
                   at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
                   at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
                   at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
                   at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
                   at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
                   at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
              Please advise , would be of help ..
              thanks a lot for taking a look
              s

    ####<Jan 19, 2007 2:55:00 AM CST> <Error> <Kernel> <bocephus.aus.lab.vignette.com> <Preview2DPMSrv> <ExecuteThread: '14' for queue: 'weblogic.kernel.Default'> <<WLS Kernel>> <> <BEA-000802> <ExecuteRequest failed
              java.lang.ClassCastException.
              java.lang.Throwable
                   at weblogic.servlet.internal.session.ReplicatedSessionContext.sync(ReplicatedSessionContext.java:175)
                   at weblogic.servlet.internal.ServletRequestImpl.syncSession(ServletRequestImpl.java:2581)
                   at weblogic.servlet.internal.ServletRequestImpl.syncSession(ServletRequestImpl.java:2566)
                   at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3920)
                   at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2773)
                   at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
                   at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
              >
              ####<Jan 19, 2007 2:55:12 AM CST> <Error> <Kernel> <bocephus.aus.lab.vignette.com> <Preview2DPMSrv> <ExecuteThread: '14' for queue: 'weblogic.kernel.Default'> <<WLS Kernel>> <> <BEA-000802> <ExecuteRequest failed
              java.lang.ClassCastException.
              java.lang.Throwable
                   at weblogic.servlet.internal.session.ReplicatedSessionContext.sync(ReplicatedSessionContext.java:175)
                   at weblogic.servlet.internal.ServletRequestImpl.syncSession(ServletRequestImpl.java:2581)
                   at weblogic.servlet.internal.ServletRequestImpl.syncSession(ServletRequestImpl.java:2566)
                   at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3920)
                   at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2773)
                   at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
                   at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
              I am getting these logs in domain.
              How to solve this problem.
              Thanks
              Somashekar

  • Why my cutomize role mapper throws java.lang.ClassCastException: $Proxy67

    Hello all,
    I customize the role mapper as follows is my MDF content
    &lt;MBeanType
    Name = "TestRoleMapper"
    DisplayName = "TestRoleMapper"
    Package = "test.pkg.roles"
    Extends = "weblogic.management.security.authorization.RoleMapper"
    Implements = "weblogic.management.security.authorization.RoleReader"
    PersistPolicy = "OnUpdate"
    I implements the method "listRolesForResource", this method declared to return a string array.
    When I return the role name array then Weblogic throws java.lang.ClassCastException: $Proxy67
    Error snapshot
    http://antonov0318.googlepages.com/error.jpg
    Would I miss some interface ?
    Would somebody know how to solve it?
    Please let me know , Please....Thank you very much.
    Edited by: user6273860 on 2008/10/25 上午 12:00

    It looks like you're just taking random methods,
    calling them incorrectly, and expecting them to
    work.
    What do you think this will do?
         * Construct {@link java.lang.Object} array of keys from {@link java.util.Hashtable}
         * @param h {@link java.util.Hashtable}
         * @return array {@link java.lang.String}
         * @throws java.lang.IndexOutOfBoundsException Exception thrown if initial {@link java.lang.Object} array paramater cannot be indexed
        public static Object[] arrayKeys(Hashtable<Object, Object> h) throws IndexOutOfBoundsException {
            return h.keySet().toArray();
        }>
    ArrayFunctionality.arrayKeys(attrs)(new
    String[attrs.size()]);What's arrayKeys? And what do you think
    method(args) (some other stuff) ; will
    do?
    Somebody else showed you what to do earlier, but they
    had a typo. You need to pass an array of the
    appropriate type to toArray:
    String[] stringArr =
    (String[])theList.toArray(someStringArray);Read the docs for that method so you understand how
    it works. Just just blindly copy/paste.The API docs for toArray() for java.util.Set interface takes no parameters, I can't expect to know you can override it

  • Multipart mp = (Multipart) p.getContent() throws java.lang.ClassCastExcept

    I'm getting the following exception:
    23:53:05,542 ERROR [BouncedMailJob] Exception javax.mail.internet.MimeMultipart
    java.lang.ClassCastException: javax.mail.internet.MimeMultipart
            at com.imc.quartz.jobs.BouncedMailJob.dumpPart(BouncedMailJob.java:604)
            at com.imc.quartz.jobs.BouncedMailJob.execute(BouncedMailJob.java:287)
            at org.quartz.core.JobRunShell.run(JobRunShell.java:195)
            at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)in the code chunk:
          else if (p.isMimeType("multipart/*"))
             logger.debug("This is a Multipart");
             logger.debug("---------------------------");
             Multipart mp = (Multipart) p.getContent();    // This is the line throwing the exception
             level++;It's almost an exact carbon copy of msgshow.java in the demo, we just do some extra stuff with the results.
    This code had been in production for a while, and I wanted to make a few minor updates, but now it's throwing the exception above on the line indicated. I've been looking at this all day and just cannot see what I might have introduced. Message is being passed in to dumpPart(), and the debug output does show I have a message.
    What would cause this innocent looking line to throw that exception?
    Any ideas?
    Running on OSX 10.4.2, JBoss 4.0.3, using JAF 1.0.2 and JavaMail 1.3.3_01
    Thanks.

    try this
    //get the content of the incoming mail and store as temp object
    Object tmpobj = mimemsg.getContent();
    if (tmpobj instanceof MimeMultipart) {
    //Extract the multipart mail to a variable mp
    MimeMultipart mp = (MimeMultipart) mimemsg.getContent();
    }

  • Calling getEJBMetaData throws java.lang.ClassCastException

    I am trying to introspect bean Home,creation methods and public methods thru Java Client using RMI/IIOP.
    It looks like I get the remote interface and home interface but next time I try to call again, I get following errror:
    getEJBMetaData() threw this: type(java.lang.ClassCastException), msg(com.sun.corba.ee.internal.POA.ServantCachePOAClientSC)
    Has anybody encountered this error?
    First time I called getEJBMetaData() on EJBHome , I get the Metadata but with warnings:SEVERE: UTIL6034:Could not initialize ORB monitoring
    Second time I get POA.. error described above

    I am trying to introspect bean Home,creation methods and public methods thru Java Client using RMI/IIOP.
    It looks like I get the remote interface and home interface but next time I try to call again, I get following errror:
    getEJBMetaData() threw this: type(java.lang.ClassCastException), msg(com.sun.corba.ee.internal.POA.ServantCachePOAClientSC)
    Has anybody encountered this error?
    First time I called getEJBMetaData() on EJBHome , I get the Metadata but with warnings:SEVERE: UTIL6034:Could not initialize ORB monitoring
    Second time I get POA.. error described above

  • ZIP file download throws java.lang.IllegalStateException: Response already

    Hello.
    In my application I need to implement a functionality where user will able to download multiple image files of their choice in compressed zip format. To implement it I used af:fileDownloadActionListener. I need to submit the form before going to process the zip. For that I have added to af:commandLinks.
    The following commandlink will process the download:
    <af:commandLink id="cl19" binding="#{pageFlowScope.album.downloadZipLink}" visible="false" text="jym">
                    <af:fileDownloadActionListener filename="Compressed.zip" contentType="application/zip" method="#{pageFlowScope.album.downloadZip}"/>
    </af:commandLink>And this commandlink will submit the form and invoke the click event of the first commandlink
    <af:commandLink text="Download" styleClass="functionButton" id="cl13" actionListener="#{pageFlowScope.album.downloadZip}"/>The downloadZip actionlistener is:
        public void downloadZip(ActionEvent actionEvent) {
            FacesContext context = FacesContext.getCurrentInstance();       
            ExtendedRenderKitService service = Service.getService(context.getRenderKit(), ExtendedRenderKitService.class);
            StringBuilder builder = new StringBuilder();
            builder.append("var link = AdfPage.PAGE.findComponentByAbsoluteId('").append(downloadZipLink.getClientId(context)).append("');");
            builder.append("AdfActionEvent.queue(link, false);");
            service.addScript(context, builder.toString());
        }And the downloadZip af:fileDownloadActionListener's method is:
        public void downloadZip(FacesContext facesContext, OutputStream outputStream) throws IdcClientException, IOException { 
            ZipOutputStream zipOutputStream = new ZipOutputStream(outputStream);
            for(List<Image> images : getAlbumDetailCurrent()){
                for(Image image : images){
                    if(image.isChecked()) {
                        CloseNotifyInputStream inputStream = (CloseNotifyInputStream)ridcConnection.getFileInputStream(image.getDocId(), image.getDocName());
                        String filename = getImageFilename(image.getDocName(), image.getFormat());       
                        zipOutputStream.putNextEntry(new ZipEntry(filename));
                        IOUtils.copy(inputStream, zipOutputStream);
                        inputStream.close();
                        zipOutputStream.closeEntry();                   
            zipOutputStream.close();
        }Everything is working fine. The zip is creating and and is being thrown to the user, but in console I am getting the following exception:
    <LifecycleImpl> <_handleException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase INVOKE_APPLICATION 5
    java.lang.IllegalStateException: Response already committed
         at weblogic.servlet.internal.ServletOutputStreamImpl.clearBuffer(ServletOutputStreamImpl.java:360)
         at weblogic.servlet.internal.ServletOutputStreamImpl.reset(ServletOutputStreamImpl.java:313)
         at weblogic.servlet.internal.ServletResponseImpl.reset(ServletResponseImpl.java:328)
         at javax.servlet.ServletResponseWrapper.reset(ServletResponseWrapper.java:193)
         at org.apache.myfaces.trinidadinternal.taglib.listener.FileDownloadActionListener.processAction(FileDownloadActionListener.java:127)
         at oracle.adfinternal.view.faces.event.rich.FileDownloadActionListener.processAction(FileDownloadActionListener.java:77)
         at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcast(UIXComponentBase.java:675)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:179)
         at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
         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.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)
         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.portlet.client.adapter.adf.ADFPortletFilter.doFilter(ADFPortletFilter.java:32)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.webcenter.framework.events.dispatcher.EventDispatcherFilter.doFilter(EventDispatcherFilter.java:44)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.wcps.client.PersonalizationFilter.doFilter(PersonalizationFilter.java:75)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.webcenter.content.integration.servlets.ContentServletFilter.doFilter(ContentServletFilter.java:168)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.webcenter.lifecycle.filter.LifecycleLockFilter.doFilter(LifecycleLockFilter.java:151)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at com.mhis.webfactory.filter.RelayFilter.doFilter(RelayFilter.java:144)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:179)
         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)
    <16 May, 2012 2:49:10 PM IST> <Error> <HTTP> <BEA-101020> <[ServletContext@2140334934[app:j2ee-app module:hennessy path:/hennessy spec-version:2.5 version:V2.0]] Servlet failed with Exception
    java.lang.IllegalStateException: Response already committed
         at weblogic.servlet.internal.ServletOutputStreamImpl.clearBuffer(ServletOutputStreamImpl.java:360)
         at weblogic.servlet.internal.ServletOutputStreamImpl.reset(ServletOutputStreamImpl.java:313)
         at weblogic.servlet.internal.ServletResponseImpl.reset(ServletResponseImpl.java:328)
         at javax.servlet.ServletResponseWrapper.reset(ServletResponseWrapper.java:193)
         at org.apache.myfaces.trinidadinternal.taglib.listener.FileDownloadActionListener.processAction(FileDownloadActionListener.java:127)
         Truncated. see log file for complete stacktraceI am unable to find its cause. It is not causing any problem in webpage.
    Any information will be very helpful to me.
    I am using JDeveloper 11.1.1.6.0.
    Regards.

              The reason for this exception is when you are trying to write something on the
              response stream
              which was already closed (commit) . This may happen when u write something in
              the response stream after doing a redirect/forward. OR if u r trying to redirect/forward
              more than once. bcs once u redirect/forward your response object will be flushed
              and commited..
              Hope this may help u
              regards
              Perianayagam.T
              "Jai Verma" <[email protected]> wrote:
              >
              >Hi,
              >
              >I am getting java.lang.IllegalStateException: response already committed
              >error
              >in log lot of time.
              >Any idea what does this error mean?
              >
              >thanks
              

  • Getting :java.lang.ClassCastException: weblogic.rmi.internal.MethodDescript

    Hi I am getting the following exception:
    java.lang.ClassCastException: weblogic.rmi.internal.MethodDescriptor
         at weblogic.rjvm.MsgAbbrevInputStream.readClassDescriptor(MsgAbbrevInputStream.java:186)
         at weblogic.common.internal.ChunkedObjectInputStream$NestedObjectInputStream.readClassDescriptor(ChunkedObjectInputStream.java:300)
         at java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java:901)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:361)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:231)
         at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1181)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:381)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:231)
         at weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:110)
         at weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:123)
         at weblogic.jndi.internal.RootNamingNode_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:298)
         at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:267)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    can any body explain the Cause for this exception and what will be the impact on the server.
    but if i restart the server the error is not coming

    Hi I am getting the following exception:
    java.lang.ClassCastException: weblogic.rmi.internal.MethodDescriptor
         at weblogic.rjvm.MsgAbbrevInputStream.readClassDescriptor(MsgAbbrevInputStream.java:186)
         at weblogic.common.internal.ChunkedObjectInputStream$NestedObjectInputStream.readClassDescriptor(ChunkedObjectInputStream.java:300)
         at java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java:901)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:361)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:231)
         at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1181)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:381)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:231)
         at weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:110)
         at weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:123)
         at weblogic.jndi.internal.RootNamingNode_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:298)
         at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:267)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    can any body explain the Cause for this exception and what will be the impact on the server.
    but if i restart the server the error is not coming

  • Java.lang.ClassCastException in struts application

    Hi,
    In application after I perform an insert(data into the DB) operation, the application must then display a list . Currently this is not happening. I can perform the insert operation successfully , but after that i get the following exception:
    java.lang.ClassCastException: org.theclass.candidate.view.SearchForm
         org.theclass.candidate.view.CandidateListAction.execute(CandidateListAction.java:41)
         org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
         org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    I dont understand where to look for errors.
    This is my web.xml file :
    <web-app>
    <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
    <param-name>config</param-name>
    <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <init-param>
    <param-name>debug</param-name>
    <param-value>2</param-value>
    </init-param>
    <init-param>
    <param-name>detail</param-name>
    <param-value>2</param-value>
    </init-param>
    <init-param>
    <param-name>validate</param-name>
    <param-value>true</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
    </servlet>
    <!-- Standard Action Servlet Mapping -->
    <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
    </servlet-mapping>
    <!-- The Usual Welcome File List -->
    <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
    <!-- Struts Tag Library Descriptors -->
    <taglib>
    <taglib-uri>/tags/struts-bean</taglib-uri>
    <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/tags/struts-html</taglib-uri>
    <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/tags/struts-logic</taglib-uri>
    <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/tags/struts-nested</taglib-uri>
    <taglib-location>/WEB-INF/struts-nested.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/tags/struts-tiles</taglib-uri>
    <taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
    </taglib>
    </web-app>
    struts-config.xml:
    <struts-config>
         <form-beans>
              <form-bean
              name="candidateForm"
              type="org.theclass.candidate.view.CandidateForm"/>
         <form-bean
              name="listForm"
              type="candidate.ListForm"/>
              <form-bean
              name="searchForm"
              type="org.theclass.candidate.view.SearchForm"/>
         </form-beans>
    <global-forwards>
         <forward
              name="List"
              path="/jsp/list.jsp"/>
         <forward
              name="candidatelist"
              path="/CandidateList"/>
         <forward
              name="Add"
              path="/jsp/addcandidate.jsp"/>
    </global-forwards>
    <action-mappings>
         <action path="/Add"
              name="candidateForm"
              type="org.theclass.candidate.view.AddCandidateAction"
              validate ="true"
              input="/jsp/addcandidate.jsp">
              <forward name="success" path="/CandidateList.do"/>
         </action>
         <action path="/CandidateList"
              type="org.theclass.candidate.view.CandidateListAction"
              name="searchForm"
              scope="request" >
              <forward name="failure" path="/jsp/list.jsp"/>
              <forward name="success" path="/jsp/candidatelist.jsp"/>
         </action>
         <action path="/Edit"
              type="org.theclass.candidate.view.GetCandidateAction"
              name="candidateForm"
              scope="request"
              validate="false" >
              <forward name="success" path="/jsp/editcandidate.jsp"/>
              <forward name="error" path="/CandidateList.do"/>
         </action>
         <action path="/View"
              type="org.theclass.candidate.view.GetCandidateAction"
              name="candidateForm"
              scope="request"
              validate="false" >
              <forward name="success" path="/jsp/viewcandidate.jsp"/>
              <forward name="error" path="/CandidateList.do"/>
         </action>
         <action path="/EditCandidate"
              type="org.theclass.candidate.view.EditCandidateAction"
              name="candidateForm"
              scope="request"
              input="/jsp/editcandidate.jsp"
              validate="true" >
              <forward name="success" path="/CandidateList.do"/>
              <forward name="error" path="/jsp/editcandidate.jsp"/>
         </action>
         <action path="/ViewCandidate"
              name="candidateForm"
              scope="request"
              input="/jsp/viewcandidate.jsp"
              validate="true" >
              <forward name="success" path="/CandidateList.do"/>
              <forward name="error" path="/jsp/viewcandidate.jsp"/>
         </action>
    <action path="/List"
              name="searchForm"
              type="org.theclass.candidate.view.CandidateListAction"
              input="/jsp/list.jsp">
              <forward name="success" path="/jsp/candidatelist.jsp"/>
         </action>
    </action-mappings>
    <!-- Controller Configuration -->
    <controller
    processorClass="org.apache.struts.tiles.TilesRequestProcessor"/>
    <!-- Message Resources Definitions -->
    <message-resources parameter="ApplicationResources"/>
    <!-- comment following if struts1.0.x -->
    <plug-in className="org.apache.struts.tiles.TilesPlugin" >
    <set-property property="definitions-config"
         value="/WEB-INF/tiles-defs.xml" />
    <set-property property="moduleAware" value="true" />
    <set-property property="definitions-parser-validate" value="true" />
    </plug-in>
    <!-- end comment if struts1.0.x -->
         <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
              <set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
    </plug-in>
    <plug-in className="org.theclass.candidate.view.HibernatePlugin">
    <!-- <set-property property="configFilePath" value="/WEB-INF/src/hibernate.cfg.xml" /> -->
         <set-property property="configFilePath" value="/hibernate.cfg.xml" />
    <set-property property="storeInServletContext" value="true" />
         </plug-in>
    </struts-config>
    Please tell me where am i going wrong. I am running out of time.
    I use struts 1.2.9, JDK 5,tomcat 5.5.17. In CandidateListAction class i have hibernate query language statements(HQL)

    Take a look at the stack trace, it shows you exactly where the error is coming from:
    java.lang.ClassCastException: org.theclass.candidate.view.SearchForm
    org.theclass.candidate.view.CandidateListAction.execute(CandidateListAction.java:41)Line 41 in your CandidateListAction.
    Probably it is failing on a cast of your action form.
    Taking a closer look at your struts-config, you are "chaining" actions.
    Your AddCandidateAction uses the candidateForm, and forwards to CandidateListAction.do
    Your CandidateListAction uses the searchForm.
    That will be the cause of your class cast exception.
    <action path="/Add"
      name="candidateForm"
      type="org.theclass.candidate.view.AddCandidateAction"
      validate ="true"
      input="/jsp/addcandidate.jsp">
      <forward name="success" path="/CandidateList.do"/>
    </action>
    <action path="/CandidateList"
    type="org.theclass.candidate.view.CandidateListAction"
    name="searchForm"
    scope="request" >
    <forward name="failure" path="/jsp/list.jsp"/>
    <forward name="success" path="/jsp/candidatelist.jsp"/>
    </action>Check out: http://struts.apache.org/1.x/faqs/newbie.html#chaining
    Solutions?
    - don't chain actions ;-)
    - use the same action form for both actions (possible?)
    - make the actionForward a "redirect" one. That means a new request, and losing any request parameters/attributes but should prevent this class cast exception.
    Hope this helps,
    evnafets

  • Java.lang.ClassCastException: Cannot narrow remote object weblogic.rmi.inte

    Hi,
    I am trying to deploy ejb3.0 on weblogic 10 server. I am able to find the JNDI name of the stateless session bean correctly, but getting an exception while narrowing it down. My ejb3.0 client is a standalone java client. I am trying to access the stateless session ejb3.0 bean.Please help me. i have been trying it for many days.
    thanks in advance,
    Sanjeev
    [sanpraka@localhost certEjb]$ java -cp ./:/usr/weblogic/bea/wlserver_10.0/server/lib/weblogic.jar:/usr/weblogic/bea/wlserver_10.0/server/lib/wlclient.jar com.titan.clients.Client
    Object is weblogic.rmi.internal.BasicRemoteRef - hostID: '5337880647112897730S:127.0.0.1:[7001,7001,-1,-1,-1,-1,-1]:wl_server:examplesServer', oid: '302', channel: 'null'
    java.lang.ClassCastException: Cannot narrow remote object weblogic.rmi.internal.BasicRemoteRef - hostID: '5337880647112897730S:127.0.0.1:[7001,7001,-1,-1,-1,-1,-1]:wl_server:examplesServer', oid: '302', channel: 'null' to com.titan.travelagent.TravelAgentRemote
    at weblogic.corba.server.naming.ReferenceHelperImpl.narrow(ReferenceHelperImpl.java:206)
    at weblogic.rmi.extensions.PortableRemoteObject.narrow(PortableRemoteObject.java:88)
    at weblogic.iiop.PortableRemoteObjectDelegateImpl.narrow(PortableRemoteObjectDelegateImpl.java:32)
    at javax.rmi.PortableRemoteObject.narrow(Unknown Source)
    at com.titan.clients.Client.main(Client.java:24)
    [sanpraka@localhost certEjb]$

    We have a similar problem. We have a web application (on server A) that invokes an EJB on a remote server (server B). This works fine, until we deploy another web application to server A at which point the existing web application starts to throw java.lang.ClassCastException when narrowing the remote EJB interface. The exception starts to be thrown at the moment the latter web application is deployed - start is not required.
    The latter web application contains (actually in APP-INF/lib) the old version of the EJB remote interface, that somehow gets to be loaded into the classpath of the existing web application. The solution is to delete the old version of the EJB remote interface from APP-INF/lib of the latter web application (we didn't need it anyway), but it would be interesting to know in which circumstances classes can get mixed between enterprise applications.
    I failed to reproduce the error in simple scenario, so this does not happen always.

  • Java.lang.ClassCastException in simple struts application. please help me!

    I have a simple struts application, it only have a login form. however, it's alway throw java.lang.ClassCastException when I submit the form. Here is full stack trace:
    14-03-2007 17:04:50 org.apache.struts.chain.ComposableRequestProcessor init
    INFO: Initializing composable request processor for module prefix ''
    14-03-2007 17:04:50 org.apache.struts.chain.commands.servlet.CreateAction getAction
    INFO: Initialize action of type: ndlinh.struts.lab.RegistrationForm
    14-03-2007 17:04:50 org.apache.struts.chain.commands.AbstractExceptionHandler execute
    WARNING: Unhandled exception
    java.lang.ClassCastException: ndlinh.struts.lab.RegistrationForm
         at org.apache.struts.chain.commands.servlet.CreateAction.getAction(CreateAction.java:66)
         at org.apache.struts.chain.commands.AbstractCreateAction.execute(AbstractCreateAction.java:82)
         at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:48)
         at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
         at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
         at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
         at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:280)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:459)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Thread.java:595)
    14-03-2007 17:04:50 org.apache.struts.chain.commands.ExceptionCatcher postprocess
    WARNING: Exception from exceptionCommand 'servlet-exception'
    java.lang.ClassCastException: ndlinh.struts.lab.RegistrationForm
         at org.apache.struts.chain.commands.servlet.CreateAction.getAction(CreateAction.java:66)
         at org.apache.struts.chain.commands.AbstractCreateAction.execute(AbstractCreateAction.java:82)
         at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:48)
         at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
         at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
         at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
         at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:280)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:459)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Thread.java:595)
    Here is my code:
    package ndlinh.struts.lab;
    import javax.servlet.http.HttpServletRequest;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionMapping;
    public class RegistrationForm extends ActionForm {
         private String userid = null;
         private String password = null;
         private String password2 = null;
         public RegistrationForm() {
              System.out.println("************ Registration Form created *************");
          * @return the password
         public String getPassword() {
              return password;
          * @param password the password to set
         public void setPassword(String password) {
              this.password = password;       
          * @return the password2
         public String getPassword2() {
              return password2;
          * @param password2 the password2 to set
         public void setPassword2(String password2) {
              this.password2 = password2;
          * @return the userid
         public String getUserid() {
              return userid;
          * @param userid the userid to set
         public void setUserid(String userid) {
              this.userid = userid;
         public void reset(ActionMapping arg0, HttpServletRequest arg1) {
              userid = "";
              password = "";
              password2 = "";
    package ndlinh.struts.lab;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    public final class RegistrationAction extends Action {
         public ActionForward execute(ActionMapping mapping, ActionForm actionForm,
                                             HttpServletRequest request, HttpServletResponse response)
              try {
                   System.out.println("*******************" + actionForm.toString() + "*******************");
                   RegistrationForm form = (RegistrationForm)actionForm;     
                   String username = form.getUserid();
                   String password = form.getPassword();
                   System.out.println(username);
                   // simple login checking.
                   // if userid equals password, user can login to system
                   if ( username.equalsIgnoreCase(password)) {
                        return mapping.findForward("success");
                   } else {
                        return mapping.findForward("failure");
              } catch (Exception e) {
                   e.printStackTrace();
                   return mapping.findForward("failure");
    }registration.jsp
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
        pageEncoding="ISO-8859-1"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <%@taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Insert title here</title>
    </head>
    <body>
         <html:form action="/register">
              Username: <html:text property="userid" /> <br />
              Password: <html:password property="password" /> <br />
              Re-type: <html:password property="password2" />
              <html:submit value="Register" />
         </html:form>
    </body>
    </html>struts-config.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
    <struts-config>
      <form-beans>
           <form-bean name="registrationForm" type="ndlinh.struts.lab.RegistrationForm" />
      </form-beans>
      <action-mappings>
           <action path="/register"
                   type="ndlinh.struts.lab.RegistrationForm"
                   name="registrationForm"
                   validate="false"
                   scope="request"
                   input="registration.jsp" >
                <forward name="success" path="/jsp/success.jsp"  />
                <forward name="failure" path="/jsp/failure.jsp"  />
           </action>
      </action-mappings>
    </struts-config>web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
    <web-app>
      <servlet>
        <servlet-name>action</servlet-name>
        <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
        <init-param>
          <param-name>config</param-name>
          <param-value>/WEB-INF/struts-config.xml</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
      </servlet>
      <servlet-mapping>
        <servlet-name>action</servlet-name>
        <url-pattern>*.do</url-pattern>
      </servlet-mapping>
    </web-app>System information:
    Tomcat 5.5.20
    Struts 1.3.5
    JDK1.5.08

    struts-config.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
    <struts-config>
      <form-beans>
           <form-bean name="registrationForm" type="ndlinh.struts.lab.RegistrationForm" />
      </form-beans>
      <action-mappings>
           <action path="/register"
                   type="ndlinh.struts.lab.RegistrationAction" // action class
                   name="registrationForm" // form bean name
                   validate="false"
                   scope="request"
                   input="registration.jsp" >
                <forward name="success" path="/jsp/success.jsp"  />
                <forward name="failure" path="/jsp/failure.jsp"  />
           </action>
      </action-mappings>
    </struts-config>HTH

  • Java.lang.ClassCastException: org.apache.crimson.tree.XmlDocument

    Hi all,
    i am new to java. I am trying to parse an xml document. the code is as follows:-
    Document document = null;
    DocumentBuilderFactory factory = ocumentBuilderFactory.newInstance();
    try {
         DocumentBuilder builder = factory.newDocumentBuilder();
         document = builder.parse( new File(xmlFile) );
    after this i am trying to traverse using treewalker :-
    Element docElem = document.getDocumentElement();
                   DocumentTraversal docTrav = (DocumentTraversal) document;
                   TreeWalker treeWalk = docTrav.createTreeWalker(docElem, NodeFilter.SHOW_ELEMENT, new ConfigNodeFilter(), false);
              Node node = treeWalk.nextNode();
    when i compile all is fine but while runnig it. i get the following error:-
    java.lang.ClassCastException: org.apache.crimson.tree.XmlDocument
    at - DocumentTraversal docTrav = (DocumentTraversal) document;.
    my import statements are as follows:-
    import java.io.File;
    import java.io.IOException;
    import java.net.InetAddress;
    import java.net.UnknownHostException;
    import java.util.Vector;
    import java.util.regex.Matcher;
    import java.util.regex.Pattern;
    import javax.servlet.Filter;
    import javax.servlet.FilterChain;
    import javax.servlet.FilterConfig;
    import javax.servlet.RequestDispatcher;
    import javax.servlet.ServletException;
    import javax.servlet.ServletRequest;
    import javax.servlet.ServletResponse;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.traversal.DocumentTraversal;
    import org.w3c.dom.traversal.NodeFilter;
    import org.w3c.dom.traversal.TreeWalker;
    import org.xml.sax.SAXException;
    i am not able to understand why the error is coming.
    any help will be appreciated.

    "In DOMs which support the Traversal feature, DocumentTraversal will be implemented by the same objects that implement the Document interface. "
    My guess is that the DOM parser you are using doesn't support the DocumentTraversal interface which is why you can not cast to that class.

  • Java.lang.ClassCastException in WD Components

    Hi evebody,
    I facing with a very stranger situation in my WD Component. I have two components, A and B. The component B uses some methods of the Component A, but when I invoke these methods I getting the following exception:
       java.lang.ClassCastException
        at net.weg.cs.astec.srvorder.wdp.InternalMaterialOVSCustomController.wdGetConfigurationCompInstInterface(InternalMaterialOVSCustomController.java:226)
        at net.weg.cs.astec.srvorder.MaterialOVSCustomController$OVSMaterialContextNotificationListener.onQuery(MaterialOVSCustomController.java:204)
        at com.sap.tc.webdynpro.progmodel.valuehelp.OVSCMIQuery.onQuery(OVSCMIQuery.java:159)
        at com.sap.tc.webdynpro.components.ovs.OVSComponent.query(OVSComponent.java:209)
        at com.sap.tc.webdynpro.components.ovs.wdp.InternalOVSComponent.query(InternalOVSComponent.java:170)
        ... 31 more
    When I debug my code, I see where this happen:
      /** outgoing controller usage to interface controller of component usage */
      public net.weg.cs.astec.model.configuration.wdp.IExternalConfigurationCompInterface wdGetConfigurationCompInstInterface() {
        return
          (net.weg.cs.astec.model.configuration.wdp.IExternalConfigurationCompInterface)
            wdAlterEgo
              .getComponentGCI()
                .getComponentUsage("ConfigurationCompInst")
                  .getInterfaceController();
    The method wdAlterEgo.getComponentGCI().getComponentUsage("ConfigurationCompInst").getInterfaceController() return a different type then the expected. Should return net.weg.cs.astec.model.configuration.wdp.IExternalConfigurationCompInterface but is returning net.weg.cs.astec.model.configuration.wdp.IInternalConfigurationCompInterface
    Does anybody knows why this happening?
    Thanks,
    Luciano

    Hi,
    I embeded on the "On Demand mode". It was working yesterday. If I deploy of the component A by as DC it stop to work. If I deploy by application it works. I have no idea why it is happening!
    Thank you!

  • Class java.lang.ClassCastException

    Hello,
    In a Collaboration Room we are using discussion Iviews with the LayoutSets Discussiongroups and DiscussiongroupsContributor. We are using SAP Portal NetWeaver2004 SP17.
    By mistake we've made some changes in these LayoutSets and are getting the following stacktrace.
    java.lang.ClassCastException
            at com.sapportals.wcm.rendering.component.cm.ResourcePath.doInitialize(ResourcePath.java:1228)
            at com.sapportals.wcm.rendering.component.cm.ResourcePath.render(ResourcePath.java:364)
            at com.sapportals.wcm.rendering.layout.cm.DiscussionGroupLayoutController.render(DiscussionGroupLayoutController.java:104)
            at com.sapportals.wcm.rendering.control.cm.WdfProxy.render(WdfProxy.java:1717)
            at com.sapportals.wdf.layout.HorizontalLayout.renderControls(HorizontalLayout.java:42)
            at com.sapportals.wdf.stack.Pane.render(Pane.java:155)
            at com.sapportals.wdf.stack.PaneStack.render(PaneStack.java:67)
            at com.sapportals.wdf.layout.HorizontalLayout.renderPanes(HorizontalLayout.java:73)
            at com.sapportals.wdf.stack.Pane.render(Pane.java:158)
            at com.sapportals.wdf.stack.PaneStack.render(PaneStack.java:67)
            at com.sapportals.wdf.layout.HorizontalLayout.renderPanes(HorizontalLayout.java:73)
            at com.sapportals.wdf.stack.Pane.render(Pane.java:158)
            at com.sapportals.wdf.stack.PaneStack.render(PaneStack.java:67)
            at com.sapportals.wdf.layout.HorizontalLayout.renderPanes(HorizontalLayout.java:73)
            at com.sapportals.wdf.stack.Pane.render(Pane.java:158)
            at com.sapportals.wdf.stack.PaneStack.render(PaneStack.java:67)
            at com.sapportals.wdf.WdfCompositeController.internalRender(WdfCompositeController.java:696)
            at com.sapportals.wdf.WdfCompositeController.build...
    We still can create a Discussion Theme and we also can  create a discussion within the Discussion Theme.
    But when we would like to respond to the discussion, we are getting an error.
    Can someone help me with this problem?
    Greetings,
    Gene

    Hi Detlev,
    The error is still the same. I decompiled the ResourcePath.class. The strange thing is that there is no line 1228. The code ends with line 1095. Can it be the decompiler? (I decompiled with Cavaj).
    The methode doInitialize() is on codelines 991-1010 and looks like this:
        private void doInitialize()
            throws WcmException
            ICustomizingController cc = CustomizingControllerFactory.getCustomizingController((ICollection)getResource(), (ICollection)getResource(), getProxy().getParameters(), getProxy());
            IParameterName names[] = getLayoutObject().getSupportedParameters();
            boolean isCollectionStyleSetOff = false;
            if(getLayoutObject().getParameters().isExactlyValue(ICollectionRendererParameterNameConst.COLLECTION_ACTIONSTYLE, "off"))
                isCollectionStyleSetOff = true;
            if(names != null)
                IParameters parameters = cc.parameters().getParameters(getFlavor(), names);
                getLayoutObject().setParameters(parameters);
            if(isCollectionStyleSetOff)
                getLayoutObject().setParameter(ICollectionRendererParameterNameConst.COLLECTION_ACTIONSTYLE, "off");
    I expect that a classcastexception can occur in the first line... but why? What do you think?
    Thanks,
    Eric

  • Caught an unexpected exception! java.lang.ClassCastException at com.sun.cor

    Hi,
    Iam struggling with this problem from last 3days.
    Any body could u help me to solve this problem.
    error:
    Caught an unexpected exception!
    java.lang.ClassCastException at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow (PortableRemoteObject.java:293)
    at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)
    at ConverterClient.main(ConverterClient.java:59)
    Client Code is here:
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.rmi.PortableRemoteObject;
    import java.util.Properties;
    import javax.ejb.CreateException;
    import java.util.Hashtable;
    // NOT NECESSARY import Converter;
    // NOT NECESSARY import ConverterHome;
    public class ConverterClient {
    public static void main(String[] args) {
    try {
    Properties env = new Properties();
              env.put("java.naming.factory.initial","com.sun.jndi.cosnaming.CNCtxFactory");
              env.put("java.naming.provider.url", "iiop://localhost:3700");
              Context initial = new InitialContext(env);
         ConverterHome home =(ConverterHome)PortableRemoteObject.narrow(initial.lookup("MyConverter"),ConverterHome.class);
    // Create converter session bean
    Converter currencyConverter = home.create();
    // Calculate from dollars to yen
    double amount = currencyConverter.dollarToYen(100.00);
    System.out.println("100 Dollars is " + String.valueOf(amount) + " Yen");
    // Calculate from yen to dollars
    amount = currencyConverter.yenToEuro(100.00);
    System.out.println("100 Yen is " + String.valueOf(amount) + " Dollars");
    } catch (Exception ex) {
    System.err.println("Caught an unexpected exception!");
    ex.printStackTrace();

    Hi,
    I have a stateless bean and accessing it from a jsp page in Orion App Server. There is no problem in the deployment. of the application.
    When I access the bean from the jsp page is throwing
    java.lang.ClassCastException
    at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(Unknown Source)
    The code is :
    Object homeObject = null;
    homeObject = ctx.lookup("LoginHome");
    out.println(homeObject.toString());
    LoginHome ejbHome = (LoginHome)PortableRemoteObject.narrow(homeObject,LoginHome.class);
    Login login = ejbHome.create();
    when I use the statement
    homeOject.toString() to print the object it prints
    LoginHome EJBHome
    I am not able to resolve this for th epast three days.
    Thanks,
    Vivek S

  • ASN java.lang.ClassCastException

    hi,
    i'm getting Error At ASN java.lang.ClassCastException, following is the code, the error points out in the 3rd line. can any one help me out.
    ByteArrayInputStream bin = new ByteArrayInputStream(data);
    ASN1InputStream ain = new ASN1InputStream(bin);
    ASN1Sequence root = (ASN1Sequence) ain.readObject();
    ASN1Sequence seq = (ASN1Sequence) root.getObjectAt(0);
    Thnx in Advance
    Vinodh

    Mr. Vinodh,
    Are you using org.bouncycastle.asn1.ASN1InputStream()?
    To check your program, try printing the type of the object returned by ain.readObject().
    System.out.println ((ain.readObject()).getClass().getName());
    Maybe your data is not a ASN.1 SEQUENCE, but another ASN.1 data type. Use some ASN.1 dump tool, like DUMPASN1 (search in google for it).

Maybe you are looking for

  • HP 3520 not printing black ink

    My HP deskjet 3520 is not printing black even though the cartridge is brand new.  I've tried the clean printhead tool, plugging printer and turning back on, re-seating the cartridge, checked the vent, did a partial reset of the printer, reinstalled d

  • ! the folder "i Tunes" cannot be found or created

    This message continues to read, "and is required. The default location for this folder is inside the "my music" folder." I have installed and uninstalled my ipod software and I still can't seem to solve this problem. Please help.

  • New ipod for me, was my friends

    a friend gave me their ipod. it is still showing their name whenever i plug it in to the computer. they dont have the software disk anymore. how do i set it up to show my name and register the serial number under my name? ipod shuffle   Windows XP  

  • Accessing JavaScripts in Share Components

    Hi. I am trying to access/use a javascript I created under the path in portal:provider-->shared components--> javascripts. I called this function "test". The Javascript works when I test it, but when I try to call the function "test" from an onChange

  • Skyep is not dwnloading through OVI

    Dear, In my nokia E52 model skype setup file which is in ovi is not downloading instead its showing fade color(The download option) Can you please give any tips to solve this problem?