Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 13554 invoked from network); 15 Feb 2006 23:21:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Feb 2006 23:21:39 -0000 Received: (qmail 48899 invoked by uid 500); 15 Feb 2006 23:21:36 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 48871 invoked by uid 500); 15 Feb 2006 23:21:35 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 48856 invoked by uid 99); 15 Feb 2006 23:21:35 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Feb 2006 15:21:35 -0800 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=HTML_MESSAGE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: 68.142.206.237 is neither permitted nor denied by domain of sppatel2@gmail.com) Received: from [68.142.206.237] (HELO smtp104.plus.mail.mud.yahoo.com) (68.142.206.237) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 15 Feb 2006 15:21:34 -0800 Received: (qmail 55831 invoked from network); 15 Feb 2006 23:21:13 -0000 Received: from unknown (HELO ?192.168.1.4?) (spalias78@71.65.234.198 with plain) by smtp104.plus.mail.mud.yahoo.com with SMTP; 15 Feb 2006 23:21:12 -0000 Mime-Version: 1.0 (Apple Message framework v746.2) In-Reply-To: References: <34B65144-90D3-4724-92CD-1238DC46BEC8@gmail.com> Content-Type: multipart/alternative; boundary=Apple-Mail-7-677194972 Message-Id: <0DBBB175-053D-4B3D-9A0C-BFCCD1B2FD24@gmail.com> From: Sachin Patel Subject: Re: EJB lookup problem.. Free 6 pack of beer offer Date: Wed, 15 Feb 2006 18:21:08 -0500 To: user@geronimo.apache.org X-Mailer: Apple Mail (2.746.2) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --Apple-Mail-7-677194972 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Problem fixed. Thanks. Contest over. :) - sachin On Feb 15, 2006, at 5:05 PM, David Jencks wrote: > One problem is that you are looking up JNDI_NAME = HelloWorld > rather than COMP_NAME=java:comp/env/ejb/HelloWorld > > If you really want you can make this work by passing the openejb > proprietary naming properties into the new InitialContext() but it > will no longer be a j2ee app. > > thanks > david jencks > > On Feb 15, 2006, at 12:39 PM, Sachin Patel wrote: > >> Ok this is bugging me now. I've posted the 2 modules here... >> (both containing source) >> >> http://people.apache.org/~sppatel/temp/ >> >> A free 6 pack of beer to anyone who can figure out whats wrong >> with my lookup :) >> >> - sachin >> >> >> >> On Feb 15, 2006, at 2:39 PM, Sachin Patel wrote: >> >>> and yes, TestEJB/TestEJB is the configID of the ejb module. >>> >>> - sachin >>> >>> >>> >>> On Feb 15, 2006, at 2:27 PM, David Jencks wrote: >>> >>>> I doubt the TestEJB/TestEJB is correct. Is >>>> this really the J2EEModule key of the ejb's object name? I >>>> always end up looking in geronimo.log for the correct name. You >>>> might try * >>>> >>>> We are planning to make this easier in the configid branch so >>>> you only have to specify the HelloWorld part. >>>> >>>> thanks >>>> david jencks >>>> >>>> On Feb 15, 2006, at 11:09 AM, Sachin Patel wrote: >>>> >>>>> Ok, I know I'm missing something but can't seem to find what... >>>>> I've deployed a standalone ejbjar and standalone war that >>>>> contains and ejbref. When launching the servlet the lookup to >>>>> my ejb fails... >>>>> >>>>> javax.naming.NameNotFoundException: HelloWorld >>>>> at com.sun.jndi.rmi.registry.RegistryContext.lookup >>>>> (RegistryContext.java:90) >>>>> at com.sun.jndi.rmi.registry.RegistryContext.lookup >>>>> (RegistryContext.java:98) >>>>> at javax.naming.InitialContext.lookup(InitialContext.java:347) >>>>> >>>>> What am I missing?????? >>>>> >>>>> In my openejb-jar.xml I have: >>>>> >>>>> >>>>> >>>>> HelloWorld >>>>> HelloWorld >>>>> >>>>> >>>>> >>>>> In my web.xml I have: >>>>> >>>>> >>>>> ejb/HelloWorld >>>>> Session >>>>> org.apache.test.HelloWorldHome >>>>> org.apache.test.HelloWorld >>>>> >>>>> >>>>> In my geronimo-web.xml I have: >>>>> >>>>> >>>>> TestEJB/TestEJB >>>>> >>>>> >>>>> >>>>> ejb/HelloWorld >>>>> geronimo.server >>>>> geronimo >>>>> null >>>>> TestEJB/TestEJB >>>>> StatelessSessionBean >>>>> HelloWorld >>>>> >>>>> >>>>> >>>>> - sachin >>>>> >>>> >>> >> > --Apple-Mail-7-677194972 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=ISO-8859-1 Problem fixed. Thanks.=A0 = Contest over. :)

- = sachin


=

On Feb 15, 2006, at 5:05 PM, David Jencks = wrote:

One problem is that you are looking up JNDI_NAME =3D = HelloWorld rather than = COMP_NAME=3Djava:comp/env/ejb/HelloWorld

If you really want you can = make this work by passing the openejb proprietary naming properties into = the new InitialContext() but it will no longer be a j2ee = app.

thanks
david = jencks

On Feb 15, 2006, at 12:39 PM, Sachin = Patel wrote:

Ok this is bugging me now.=A0 I've posted the 2 = modules here... (both containing source)

http://people.apache.org/= ~sppatel/temp/

A free 6 pack of beer = to anyone who can figure out whats wrong with my lookup = :)

- = sachin


=

On Feb 15, 2006, at 2:39 PM, Sachin Patel = wrote:

and yes, TestEJB/TestEJB is the configID of the ejb = module.=A0=A0

- = sachin


=

On Feb 15, 2006, at 2:27 PM, David Jencks = wrote:

I doubt the <module>TestEJB/TestEJB</module> = is correct.=A0 Is this really the J2EEModule key of the ejb's object = name?=A0 I always end up looking in geronimo.log for the correct name.=A0 = You might try <module>*</module>

We are planning to make = this easier in the configid branch so you only have to specify the = <name>HelloWorld</name> part.

thanks
david = jencks

On Feb 15, 2006, at 11:09 AM, Sachin = Patel wrote:

Ok, I = know I'm missing something but can't seem to find what... I've deployed = a standalone ejbjar and standalone war that contains and ejbref.=A0 When = launching the servlet the lookup to my ejb fails...

javax.naming.NameNotFoundException<= FONT class=3D"Apple-style-span" face=3D"Monaco" size=3D"3">: = HelloWorld
at = com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:90)
at = com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:98)
at = javax.naming.InitialContext.lookup(InitialContext.java:347)

What am I = missing??????

In my openejb-jar.xml I = have:

<enterprise-beans>=A0
=A0 = <session>
=A0=A0 = <ejb-name>HelloWorld</ejb-name>
=A0=A0 <jndi-name>HelloWorld</jndi-name>
=A0 </session>=A0
</enterprise-beans>=A0

In my web.xml I have:

<ejb-ref>
=A0 =A0 = <ejb-ref-name>ejb/HelloWorld</ejb-ref-name>
=A0 =A0 = <ejb-ref-type>Session</ejb-ref-type>
=A0 =A0 = <home>org.apache.test.HelloWorldHome</home>
=A0 =A0 = <remote>org.apache.test.HelloWorld</remote>
</ejb-ref>

In = my geronimo-web.xml I have:

<sys:import>
=A0 =A0 = <sys:uri>TestEJB/TestEJB</sys:uri>
</sys:import>
<nam:ejb-ref>
=A0 =A0 = <nam:ref-name>ejb/HelloWorld</nam:ref-name><= /FONT>
=A0 =A0 = <nam:domain>geronimo.server</nam:domain>
=A0 =A0 <nam:server>geronimo</nam:server>
=A0 =A0 <nam:application>null</nam:application>
=A0 =A0 <nam:module>TestEJB/TestEJB</nam:module>
=A0 =A0 <nam:type>StatelessSessionBean</nam:type>
=A0 =A0 = <nam:name>HelloWorld</nam:name>
</nam:ejb-ref>


- sachin

=




= --Apple-Mail-7-677194972--