<div dir="ltr">Hi,<br><br>I'm having the problem below when I try to execute my java program:<br><br>## ERROR ##<br>Exception in thread "main" java.lang.NoClassDefFoundError: org/jboss/logging/Logger<br> at org.jnp.interfaces.NamingContext.<clinit>(NamingContext.java:162)<br>
at org.jnp.interfaces.NamingContextFactory.getInitialContext(NamingContextFactory.java:69)<br> at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)<br> at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)<br>
at javax.naming.InitialContext.init(InitialContext.java:223)<br> at javax.naming.InitialContext.<init>(InitialContext.java:175)<br> at testejndi.TesteJNDI.main(TesteJNDI.java:29)<br>## END ERROR ##<br>
<br>## CODE ##<br><br>import java.util.logging.Level;<br>import java.util.logging.Logger;<br>import javax.naming.Context;<br>import javax.naming.InitialContext;<br>import javax.naming.NamingException;<br><br>/**<br> *<br>
* @author pablolacerdademiranda<br> */<br>public class TesteJNDI {<br><br> /**<br> * @param args the command line arguments<br> */<br> public static void main(String[] args) {<br> System.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");<br>
System.setProperty("java.naming.factory.url.pkgs", "org.jnp.interfaces");<br> System.setProperty("java.naming.factory.provider.url", "localhost");<br> try {<br>
<br> Context ctx = new InitialContext();<br> } catch (NamingException ex) {<br> Logger.getLogger(TesteJNDI.class.getName()).log(Level.SEVERE, null, ex);<br> }<br> }<br><br>}<br><br clear="all">
## END CODE ##<br><br>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.<br>Someone has any ideia that what's wrong?<br>
<br>Thanks...<br><br>Att, <br><br>Pablo Lacerda de Miranda<br>Graduando Sistemas de Informação<br>Universidade Estadual de Montes Claros<br><a href="mailto:pablolmiranda@gmail.com">pablolmiranda@gmail.com</a><br>
</div>