camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Walzer, Thomas" <thomas.wal...@integratix.net>
Subject Re: Ldap query exception
Date Mon, 28 Mar 2016 17:29:57 GMT
Please share your route.


> Am 28.03.2016 um 18:39 schrieb rburdet <rodrigo.burdet@semperti.com>:
> 
> Hi, im working on an application that needs to make a query to a ldap server.
> 
> My bean is :
>      <bean id="ldapserver" class="javax.naming.directory.InitialDirContext"
> scope="prototype">
>        <argument>
>            <props>
>                <prop key="java.naming.factory.initial"
> value="com.sun.jndi.ldap.LdapCtxFactory"/>
>                <prop key="java.naming.provider.url" value="${LDAP_URL}"/>
>                <prop key="java.naming.security.authentication"
> value="${LDAP_AUTHENTICATION}" />
>                <prop key="java.naming.security.principal" value="${LDAP_PRINCIPAL}"/>
>                <prop key="java.naming.security.credentials"
> value="${LDAP_CREDENTIALS}"/>
>                <prop key="java.naming.referral" value="follow"/>            
>            </props>
>        </argument>
>       </bean>    
> 
> The query im trying to achieve is: 
>        String queryLdap =
> "(&(objectClass=user)(sAMAccountName="+userName+")(memberOf="+OU+"))";
> 
> My ldap component in camel route : 
> <to uri="ldap:ldapserver?base=[[BASE_DN]]"/>
> 
> And the stacktrace of the exception is at the bottom.
> 
> I cannot find any clues to this issue. 
> Any help is appreciated.
> 
> 
> Stacktrace:
> ---------------------------------------------------------------------------------------------------------------------------------------
> javax.naming.PartialResultException [Root exception is
> javax.naming.NotContextException: Cannot create context for:
> ldap://DomainDnsZones.swm.com.ar/DC=DomainDnsZones,DC=swm,DC=com,DC=ar;
> remaining name 'DC=swm,DC=com,DC=ar']
>    at
> com.sun.jndi.ldap.LdapNamingEnumeration.hasMoreImpl(LdapNamingEnumeration.java:242)[:1.7.0_71]
>    at
> com.sun.jndi.ldap.LdapNamingEnumeration.hasMore(LdapNamingEnumeration.java:189)[:1.7.0_71]
>    at
> org.apache.camel.component.ldap.LdapProducer.simpleSearch(LdapProducer.java:101)[857:org.apache.camel.camel-ldap:2.12.0.redhat-610379]
>    at
> org.apache.camel.component.ldap.LdapProducer.process(LdapProducer.java:71)[857:org.apache.camel.camel-ldap:2.12.0.redhat-610379]
>    at
> org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)[151:org.apache.camel.camel-core:2.12.0.redhat-610379]
>    at
> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:110)[151:org.apache.camel.camel-core:2.12.0.redhat-610379]
>    at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)[151:org.apache.camel.camel-core:2.12.0.redhat-610379]
>    at
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)[151:org.apache.camel.camel-core:2.12.0.redhat-610379]
>    at
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[151:org.apache.camel.camel-core:2.12.0.redhat-610379]
>    at
> org.apache.camel.processor.Pipeline.process(Pipeline.java:118)[151:org.apache.camel.camel-core:2.12.0.redhat-610379]
>    at
> org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[151:org.apache.camel.camel-core:2.12.0.redhat-610379]
>    at
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[151:org.apache.camel.camel-core:2.12.0.redhat-610379]
>    at
> org.apache.camel.component.cxf.jaxrs.CxfRsInvoker.asyncInvoke(CxfRsInvoker.java:90)[214:org.apache.camel.camel-cxf:2.12.0.redhat-610379]
>    at
> org.apache.camel.component.cxf.jaxrs.CxfRsInvoker.performInvocation(CxfRsInvoker.java:57)[214:org.apache.camel.camel-cxf:2.12.0.redhat-610379]
>    at
> org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:104)[173:org.apache.cxf.cxf-api:2.7.0.redhat-610379]
>    at
> org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:205)[184:org.apache.cxf.cxf-rt-frontend-jaxrs:2.7.0.redhat-610379]
>    at
> org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:102)[184:org.apache.cxf.cxf-rt-frontend-jaxrs:2.7.0.redhat-610379]
>    at
> org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)[173:org.apache.cxf.cxf-api:2.7.0.redhat-610379]
>    at
> org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:94)[173:org.apache.cxf.cxf-api:2.7.0.redhat-610379]
>    at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)[173:org.apache.cxf.cxf-api:2.7.0.redhat-610379]
>    at
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)[173:org.apache.cxf.cxf-api:2.7.0.redhat-610379]
>    at
> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:355)[192:org.apache.cxf.cxf-rt-transports-http-jetty:2.7.0.redhat-610379]
>    at
> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:319)[192:org.apache.cxf.cxf-rt-transports-http-jetty:2.7.0.redhat-610379]
>    at
> org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:72)[192:org.apache.cxf.cxf-rt-transports-http-jetty:2.7.0.redhat-610379]
>    at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1088)[101:org.eclipse.jetty.aggregate.jetty-all-server:8.1.14.v20131031]
>    at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1024)[101:org.eclipse.jetty.aggregate.jetty-all-server:8.1.14.v20131031]
>    at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)[101:org.eclipse.jetty.aggregate.jetty-all-server:8.1.14.v20131031]
>    at
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)[101:org.eclipse.jetty.aggregate.jetty-all-server:8.1.14.v20131031]
>    at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)[101:org.eclipse.jetty.aggregate.jetty-all-server:8.1.14.v20131031]
>    at
> org.eclipse.jetty.server.Server.handle(Server.java:366)[101:org.eclipse.jetty.aggregate.jetty-all-server:8.1.14.v20131031]
>    at
> org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)[101:org.eclipse.jetty.aggregate.jetty-all-server:8.1.14.v20131031]
>    at
> org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:982)[101:org.eclipse.jetty.aggregate.jetty-all-server:8.1.14.v20131031]
>    at
> org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1043)[101:org.eclipse.jetty.aggregate.jetty-all-server:8.1.14.v20131031]
>    at
> org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)[101:org.eclipse.jetty.aggregate.jetty-all-server:8.1.14.v20131031]
>    at
> org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)[101:org.eclipse.jetty.aggregate.jetty-all-server:8.1.14.v20131031]
>    at
> org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)[101:org.eclipse.jetty.aggregate.jetty-all-server:8.1.14.v20131031]
>    at
> org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:667)[101:org.eclipse.jetty.aggregate.jetty-all-server:8.1.14.v20131031]
>    at
> org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)[101:org.eclipse.jetty.aggregate.jetty-all-server:8.1.14.v20131031]
>    at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)[101:org.eclipse.jetty.aggregate.jetty-all-server:8.1.14.v20131031]
>    at
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)[101:org.eclipse.jetty.aggregate.jetty-all-server:8.1.14.v20131031]
>    at java.lang.Thread.run(Thread.java:745)[:1.7.0_71]
> Caused by: javax.naming.NotContextException: Cannot create context for:
> ldap://DomainDnsZones.swm.com.ar/DC=DomainDnsZones,DC=swm,DC=com,DC=ar;
> remaining name 'DC=swm,DC=com,DC=ar'
>    at
> com.sun.jndi.ldap.LdapReferralContext.<init>(LdapReferralContext.java:141)[:1.7.0_71]
>    at
> com.sun.jndi.ldap.LdapReferralException.getReferralContext(LdapReferralException.java:150)[:1.7.0_71]
>    at
> com.sun.jndi.ldap.LdapNamingEnumeration.hasMoreReferrals(LdapNamingEnumeration.java:357)[:1.7.0_71]
>    at
> com.sun.jndi.ldap.LdapNamingEnumeration.hasMoreImpl(LdapNamingEnumeration.java:226)[:1.7.0_71]
> 
> 
> 
> 
> 
> 
> --
> View this message in context: http://camel.465427.n5.nabble.com/Ldap-query-exception-tp5779904.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message