2 Replies Latest reply on Sep 3, 2009 2:11 PM by Felipe Jaekel

    Problem with KeepAlive + ClassNotFoundException

    Felipe Jaekel Newbie

      If I use a4j:keepAlive + facelets custom function I get a ClassNotFoundException when a component that uses the custom function is reRendered.

      The facelets taglib and class that contains the function are in a separate project.

      Thanks for any help,
      Felipe

      Stacktrace:

      26/08/2009 14:21:33 com.sun.facelets.FaceletViewHandler handleRenderException
      SEVERE: Error Rendering View[/page/rdv/rdv.xhtml]
      java.lang.RuntimeException: Error loading function
       at org.jboss.el.lang.FunctionMapperImpl$Function.getMethod(FunctionMapperImpl.java:151)
       at org.jboss.el.lang.FunctionMapperImpl$Function.writeExternal(FunctionMapperImpl.java:123)
       at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1421)
       at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1390)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
       at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
       at java.util.HashMap.writeObject(HashMap.java:1001)
       at sun.reflect.GeneratedMethodAccessor95.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
       at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)
       at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
       at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
       at org.jboss.el.lang.FunctionMapperImpl.writeExternal(FunctionMapperImpl.java:74)
       at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1421)
       at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1390)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
       at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
       at org.jboss.el.ValueExpressionImpl.writeExternal(ValueExpressionImpl.java:256)
       at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1421)
       at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1390)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
       at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
       at com.sun.facelets.el.TagValueExpression.writeExternal(TagValueExpression.java:128)
       at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1421)
       at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1390)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
       at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
       at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
       at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
       at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
       at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
       at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
       at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
       at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
       at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
       at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
       at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
       at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
       at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
       at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
       at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
       at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
       at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
       at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
       at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
       at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
       at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
       at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
       at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
       at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
       at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
       at com.sun.faces.renderkit.ResponseStateManagerImpl.writeState(ResponseStateManagerImpl.java:269)
       at javax.faces.render.ResponseStateManager.writeState(ResponseStateManager.java:166)
       at org.ajax4jsf.application.AjaxStateManager.writeState(AjaxStateManager.java:294)
       at org.ajax4jsf.application.AjaxStateManager.writeState(AjaxStateManager.java:256)
       at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:606)
       at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
       at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
       at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
       at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
       at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
       at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
       at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
       at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at br.com.spdata.tecnico.filter.LoginFilter.doFilter(LoginFilter.java:114)
       at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:236)
       at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
       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.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:191)
       at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
       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:293)
       at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
       at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:574)
       at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1527)
       at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.ClassNotFoundException: br.com.spdata.util.Formatter
       at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
       at java.security.AccessController.doPrivileged(Native Method)
       at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
       at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
       at java.lang.Class.forName0(Native Method)
       at java.lang.Class.forName(Class.java:169)
       at org.jboss.el.lang.FunctionMapperImpl$Function.getMethod(FunctionMapperImpl.java:147)
       ... 118 more