Thanks arul.
its right. its running but have a another problem.
my code looks like..
Properties p = new Properties();
p.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY,"com.ibm.ejs.ns.jndi.CNInitialContextFactory");
p.put(javax.naming.Context.PROVIDER_URL,
"iiop://localhost/");
System.out.println("Context not Created.");
InitialContext ctx = new
javax.naming.InitialContext(p);
System.out.println("Context
Created.");
Object home =
ctx.lookup("HelloHome");
System.out.println("Lookup
Home Created.");
HelloWorldHome helloHome = (HelloWorldHome)
PortableRemoteObject.narrow(home,
HelloWorldHome.class);
System.out.println("HelloHome
Created.");
OUTPUT ::
Context not Created.
Context Created.
javax.naming.NamingException: Error during resolve
[Root exception is java.lang.NullPointerException]
And the error traped at ... lookup("HelloHome"); ..
Everything is there HelloHome EJB is running also.
CLASSPATH is also set.
Can anybody knows the problems of lookup....
Thanks in advance
--- Arul <[EMAIL PROTECTED]> wrote:
> hey..
>
> just changing from InitailContext.narrow to
> PortableRemoteObject.narrow
> doesnt make much difference..As per RMI IIOp us
> should give only
> PortableRemoteObject.narrow.
>
> but the Initial Context parameter which u give for
> look up the bean differs
> from weblogic to websphere.In weblogic u would use
> "weblogic.jndi.WLInitialContextFactory"
>
> The client look up in weblogic would look like this
>
>
> Properties h = new Properties();
>
>
h.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory
> ");
> h.put(Context.PROVIDER_URL,
> "t3://localhost:7001");
> InitialContext ic=new InitialContext(h);
> Object objlkup=ic.lookup(Jndi);
> BeanHome
>
home=(BeanHome)PortableRemoteObject.narrow(objlkup,BeanHome.class);
> Remote
>
remote=(Remote)PortableRemoteObject.narrow(home.create(),Remote.class);
> return remote;
>
>
> but the h.put value changes in websphere ..
>
> ex:
>
> Hashtable h = new Hashtable();
> h.put(Context.INITIAL_CONTEXT_FACTORY,
> "com.ibm.ejs.ns.jndi.CNInitialContextFactory");
> InitialContext ic = new InitialConext(h);
>
>
> Just try to work with this
>
> Arul
> ----- Original Message -----
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, February 13, 2001 4:56 PM
> Subject: Re: WebSphere3.5 Client Running Problem
>
>
> > Hi buddy,
> >
> > u need to check how r u getting the InitialContext
> from the JNDI . I faced
> > a similar problem
> > coz i was using EJBHome
> home=initialcontext.narrow(".....");
> > instead use
> home=PortableRemoteObject.narrow("......");(boy
> check out the
> > exact syntax)
> >
> > check if thats the problem,
> >
> > pirbhu
> >
> >
>
===========================================================================
> > 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".
>
=====
Ashish Patel.
Baeurer Infotech Ltd.
India.
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year! 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".