[
https://issues.jboss.org/browse/AS7-2186?page=com.atlassian.jira.plugin.s...
]
Stuart Douglas resolved AS7-2186.
---------------------------------
Fix Version/s: 7.1.0.Beta1
Resolution: Done
Poor error message if JPA is not enabled, and EM is injected using
@PersistenceContext into an CDI managed bean
---------------------------------------------------------------------------------------------------------------
Key: AS7-2186
URL:
https://issues.jboss.org/browse/AS7-2186
Project: Application Server 7
Issue Type: Bug
Components: CDI / Weld
Affects Versions: 7.0.2.Final
Reporter: Pete Muir
Assignee: Stuart Douglas
Fix For: 7.1.0.Beta1
00:22:09,609 SEVERE [javax.enterprise.resource.webcontainer.jsf.application]
(http--127.0.0.1-8080-2) Error Rendering View[/index.xhtml]:
org.jboss.weld.exceptions.CreationException: WELD-000079 Could not find the EJB in JNDI:
class com.acme.controller.MemberRegistration$Proxy$_$$_Weld$Proxy$
at org.jboss.weld.bean.SessionBean.create(SessionBean.java:357)
[weld-core-1.1.2.Final.jar:2011-07-26 15:02]
at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:122)
[weld-core-1.1.2.Final.jar:2011-07-26 15:02]
at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:693)
[weld-core-1.1.2.Final.jar:2011-07-26 15:02]
at org.jboss.weld.bean.AbstractReceiverBean.getReceiver(AbstractReceiverBean.java:84)
[weld-core-1.1.2.Final.jar:2011-07-26 15:02]
at org.jboss.weld.bean.ProducerMethod$1.produce(ProducerMethod.java:146)
[weld-core-1.1.2.Final.jar:2011-07-26 15:02]
at org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:361)
[weld-core-1.1.2.Final.jar:2011-07-26 15:02]
at org.jboss.weld.context.unbound.DependentContextImpl.get(DependentContextImpl.java:67)
[weld-core-1.1.2.Final.jar:2011-07-26 15:02]
at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:693)
[weld-core-1.1.2.Final.jar:2011-07-26 15:02]
at org.jboss.weld.el.AbstractWeldELResolver.lookup(AbstractWeldELResolver.java:152)
[weld-core-1.1.2.Final.jar:2011-07-26 15:02]
at org.jboss.weld.el.AbstractWeldELResolver.getValue(AbstractWeldELResolver.java:112)
[weld-core-1.1.2.Final.jar:2011-07-26 15:02]
at
org.jboss.as.weld.webtier.jsf.ForwardingELResolver.getValue(ForwardingELResolver.java:46)
[jboss-as-weld-7.0.2.Final.jar:7.0.2.Final]
at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:175)
[jboss-el-api_2.2_spec-1.0.0.Final.jar:1.0.0.Final]
at
com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
[jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
[jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
at org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:67)
[jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.el.parser.AstValue.getValue(AstValue.java:115)
[jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:187)
[jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.jboss.weld.el.WeldValueExpression.getValue(WeldValueExpression.java:55)
[weld-core-1.1.2.Final.jar:2011-07-26 15:02]
at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
[jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194)
[jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:182)
[jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
at javax.faces.component.UIOutput.getValue(UIOutput.java:169)
[jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
at
com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:205)
[jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
at
com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:355)
[jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
at
com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:164)
[jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875)
[jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1763)
[jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
at javax.faces.render.Renderer.encodeChildren(Renderer.java:168)
[jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845)
[jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1756)
[jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1759)
[jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1759)
[jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
at
com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:401)
[jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
[jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:288)
[jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)
[jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
[jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
[jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
[jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
[jbossweb-7.0.1.Final.jar:7.0.2.Final]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
[jbossweb-7.0.1.Final.jar:7.0.2.Final]
at
org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:67)
[weld-core-1.1.2.Final.jar:2011-07-26 15:02]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
[jbossweb-7.0.1.Final.jar:7.0.2.Final]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
[jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
[jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
[jbossweb-7.0.1.Final.jar:7.0.2.Final]
at
org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:139)
[jboss-as-web-7.0.2.Final.jar:7.0.2.Final]
at org.jboss.as.web.NamingValve.invoke(NamingValve.java:57)
[jboss-as-web-7.0.2.Final.jar:7.0.2.Final]
at
org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:49)
[jboss-as-jpa-7.0.2.Final.jar:7.0.2.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154)
[jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
[jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
[jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)
[jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
[jbossweb-7.0.1.Final.jar:7.0.2.Final]
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:667)
[jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:952)
[jbossweb-7.0.1.Final.jar:7.0.2.Final]
at java.lang.Thread.run(Thread.java:680) [:1.6.0_26]
Caused by: java.lang.IllegalStateException: Failed to construct component instance
at
org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:154)
at org.jboss.as.ee.component.BasicComponent.createInstance(BasicComponent.java:77)
at
org.jboss.as.ejb3.component.stateful.StatefulSessionComponent$1.createInstance(StatefulSessionComponent.java:96)
at
org.jboss.as.ejb3.component.stateful.StatefulSessionComponent$1.createInstance(StatefulSessionComponent.java:93)
at org.jboss.as.ejb3.cache.ExpiringCache.create(ExpiringCache.java:140)
at
org.jboss.as.ejb3.component.stateful.StatefulSessionComponent.createSession(StatefulSessionComponent.java:185)
at
org.jboss.as.weld.ejb.StatefulSessionObjectReferenceImpl.<init>(StatefulSessionObjectReferenceImpl.java:97)
[jboss-as-weld-7.0.2.Final.jar:7.0.2.Final]
at
org.jboss.as.weld.services.bootstrap.WeldEjbServices.resolveEjb(WeldEjbServices.java:60)
[jboss-as-weld-7.0.2.Final.jar:7.0.2.Final]
at org.jboss.weld.bean.SessionBean.createReference(SessionBean.java:483)
[weld-core-1.1.2.Final.jar:2011-07-26 15:02]
at
org.jboss.weld.bean.proxy.EnterpriseBeanProxyMethodHandler.<init>(EnterpriseBeanProxyMethodHandler.java:75)
[weld-core-1.1.2.Final.jar:2011-07-26 15:02]
at org.jboss.weld.bean.SessionBean.create(SessionBean.java:340)
[weld-core-1.1.2.Final.jar:2011-07-26 15:02]
... 56 more
Caused by: java.lang.RuntimeException: Can't find a deployment unit named at
subdeployment "acme-ejb-1.0-SNAPSHOT.jar" of deployment
"acme-ear-1.0-SNAPSHOT.ear"
at
org.jboss.as.weld.services.bootstrap.WeldJpaInjectionServices.getScopedPUName(WeldJpaInjectionServices.java:94)
[jboss-as-weld-7.0.2.Final.jar:7.0.2.Final]
at
org.jboss.as.weld.services.bootstrap.WeldJpaInjectionServices.resolvePersistenceContext(WeldJpaInjectionServices.java:59)
[jboss-as-weld-7.0.2.Final.jar:7.0.2.Final]
at org.jboss.weld.util.Beans.injectEEFields(Beans.java:784)
[weld-core-1.1.2.Final.jar:2011-07-26 15:02]
at
org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget$1$1.proceed(ManagedBean.java:181)
[weld-core-1.1.2.Final.jar:2011-07-26 15:02]
at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:54)
[weld-core-1.1.2.Final.jar:2011-07-26 15:02]
at
org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget$1.work(ManagedBean.java:176)
[weld-core-1.1.2.Final.jar:2011-07-26 15:02]
at org.jboss.weld.bean.ManagedBean$FixInjectionPoint.run(ManagedBean.java:142)
[weld-core-1.1.2.Final.jar:2011-07-26 15:02]
at
org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget.inject(ManagedBean.java:170)
[weld-core-1.1.2.Final.jar:2011-07-26 15:02]
at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:339)
[weld-core-1.1.2.Final.jar:2011-07-26 15:02]
at org.jboss.weld.context.unbound.DependentContextImpl.get(DependentContextImpl.java:67)
[weld-core-1.1.2.Final.jar:2011-07-26 15:02]
at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:693)
[weld-core-1.1.2.Final.jar:2011-07-26 15:02]
at org.jboss.weld.bean.AbstractReceiverBean.getReceiver(AbstractReceiverBean.java:84)
[weld-core-1.1.2.Final.jar:2011-07-26 15:02]
at org.jboss.weld.bean.ProducerMethod$1.produce(ProducerMethod.java:146)
[weld-core-1.1.2.Final.jar:2011-07-26 15:02]
at org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:361)
[weld-core-1.1.2.Final.jar:2011-07-26 15:02]
at org.jboss.weld.context.unbound.DependentContextImpl.get(DependentContextImpl.java:67)
[weld-core-1.1.2.Final.jar:2011-07-26 15:02]
at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:693)
[weld-core-1.1.2.Final.jar:2011-07-26 15:02]
at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:775)
[weld-core-1.1.2.Final.jar:2011-07-26 15:02]
at org.jboss.weld.injection.FieldInjectionPoint.inject(FieldInjectionPoint.java:138)
[weld-core-1.1.2.Final.jar:2011-07-26 15:02]
at org.jboss.weld.util.Beans.injectBoundFields(Beans.java:875)
[weld-core-1.1.2.Final.jar:2011-07-26 15:02]
at org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:887)
[weld-core-1.1.2.Final.jar:2011-07-26 15:02]
at org.jboss.weld.bean.SessionBean$1$1.proceed(SessionBean.java:194)
[weld-core-1.1.2.Final.jar:2011-07-26 15:02]
at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:54)
[weld-core-1.1.2.Final.jar:2011-07-26 15:02]
at org.jboss.weld.bean.SessionBean$1.inject(SessionBean.java:189)
[weld-core-1.1.2.Final.jar:2011-07-26 15:02]
at org.jboss.as.weld.injection.WeldEEInjection.inject(WeldEEInjection.java:76)
[jboss-as-weld-7.0.2.Final.jar:7.0.2.Final]
at
org.jboss.as.weld.injection.WeldInjectionInterceptor.processInvocation(WeldInjectionInterceptor.java:60)
[jboss-as-weld-7.0.2.Final.jar:7.0.2.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287)
[jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
at
org.jboss.as.ee.component.ManagedReferenceInterceptor.processInvocation(ManagedReferenceInterceptor.java:53)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287)
[jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
[jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287)
[jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
at
org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:44)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287)
[jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
at
org.jboss.as.jpa.interceptor.SFSBPreCreateInterceptor.processInvocation(SFSBPreCreateInterceptor.java:46)
[jboss-as-jpa-7.0.2.Final.jar:7.0.2.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287)
[jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
at
org.jboss.as.ejb3.component.session.SessionInvocationContextInterceptor.processInvocation(SessionInvocationContextInterceptor.java:71)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287)
[jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287)
[jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
[jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
at
org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:152)
... 66 more
--
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