You need to replace JRun's default InitialContextFactory with Oracle's by
adding it to your env Hashtable in your JSP. Also make sure you have the
requisite Oracle and EJB client classes in your JRun server's CLASSPATH. It
most likely works from the command line because your shell has a different
CLASSPATH than JRun does, and thus reads jndi.properties from a different
location.

I believe the Oracle and/or JRun forums are better places for this type of
question, and would provide you with specific help.

psn

-----Original Message-----
From: A mailing list for Enterprise JavaBeans development
[mailto:[EMAIL PROTECTED]]On Behalf Of Abhishek Tripathi
Sent: Tuesday, February 27, 2001 10:11 AM
To: [EMAIL PROTECTED]
Subject: JSP to EJB on different server


Hi All

I am new to enterprise development,I would like to ask whether it would be
possible to communicate between two environments each has its own
implementation of EJB.
In a typical environment I am trying to call a successfully deployed as well
as executing EJB on ORACLE8i from JSP pages hosted on Allaire JRUN 3.0, but
it throws some exception :

javax.naming.NameNotFoundException:
sess_iiop://13.210.136.31:2481:oralpms1/test/myHello not found
 at allaire.ejipt._NamingContext.lookup(_NamingContext.java:73)
 at allaire.ejipt._LocalContext.lookup(_LocalContext.java:140)
 at allaire.ejipt._NamingContext.lookup(_NamingContext.java:103)
 at javax.naming.InitialContext.lookup(InitialContext.java:356)
 at allaire.jrun.jndi.LocalContext.lookup(LocalContext.java:161)
 at allaire.jrun.jndi.LocalContext.lookup(LocalContext.java:113)
 at javax.naming.InitialContext.lookup(InitialContext.java:349)

actual code goes like

   String serviceURL = "sess_iiop://13.210.136.31:2481:oralpms1";
   String objectName = "/test/myHello";
   String user       = "scott";
   String password   = "tiger";
   Hashtable env = new Hashtable ();
   env.put (Context.URL_PKG_PREFIXES, "oracle.aurora.jndi");
   env.put (Context.SECURITY_PRINCIPAL, user);
   env.put (Context.SECURITY_CREDENTIALS, password);
   env.put (Context.SECURITY_AUTHENTICATION, ServiceCtx.NON_SSL_LOGIN);
   Context ic = new InitialContext (env);
   HelloHome hello_home = (HelloHome)ic.lookup (serviceURL + objectName);
   Hello hello = hello_home.create ();
   out.println (hello.helloWorld ());


same code when executed from dos shell, works fine !!!

Any direction, workaround or resources ???

===========================================================================
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".

Reply via email to