473,325 Members | 2,828 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

JNDI Question Help Requested.

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]
Jul 17 '05 #1
0 2507

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: mdh | last post by:
I am trying to learn the basics of MVC applications using a Tomcat infrastructure. I'm starting by building a simple application with: * a login.jsp page for a basic login form with a action...
0
by: Jeff K | last post by:
JNDI is adding a naming attribute to my add request. Is there a way to prevent this? For example: Using LdapContext.createSubcontext(String s, Attributes atts) with the following: s =...
2
by: Jon Dellaria | last post by:
I have been using MySql as the database using JSP's and JavaBeans but recently I have wanted to start using the database connection pooling mechanism built into TomCat. I think I am having a...
1
by: Kent | last post by:
I'm running on Win2000 and JRE 1.4.1.... I've got a small client trying to do get an InitialContext() and talk to the local JBoss server running on same machine (different VM of course). When...
0
by: Steffen | last post by:
Hi! I'm trying to access a EntityBean from a servlet via the bean's local home interface. The EJB and the Servlet are together in one .ear file and I'm using JBoss 3.2.3. I think the...
1
by: slurper | last post by:
i have problems understanding jndi. i'm this far: i deployed the sun application server and i'm working through the examples (Duke bookstore, ...). Sometimes i see code which does a lookup to a...
1
by: John Chambers | last post by:
Hi all, I'm relatively new to JNDI concepts and need some help. I am writing a web app that accepts a variable specifying a jndi pooled connection datasource as a url variable. This is a...
0
by: crossroadsk | last post by:
I have a problem in configuring JNDI properties for LDAP server i created jndi.properties file in the current directory where i'm running a simple java code. jndi.properties file which i...
1
dmjpro
by: dmjpro | last post by:
how do i do JNDI program in local machine.... plze give me JNDI programming free tutorial with examples .... plz help me .... thanx
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.