Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / JavaBeans / March 2005

Tip: Looking for answers? Try searching our database.

JNDI Question Help Requested.

Thread view: 
Lakshmi Jagarlapudi - 07 Dec 2003 03:48 GMT
Hi ,

I wrote the following program and compiled and I was getting the error
pasted below. Can anyone throw some light as to why it is happening.
Thanks in advance

-----  START OF THE PROGRAM --------------------
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.naming.spi.*;
import javax.naming.NoInitialContextException;
import java.util.*;

public class jlnjndi {
public static void main(String args[]){
Hashtable env = new Hashtable();

env.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFacto
ry");

System.out.println("up to here it is ok ");

try{

Context ctx = new InitialContext(env);

System.out.println("up to here it is ok ");

Object obj = ctx.lookup("/javaprac/packages.html");
System.out.println(" is bound to: " + obj);

} catch (NamingException e) {
   System.err.println("Problem looking up "  + e);
}  // end of the catch stmt

}  // end of the main method

} // end of the class
-----  END OF THE PROGRAM --------------------

ERROR MESSAGE
----------------
Problem looking up javax.naming.NamingException: Couldn't connect to any
host [Root exception is org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor
code: 203  completed: No]
Herman Timmermans - 07 Dec 2003 06:34 GMT
> Hi ,
>
[quoted text clipped - 13 lines]
> public static void main(String args[]){
> Hashtable env = new Hashtable();

env.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFacto
> ry");
>
[quoted text clipped - 23 lines]
> host [Root exception is org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor
> code: 203  completed: No]
************************************************************
I think you should use rs.next() to position the resultset to the first
record.  So you need to change your code to do something lie
while (rs.next()){
//do something
};

Hope this helps,
Brgds Herman
Signature

Suse Linux Professional 8.1 on Athlon 1.1 Ghz 512 Mb
Anti Spam = remove the "dot" and the "at"
Registered Linux User #264690

Brian Taylor - 08 Mar 2005 20:53 GMT
Check to ensure that the ExternalDNSName attribute of the Server element
has been set in the Config.xml file located in the root directory of the
WLS domain your running from.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.