[jboss-user] [EJB 3.0] - Problems injecting EJB into JSF-backingbean (on jboss-5.0.0.
CarstenRudat
do-not-reply at jboss.com
Thu May 3 10:26:16 EDT 2007
Hi All,
I have an JSF-backing-bean and a SLSB and I'd like to have an injection of the SLSB.
My app:
web.xml is JEE5:
| <web-app version="2.5"
| xmlns="http://java.sun.com/xml/ns/javaee"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
| http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
| ...
|
I have a definicion in my faces-config.xml:
| <managed-bean>
| <managed-bean-name>partner_Einzelperson_Screen</managed-bean-name>
| <managed-bean-class>com.genloop.web.Projektabrechnung.Projektabrechnung_v13.beans.screen.Partner_Einzelperson_Screen</managed-bean-class>
| <managed-bean-scope>session</managed-bean-scope>
| </managed-bean>
|
My SLSB implements a common interface (which type I use in my backing bean!):
| @Local
| @Remote
| @Stateless
| public class Configuration implements com.genloop.web.Configuration, Serializable {
| ...
| }
|
My Backing bean uses:
| @EJB(mappedName="Projektabrechnung-Projektabrechnung_v13/Configuration/local")
| protected com.genloop.web.Configuration configuration;
|
Everything is deployed in an EAR named Projektabrechnung-Projektabrechnung_v13.ear
If I try to access configuration, I get:
| 16:12:46,859 ERROR [JBossInjectionProvider] Injection failed on managed bean.
| javax.naming.NameNotFoundException: com.genloop.web.Projektabrechnung.Projektabrechnung_v13.beans.screen.Partner_Einzelperson_Screen not bound
| at org.jnp.server.NamingServer.getBinding(NamingServer.java:542)
| at org.jnp.server.NamingServer.getBinding(NamingServer.java:550)
| at org.jnp.server.NamingServer.getObject(NamingServer.java:556)
| at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:628)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:590)
| at javax.naming.InitialContext.lookup(InitialContext.java:351)
| at org.apache.catalina.util.DefaultAnnotationProcessor.lookupFieldResource(DefaultAnnotationProcessor.java:203)
| at org.apache.catalina.util.DefaultAnnotationProcessor.processAnnotations(DefaultAnnotationProcessor.java:139)
| at org.jboss.web.jsf.integration.injection.JBossInjectionProvider.inject(JBossInjectionProvider.java:104)
| at com.sun.faces.config.ManagedBeanFactoryImpl.newInstance(ManagedBeanFactoryImpl.java:298)
| at com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBeans(ApplicationAssociate.java:531)
| at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:82)
| at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
| at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
| at org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:45)
| at org.apache.el.parser.AstValue.getValue(AstValue.java:86)
| at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
| at org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:101)
| at javax.faces.component.UIOutput.getValue(UIOutput.java:173)
| at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:189)
| at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:320)
| at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:200)
| at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:833)
| at javax.faces.component.UIComponent.encodeAll(UIComponent.java:896)
| at javax.faces.render.Renderer.encodeChildren(Renderer.java:137)
| at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:809)
| at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
| at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
| at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:244)
| at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:175)
| at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
|
I wonder why I see "com.genloop.web.Projektabrechnung.Projektabrechnung_v13.beans.screen.Partner_Einzelperson_Screen" (which is my backing bean) in the stack trace as "not bound"?!
Any ideas?
Thanks for help,
Carsten
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4042844#4042844
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4042844
More information about the jboss-user
mailing list