File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes Plz guys help me to fix JNDI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Plz guys help me to fix JNDI" Watch "Plz guys help me to fix JNDI" New topic
Author

Plz guys help me to fix JNDI

Frederik Ericsson
Ranch Hand

Joined: Apr 27, 2005
Posts: 128
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

Joined: Feb 07, 2004
Posts: 25
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

Joined: Oct 29, 2001
Posts: 8713
    
    6

Please do not post the same question more than once. It causes confusion and duplication of effort as the community tries to help everyone.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Frederik Ericsson
Ranch Hand

Joined: Apr 27, 2005
Posts: 128
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Plz guys help me to fix JNDI
 
Similar Threads
JNDI
Weblogic8.1 with JNDI
Trouble running Advice EJB
HFEJB - Basic Question from
Weblogic with Ejb, HFEJB