[weld-issues] [JBoss JIRA] (WELD-957) Log says "JSR-299 injection will be available in Servlets" on Jetty 6, but it is not if jetty-env.xml and jetty-web.xml are missing
Pete Muir (Updated) (JIRA)
jira-events at lists.jboss.org
Fri Oct 14 11:07:16 EDT 2011
[ https://issues.jboss.org/browse/WELD-957?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pete Muir updated WELD-957:
---------------------------
Issue Type: Bug (was: Task)
Priority: Critical (was: Optional)
> Log says "JSR-299 injection will be available in Servlets" on Jetty 6, but it is not if jetty-env.xml and jetty-web.xml are missing
> -----------------------------------------------------------------------------------------------------------------------------------
>
> Key: WELD-957
> URL: https://issues.jboss.org/browse/WELD-957
> Project: Weld
> Issue Type: Bug
> Affects Versions: 1.1.2.Final
> Reporter: Geoffrey De Smet
> Priority: Critical
>
> 1) Either the log should say "... if jetty-env.xml and jetty-web.xml have been correctly added."
> Or 2) it should check if they are there in the war before stating that injection works on servlets.
> Or 3) - better yet - the system should be improved so the jetty-web.xml thing is obsolete (like on tomcat).
> That log statement was very misleading and it took me quite some time to find out that it was not my jetty6 plugin that was causing the trouble, but that in fact I was missing these bits:
> http://docs.jboss.org/weld/reference/1.1.0.Final/en-US/html_single/#d0e5286
> I've looked into 3), by adding this in org.jboss.weld.environment.jetty.AbstractJettyPre72Container:
> {code}
> Class<?> weldServletHandlerClass = Reflections.classForName("org.jboss.weld.environment.jetty.WeldServletHandler");
> Method processMethod = weldServletHandlerClass.getMethod("process", WebAppContext.class);
> processMethod.invoke(null, (WebAppContext) WebAppContext.getCurrentWebAppContext());
> {code}
> But that results in 404, because in org.jboss.weld.environment.jetty.WeldServletHandler#WeldServletHandler
> the existingHandler is properly started and the new one is not.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the weld-issues
mailing list