Hi,

Myself I'm testing stopping Apache ServiceMix Naming (1.1.0.fuse) bundle.
That made it work for me, but I don't know what are the consequences of
doing that. Everything else seems to work fine.

I created a new thread at
http://fusesource.com/forums/thread.jspa?threadID=1435 to get some feedback
about this. 

-Marcel


skarootz wrote:
> 
> Hi, i'm receiving the same problem, I don't understand exactly that about
> servicemix intercepting the InitialContext created and inserting an
> InititalContextWrapper?
> 
> Is there a simple solution for this?
> 
> 
> Dan Salt wrote:
>> 
>> Hi,
>> 
>> I'm trying to get LDAP working in Camel via ServiceMix 4. However, I get
>> an exception when trying to use the "search" method against the LDAP
>> "DirContext" object (obtained either using the Camel ProducerTemplate, or
>> directly in code). 
>> 
>> I have diagnosed the problem via debugging, and have sourced the problem
>> to servicemix.naming.InitialContextWrapper. When the LDAP InitialContext
>> is created, Servicemix is internally intercepting this and inserting an
>> InitialContextWrapper instead.
>> 
>> This InitialContextWrapper extends InitialContext, not DirContext, and so
>> when the Java LDAP classes try to execute the "search(...)" method, it
>> checks to see if the Default Context is an instanceof "DirContext", which
>> it isn't, and throws an exception.
>> 
>> 22:42:14,203 | WARN  | enerContainer-43 | EndpointMessageListener         
>> | nent.jms.EndpointMessageListener   98 |
>> Endpoint[activemq:queue:spf-jms-endpoint] consumer caught an exception
>> while processing JMS message: ActiveMQTextMessage {commandId = 8,
>> responseRequired = true, messageId =
>> ID:saltda-cbg-3684-1246329564484-0:0:2:1:1, originalDestination = null,
>> originalTransactionId = null, producerId =
>> ID:saltda-cbg-3684-1246329564484-0:0:2:1, destination =
>> queue://spf-jms-endpoint, transactionId = null, expiration =
>> 1246329584875, timestamp = 1246329564875, arrival = 0, brokerInTime =
>> 1246329564875, brokerOutTime = 1246329564875, correlationId =
>> ID-saltda-cbg/3683-1246329563750/3-0, replyTo =
>> temp-queue://ID:saltda-cbg-3684-1246329564484-0:0:1, persistent = true,
>> type = null, priority = 4, groupID = null, groupSequence = 0,
>> targetConsumerId = null, compressed = false, userID = null, content =
>> null, marshalledProperties = org.apache.activemq.util.byteseque...@5faa7,
>> dataStructure = null, redeliveryCounter = 0, size = 0, properties =
>> {SPF_SERVICE_NAME=http://spf.sse.ge/ExampleObjectService/GetObjectValue},
>> readOnlyProperties = true, readOnlyBody = true, droppable = false, text =
>> <?xml version="1.0" encoding="UTF-8" standalo...ObjectValue>}
>> org.apache.camel.RuntimeCamelException: javax.naming.NotContextException:
>> Not an instance of DirContext
>>      at
>> org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:845)
>>      at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:138)
>>      at
>> org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:101)
>>      at
>> org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:105)
>>      at
>> org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:121)
>>      at
>> org.apache.camel.impl.DefaultProducerTemplate.requestBody(DefaultProducerTemplate.java:201)
>>      at ge.sse.spf.spf_core_eips.ServiceLookup.process(ServiceLookup.java:38)
>> 
>> Please can anyone advise how to get around this - as it's a total
>> show-stopper for me. My only option is to run all my Camel routes OUTSIDE
>> of Servicemix, which isn't the solution I want.
>> 
>> Many thanks,
>> Dan Salt
>> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/ServiceMix-InitialContextWrapper-breaks-LDAP-Requests-tp24266066p26421437.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to