karafman wrote: > > Ok, what is bundle 202? > > > shekarpcs wrote: >> >> Karaf is 2.1.3 >> Jdk 1.5 >> >> >> I am using this as part of Servicemix. >> > Wow, talk about me making this harder than it needs to be! First things first, karaf is complaining that it can't find something that bundle_id 202 (ldap-module.jar): Caused by: java.lang.ClassNotFoundException: org.apache.karaf.jaas.modules.ldap.LDAPLoginModule not found by ldap-module.xml [202]
This can be caused by a couple of things: first the package may not be available for wiring (usually this will throw a different exception, but for the sake of completeness, I'll explain how to fix this, or secondly the code in ldap-module.jar may be using this but it may not be being imported (wired). First, check that the package is available inside of karaf: karaf@root: exports | grep org.apache.karaf.jaas.modules.ldap If that returns at least one response which only has that package, its available for wiring. Please note, it may be that sub-packages are available, but not that specific package. If that's the case, they there's something wrong with the containing bundle's exports. If nothing is returned, then you'll need to find the bundle containing this functionality, and deploy it into Karaf. Now, assuming that package is available inside of Karaf, the problem is likely that your bundle simply isn't asking Karaf to wire to it. To verify this, open ldap-module.jar, and open the resources/META-INF/MANIFEST.MF file. In that file, you'll see a section called Import-Package:. The org.apache.karaf.jaas.modules.ldap package should be listed there. If it isnt', then you've found your bundle's issue! Woo hoo! Go celebrate! To fix this, you'll need to go to your pom.xml file for ldap-module.jar. In it you should have an entry for maven-bundle-plugin. In that area, inside of configurations, and then inside of instructions, you should find an section. Add this package into that section, recompile, deploy and start the bundle. Now, the maven-bundle-plugin does a lot of heavy lifting for you as it creates your MANIFEST.MF file. It does this by scanning all of the compiled code (classfiles) and adding everything that's imported to your Import-Package section, as long as the imported package isn't already in your bundle. However, it won't go into your resources directory to pull out stuff. Now, I'm assuming you're configuring org.apache.karaf.jaas.modules.ldap.LDAPLoginModule in a spring or blueprint file inside of the resources directory. If that's the case, the bundle plugin won't find those and you'll get that error your'e getting. Please let me know if that helps or if you have any questions! ----- Karafman Slayer of the JEE Pounder of the Perl Programmer -- View this message in context: http://karaf.922171.n3.nabble.com/LDAPLoginModule-class-not-found-org-apache-karaf-jaas-modules-ldap-LDAPLoginModule-tp2676891p2677263.html Sent from the Karaf - User mailing list archive at Nabble.com.
