struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Morten Andersen <mort...@mip.sdu.dk>
Subject java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory
Date Thu, 17 Jan 2002 15:41:15 GMT
I have made a stand -alone client and a web-client that uses the same EJB's 
on a JBoss server.
The web-client have no problems in connecting to the EJB's, but after I 
changed my Operative system I got some problems with the stand-alone 
client. It seems to be something to do with the classpath, which is the 
only thing I changed, but I'm not sure. Afterall I tried to put all the 
*.jar files into the classpath, and resetting and checking the classpath 
several times.

When I try to connect to the server with a jndi-call I get the following 
exception:
"java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory"

This happens in the last line of code:


InitialContext nameContext=null;
try{
  	 if (nameContext == null) {
	            Properties props = new Properties();
		Properties sysProps = System.getProperties();
		props.setProperty("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
		props.setProperty("java.naming.provider.url","localhost:1099");
		sysProps.putAll(props);
		System.setProperties(sysProps);
		nameContext = new InitialContext();
            }
}

I can't find the problem, and don't know where it comes from. Afterall it 
worked just fine before i changed operative system.

Is it a CLASSPATH related problem or ...?

Thanks

Morten Andersen
Denmark


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message