• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

EJB bean not able to run Client

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
i am trying out my first demo example of EJB in Weblogic. However i am getting the following error. I am trying to invoke the client with the bean deployed.
"
C:\weblogic>java examples.ejb.basic.statelessSession.Client
Beginning statelessSession.Client...
We were unable to get a connection to the WebLogic server at t3://localhost:7001
Please make sure that the server is running."
I have the bean deployed and can be seen in the Weblogic console . it is running on the default 7001 port.
Is it that i have missed something.
Regds.
Rahul

[This message has been edited by rahul_mkar (edited July 11, 2000).]
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
are you using weblogic 5.1 or 4.5.1.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
I am using 5.1.
Regds.
Rahul
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Iam also using weblogic 5.1.Iam able to run.I can just give you the steps I did.Hope you did all this already.
1.Make sure the server,deployer and console is started.In console connect to the server by logging through your password.
In deployer also make sure that the listen port and password match to the weblogic properties file.
2.Load the corresponding jar file which is in \weblogic\myserver directory.
3.Deploy through the deployer.you can see it on the console.
4.At the command prompt change to weblogic directory and type in C:\weblogic>java examples.ejb.basic.statelesssession.Client
This should work.and It worked for me.I think its better if you check in weblogic properties file to make sure the port and password.and also in client program.
thanks.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
the exact error is as follows which i have trapped
C:\weblogic>java examples.ejb.basic.statelessSession.Client
Beginning statelessSession.Client...
We were unable to get a connection to the WebLogic server at t3://127.0.0.1:7001
Please make sure that the server is running.
javax.naming.NoInitialContextException: Cannot instantiate class: weblogic.jndi.
WLInitialContextFactory [Root exception is java.lang.ClassNotFoundException: web
logic.jndi.WLInitialContextFactory]
i saw something about this in the sun site which i will be checking out. I carried out the same steps u specified.
Regds
Rahul
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
The sun site was really helpful. i entered WLInitialContextFactory in the search field and got some good results. Basically it told me that there is a WLInitialContextFactory.jar file in weblogic/classes folder. gotto check out by adding it in the classpath at home.
Regds.
Rahul
[This message has been edited by rahul_mkar (edited July 13, 2000).]
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I looked at the sun site and read the solution given,but I didn't found any jar file you specied.According to the solution it is asked to add directory which contains weblogic.jndi package.this is in weblogic/classes path and it is already added to the classpath of setenv.please post here how the problem is solved.
thanks
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
i removed the set path command in my autoexec.bat file. then i restarted the system. i started the console with the bean specified in the properties file. the bean was deployed. later i created a new console window. i used setEnv command.
i had renamed the setEnv.cmd file to setEnv.bat earlier and specified in the file where my java clases are.
i went into the examples.ejb.basic.statefulSession and compiled all the files through javac *.java.
then i moved up to the weblogic folder and gave the command
java examples.ejb.basic.statefulSession.Client
things went off smoothly.
i think the problem lies in the classpath in the autoexec file which the documentation says has to be removed.

thanks for all u r help. I will be asking for more!!
Regds.
Rahul

[This message has been edited by rahul_mkar (edited July 14, 2000).]
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hai,
great,your problem got solved.Its good not to use autoexec.bat file at all.always create your own batch files for java development.o,k.see my another question in this post regarding connection pool.if you got answer please post it there.
thanks
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic