Hi all,
i have openldap running on my RedHat 7.2 linux box and i'm trying to get jboss to bind the ldap tree to the JNDI tree. I've read the documentation found at this link http://www.jboss.org/online-manual/HTML/ch13s126.html and i've tried applying the method to 3.0RC2. However, i keep getting javax.naming.AuthenticationException: [LDAP: error code 49 - Invalid Credentials] see bottom for more of the exception what am i missing - do i have to set up an LDAPRealm in the login-config.xml any help would be appreciated, Colin. <more info> it's been a bit of trial and error but here is where I've tried ... here are the contents of a file called ldap-sevice.xml which i created in $JBOSS_HOME/server/default/deploy <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE server> <server> <classpath codebase="lib" archives="jboss.jar"/> <!-- ========================================================== --> <!-- LDAP Service --> <!-- ========================================================== --> <mbean code="org.jboss.naming.ExternalContext" name="DefaultDomain:service=ExternalContext,jndiName=external/ldap/colin" > <attribute name="JndiName">external/ldap/colin</attribute> <attribute name="Properties">file:///home/colin/colin_ldap.properties</attribute> <attribute name="InitialContext">javax.naming.ldap.InitialLdapContext</attribute> <attribute name="RemoteAccess">true</attribute> </mbean> </server> --------- here are the contents of /home/colin/colin_ldap.properties --- java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory java.naming.provider.url=ldap://localhost:389/o=UnderCoverWear Collection java.naming.security.principal=cn=Colin Daly java.naming.security.authentication=simple java.naming.security.credentials=secret ------------------------------------------------------------------------ here is some of the output from the jboss console when i touch the ldap-service.xml 11:24:45,547 ERROR [MainDeployer] Couldn't deploy URL file:/home/colin/apps/jboss/jboss-3.0.0RC2/server/default/deploy/ldap-service.xml 11:24:45,548 ERROR [STDERR] java.lang.reflect.InvocationTargetException 11:24:45,548 ERROR [STDERR] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 11:24:45,548 ERROR [STDERR] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) 11:24:45,549 ERROR [STDERR] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) 11:24:45,549 ERROR [STDERR] at java.lang.reflect.Constructor.newInstance(Constructor.java:274) 11:24:45,549 ERROR [STDERR] at org.jboss.naming.ExternalContext$SerializableInitialContext.newLdapContext(ExternalContext.java:380) 11:24:45,549 ERROR [STDERR] at org.jboss.naming.ExternalContext$SerializableInitialContext.newContext(ExternalContext.java:359) 11:24:45,549 ERROR [STDERR] at org.jboss.naming.ExternalContext$SerializableInitialContext.newContext(ExternalContext.java:345) 11:24:45,549 ERROR [STDERR] at org.jboss.naming.ExternalContext.rebind(ExternalContext.java:189) 11:24:45,549 ERROR [STDERR] at org.jboss.naming.ExternalContext.startService(ExternalContext.java:153) 11:24:45,549 ERROR [STDERR] at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:162) 11:24:45,550 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 11:24:45,550 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 11:24:45,550 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 11:24:45,550 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:324) 11:24:45,550 ERROR [STDERR] at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284) 11:24:45,550 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491) 11:24:45,550 ERROR [STDERR] at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:867) 11:24:45,550 ERROR [STDERR] at $Proxy0.start(Unknown Source) 11:24:45,550 ERROR [STDERR] at org.jboss.system.ServiceController.start(ServiceController.java:341) 11:24:45,567 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source) 11:24:45,567 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 11:24:45,567 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:324) 11:24:45,567 ERROR [STDERR] at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284) 11:24:45,567 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491) 11:24:45,567 ERROR [STDERR] at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174) 11:24:45,567 ERROR [STDERR] at $Proxy3.start(Unknown Source) 11:24:45,567 ERROR [STDERR] at org.jboss.deployment.SARDeployer.start(SARDeployer.java:281) 11:24:45,568 ERROR [STDERR] at org.jboss.deployment.MainDeployer.start(MainDeployer.java:692) 11:24:45,568 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:527) 11:24:45,568 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:490) 11:24:45,568 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source) 11:24:45,568 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 11:24:45,568 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:324) 11:24:45,569 ERROR [STDERR] at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284) 11:24:45,569 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491) 11:24:45,569 ERROR [STDERR] at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174) 11:24:45,569 ERROR [STDERR] at $Proxy4.deploy(Unknown Source) 11:24:45,569 ERROR [STDERR] at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:405) 11:24:45,569 ERROR [STDERR] at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:515) 11:24:45,569 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:202) 11:24:45,569 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191) 11:24:45,570 ERROR [STDERR] Caused by: javax.naming.AuthenticationException: [LDAP: error code 49 - Invalid Credentials] 11:24:45,570 ERROR [STDERR] at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:2864) 11:24:45,570 ERROR [STDERR] at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2810) 11:24:45,570 ERROR [STDERR] at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2611) 11:24:45,570 ERROR [STDERR] at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2525) 11:24:45,570 ERROR [STDERR] at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:263) 11:24:45,570 ERROR [STDERR] at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:76) 11:24:45,570 ERROR [STDERR] at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662) 11:24:45,570 ERROR [STDERR] at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243) 11:24:45,571 ERROR [STDERR] at javax.naming.InitialContext.init(InitialContext.java:219) 11:24:45,571 ERROR [STDERR] at javax.naming.ldap.InitialLdapContext.<init>(InitialLdapContext.java:130) _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user