geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim McConnell <tim.mcco...@gmail.com>
Subject @EJB Deployment Plan
Date Thu, 08 Feb 2007 06:47:30 GMT
Hi, I'm very close to getting the Calculator Stateless SessionBean Servlet 
Sample ear file to properly deploy by changing the deployment descriptor 
based on @EJB annotation(s). However, I'm getting this ugly exception and 
it's not clear to me why....

org.apache.openejb.OpenEJBException: Cannot find bean 
"org.apache.geronimo.samples.calculator.CalculatorServlet/calc" referenced 
by bean "GeronimoEnc".
org.apache.geronimo.common.DeploymentException: 
org.apache.openejb.OpenEJBException: Cannot find bean 
"org.apache.geronimo.samples.calculator.CalculatorServlet/calc" referenced 
by bean "GeronimoEnc".
	at 
org.apache.geronimo.openejb.deployment.EjbRefBuilder.buildNaming(EjbRefBuilder.java:135)
	at 
org.apache.geronimo.openejb.deployment.EjbRefBuilder$$FastClassByCGLIB$$dbba8597.invoke(<generated>)
	at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
....


Does anyone see anything obviously incorrect about the deployment plan 
below that I've augmented based on this @EJB annotation in the 
org.apache.geronimo.samples.calculator.CalculatorServlet  servlet ?? The 
only change to the existing plan is the addition of the  <ejb-local-ref> 
element. Thanks.

     @EJB
     private CalculatorLocal calc = null;

<xml-fragment version="2.5" 
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:jav="http://java.sun.com/xml/ns/javaee">
   <jav:description>Stateless SessionBean Servlet Sample</jav:description>
   <jav:servlet>
     <jav:servlet-name>Calculator</jav:servlet-name>
 
<jav:servlet-class>org.apache.geronimo.samples.calculator.CalculatorServlet</jav:servlet-class>
     <jav:load-on-startup>0</jav:load-on-startup>
   </jav:servlet>
   <jav:servlet-mapping>
     <jav:servlet-name>Calculator</jav:servlet-name>
     <jav:url-pattern>/calculator</jav:url-pattern>
   </jav:servlet-mapping>
   <jav:welcome-file-list>
     <jav:welcome-file>index.html</jav:welcome-file>
   </jav:welcome-file-list>
   <jav:ejb-local-ref>
 
<jav:ejb-ref-name>org.apache.geronimo.samples.calculator.CalculatorServlet/calc</jav:ejb-ref-name>
 
<jav:local-home>org.apache.geronimo.samples.slsb.calculator.CalculatorLocal</jav:local-home>
     <jav:injection-target>
 
<jav:injection-target-class>org.apache.geronimo.samples.calculator.CalculatorServlet</jav:injection-target-class>
       <jav:injection-target-name>calc</jav:injection-target-name>
     </jav:injection-target>
   </jav:ejb-local-ref>
</xml-fragment>

-- 
Thanks,
Tim McConnell

Mime
View raw message