Maven, Jetty, and commons-logging issue
by Tom Waterhouse
I've followed the instructions posted for using Jetty as a test
container in a Maven build (I had sent an email previously about
deployment issues, but that was due to not including all required test
dependencies). I've since run into what looks to be a known issue with
commons logging.
Is there a working JSFUnit Maven project that tests with a container
available for download?
The commons-logging issue is documented here:
http://www.qos.ch/logging/classloader.jsp.
Caused by: org.apache.commons.logging.LogConfigurationException: No
suitable Log
constructor [Ljava.lang.Class;@127e4be for
org.apache.commons.logging.impl.Log4
JLogger (Caused by java.lang.NoClassDefFoundError:
org/apache/log4j/Category)
at
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogF
actoryImpl.java:413)
at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactory
Impl.java:529)
... 33 more
Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Category
at java.lang.Class.getDeclaredConstructors0(Native Method)
at
java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
at java.lang.Class.getConstructor0(Class.java:2699)
at java.lang.Class.getConstructor(Class.java:1657)
at
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogF
actoryImpl.java:410)
... 34 more
Thanks,
Tom
This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information that is protected from disclosure. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message and any attachments. This document was not intended or written to be used, and it cannot be used, for the purpose of avoiding U.S. federal, state or local tax or tax penalties.
16 years, 10 months
Exception during Maven test run: IllegalStateException
by Tom Waterhouse
I'm not having luck with JSFUnit and Maven 2. I'm trying to execute the
tests using Jetty as the container. Here is the exception I receive
when testing my Web app. Note that it deploys just fine to JBoss 4.2.2.
Thanks,
Tom
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.sabrix.ui.jsf.BasicTest
Dec 17, 2007 5:41:29 PM
com.sun.faces.lifecycle.ELResolverInitPhaseListener popu
lateFacesELResolverForJsp
INFO: JSF1027: [/war-tests] The ELResolvers for JSF were not registered
with the
JSP container.
Dec 17, 2007 5:41:29 PM com.sun.faces.lifecycle.LifecycleImpl phase
WARNING: executePhase(RENDER_RESPONSE
6,org.jboss.jsfunit.context.JSFUnitFacesCo
ntext@10a4d7c) threw exception
java.lang.IllegalStateException
at
com.sun.faces.context.FacesContextImpl.assertNotReleased(FacesContext
Impl.java:428)
at
com.sun.faces.context.FacesContextImpl.getExternalContext(FacesContex
tImpl.java:149)
at
org.jboss.jsfunit.context.JSFUnitFacesContext.getExternalContext(JSFU
nitFacesContext.java:114)
at
org.richfaces.skin.SkinFactoryImpl.getSkinOrName(SkinFactoryImpl.java
:208)
at
org.richfaces.skin.SkinFactoryImpl.getSkin(SkinFactoryImpl.java:134)
at
org.ajax4jsf.context.AjaxContextImpl.processHeadResources(AjaxContext
Impl.java:382)
at
org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.j
ava:245)
at
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePha
se.java:106)
at
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
at
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
at
javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491
)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
Handler.java:1074)
at
org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
Handler.java:1065)
at
org.springframework.web.filter.RequestContextFilter.doFilterInternal(
RequestContextFilter.java:63)
at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR
equestFilter.java:75)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
Handler.java:1065)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:3
65)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.jav
a:185)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:1
81)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:6
89)
at
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHand
lerCollection.java:146)
at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.
java:114)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:1
39)
at org.mortbay.jetty.Server.handle(Server.java:285)
at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:45
7)
at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpCo
nnection.java:751)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:500)
at
org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
at
org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.ja
va:329)
at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool
.java:475)
Dec 17, 2007 5:41:29 PM com.sun.faces.lifecycle.LifecycleImpl phase
WARNING: phase(RENDER_RESPONSE
6,org.jboss.jsfunit.context.JSFUnitFacesContext@1
0a4d7c) threw exception: java.lang.IllegalStateException null
com.sun.faces.context.FacesContextImpl.assertNotReleased(FacesContextImp
l.java:4
28)
com.sun.faces.context.FacesContextImpl.getExternalContext(FacesContextIm
pl.java:
149)
org.jboss.jsfunit.context.JSFUnitFacesContext.getExternalContext(JSFUnit
FacesCon
text.java:114)
org.ajax4jsf.event.AjaxPhaseListener.afterPhase(AjaxPhaseListener.java:7
4)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:280)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491)
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHan
dler.jav
a:1074)
org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHan
dler.jav
a:1065)
org.springframework.web.filter.RequestContextFilter.doFilterInternal(Req
uestCont
extFilter.java:63)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequ
estFilte
r.java:75)
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHan
dler.jav
a:1065)
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:1
85)
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandler
Collecti
on.java:146)
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.jav
a:114)
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
org.mortbay.jetty.Server.handle(Server.java:285)
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConne
ction.ja
va:751)
org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:500)
org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:
329)
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.ja
va:475)
2007-12-17 17:41:29.229::WARN: /war-tests/index.jsf:
java.lang.IllegalStateException
at
com.sun.faces.context.FacesContextImpl.assertNotReleased(FacesContext
Impl.java:428)
at
com.sun.faces.context.FacesContextImpl.getExternalContext(FacesContex
tImpl.java:149)
at
org.jboss.jsfunit.context.JSFUnitFacesContext.release(JSFUnitFacesCon
text.java:170)
at
javax.faces.webapp.FacesServlet.service(FacesServlet.java:262)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491
)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
Handler.java:1074)
at
org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
Handler.java:1065)
at
org.springframework.web.filter.RequestContextFilter.doFilterInternal(
RequestContextFilter.java:63)
at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR
equestFilter.java:75)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
Handler.java:1065)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:3
65)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.jav
a:185)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:1
81)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:6
89)
at
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHand
lerCollection.java:146)
at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.
java:114)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:1
39)
at org.mortbay.jetty.Server.handle(Server.java:285)
at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:45
7)
at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpCo
nnection.java:751)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:500)
at
org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
at
org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.ja
va:329)
at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool
.java:475)
2007-12-17 17:41:29.229::WARN: /war-tests/index.jsf
java.lang.IllegalStateException
at
com.sun.faces.context.FacesContextImpl.assertNotReleased(FacesContext
Impl.java:428)
at
com.sun.faces.context.FacesContextImpl.getExternalContext(FacesContex
tImpl.java:149)
at
org.jboss.jsfunit.context.JSFUnitFacesContext.release(JSFUnitFacesCon
text.java:170)
at
javax.faces.webapp.FacesServlet.service(FacesServlet.java:262)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491
)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
Handler.java:1074)
at
org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
Handler.java:1065)
at
org.springframework.web.filter.RequestContextFilter.doFilterInternal(
RequestContextFilter.java:63)
at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR
equestFilter.java:75)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
Handler.java:1065)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:3
65)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.jav
a:185)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:1
81)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:6
89)
at
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHand
lerCollection.java:146)
at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.
java:114)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:1
39)
at org.mortbay.jetty.Server.handle(Server.java:285)
at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:45
7)
at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpCo
nnection.java:751)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:500)
at
org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
at
org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.ja
va:329)
at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool
.java:475)
This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information that is protected from disclosure. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message and any attachments. This document was not intended or written to be used, and it cannot be used, for the purpose of avoiding U.S. federal, state or local tax or tax penalties.
16 years, 11 months