7 Replies Latest reply on Jul 30, 2008 1:24 PM by benitojuarez

    Error reading member

    benitojuarez
      Hello

      i'm still fighting against an error in seam:
      I have a session bean which has the member productType defining the search. After deployment all waorks fine, but when i wait some minutes and call the same site, i get the following error:


      "javax.faces.FacesException: javax.el.ELException: /productcttable.xhtml @39,73 value="#{productLi
      st.productType}": Error reading 'productType' on type org.javassist.tmp.java.lang.Object_$$_javassist_
      7
              at javax.faces.component.UIOutput.getValue(UIOutput.java:176)
              at org.jboss.seam.ui.component.UISelectItems.getParentValue(UISelectItems.java:281)
              at org.jboss.seam.ui.component.UISelectItems.isShowNoSelectionLabel(UISelectItems.java:244)
              at org.jboss.seam.ui.component.UISelectItems.noSelectionLabel(UISelectItems.java:222)
              at org.jboss.seam.ui.component.UISelectItems.getValue(UISelectItems.java:149)
              at javax.faces.component.SelectItemsIterator.next(SelectItemsIterator.java:136)
              at javax.faces.component.SelectItemsIterator.next(SelectItemsIterator.java:49)
              at javax.faces.component.UISelectOne.matchValue(UISelectOne.java:164)
              at javax.faces.component.UISelectOne.validateValue(UISelectOne.java:137)
              at javax.faces.component.UIInput.validate(UIInput.java:867)
              at javax.faces.component.UIInput.executeValidate(UIInput.java:1065)
              at javax.faces.component.UIInput.processValidators(UIInput.java:666)
              at javax.faces.component.UIForm.processValidators(UIForm.java:229)
              at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1033)
              at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:662)
              at org.ajax4jsf.component.AjaxViewRoot.access$201(AjaxViewRoot.java:57)
              at org.ajax4jsf.component.AjaxViewRoot$3.invokeRoot(AjaxViewRoot.java:319)
              at org.ajax4jsf.context.JsfOneOneInvoker.invokeOnRegionOrRoot(JsfOneOneInvoker.java:56)
              at org.ajax4jsf.context.AjaxContextImpl.invokeOnRegionOrRoot(AjaxContextImpl.java:170)
              at org.ajax4jsf.component.AjaxViewRoot.processValidators(AjaxViewRoot.java:333)
              at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:100)

              at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
              at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j
      ava:290)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
              at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
              at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
              at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j
      ava:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

              at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j
      ava:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.ja
      va:179)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
              at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:
      157)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.ja
      va:583)
              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
              at java.lang.Thread.run(Thread.java:619)
      Caused by: javax.el.ELException: /producttable.xhtml @39,73 value="#{productList.productType}":
      Error reading 'productType' on type org.javassist.tmp.java.lang.Object_$$_javassist_7
              at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:76)
              at javax.faces.component.UIOutput.getValue(UIOutput.java:173)
              ... 60 more
      Caused by: java.lang.RuntimeException: java.lang.RuntimeException: org.jboss.serial.exception.Serial
      izationException: Could not create instance of java.util.RandomAccessSubList - java.util.RandomAcces
      sSubList
              at org.jboss.ejb3.interceptor.LifecycleInterceptorHandler.postActivate(LifecycleInterceptorH"



        • 1. Re: Error reading member
          mail.micke

          Hi


          Do you have the getter in your interface?


          - micke

          • 2. Re: Error reading member
            benitojuarez

            yes


            public String getProductType();
            public void setProductType(String productType);


            maybe i need some annotations?

            • 3. Re: Error reading member
              mail.micke

              Sorry,
              didn't read your post properly (that it works initially).


              Not sure what the problem is, would have thought there would be a ViewExpiredException if the session had timed out before the new request.


              - micke

              • 4. Re: Error reading member
                obfuscator

                Looks like you are referencing a variable in your bean which cannot properly be serialized and deserialized. Serialization happens in app servers to save memory. See JBoss Forums, I guess you're holding a reference to a list which you got through List.subList()?

                • 5. Re: Error reading member
                  benitojuarez

                  yes, that it!


                  is it possible to prevent a session bean from beeng serialized and deserialized?
                  The memory is actually and in future not a problem.


                  If not, is it right, that each member of the session bean must be serializable? Can i exclude a member from serialization?


                  BJ

                  • 6. Re: Error reading member
                    obfuscator

                    If you really want a service to be present all the time, you can (in JBoss AS) use a MBean (lookup @Service annotation), or register you component in Seam in APPLICATION scope. Beware that you will receive multi-thread requests, so your components must be thread safe.


                    I guess that you don't want this. In this case, if you want to control serialization you need to look into the details. SFSB serialization works differently than normal Java serialization AFAIK. If you use a normal POJO, you can declare fields as transient and control read and write using the normal serialization methods. With SFSB I am not quite sure.


                    For your specific case, however, I think the problem is that List.subList merely creates a list which references the items in the original list. Try working around your problem by copying the elements into a new list, or find another method which does a deep copy of the segment you are interrested in. If not in JDK, perhaps in apache commons?

                    • 7. Re: Error reading member
                      benitojuarez

                      If you really want a service to be present all the time, you can (in JBoss AS) use a MBean (lookup @Service annotation), or register you component in Seam in APPLICATION scope. Beware that you will receive multi-thread requests, so your components must be thread safe.


                      I think i cant use the application scope. The perfekt solution would be a session scoped bean, wich is hold in the memory as long the session exists.



                      For your specific case, however, I think the problem is that List.subList merely creates a list which references the items in the original list. Try working around your problem by copying the elements into a new list, or find another method which does a deep copy of the segment you are interrested in. If not in JDK, perhaps in apache commons?


                      ok, thanks for your advises! I try to find a solution.


                      BJ