4 Replies Latest reply on Dec 9, 2010 10:29 AM by nksaran

    Facelets x a4j:mediaOutput

    Daniel Noto Paiva Newbie

      I use facelets 1.1.14 and a4j:mediaOutput don't work, give this error:

      ERROR: Data class for restore not found
      java.lang.ClassNotFoundException: com.sun.facelets.el.TagValueExpression
      at java.net.URLClassLoader$1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClassInternal(Unknown Source)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Unknown Source)
      at java.io.ObjectInputStream.resolveClass(Unknown Source)
      at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
      at java.io.ObjectInputStream.readClassDesc(Unknown Source)
      at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
      at java.io.ObjectInputStream.readObject0(Unknown Source)
      at java.io.ObjectInputStream.readObject(Unknown Source)
      at java.util.HashMap.readObject(Unknown Source)
      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 java.io.ObjectStreamClass.invokeReadObject(Unknown Source)
      at java.io.ObjectInputStream.readSerialData(Unknown Source)
      at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
      at java.io.ObjectInputStream.readObject0(Unknown Source)
      at java.io.ObjectInputStream.readObject(Unknown Source)
      at org.apache.el.lang.VariableMapperImpl.readExternal(VariableMapperImpl.java:50)
      at java.io.ObjectInputStream.readExternalData(Unknown Source)
      at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
      at java.io.ObjectInputStream.readObject0(Unknown Source)
      at java.io.ObjectInputStream.readObject(Unknown Source)
      at org.apache.el.MethodExpressionImpl.readExternal(MethodExpressionImpl.java:294)
      at java.io.ObjectInputStream.readExternalData(Unknown Source)
      at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
      at java.io.ObjectInputStream.readObject0(Unknown Source)
      at java.io.ObjectInputStream.readObject(Unknown Source)
      at com.sun.facelets.el.TagMethodExpression.readExternal(TagMethodExpression.java:101)
      at java.io.ObjectInputStream.readExternalData(Unknown Source)
      at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
      at java.io.ObjectInputStream.readObject0(Unknown Source)
      at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
      at java.io.ObjectInputStream.readSerialData(Unknown Source)
      at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
      at java.io.ObjectInputStream.readObject0(Unknown Source)
      at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
      at java.io.ObjectInputStream.readSerialData(Unknown Source)
      at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
      at java.io.ObjectInputStream.readObject0(Unknown Source)
      at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
      at java.io.ObjectInputStream.readSerialData(Unknown Source)
      at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
      at java.io.ObjectInputStream.readObject0(Unknown Source)
      at java.io.ObjectInputStream.readObject(Unknown Source)
      at org.ajax4jsf.resource.ResourceBuilderImpl.getResourceDataForKey(ResourceBuilderImpl.java:366)
      at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:159)
      at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:144)
      at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:265)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      at java.lang.Thread.run(Unknown Source)

        • 2. Re: Facelets x a4j:mediaOutput
          Ilya Shaikovsky Master

          Seems this info isn't enough to give you sugestion..
          Our demosite uses facelets 1.1.14 also.. And there's no such error..

          • 3. Re: Facelets x a4j:mediaOutput
            nksaran Newbie

            I am getting identical error. I am using the exact same code from the demosite. Everything works fine when a4j:mediaOutput is included in the page. Since I need to use this file upload in many other pages, I converted into a facelets component and passing ‘fileUploadBean’ to this component. Now the page appears with the upload component and allows me to select an image and it uploads the image and then fires the event 'onuploadcomplete' (in this case it reRender 'info' as in the demosite) to show the uploaded image in the UI and now it throws the exception. Following is the stack trace:

             

            Dec 2, 2010 5:21:41 PM org.ajax4jsf.resource.ResourceBuilderImpl getResourceDataForKey

            SEVERE: Data class for restore not found

            java.lang.ClassNotFoundException: com.sun.facelets.el.TagValueExpression

                    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)

                    at java.security.AccessController.doPrivileged(Native Method)

                    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

                    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)

                    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

                    at java.lang.Class.forName0(Native Method)

                    at java.lang.Class.forName(Class.java:247)

                    at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:604)

                    at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575)

                    at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)

                    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)

                    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)

                    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)

                    at java.util.HashMap.readObject(HashMap.java:1030)

                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                    at java.lang.reflect.Method.invoke(Method.java:597)

                    at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)

                    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)

                    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)

                    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)

                    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)

                    at org.apache.el.lang.VariableMapperImpl.readExternal(VariableMapperImpl.java:50)

                    at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792)

                    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1751)

                    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)

                    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)

                    at org.apache.el.MethodExpressionImpl.readExternal(MethodExpressionImpl.java:294)

                    at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792)

                    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1751)

                    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)

                    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)

                    at com.sun.facelets.el.TagMethodExpression.readExternal(TagMethodExpression.java:101)

                    at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792)

                    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1751)

                    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)

                    at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)

                    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)

                    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)

                    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)

                    at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)

                    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)

                    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)

                    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)

                    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)

                    at org.ajax4jsf.resource.ResourceBuilderImpl.getResourceDataForKey(ResourceBuilderImpl.java:381)

                    at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:156)

                    at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:141)

                    at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:508)

                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                    at org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:112)

                    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)

                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)

                    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)

                    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)

                    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

                    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

                    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)

                    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)

                    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)

                    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)

                    at java.lang.Thread.run(Thread.java:619)

             

             

            If it helps following are the versions I am using:

             

            JDK1.6.0_18

            richfaces-ui-3.3.3

            facelets 1.1.14

             

            Please let me know if you need more info.

            • 4. Re: Facelets x a4j:mediaOutput
              nksaran Newbie

              Can some one please help me?