myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dennis Byrne (JIRA)" <...@myfaces.apache.org>
Subject [jira] Commented: (MYFACES-1163) JBoss classloading fails if myfaces jars installed in tomcat
Date Wed, 15 Mar 2006 07:33:35 GMT
    [ http://issues.apache.org/jira/browse/MYFACES-1163?page=comments#action_12370478 ] 

Dennis Byrne commented on MYFACES-1163:
---------------------------------------

I downloaded an unzipped jboss-4.0.4RC1 .  I built jboss-seam-numberguess.ear and ran JBoss.
 It blows up because it can't find javax.ejb.Stateful so I just copied ejb3-persistence.jar,
jboss-ejb3.jar and jboss-ejb3x.jar from \jboss-seam-1.0beta2\lib to jboss-4.0.4RC1\server\default\deploy\jbossweb-tomcat55.sar\jsf-libs
.  Everything works fine, I figured it would be in one of those.  Keep in mind, this is moving
any other files in the JBoss install.

Then, I replace myfaces-impl.jar and myfaces-api.jar ( in the jboss-4.0.4RC1\server\default\deploy\jbossweb-tomcat55.sar\jsf-libs
dir ) with the equivalent jars from a few night ago ( before the patch ).  I get the following
stack trace for the first request :

org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsf/html cannot be
resolved in either web.
xml or the jar files deployed with this application
        at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:50)
        at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
        at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:114)
        at org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:316)
        at org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:147)
        at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:423)
        at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:492)
        at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1552)
        at org.apache.jasper.compiler.Parser.parse(Parser.java:126)
        at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:211)
        at org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
        at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:146)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
        at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
        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.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:4
16)
        at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
        at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:367)
        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.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:23)
        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.CustomPrincipalValve.invoke(CustomPrincipalValve.java:54)
        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:174)
        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:868)
        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol
.java:663)
        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)
22:14:11,781 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
javax.faces.FacesException: The absolute uri: http://java.sun.com/jsf/html cannot be resolved
in either web.xml or
the jar files deployed with this application
        at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:4
22)
        at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
        at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:367)
        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.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:23)
        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.CustomPrincipalValve.invoke(CustomPrincipalValve.java:54)
        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:174)
        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:868)
        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol
.java:663)
        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: org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsf/html
cannot be resolved in
either web.xml or the jar files deployed with this application
        at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:50)
        at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
        at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:114)
        at org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:316)
        at org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:147)
        at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:423)
        at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:492)
        at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1552)
        at org.apache.jasper.compiler.Parser.parse(Parser.java:126)
        at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:211)
        at org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
        at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:146)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
        at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
        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.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:4
16)
        ... 25 more

I then replace the jars from before the patch w/ a fresh co of MyFaces ( after the patch ).
 I still get the same stack trace.  

I have visually inspected the contents of the jar file, and not only are the TLDs there, but
the URI is correct.  I have visually inspected the co, and Stans one line change was in StateUtils.

I move the original MyFaces jars back under the tomcat sar, and everything works again.


> JBoss classloading fails if myfaces jars installed in tomcat
> ------------------------------------------------------------
>
>          Key: MYFACES-1163
>          URL: http://issues.apache.org/jira/browse/MYFACES-1163
>      Project: MyFaces Core
>         Type: Bug
>     Versions: 1.1.2-SNAPSHOT, 1.1.2, 1.1.3-SNAPSHOT
>  Environment: JBoss 4.0.4RC1 myfaces-1.1.3-SNAPSHOT
>     Reporter: Ingo Massen
>     Assignee: Stan Silvert

>
> Cannot use Myfaces jars installed in JBOSS_HOME/server/default/deploy/jbossweb-tomcat55.sar/jsf-libs
as they do not use the correct WebappClassloader but instead an UCL3 classloader.
> This is because myfaces use the following line in StateUtils.getAsObject
>             ObjectInputStream s = new ObjectInputStream(input);
> instead of 
>             import org.apache.myfaces.shared.util.MyFacesObjectInputStream;
>             ObjectInputStream s = new MyFacesObjectInputStream(input);
> The same applies to JspStateManagerImpl.deserializeView().
> ObjectInputStream uses Class.forName instead of Thread.currentThread().getContextClassLoader()
as the ClassUtils implementation that MyFacesObjectInputStream uses does.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message