]
Juergen Zimmermann closed SOLDER-311.
-------------------------------------
Resolution: Out of Date
The issue is gone since 3.1.1
HttpServletRequest cannot be @Inject-ed
---------------------------------------
Key: SOLDER-311
URL:
https://issues.jboss.org/browse/SOLDER-311
Project: Solder
Issue Type: Bug
Components: Servlet
Affects Versions: 3.1.0.Final
Environment: JBossAS 7.1beta1b
Reporter: Juergen Zimmermann
Attachments: testcase.ear.zip, testcase.src.zip
"@Inject HttpServletRequest request;" results in the stacktrace below, when I
invoke "request(myusername, mypassword);" using JBossAS 7.1beta1b. I'll
attach a testcase as an EAR. Just invoke
http://localhost:8080/testcase and you'll see
a form where you click the OK button. Then you'll see the stacktrace in the JBoss
console.
Stacktrace:
09:11:00,535 Warnung [javax.enterprise.resource.webcontainer.jsf.lifecycle]
(http--127.0.0.1-8080-1) #{cust.findCustomer}:
org.jboss.weld.exceptions.IllegalProductException: WELD-000052 Cannot return null from a
non-dependent producer method: [method] @Produces @Typed @RequestScoped protected
org.jboss.solder.servlet.http.ImplicitHttpServletObjectsProducer.getHttpServletRequest():
javax.faces.FacesException: #{cust.findCustomer}:
org.jboss.weld.exceptions.IllegalProductException: WELD-000052 Cannot return null from a
non-dependent producer method: [method] @Produces @Typed @RequestScoped protected
org.jboss.solder.servlet.http.ImplicitHttpServletObjectsProducer.getHttpServletRequest()
at
com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:118)
[jsf-impl-2.1.3-b02-jbossorg-2.jar:]
at javax.faces.component.UICommand.broadcast(UICommand.java:315)
[jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:]
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
[jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:]
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
[jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:]
at
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
[jsf-impl-2.1.3-b02-jbossorg-2.jar:]
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
[jsf-impl-2.1.3-b02-jbossorg-2.jar:]
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
[jsf-impl-2.1.3-b02-jbossorg-2.jar:]
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
[jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
[jbossweb-7.0.3.Final.jar:]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
[jbossweb-7.0.3.Final.jar:]
at
org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62)
[weld-core-1.1.4.Final.jar:]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
[jbossweb-7.0.3.Final.jar:]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
[jbossweb-7.0.3.Final.jar:]
at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:126)
[prettyfaces-jsf2-3.3.2.jar:]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
[jbossweb-7.0.3.Final.jar:]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
[jbossweb-7.0.3.Final.jar:]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
[jbossweb-7.0.3.Final.jar:]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
[jbossweb-7.0.3.Final.jar:]
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:397)
[jbossweb-7.0.3.Final.jar:]
at
org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)
[jboss-as-jpa-7.1.0.Beta1b.jar:]
at
org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:151)
[jboss-as-web-7.1.0.Beta1b.jar:]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
[jbossweb-7.0.3.Final.jar:]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
[jbossweb-7.0.3.Final.jar:]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
[jbossweb-7.0.3.Final.jar:]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)
[jbossweb-7.0.3.Final.jar:]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
[jbossweb-7.0.3.Final.jar:]
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
[jbossweb-7.0.3.Final.jar:]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
[jbossweb-7.0.3.Final.jar:]
at java.lang.Thread.run(Thread.java:722) [:1.7.0_02]
Caused by: javax.faces.el.EvaluationException:
org.jboss.weld.exceptions.IllegalProductException: WELD-000052 Cannot return null from a
non-dependent producer method: [method] @Produces @Typed @RequestScoped protected
org.jboss.solder.servlet.http.ImplicitHttpServletObjectsProducer.getHttpServletRequest()
at
javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
[jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:]
at
com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
[jsf-impl-2.1.3-b02-jbossorg-2.jar:]
... 28 more
Caused by: org.jboss.weld.exceptions.IllegalProductException: WELD-000052 Cannot return
null from a non-dependent producer method: [method] @Produces @Typed @RequestScoped
protected
org.jboss.solder.servlet.http.ImplicitHttpServletObjectsProducer.getHttpServletRequest()
at
org.jboss.weld.bean.AbstractProducerBean.checkReturnValue(AbstractProducerBean.java:217)
[weld-core-1.1.4.Final.jar:]
at org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:300)
[weld-core-1.1.4.Final.jar:]
at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:107)
[weld-core-1.1.4.Final.jar:]
at
org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:90)
[weld-core-1.1.4.Final.jar:]
at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:104)
[weld-core-1.1.4.Final.jar:]
at
org.jboss.weld.proxies.HttpServletRequest$83012492$Proxy$_$$_WeldClientProxy.login(HttpServletRequest$83012492$Proxy$_$$_WeldClientProxy.java)
at testcase.CustomerController.findCustomer(CustomerController.java:43) [classes:]
at
testcase.CustomerController$Proxy$_$$_WeldClientProxy.findCustomer(CustomerController$Proxy$_$$_WeldClientProxy.java)
[classes:]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.7.0_02]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[:1.7.0_02]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[:1.7.0_02]
at java.lang.reflect.Method.invoke(Method.java:601) [:1.7.0_02]
at org.apache.el.parser.AstValue.invoke(AstValue.java:196) [jbossweb-7.0.3.Final.jar:]
at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
[jbossweb-7.0.3.Final.jar:]
at
org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:39)
[weld-core-1.1.4.Final.jar:]
at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50)
[weld-core-1.1.4.Final.jar:]
at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
[jsf-impl-2.1.3-b02-jbossorg-2.jar:]
at
javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
[jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:]
... 29 more
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: