6 Replies Latest reply on Sep 27, 2002 5:06 AM by Mikkel Heisterberg

    InitialLdapContext use in MBean

    Mikkel Heisterberg Newbie

      Hi, all. I have cloned the MailService MBean to create a LDAPService MBean to provice me with an InitialLdapContext for doing LDAP operations. The MBean compile fine, but when loading I get a ClassNotFoundException for the factory class used. I have placed the ldap.jar from Sun in lib\ext and can verify that the MLET puts the jar on the classpath.

      The stacktrace (the LdapService class is the one I'm developing):
      java.lang.ClassNotFoundException: "com/sun/jndi/ldap/LdapCtxFactory"
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Unknown Source)
      at com.sun.naming.internal.VersionHelper12.loadClass(Unknown Source)
      at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
      at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
      at javax.naming.InitialContext.init(Unknown Source)
      at javax.naming.ldap.InitialLdapContext.(Unknown Source)
      at dk.itinspiration.jboss.mbeans.ldap.LdapService.startService(Unknown Source)
      at org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.java:103)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.configuration.ConfigurationService$ServiceProxy.invoke(ConfigurationService.java:967)
      at $Proxy0.start(Unknown Source)
      at org.jboss.util.ServiceControl.start(ServiceControl.java:79)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.Main.(Main.java:208)
      at org.jboss.Main$1.run(Main.java:110)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.jboss.Main.main(Main.java:106)

      Anyone with ideas ?

      Thanx,

      lekkim