4 Replies Latest reply on May 16, 2011 5:17 PM by Nick Belaevski

    Facelets a4j:mediaOutput error

    nksaran Newbie

      I am using the exact same code from the demosite. Everything works  fine when a4j:mediaOutput is included in the same .xhtml page. Since I need to use  this file upload in many other pages (also need to include many times in the same page), I converted it 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 fllowing 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

       

      Can someone please help?

       

      P.S: follwoing is the url to the demo site:http://livedemo.exadel.com/richfaces-demo/richfaces/fileUpload.jsf;jsessionid=80BD52E84F494B313CD3C30A5F98989C?c=fileUpload&tab=usage