[weld-issues] [JBoss JIRA] Created: (WELDINT-42) Injecting Session Beans into Servlet in EAR archiv throws exception

Martin Gencur (JIRA) jira-events at lists.jboss.org
Fri Feb 5 03:14:19 EST 2010


Injecting Session Beans into Servlet in EAR archiv throws exception
-------------------------------------------------------------------

                 Key: WELDINT-42
                 URL: https://jira.jboss.org/jira/browse/WELDINT-42
             Project: Weld Integration
          Issue Type: Bug
         Environment: JBossAS 6.0.0.M1 udpated with current version of Weld core
            Reporter: Martin Gencur
            Assignee: Pete Muir
         Attachments: pastietrimmed.zip

Injecting Session bean using either @Inject annotation directly or Instance<T> with following .get() into Servlet in EAR archiv throws an exception

Steps to reproduce:
1) download attached zip file and unpack it among weld/jsf examples
2) run "mvn clean package" in root directory of the new project
3) deploy resulting weld-pastie.ear into JBossAS default configuration
4) go to localhost: http://localhost:8080/weld-pastie/download         //which invokes the servlet
5) now you can see following exception at jboss console:


08:52:56,537 ERROR [[/weld-pastie]] StandardWrapper.Throwable
java.lang.NullPointerException
	at org.jboss.weld.examples.pastie.DownloadServlet.init(DownloadServlet.java:31)
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1048)
	at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:777)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183)
	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95)
	at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
	at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
	at java.lang.Thread.run(Thread.java:619)
08:52:56,538 ERROR [[DownloadServlet]] Allocate exception for servlet DownloadServlet
java.lang.NullPointerException
	at org.jboss.weld.examples.pastie.DownloadServlet.init(DownloadServlet.java:31)
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1048)
	at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:777)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183)
	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95)
	at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
	at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
	at java.lang.Thread.run(Thread.java:619)



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

        


More information about the weld-issues mailing list