[jboss-user] JNDI problem

Pablo L. de Miranda pablolmiranda at gmail.com
Tue Sep 2 06:54:36 EDT 2008


Hi,

I'm having the problem below when I try to execute my java program:

## ERROR ##
Exception in thread "main" java.lang.NoClassDefFoundError:
org/jboss/logging/Logger
        at org.jnp.interfaces.NamingContext.<clinit>(NamingContext.java:162)
        at
org.jnp.interfaces.NamingContextFactory.getInitialContext(NamingContextFactory.java:69)
        at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
        at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
        at javax.naming.InitialContext.init(InitialContext.java:223)
        at javax.naming.InitialContext.<init>(InitialContext.java:175)
        at testejndi.TesteJNDI.main(TesteJNDI.java:29)
## END ERROR ##

## CODE ##

import java.util.logging.Level;
import java.util.logging.Logger;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;

/**
 *
 * @author pablolacerdademiranda
 */
public class TesteJNDI {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        System.setProperty("java.naming.factory.initial",
"org.jnp.interfaces.NamingContextFactory");
        System.setProperty("java.naming.factory.url.pkgs",
"org.jnp.interfaces");
        System.setProperty("java.naming.factory.provider.url", "localhost");
        try {

            Context ctx = new InitialContext();
        } catch (NamingException ex) {
            Logger.getLogger(TesteJNDI.class.getName()).log(Level.SEVERE,
null, ex);
        }
    }

}

##  END CODE ##

I'm using JBoss AS 5, Mac Os X Java "1.5.0_13" implementation, and imported
the libraries: jnp-client.jar, jboss-client.jar and jboss-common-core.jar of
jboss/client directory.
Someone has any ideia that what's wrong?

Thanks...

Att,

Pablo Lacerda de Miranda
Graduando Sistemas de Informação
Universidade Estadual de Montes Claros
pablolmiranda at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20080902/9778d612/attachment.html 


More information about the jboss-user mailing list