Hello,
you are doing a lookup for "HelloHome" but
is the Home - Interface bound to that name?
Under which JNDI - Name is your EJB deployed?
Every Vendor has an additional vendor - specific configuration for the EJBs.
E.g. <Vendor>For BEA WebLogic there is a weblogic-ejb-jar.xml in the EJB -
Jar - File,
one job of that XML - File is to map the used name when calling from other
EJB's, e.g. "HelloHome"
to the real jndi-name on the server the EJB is bound to, e.g.
"ejb/HelloHome".
The corresponding entry is in WL 6.0
<weblogic-enterprise-bean>
<ejb-name>used-name-in-EJBs</ejb-name>
...
<jndi-name>real-jndi-name</jndi-name>
</weblogic-enterprise-bean>
There should be a corresponding Entry in WL 4.5.1 I think.
</Vendor>
Regards,
Hans
> -----Ursprüngliche Nachricht-----
> Von: vikram veeravelu [SMTP:[EMAIL PROTECTED]]
> Gesendet am: Montag, 5. März 2001 08:20
> An: [EMAIL PROTECTED]
> Betreff: Problem while running client
>
> Hello,
> I am new to ejb ,I had a problem while running a
> client ,I through a exception by name
> javax.naming.NameNotFoundException:'HelloHome';
> Remaining Name:'HelloHome'.
> I am using stateless session bean in weblogic
> server.Using DDCreator utility,i created manifest and
> jar file sussesfully.
> And also i changed weblogic property file.
>
> My program is given below:
> 1)
>
> import javax.ejb.*;
> import java.rmi.*;
> public interface Hello extends EJBObject
> {
> String sayHello(String s) throws RemoteException;
> }
>
> 2)
> import javax.ejb.*;
> public interface HelloHome extends EJBHome
>
> {
> public Hello create() throws java.rmi.RemoteException,
> javax.ejb.CreateException;
> }
>
>
> 3)
>
> import javax.ejb.*;
>
> public class HelloBean implements SessionBean
> {
> SessionContext ctx;
> public void ejbCreate()
> {
> }
> public String sayHello(String s)
> {
> return "Hello There,"+s;
> }
> public void ejbRemove()
> {
> }
> public void ejbPassivate()
> {
> }
> public void ejbActivate()
> {
> }
> public void setSessionContext(SessionContext ctx)
> {
> this.ctx = ctx;
> }
> }
>
> 4)
> Client program
>
> import java.rmi.*;
> import javax.naming.*;
> public class HelloClient
> {
> public static void main(String arg[])
> {
> try
> {
> InitialContext ic = new InitialContext();
> HelloHome home=(HelloHome) ic.lookup("HelloHome");
> Hello hel= home.create();
> String retval=hel.sayHello("VIKRAM");
> System.out.println("returned:"+retval);
> hel.remove();
> }
> catch(java.rmi.RemoteException e)
> {
> System.out.println("remote exception occured:"+e);
> }
> catch(javax.ejb.CreateException e)
> {
> System.out.println("create exception occured:"+e);
> }
> catch(javax.ejb.RemoveException e)
> {
> System.out.println("remote exception occured:"+e);
> }
> catch(javax.naming.NamingException e)
> {
> System.out.println("naming exception occured:"+e);
> }
> }
> }
>
> all the programs I am writing in the directory by name
>
> d:\ejb including client.I am compiling all the program
> in the same directory.
> If i write package statement in the program i can't
> able to create
> DD.ser file.
> Please help me in this problem.wheater i have to
> import any other
> things to the client program.
>
>
>
> I set my classpath properyly.Please help me in this.I
> also change my weblogic property file
> ie
> weblogic.ejb.deploy=/d:\weblogic\classes\HelloBean.jar;/
> d:\weblogic is the directory where i store weblogic
> server.
> I am using weblogic 4.5.1 server.Because of that i
> gives me error or
> else i have to use higher version.
>
>
>
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> http://personal.mail.yahoo.com/
>
> ==========================================================================
> =
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> of the message "signoff EJB-INTEREST". For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".