geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stein Kråbøl" <>
Subject Re: Reference question
Date Tue, 24 Jan 2006 16:34:07 GMT
The thing is (as posted earlier) that when I put

I get an error when deploying:
   Error: Unable to distribute my-webapp-1.0.war: Error processing
   'remote' element for EJB Reference 'ejb/BCalcREJB' for module
   'MyWebApp-1.0': Remote interface class not found:
In my openejb-jar:

Now, I beleave the class files in the ejb.jar fil should be found in
the file structure of Geronimo, but they are not there.
In config-store/
and in
   ejb                    6kb
   META-INF/config.ser    18kb
Structure of test-ejb-1.0.1.jar:
What am I doing wrong?
I'm a little desperate case I have to get this to work by tomorrow. 


Aaron Mulder writes: 

> You need an EJB Reference in your WAR (in Geronimo, a web app can't
> look up an EJB in JNDI unless there's an EJB Reference in the
> web.xml).  It's easiest if your EJB JAR and WAR are deployed as part
> of an EAR so you can use an <ejb-link> in the EJB Reference in web.xml
> and then you don't need any Geronimo-specific information.  If the EJB
> JAR and WAR are deployed separately, you'll probably need a
> geronimo-web.xml that maps the EJB reference in web.xml to the correct
> EJB in the EJB JAR.  See, for example, 
> using the geronimo-web.xml syntax described at
> Anyway, once your EJB reference is set up, if the EJB reference name
> is ejb/BCalcREJB then you'll look it up in JNDI at
> java:comp/env/ejb/BCalcREJB (generally, it's java:comp/env/[name of
> EJB reference]) 
> Thanks,
>     Aaron 
> On 1/24/06, Stein Kråbøl <> wrote:
>> Help!
>> I have deployed my first EJB modul without error. 
>> ejb-jar.xml: 
>> <?xml version="1.0" encoding="UTF-8"?>
>> <!DOCTYPE ejb-jar PUBLIC
>>                 '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN'
>>                 ''>
>> <ejb-jar>
>>  <enterprise-beans>
>>      <session>
>>          <display-name>Stateless Session Bean with Remote
>> Interfaces</display-name>
>>          <ejb-name>BCalcREJB</ejb-name>
>>          <home>com.tellussoft.Test.BonusCalculatorHome</home>
>>          <remote>com.tellussoft.Test.BonusCalculator</remote>
>> <local-home>com.tellussoft.Test.LocalBonusCalculatorHome</local-home>
>>          <local>com.tellussoft.Test.LocalBonusCalculator</local>
>>          <ejb-class>com.tellussoft.Test.BonusCalculatorBean</ejb-class>
>>          <session-type>Stateless</session-type>
>>          <transaction-type>Container</transaction-type>
>>      </session>
>>  </enterprise-beans>
>> </ejb-jar> 
>> I'm trying to connect to it with a servlet in an standalone war.
>> What is the correct syntax for the lookup method?
>>                         Object homeObject = context.lookup("java:comp/ejb/BCalcREJB");
>> I have tried all the variants I can think of!
>> BCalcREJB
>> java:comp/env/ejb/BCalcREJB
>> java:comp/env/BCalcREJB
>> ejb/BCalcREJB
>> Is there any other method to verify JNDI names tied to a EJBs? 
>> Stein 

View raw message