6 Replies Latest reply on Nov 20, 2014 11:34 AM by muhammad.aslam

    ApacheDs LDAP Jar problem in Camel Route

    muhammad.aslam

      Hello,I am facing problem in calling LDAP from camel route. I have created a web service which communicates with LDAP, I am using that web service in blueprint route file. If i run camel route by right clicking and selecting run as camel context without test it run fine and i am able to access web service from rest client. But when i deploy it to JBOSS FUSE using hot deployment it gives following error in starting bundle. Complete stack trace is as follow

       

      POM file is also attached.

       

        • 1. Re: ApacheDs LDAP Jar problem in Camel Route
          bharadwaj

          wrap apache LDAP dependency into karaf should solve the problem.

           

          On Thu, Nov 20, 2014 at 4:21 PM, Muhammad Aslam <do-not-reply@jboss.com>

          1 of 1 people found this helpful
          • 2. Re: ApacheDs LDAP Jar problem in Camel Route
            muhammad.aslam

            Hi, I am beginner in JBOSS FUSE can you please guide me or provide any link on how to wrap apache ldap dependency into karaf.

            • 3. Re: ApacheDs LDAP Jar problem in Camel Route
              davsclaus

              Do you add any special Camel component or other Maven depdedency to your source code project, eg in the pom.xml file?

               

              In JBoss Fuse you would need to install those components as well, for example if you use a new Camel component such as camel-ldap then you need to install it with

               

              features:install camel-ldap

               

              Before you install your own application.

              • 4. Re: ApacheDs LDAP Jar problem in Camel Route
                muhammad.aslam

                <dependency>

                  <groupId>org.apache.directory.api</groupId>

                  <artifactId>apache-ldap-api</artifactId>

                  <version>1.0.0-M25</version>

                  <type>pom</type>

                </dependency>

                 

                this is the dependency i added in pom.xml. I am using apacheds ldap api to communicate with remote ldap server for authentication from java api.

                for more details this is what i see in jboss fuse web console under OSGI section my bundle

                 

                Imported Packages

                 

                 

                 

                The following optional imports were not satisfied:

                javax.ws.rs

                 

                org.apache.directory.api.ldap.model.entry

                org.apache.directory.api.ldap.model.message

                org.apache.directory.api.ldap.model.message.controls

                org.apache.directory.api.ldap.model.name

                org.apache.directory.ldap.client.api

                org.codehaus.jettison.json

                org.osgi.service.blueprint

                 

                 

                Exported Packages

                 

                 

                com.saanga.camel.services.endpoints

                 

                com.saanga.camel.services.ldap

                • 5. Re: ApacheDs LDAP Jar problem in Camel Route
                  davsclaus

                  You need to install an OSGi bundle that has that Apache LDAP api you use.

                   

                  From the pom above it looks like its the api-all JAR that has it

                   

                    <groupId>org.apache.directory.api</groupId>

                      <artifactId>api-all</artifactId>

                      <version>1.0.0-M25</version>

                   

                  You can try install it in JBoss Fuse using wrap as its not an OSGi bundle

                   

                  osgi:install -s wrap:mvn:org.apache.directory.api/api-all/1.0.0-M25

                  • 6. Re: ApacheDs LDAP Jar problem in Camel Route
                    muhammad.aslam

                    Thanks it worked, great relief for me after spending two days in this issue.