LDAP BindRequest class not found error

Hi Apigeeks,

I am having this problem in private-cloud installation where I have uploaded the unboundid.jar for LDAP unboundid sdk both at organization as well as environment level. Still my LDAP policy is throwing this error.

java.lang.NoClassDefFoundError: com/unboundid/ldap/sdk/BindRequest
        at com.apigee.messaging.runtime.ExternalLdapConnectionFactory.getConnectionProvider(ExternalLdapConnectionFactory.java:38) ~[message-processor-1.0.0.jar:na]
        at com.apigee.steps.ldap.LdapStepExecution.execute(LdapStepExecution.java:52) ~[ldap-1.0.0.jar:na]
        at com.apigee.messaging.runtime.steps.StepExecution.execute(StepExecution.java:146) ~[message-processor-1.0.0.jar:na]
        at com.apigee.flow.execution.AbstractAsyncExecutionStrategy$AsyncExecutionTask.call(AbstractAsyncExecutionStrategy.java:74) ~[message-flow-1.0.0.jar:na]
        at com.apigee.flow.execution.AbstractAsyncExecutionStrategy$AsyncExecutionTask.call(AbstractAsyncExecutionStrategy.java:45) ~[message-flow-1.0.0.jar:na]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_121]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_121]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_121]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_121]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_121]
        at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121]
Caused by: java.lang.ClassNotFoundException: com.unboundid.ldap.sdk.BindRequest
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_121]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_121]
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) ~[na:1.8.0_121]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_121]
        ... 11 common frames omitted

There was a similar question but there they did not have jar files added to organization or environment level.

Any help is appritiated.

Solved Solved
1 4 710
1 ACCEPTED SOLUTION

Hi All,

Found the cause of this. The problem is apigee looks for jar resources from "org, env or proxy" only when they are referenced in Java callouts. Sine LDAP connection provider is not having a resource reference as that of java callout it was not getting resolved to any jar file.

For this you need to add "unboundid.jar" to third party libs at /opt/apigee/edge-gateway<version>/lib/thirdparty.

Once added just restart your Message processors for this file to get loaded in classpath.

Cheers!

View solution in original post

4 REPLIES 4

Hi All,

Found the cause of this. The problem is apigee looks for jar resources from "org, env or proxy" only when they are referenced in Java callouts. Sine LDAP connection provider is not having a resource reference as that of java callout it was not getting resolved to any jar file.

For this you need to add "unboundid.jar" to third party libs at /opt/apigee/edge-gateway<version>/lib/thirdparty.

Once added just restart your Message processors for this file to get loaded in classpath.

Cheers!

@docs, Could you add this information as part of the 'LDAP-Policy' documentation.

Thanks @rdoda

I added a section to the LDAP policy doc here.

Stephen

Awesome, Thank you @sgilson