You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2013/07/23 09:20:57 UTC

[jira] [Resolved] (CAMEL-6459) ReplyManager holds a reference to the first calling Bundle classloader

     [ https://issues.apache.org/jira/browse/CAMEL-6459?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-6459.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 2.12.0
                   2.11.2
                   2.10.7

Thanks for reporting.
                
> ReplyManager holds a reference to the first calling Bundle classloader
> ----------------------------------------------------------------------
>
>                 Key: CAMEL-6459
>                 URL: https://issues.apache.org/jira/browse/CAMEL-6459
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-jms
>    Affects Versions: 2.10.4
>         Environment: Apache karaf 2.3.1
>            Reporter: Hauke Rabe
>            Assignee: Claus Ibsen
>             Fix For: 2.10.7, 2.11.2, 2.12.0
>
>
> h3. Source
> The initialization of the ReplyManager is triggerd by the first processInOut method call at the JmsProducer.
> The concrete instance of the ReplyManager creates on startup an AbstractMessageListenerContainer. The concrete listener container is generally a DefaultMessageListenerContainer which starts a new AsyncMessageListenerInvoker Thread. 
> h3. OSGI Scenario
> In an osgi envrironment this AsyncMessageListenerInvoker Thread has a class loader reference to the bundle who is triggerd by the first processInOut method call at the JmsProducer.
> Let the calling bundle (A) be another bundle as bundle (B) which contains the JmsProducer the AsyncMessageListenerInvoker Thread holds a class loader reference to bundle (A).
> Scenario:
> * Bundle (A) calls a java service of Bundle (B) 
> * Bundle (B) sends a jms message
> * Bundle (B) receives a response of the jms message
> * Bundle (B) returns the java service call to Bundle (A)
> h3. Problem
> At this point everything is alright but when Bundle (A) is undeployed and another Bundle (C) calls a java service of Bundle (B) the AsyncMessageListenerInvoker Thread has a class loader problem.
> h3. StackTrace
> BundleImpl.loadClass(String) line: 926
> BundleClassLoader.findClass(String) line: 176
> BundleClassLoader.loadClass(String, boolean) line: 194
> BundleClassLoader(ClassLoader).loadClass(String) line: 248
> Class<T>.forName0(String, boolean, ClassLoader) line: not available [native method]
> Class<T>.forName(String, boolean, ClassLoader) line: 247
> ClassLoadingAwareObjectInputStream.load(String, ClassLoader...) line: 77
> ClassLoadingAwareObjectInputStream.resolveClass(ObjectStreamClass) line: 46
> ClassLoadingAwareObjectInputStream(ObjectInputStream).readNonProxyDesc(boolean) line: 1574
> ClassLoadingAwareObjectInputStream(ObjectInputStream).readClassDesc(boolean) line: 1495
> ClassLoadingAwareObjectInputStream(ObjectInputStream).readOrdinaryObject(boolean) line: 1731
> ClassLoadingAwareObjectInputStream(ObjectInputStream).readObject0(boolean) line: 1328
> ClassLoadingAwareObjectInputStream(ObjectInputStream).readObject() line: 350
> ActiveMQObjectMessage.getObject() line: 185
> ActiveMQObjectMessage.toString() line: 226
> MessageFormatter.safeObjectAppend(StringBuffer, Object) line: 304
> MessageFormatter.deeplyAppendParameter(StringBuffer, Object, Map) line: 276
> MessageFormatter.arrayFormat(String, Object[]) line: 230
> MessageFormatter.format(String, Object, Object) line: 152
> Slf4jLogger.debug(String, Object, Object) line: 300
> PersistentQueueReplyManager(ReplyManagerSupport).onMessage(Message) line: 110
> ExclusivePersistentQueueMessageListenerContainer(AbstractMessageListenerContainer).doInvokeListener(MessageListener, Message) line: 560
> ExclusivePersistentQueueMessageListenerContainer(AbstractMessageListenerContainer).invokeListener(Session, Message) line: 498
> ExclusivePersistentQueueMessageListenerContainer(AbstractMessageListenerContainer).doExecuteListener(Session, Message) line: 467
> ExclusivePersistentQueueMessageListenerContainer(AbstractPollingMessageListenerContainer).doReceiveAndExecute(Object, Session, MessageConsumer, TransactionStatus) line: 325
> ExclusivePersistentQueueMessageListenerContainer(AbstractPollingMessageListenerContainer).receiveAndExecute(Object, Session, MessageConsumer) line: 263
> DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener() line: 1058
> DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop() line: 1050
> DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run() line: 947
> Thread.run() line: 662 
> h3. JMS Error
> <suppressedExceptions class="java.util.Collections$UnmodifiableRandomAccessList" resolves-to="java.util.Collections$UnmodifiableList"><c class="list"/><list reference="../c"/></suppressedExceptions><undeclaredThrowable class="org.apache.camel.InvalidPayloadException"><detailMessage>No body available of type: TransactionServiceResponse but has value: [B@7b9554f9 of type: byte[] on: Message: &lt;?xml version='1.0' encoding='UTF-8'?>&lt;org.apache.camel.component.bean.BeanInvocation>&

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira