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:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to