aspose file tools*
The moose likes BEA/Weblogic and the fly likes EJB Examples on Weblogic 6.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "EJB Examples on Weblogic 6.0" Watch "EJB Examples on Weblogic 6.0" New topic
Author

EJB Examples on Weblogic 6.0

Louis Morisset
Greenhorn

Joined: Jul 30, 2001
Posts: 4
Hi everyone, I am trying to run the example trader that comes with the server. I have run the setExampleEnv.cmd batch file and downloaded the ejb.jar file missing. i have checked the sever console and everything is according to what is witten that needs to be done. I am using the pre-compiled .class but when I run this line which is form the tutorial $ java examples.ejb20.basic.statelessSession.Client "t3://127.0.0.1:80"
I get this error:

The client was unable to lookup the EJBHome. Please make sure
that you have deployed the ejb with the JNDI name ejb20-statelessSession-TraderHome on the WebLogic server at t3://127.0.0.1:80
So can anyone help me, I am in a littleb bit of a time crunch, like the rest of the world.
thanks.
Louis
Marcos Maia
Ranch Hand

Joined: Jan 06, 2001
Posts: 977
Hi,
First you should be sure about the port and host your passing in the command line 127.0.0.1 is usually the localhost and check the port where WL is listening from if is it really 80(the default is 7001) then you have to check the deployment descriptor for the bean in the jndi tag should be:
<jndi-name>ejb20-statelessSession-TraderHome </jndi-name>
an finally check the client code where it tryies to recover the reference to the bean, should be:
context.lookup("ejb20-statelessSession-TraderHome");
Louis Morisset
Greenhorn

Joined: Jul 30, 2001
Posts: 4
Thanks I'll look into that... But I know that my server is on port 80, Is the example server on a diffrent one??
Marcos Maia
Ranch Hand

Joined: Jan 06, 2001
Posts: 977
Hi,
take a look at your config.xml under %WL_HOME%\config\examples and there you can see the server port and the ssl port for your examples server, take care and don�t change it.
Louis Morisset
Greenhorn

Joined: Jul 30, 2001
Posts: 4
Hi, I checked all that you said and every thing was fine. So I ran it and it worked. i don't know if I did something diffrent but it did. Now I am trying to run it again with no succes??? Is there something that you need to do to start the JNDI server. How can this work one minute and the next not?? All the code is fine, it ran an hour ago. So I think that the JDNI server is not running. When you deploy your EJB, do you need to do something special to register it to the JNDI server is it taken in charge by the deployement descriptor. I know it's novice questions, I am a novice at this.(third year University project )
thanks for your understanding.
Louis
Marcos Maia
Ranch Hand

Joined: Jan 06, 2001
Posts: 977
hmmm!!! That�s really strange. I really can�t think about nothing that coul�d cause this, or maybe Did you tryied to deploy another ejb and than this happend??
Anyway if you want, send me the code to mmaia@mrbrasilia.com.br that I�ll take a look for you.
regards.
P.S-tomorrow(08/01/2001) I�m gonna have a really busy day so I�ll be able to do this only in the afternoon.
I know that�s an example from WL but problably something is wrong with it, and no you don�t need to start a jndi server it�s already started when you run WL.
[This message has been edited by Marcos Maia (edited July 31, 2001).]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EJB Examples on Weblogic 6.0