When I try to bind name and entity using JNDI what does this mean:
log4j:WARN No appenders could be found for logger (org.jnp.interfaces.NamingCont ext). log4j:WARN Please initialize the log4j system properly. javax.naming.CommunicationException: Receive timed out [Root exception is java.n et.SocketTimeoutException: Receive timed out]
I added some String executions to find the problem and it is obviously at ctx.bind(name, entity); Here is a piece if my code:
try { System.out.println("Here"); // For clarity, command-line args in local vars String name = args[0]; Integer entity = Integer.valueOf(args[1]); System.out.println("Here"); // Access the initial context. Context ctx = new InitialContext(); System.out.println("Context"); // Bind name to entity in the Context. ctx.bind(name, entity); System.out.println("Here"); // To test, retrieve the entity through the name Integer retrieved = (Integer) ctx.lookup(name); System.out.println("From lookup: " + retrieved); } catch(NamingException e) { System.err.println(e); } catch(NumberFormatException e) { System.err.println(e); } } } [ April 04, 2005: Message edited by: Robert Bonslater ]
Yuan Ye
Ranch Hand
Joined: Mar 05, 2003
Posts: 172
posted
0
Is your AS started before the program, looks like sth wrong with the system environment.
Clemens Tolboom
Greenhorn
Joined: Feb 15, 2005
Posts: 12
posted
0
As far as i can see the log4j warning is about a misconfigured log4j.xml or log4j.properties file. Have you checked this file?
Anyway ... it's just a warning ... you app should still work.
log4j is 'just' a logging framework. [ April 06, 2005: Message edited by: Clemens Tolboom ]