The Artima Developer Community
Sponsored Link

Java Answers Forum
ejb on WebLogic

1 reply on 1 page. Most recent reply: Oct 7, 2002 11:42 PM by glkrr

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
siddhartha

Posts: 15
Nickname: saddysan
Registered: Jul, 2002

ejb on WebLogic Posted: Oct 6, 2002 1:33 PM
Reply to this message Reply
Advertisement
Hello Friends,

I am trying to work on EJBs and i am using weblogic 6.0
I have created my bean and deployed it on the server using command line
weblogic.deploy deploy password HelloWorld c:\helloWorld.jar

When i start my server, the server also creates 10 instances of my bean (I have mentioned this in deplyment decripter)
But my problem is my client is not able to locate the bean, the error which comes is

javax.naming.NameNotFoundException: Unable to resolve HelloWorld. Resolved: '' Unresolved:'HelloWorld' ; remaining name ''

i dont know why it is not working, when i start weblogic console, the name of my bean there is HelloWorld, then why it can not resolve the name HelloWorld.
I am attaching code of my java client


import javax.ejb.*;
import javax.naming.*;
import java.rmi.*;
import java.util.Properties;
import helloWorld.*;

public class HelloClient4
{
public static void main(String[] args)
{
try
{
Properties props = new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.TengahInitialContextFa ctory");
props.put(Context.PROVIDER_URL,"t3://localhost:7001");
Context ctx = new InitialContext(props);
HelloHome home = (HelloHome) ctx.lookup("HelloWorld");
Hello hello = home.create();
System.out.println(hello.hello());
hello.remove();
}
catch(Exception e)
{
System.out.println(e);
}
}
}


glkrr

Posts: 4
Nickname: glkrr
Registered: Oct, 2002

Re: ejb on WebLogic Posted: Oct 7, 2002 11:42 PM
Reply to this message Reply
I think ur jndi name is not identified .So u change another jndi name .i hope u can get the result .

Flat View: This topic has 1 reply on 1 page
Topic: Class Cast Exception Previous Topic   Next Topic Topic: rotating character of string

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use