Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Plz guys help me to fix JNDI

 
Frederik Ericsson
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Guys,

'm using WLS8.1, actually I wrote advice bean, after build, I got the AdviceApp.jar in that i got these files...Adiveremote, AdviceHome, ejb-jar.xml, weblogic-ejb-jar.xml.

while am trying to rewrite the weblogic xml file for naming JNDI, it says this is not rewritable file.

client code
Object o = ic.lookup("Advisor"); // replace with YOUR JNDI name for the bean
AdviceHome home = (AdviceHome) PortableRemoteObject.narrow(o, AdviceHome.class);
Advice advisor = home.create();

geting error here.
D:\Weblogic\user_projects\AdviceApp\AdviceApp\headfirst>javac -classpath "C:\Program Files\j2sdkee1.3.1\lib\j2ee.jar";"D:\Weblogic\user_projects\AdviceApp\Advic
eApp\AdviceApp.jar" AdviceClient.java
AdviceClient.java:28: cannot resolve symbol
symbol : class Advice
location: class headfirst.AdviceClient
Advice advisor = home.create();
^
1 error



Please guys.. help me how and where to give JNDI name in weblogic8.1 and how to rectify this problem

Cheers
 
Inesh Hettiarachchi
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
do not add the jar in the server when you are compiling the client try giving the generated stub when compiling
you can go to the weblogic's administration console and deploy the bean
hope this helps
 
Joe Ess
Bartender
Posts: 9280
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please do not post the same question more than once. It causes confusion and duplication of effort as the community tries to help everyone.
 
Frederik Ericsson
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
do not add the jar in the server when you are compiling the client try giving the generated stub when compiling
you can go to the weblogic's administration console and deploy the bean
hope this helps

I have tried without jar as well, got same error. I deployed my bean already in the console. still the client shows the same error.

Actually I got only one problem, am suppose to give JNDI name in weblogic***.xml file, while am trying to give in xml it says not rewritable, becoz its under jar. this weblogic-ejb-jar.xml file is created by WLS.

how can I make it to writable file, in Weblogic workshop, if I choose that file it shows only 2 options which are save as and close. I cant able to acces that file directly, coz its under jar.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic