You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Fabian Dankof <fa...@dankof.net> on 2006/02/27 11:37:01 UTC

Geronimo/Eclipse: Can't find bean in jndi

Hi List!

I just set-up a new Geronimo/Eclipse environment with the following
versions:

- Geronimo 1.0
- Eclipse 3.1.2 /w WTP 1.0.1
- Geronimo Eclipse Plug-in V1.0

After configuring the server runtime i created a new Enterprise Application
project with
an EJB and a servlet.
The only thing i do is lookup the bean via the auto-generated *Util-Class of
the bean in
the doGet() method of my servlet.
Unfortunately, it comes to an error when the bean is looked up in JNDI. I
get a NameNotFoundException.
Up to now, i extended my openejb-jar.xml file to describe the bean:

---------------------- openejb-jar.xml ------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.0"
xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.0"
xmlns:pkgen="http://www.openejb.org/xml/ns/pkgen-2.0"
xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.1"
xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.0"
configId="TestAppEJB/TestAppEJB">
  <enterprise-beans>
    	<session>
    		<ejb-name>MyTestApp</ejb-name>
    		<jndi-name>MyTestApp</jndi-name>
    	</session>
    </enterprise-beans>
</openejb-jar>
---------------------------------------------------------------------

Is this file really needed as i have an ejb-jar.xml??

When i log in to the server's console and choose "Application EARs" from the
menu, i can
see the app but the bean does not appear in the "EJB JARs" section. Is that
normal when i
deploy as an EAR??
It seems that the bean isn't deployed. I also tried to deploy a seperate EJB
an look it up
in a servlet which (as far as i remember) was successful.

Any ideas??

Thanks in advance,

Fabian




RE: Geronimo/Eclipse: Can't find bean in jndi

Posted by Fabian Dankof <fa...@dankof.net>.
No i don't. Do i need a ref? Can't think of any references to declare. 

> -----Original Message-----
> From: Sachin Patel [mailto:sppatel2@gmail.com] 
> Sent: Monday, February 27, 2006 1:52 PM
> To: user@geronimo.apache.org
> Subject: Re: Geronimo/Eclipse: Can't find bean in jndi
> 
> Do you have an ejb ref declared?
> - sachin
> 
> 
> 
> On Feb 27, 2006, at 5:37 AM, Fabian Dankof wrote:
> 
> > Hi List!
> >
> > I just set-up a new Geronimo/Eclipse environment with the following
> > versions:
> >
> > - Geronimo 1.0
> > - Eclipse 3.1.2 /w WTP 1.0.1
> > - Geronimo Eclipse Plug-in V1.0
> >
> > After configuring the server runtime i created a new Enterprise 
> > Application project with an EJB and a servlet.
> > The only thing i do is lookup the bean via the 
> auto-generated *Util- 
> > Class of the bean in the doGet() method of my servlet.
> > Unfortunately, it comes to an error when the bean is looked up in 
> > JNDI. I get a NameNotFoundException.
> > Up to now, i extended my openejb-jar.xml file to describe the bean:
> >
> > ---------------------- openejb-jar.xml 
> ------------------------------ 
> > <?xml version="1.0" encoding="UTF-8"?> <openejb-jar 
> > xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.0"
> > xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.0"
> > xmlns:pkgen="http://www.openejb.org/xml/ns/pkgen-2.0"
> > xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.1"
> > xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.0"
> > configId="TestAppEJB/TestAppEJB">
> >   <enterprise-beans>
> >     	<session>
> >     		<ejb-name>MyTestApp</ejb-name>
> >     		<jndi-name>MyTestApp</jndi-name>
> >     	</session>
> >     </enterprise-beans>
> > </openejb-jar>
> > 
> ---------------------------------------------------------------------
> >
> > Is this file really needed as i have an ejb-jar.xml??
> >
> > When i log in to the server's console and choose 
> "Application EARs"  
> > from the
> > menu, i can
> > see the app but the bean does not appear in the "EJB JARs" 
> section.  
> > Is that
> > normal when i
> > deploy as an EAR??
> > It seems that the bean isn't deployed. I also tried to deploy a 
> > seperate EJB an look it up in a servlet which (as far as i 
> remember) 
> > was successful.
> >
> > Any ideas??
> >
> > Thanks in advance,
> >
> > Fabian
> >
> >
> >
> 


Re: Geronimo/Eclipse: Can't find bean in jndi

Posted by Sachin Patel <sp...@gmail.com>.
Do you have an ejb ref declared?
- sachin



On Feb 27, 2006, at 5:37 AM, Fabian Dankof wrote:

> Hi List!
>
> I just set-up a new Geronimo/Eclipse environment with the following
> versions:
>
> - Geronimo 1.0
> - Eclipse 3.1.2 /w WTP 1.0.1
> - Geronimo Eclipse Plug-in V1.0
>
> After configuring the server runtime i created a new Enterprise  
> Application
> project with
> an EJB and a servlet.
> The only thing i do is lookup the bean via the auto-generated *Util- 
> Class of
> the bean in
> the doGet() method of my servlet.
> Unfortunately, it comes to an error when the bean is looked up in  
> JNDI. I
> get a NameNotFoundException.
> Up to now, i extended my openejb-jar.xml file to describe the bean:
>
> ---------------------- openejb-jar.xml ------------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.0"
> xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.0"
> xmlns:pkgen="http://www.openejb.org/xml/ns/pkgen-2.0"
> xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.1"
> xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.0"
> configId="TestAppEJB/TestAppEJB">
>   <enterprise-beans>
>     	<session>
>     		<ejb-name>MyTestApp</ejb-name>
>     		<jndi-name>MyTestApp</jndi-name>
>     	</session>
>     </enterprise-beans>
> </openejb-jar>
> ---------------------------------------------------------------------
>
> Is this file really needed as i have an ejb-jar.xml??
>
> When i log in to the server's console and choose "Application EARs"  
> from the
> menu, i can
> see the app but the bean does not appear in the "EJB JARs" section.  
> Is that
> normal when i
> deploy as an EAR??
> It seems that the bean isn't deployed. I also tried to deploy a  
> seperate EJB
> an look it up
> in a servlet which (as far as i remember) was successful.
>
> Any ideas??
>
> Thanks in advance,
>
> Fabian
>
>
>