1 2 3 Previous Next 35 Replies Latest reply: Jul 10, 2006 6:05 PM by rpa_rio Go to original post RSS
      • 15. Re: IOExceptions with MyFaces/Facelets apps
        rpa_rio Novice

        Clement,

        The ApplyToken is only Externalizable, not Serializable and has a default constructor.

        • 16. Re: IOExceptions with MyFaces/Facelets apps
          John Doe Newbie

           

          "clebert.suconic@jboss.com" wrote:
          "iktuz" wrote:
          Hi folks. I am getting the same error:


          It looks like this is a different error. Can you provide the whole stack trace? (I'm interested in the causes of the IOException).


          Hi Clebert, here we go...

          java.io.IOException
           at org.jboss.serial.persister.RegularObjectPersister.readSlotWithMethod(RegularObjectPersister.java:107)
           at org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:269)
           at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:241)
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:411)
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:81)
           at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:841)
           at org.jboss.serial.io.MarshalledObjectForLocalCalls.get(MarshalledObjectForLocalCalls.java:60)
           at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:61)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102)
           at $Proxy93.getMMSList(Unknown Source)
           at br.com.suntech.vigiadados.ext.client.service.oper.OperationClientService.getMMSList(OperationClientService.java:96)
           at br.com.suntech.vigiadados.ext.client.action.oper.OperationAction.loadOperationData(OperationAction.java:134)
           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:585)
           at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:274)
           at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194)
           at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
           at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
           at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
           at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
           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.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
           at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
           at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
           at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
           at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1062)
           at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
           at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386)
           at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:318)
           at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)
           at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
           at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at br.com.suntech.vigiadados.ext.client.action.login.LoginFilter.doFilter(LoginFilter.java:36)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
           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.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
           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.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
           at java.lang.Thread.run(Thread.java:595)
          Caused by: java.lang.reflect.InvocationTargetException
           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:585)
           at org.jboss.serial.persister.RegularObjectPersister.readSlotWithMethod(RegularObjectPersister.java:103)
           ... 63 more
          Caused by: org.jboss.serial.exception.SerializationException: Could not create instance of oracle.jdbc.driver.T4CConnection - oracle.jdbc.driver.T4CConnection
           at org.jboss.serial.classmetamodel.ClassMetaData.newInstance(ClassMetaData.java:327)
           at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:239)
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:411)
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:81)
           at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:841)
           at org.jboss.serial.persister.RegularObjectPersister.readSlotWithFields(RegularObjectPersister.java:353)
           at org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:273)
           at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:241)
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:411)
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:81)
           at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:841)
           at org.jboss.serial.persister.RegularObjectPersister.readSlotWithFields(RegularObjectPersister.java:353)
           at org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:273)
           at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:241)
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:411)
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFrom
          2006-06-14 08:28:58,755 INFO [STDOUT] Description(ObjectDescriptorFactory.java:81)
           at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:841)
           at org.jboss.serial.persister.ObjectInputStreamProxy.readObjectOverride(ObjectInputStreamProxy.java:68)
           at java.io.ObjectInputStream.readObject(ObjectInputStream.java:333)
           at java.util.ArrayList.readObject(ArrayList.java:591)
           ... 68 more
          Caused by: java.lang.InstantiationException: oracle.jdbc.driver.T4CConnection
           at java.lang.Class.newInstance0(Class.java:335)
           at java.lang.Class.newInstance(Class.java:303)
           at org.jboss.serial.classmetamodel.ClassMetaData.newInstance(ClassMetaData.java:319)
           ... 87 more
          


          As I suspected, when I comment the blob field in MMSEvent class, this problem does not happen. Thanks for your help.

          • 17. Re: IOExceptions with MyFaces/Facelets apps
            Clebert Suconic Master

            Add the word transient on that field (as you would do on any Serializable class). This way JBossSerializaiton will ignore that field.
            The Blob is not serializable hence you can't have it as part of your Stateful Bean.

            I'm not sure if @Transient will infere transient or not. This is something I might work on.

            • 18. Re: IOExceptions with MyFaces/Facelets apps
              Clebert Suconic Master

              http://jira.jboss.com/jira/browse/JBSER-80
              I guess I have reproduced the bug.

              It always happens when you have a private inner class implementing Externalizable.

              Maybe your property is set to null and only when your property is set the Persister is activated generating the error.

              I will be working on. A workaround would be:

              - Make the class public.
              - Make the class Serializable (hummm... maybe.. I have to check this one).


              I will be working on this.


              Thanks a lot for reporting this.


              Clebert

              • 19. Re: IOExceptions with MyFaces/Facelets apps
                Clebert Suconic Master

                I already have a fix for this, but I can't commit now due to a network problem. (I'm working from a hotel, and I can't commit the code now).

                But if you want to try the fix, you can change SunConstructorManager, method getConstructor according to this:

                if (Externalizable.class.isAssignableFrom(clazz))
                {
                 Constructor constr = class.getConstructor(EMPTY_CLASS_ARRY);
                 constr.setAccessible(true);
                 return constr;
                }
                



                JBossSerialization has a package called PersistentReference what will rebuild SoftReferences on reflection on case of SoftReferences clean up (happening when the Memory goes low).

                When that happened the setAccessible(true) was not being called at SunConstructorManager (only at ClassMetaData Constructor), and that was the mistake.

                I have a testcase and the fix sitting on my lap top, and this should be committed by tomorrow morning.


                Thanks again,


                Clebert

                • 20. Re: IOExceptions with MyFaces/Facelets apps
                  Clebert Suconic Master

                  I already have the fix commited on CVS. I don't have the testcase added yet, but this should be considered fixed.

                  I didn't commit the testcase because network problems again, but I could manage to commit the fix.

                  • 21. Re: IOExceptions with MyFaces/Facelets apps
                    rpa_rio Novice

                    The previous error seens to be gone, now i'm getting this error:

                    javax.faces.FacesException: java.io.IOException
                    at org.apache.myfaces.shared_impl.util.StateUtils.getAsByteArray(StateUtils.java:179)
                    at org.apache.myfaces.shared_impl.util.StateUtils.construct(StateUtils.java:140)
                    at org.apache.myfaces.renderkit.html.HtmlResponseStateManager.writeState(HtmlResponseStateManager.java:102)
                    at org.apache.myfaces.application.jsp.JspStateManagerImpl.writeState(JspStateManagerImpl.java:430)
                    at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:606)
                    at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
                    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                    at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:181)
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                    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(Unknown Source)
                    Caused by: java.io.IOException
                    at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithMethod(RegularObjectPersister.java:129)
                    at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:86)
                    at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
                    at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)
                    at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:197)
                    at org.jboss.serial.persister.ArrayPersister.saveObjectArray(ArrayPersister.java:110)
                    at org.jboss.serial.persister.ArrayPersister.writeData(ArrayPersister.java:101)
                    at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)
                    at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:197)
                    at org.jboss.serial.io.JBossObjectOutputStream.writeObjectOverride(JBossObjectOutputStream.java:181)
                    at java.io.ObjectOutputStream.writeObject(Unknown Source)
                    at org.apache.myfaces.shared_impl.util.StateUtils.getAsByteArray(StateUtils.java:169)
                    ... 23 more
                    Caused by: java.lang.reflect.InvocationTargetException
                    at sun.reflect.GeneratedMethodAccessor866.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                    at java.lang.reflect.Method.invoke(Unknown Source)
                    at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithMethod(RegularObjectPersister.java:120)
                    ... 34 more
                    Caused by: java.io.IOException
                    at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithMethod(RegularObjectPersister.java:129)
                    at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:86)
                    at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
                    at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)
                    at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:197)
                    at org.jboss.serial.persister.ArrayPersister.saveObjectArray(ArrayPersister.java:110)
                    at org.jboss.serial.persister.ArrayPersister.writeData(ArrayPersister.java:101)
                    at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)
                    at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:197)
                    at org.jboss.serial.persister.ObjectOutputStreamProxy.writeObjectOverride(ObjectOutputStreamProxy.java:60)
                    at java.io.ObjectOutputStream.writeObject(Unknown Source)
                    at java.util.ArrayList.writeObject(Unknown Source)
                    ... 38 more
                    Caused by: java.lang.reflect.InvocationTargetException
                    at sun.reflect.GeneratedMethodAccessor866.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                    at java.lang.reflect.Method.invoke(Unknown Source)
                    at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithMethod(RegularObjectPersister.java:120)
                    ... 49 more
                    Caused by: java.io.IOException
                    at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithMethod(RegularObjectPersister.java:129)
                    at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:86)
                    at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
                    at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)
                    at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:197)
                    at org.jboss.serial.persister.ArrayPersister.saveObjectArray(ArrayPersister.java:110)
                    at org.jboss.serial.persister.ArrayPersister.writeData(ArrayPersister.java:101)
                    at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)
                    at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:197)
                    at org.jboss.serial.persister.ObjectOutputStreamProxy.writeObjectOverride(ObjectOutputStreamProxy.java:60)
                    at java.io.ObjectOutputStream.writeObject(Unknown Source)
                    at java.util.ArrayList.writeObject(Unknown Source)
                    ... 53 more
                    Caused by: java.lang.reflect.InvocationTargetException
                    at sun.reflect.GeneratedMethodAccessor866.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                    at java.lang.reflect.Method.invoke(Unknown Source)
                    at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithMethod(RegularObjectPersister.java:120)
                    ... 64 more
                    Caused by: java.io.IOException
                    at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithMethod(RegularObjectPersister.java:129)
                    at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:86)
                    at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
                    at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)
                    at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:197)
                    at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithFields(RegularObjectPersister.java:182)
                    at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:90)
                    at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
                    at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)
                    at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:197)
                    at org.jboss.serial.persister.ArrayPersister.saveObjectArray(ArrayPersister.java:110)
                    at org.jboss.serial.persister.ArrayPersister.writeData(ArrayPersister.java:101)
                    at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)
                    at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:197)
                    at org.jboss.serial.persister.ArrayPersister.saveObjectArray(ArrayPersister.java:110)
                    at org.jboss.serial.persister.ArrayPersister.writeData(ArrayPersister.java:101)
                    at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)
                    at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:197)
                    at org.jboss.serial.persister.ObjectOutputStreamProxy.writeObjectOverride(ObjectOutputStreamProxy.java:60)
                    at java.io.ObjectOutputStream.writeObject(Unknown Source)
                    at java.util.ArrayList.writeObject(Unknown Source)
                    ... 68 more
                    Caused by: java.lang.reflect.InvocationTargetException
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                    at java.lang.reflect.Method.invoke(Unknown Source)
                    at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithMethod(RegularObjectPersister.java:120)
                    ... 88 more
                    Caused by: java.io.IOException
                    at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithMethod(RegularObjectPersister.java:129)
                    at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:86)
                    at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
                    at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)
                    at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:197)
                    at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithFields(RegularObjectPersister.java:182)
                    at org.jboss.serial.persister.ObjectOutputStreamProxy.writeFields(ObjectOutputStreamProxy.java:79)
                    at org.jboss.serial.persister.ObjectOutputStreamProxy.defaultWriteObject(ObjectOutputStreamProxy.java:68)
                    at org.hibernate.impl.SessionImpl.writeObject(SessionImpl.java:199)
                    ... 93 more
                    Caused by: java.lang.reflect.InvocationTargetException
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                    at java.lang.reflect.Method.invoke(Unknown Source)
                    at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithMethod(RegularObjectPersister.java:120)
                    ... 101 more
                    Caused by: java.io.IOException
                    at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithMethod(RegularObjectPersister.java:129)
                    at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:86)
                    at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
                    at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)
                    at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:197)
                    at org.jboss.serial.persister.ObjectOutputStreamProxy.writeObjectOverride(ObjectOutputStreamProxy.java:60)
                    at java.io.ObjectOutputStream.writeObject(Unknown Source)
                    at org.hibernate.engine.StatefulPersistenceContext.writeObject(StatefulPersistenceContext.java:244)
                    ... 106 more
                    Caused by: java.lang.reflect.InvocationTargetException
                    at sun.reflect.GeneratedMethodAccessor865.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                    at java.lang.reflect.Method.invoke(Unknown Source)
                    at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithMethod(RegularObjectPersister.java:120)
                    ... 113 more
                    Caused by: java.io.IOException: Metadata Serialization Error
                    at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:192)
                    at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:197)
                    at org.jboss.serial.persister.ObjectOutputStreamProxy.writeObjectOverride(ObjectOutputStreamProxy.java:60)
                    at java.io.ObjectOutputStream.writeObject(Unknown Source)
                    at java.util.HashMap.writeObject(Unknown Source)
                    ... 117 more
                    Caused by: java.lang.NullPointerException
                    at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:190)

                    • 22. Re: IOExceptions with MyFaces/Facelets apps
                      Clebert Suconic Master

                      Can you reproduce it with a testcase?

                      It looks like you always get this error. At least I would be able to fix any further problems if you could produce one testcase for me.

                      • 23. Re: IOExceptions with MyFaces/Facelets apps
                        rpa_rio Novice

                        No, because there's some database communication, the only think that i know this is happens when i have some null values in my class.

                        • 24. Re: IOExceptions with MyFaces/Facelets apps
                          Clebert Suconic Master

                          Can you download sourcecode from CVS and try again?

                          I have made some changes on ClassLoading operations. Maybe that will solve your problem.

                          • 25. Re: IOExceptions with MyFaces/Facelets apps
                            rpa_rio Novice

                            Nothing. Same problem.

                            • 26. Re: IOExceptions with MyFaces/Facelets apps
                              Clebert Suconic Master

                              I need some way to reproduce your issue, preferably something only using plain serialization.

                              Things that would change default behavior on serialization (to help you identify some pattern)

                              - readResolves
                              - private write or readObject
                              - non serializable classes not implementing default constructor
                              - adding something not supposed to be in the serialization tree (like socket or connection)

                              • 27. Re: IOExceptions with MyFaces/Facelets apps
                                rpa_rio Novice

                                I found this on the log:

                                DEBUG: describeObject::Calling writeReplace for br.gov.go.tj.execpen.entidades.Cidade$$EnhancerByCGLIB$$652dbb34

                                I'll investigate a little more.

                                • 28. Re: IOExceptions with MyFaces/Facelets apps
                                  Clebert Suconic Master

                                  What I meant was...

                                  you could reproduce a JbossSerialization failure by just playing with your classes, without having to play with MyFaces in a testcase at al.

                                  I will be able to fix this for you, as long as you create the testcase.

                                  Clebert

                                  PS: If you want to send me this in private it's okay. (I also speak Portuguese BTW as I'm brazilian). In case you do let me know if I can include it as part of the testcases, or if it's something confidential for you.

                                  • 29. Re: IOExceptions with MyFaces/Facelets apps
                                    rpa_rio Novice

                                    Clebert,

                                    I'm almost sure that Cidade class reach this point as null reference:

                                    (ObjectDescriptorFactory.java, line 191) metaData = ClassMetamodelFactory.getClassMetaData(obj.getClass(),cache.isCheckSerializableClass());