[seam-issues] [JBoss JIRA] Commented: (SEAMWICKET-40) Make dependency on weld-servlet-core truly optional
Ondrej Zizka (JIRA)
jira-events at lists.jboss.org
Sat Jul 16 01:49:23 EDT 2011
[ https://issues.jboss.org/browse/SEAMWICKET-40?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12614608#comment-12614608 ]
Ondrej Zizka commented on SEAMWICKET-40:
----------------------------------------
{code}
07:46:26.633 ERROR [343598919 at qtp-773092604-0] org.apache.wicket.RequestCycle WELD-001303 No active contexts for scope type javax.enterprise.context.RequestScoped
org.jboss.weld.context.ContextNotActiveException: WELD-001303 No active contexts for scope type javax.enterprise.context.RequestScoped
at org.jboss.weld.manager.BeanManagerImpl.getContext(BeanManagerImpl.java:664)
at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:77)
at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:124)
at org.jboss.weld.proxies.org$jboss$weld$bean-classpath-Built-in-javax$enterprise$context$Conversation_$$_WeldClientProxy.isTransient(org$jboss$weld$bean-classpath-Built-in-javax$enterprise$context$Conversation_$$_WeldClientProxy.java)
at org.jboss.seam.wicket.SeamWebRequestCycleProcessor.respond(SeamWebRequestCycleProcessor.java:31)
at org.jboss.seam.wicket.ReqestContext_SeamWebRequestCycleProcessor.respond(ReqestContext_SeamWebRequestCycleProcessor.java:24)
at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1258)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486)
at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:138)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
07:46:26.671 ERROR [343598919 at qtp-773092604-0] org.apache.wicket.RequestCycle unexpected exception when handling another exception: WELD-001303 No active contexts for scope type javax.enterprise.context.RequestScoped
org.jboss.weld.context.ContextNotActiveException: WELD-001303 No active contexts for scope type javax.enterprise.context.RequestScoped
at org.jboss.weld.manager.BeanManagerImpl.getContext(BeanManagerImpl.java:664)
at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:77)
at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:124)
at org.jboss.weld.proxies.org$jboss$weld$bean-classpath-Built-in-javax$enterprise$context$Conversation_$$_WeldClientProxy.isTransient(org$jboss$weld$bean-classpath-Built-in-javax$enterprise$context$Conversation_$$_WeldClientProxy.java)
at org.jboss.seam.wicket.SeamWebRequestCycleProcessor.respond(SeamWebRequestCycleProcessor.java:31)
at org.jboss.seam.wicket.ReqestContext_SeamWebRequestCycleProcessor.respond(ReqestContext_SeamWebRequestCycleProcessor.java:24)
at org.apache.wicket.RequestCycle.respond(RequestCycle.java:1267)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1334)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486)
at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:138)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
{code}
And for the record, this is what Wicket throws then (probably Wicket bug):
{code}
07:46:26.848 ERROR [343598919 at qtp-773092604-0] org.apache.wicket.protocol.http.WicketFilter closing the buffer error
java.lang.IllegalStateException: STREAM
at org.mortbay.jetty.Response.getWriter(Response.java:616)
at org.apache.wicket.protocol.http.WebResponse.write(WebResponse.java:429)
at org.apache.wicket.protocol.http.BufferedWebResponse.close(BufferedWebResponse.java:74)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:502)
at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:138)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
{code}
> Make dependency on weld-servlet-core truly optional
> ---------------------------------------------------
>
> Key: SEAMWICKET-40
> URL: https://issues.jboss.org/browse/SEAMWICKET-40
> Project: Seam for Apache Wicket
> Issue Type: Enhancement
> Affects Versions: 3.0.0.Final
> Environment: An app with weld-se-core and embedded container (like embedded Jetty) running servlet/filter based web app.
> Reporter: Ondrej Zizka
>
> Sometimes, you may need a standalone (Java SE) application, with an optional web module.
> For project which are (for any reason, e.g. historically) not based on an app server, you would need a weld-se-core for the core.
> weld-se-core can't co-exist with weld-servlet-core because they are different impl of the same API.
> However, seam-wicket silently relies on having weld-servlet-core, at least to support RequestContext.
> I suggest to make this need
> 1) explicitly stated in POM,
> 2) optional.
> To make it optional, it's enough to make this block
> {code}
> if( conversation.isActive() ){ ... }
> {code}
> in SeamRequestCycleProcessor's response() optional, because without active RequestContext, it fails.
> Also, and that would be for another jira, I suggest to modify weld-servlet-core to detect presence of weld-se-core, and use it's WeldContainer instead of bootstraping a new one.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues
mailing list