RE: problem in accessing ejb from a bean in web-inf/classes direc tory .

2001-02-28 Thread Andre Vanha

These should be in the WEB-INF directory.

If you have your application packaged as WAR file it should have a folder
called WEB-INF.  Your web.xml file should be there.

If you're running your code using orion's default web app, you'll find the
file under orion/default-web-app/WEB-INF.

In your web.xml file the ejb references should be defined like so:

  
ejb/EDMSessionBean
Session
Core.BusinessObjects.EDMSession.EDMSessionHome
Core.BusinessObjects.EDMSession.EDMSessionRemote
TheEDMSessionBean
  

With this definition my code would then expect to find the bean under
java:comp/env/ejb/EDMSessionBean

In you orion-web.xml, which should reside in you application-deployments
directory,  you need to link the bean like this:



In this case location="TheEDMSessionBean" is the location specified in your
ejb-jar.

Hope this helps.

Andre





-Original Message-
From: Prabahkar Subramaniam [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 28, 2001 9:18 AM
To: 'Andre Vanha'
Subject: RE: problem in accessing ejb from a bean in web-inf/classes
direc tory .


Where can I find the web.xml and orion-web.xml files?.

Prabahkar

-Original Message-
From: Andre Vanha [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 27, 2001 5:42 PM
To: Orion-Interest
Subject: RE: problem in accessing ejb from a bean in web-inf/classes
direc tory .


Did you define the ejb-refs in your web.xml and link them correctly in
orion-web.xml?
It works fine for me.

Andre


-Original Message-
From: Prabahkar Subramaniam [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 27, 2001 2:14 PM
To: Orion-Interest
Subject: RE: problem in accessing ejb from a bean in web-inf/classes
direc tory .


I tried the following 2 ways and get the same error:

Object hdrObj = cntx.lookup("java:comp/env/B2BOrderHeader");
headerHome = (B2BOrderHeaderHome)
 and 
headerHome = (B2BOrderHeaderHome)cntx.lookup("B2BOrderHeader");

error:

javax.naming.NameNotFoundException: B2BOrderHeader not found
at com.evermind.server.rmi.RMIContext.lookup(JAX)
at com.evermind.server.hl.f3(JAX)
at com.evermind.server.hl.lookup(JAX)
at javax.naming.InitialContext.lookup(Unknown Source)
at replacement.OrderBeanWrapper.loadOrder(OrderBeanWrapper.java:142)
at
__jspPage1_replacement_loadorder_jsp._jspService(__jspPage1_replacement_load
order_jsp.java:44)
at com.orionserver.http.OrionHttpJspPage.service(JAX)
at com.evermind.server.http.HttpApplication.xa(JAX)
at com.evermind.server.http.JSPServlet.service(JAX)
at com.evermind.server.http.d3.so(JAX)
at com.evermind.server.http.d3.sm(JAX)
at com.evermind.server.http.ef.su(JAX)
at com.evermind.server.http.ef.dn(JAX)
at com.evermind.util.f.run(JAX)

The line 142 is:
 headerHome = (B2BOrderHeaderHome) cntx.lookup("B2BOrderHeader");

Thanks in advance for your help
Prabahkar

-Original Message-
From: Rafael Alvarez [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 27, 2001 10:59 AM
To: Orion-Interest
Subject: Re: problem in accessing ejb from a bean in web-inf/classes
directory .


Hello Prabahkar,

Monday, February 26, 2001, 7:38:40 PM, you wrote:

Try using
Object hdrObj = cntx.lookup("B2BOrderHeader");

I think I remember vagely a thread in this list about java:comp/,
but that was 3000 messages ago :). Anyway, this works fine for me.

-- 
Best regards,
 Rafaelmailto:[EMAIL PROTECTED]









RE: problem in accessing ejb from a bean in web-inf/classes direc tory .

2001-02-27 Thread Andre Vanha

Did you define the ejb-refs in your web.xml and link them correctly in
orion-web.xml?
It works fine for me.

Andre


-Original Message-
From: Prabahkar Subramaniam [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 27, 2001 2:14 PM
To: Orion-Interest
Subject: RE: problem in accessing ejb from a bean in web-inf/classes
direc tory .


I tried the following 2 ways and get the same error:

Object hdrObj = cntx.lookup("java:comp/env/B2BOrderHeader");
headerHome = (B2BOrderHeaderHome)
 and 
headerHome = (B2BOrderHeaderHome)cntx.lookup("B2BOrderHeader");

error:

javax.naming.NameNotFoundException: B2BOrderHeader not found
at com.evermind.server.rmi.RMIContext.lookup(JAX)
at com.evermind.server.hl.f3(JAX)
at com.evermind.server.hl.lookup(JAX)
at javax.naming.InitialContext.lookup(Unknown Source)
at replacement.OrderBeanWrapper.loadOrder(OrderBeanWrapper.java:142)
at
__jspPage1_replacement_loadorder_jsp._jspService(__jspPage1_replacement_load
order_jsp.java:44)
at com.orionserver.http.OrionHttpJspPage.service(JAX)
at com.evermind.server.http.HttpApplication.xa(JAX)
at com.evermind.server.http.JSPServlet.service(JAX)
at com.evermind.server.http.d3.so(JAX)
at com.evermind.server.http.d3.sm(JAX)
at com.evermind.server.http.ef.su(JAX)
at com.evermind.server.http.ef.dn(JAX)
at com.evermind.util.f.run(JAX)

The line 142 is:
 headerHome = (B2BOrderHeaderHome) cntx.lookup("B2BOrderHeader");

Thanks in advance for your help
Prabahkar

-Original Message-
From: Rafael Alvarez [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 27, 2001 10:59 AM
To: Orion-Interest
Subject: Re: problem in accessing ejb from a bean in web-inf/classes
directory .


Hello Prabahkar,

Monday, February 26, 2001, 7:38:40 PM, you wrote:

Try using
Object hdrObj = cntx.lookup("B2BOrderHeader");

I think I remember vagely a thread in this list about java:comp/,
but that was 3000 messages ago :). Anyway, this works fine for me.

-- 
Best regards,
 Rafaelmailto:[EMAIL PROTECTED]