You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Edstrom Johan (JIRA)" <ji...@apache.org> on 2011/06/24 07:02:47 UTC

[jira] [Commented] (AMQ-2488) Unable to access Serializable class when receiving ObjectMessage in OSGi environment

    [ https://issues.apache.org/jira/browse/AMQ-2488?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13054240#comment-13054240 ] 

Edstrom Johan commented on AMQ-2488:
------------------------------------

Have confirmed the same on a 5.5 embedded in servicemix 4.0, possible to 
workaround by doing the serialization yourself and making sure that mapJmsMessage=false in camel.

The problem is in :

https://svn.apache.org/repos/asf/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/ClassLoadingAwareObjectInputStream.java

Will try to get a patch together against a 5.5 release.

> Unable to access Serializable class when receiving ObjectMessage in OSGi environment
> ------------------------------------------------------------------------------------
>
>                 Key: AMQ-2488
>                 URL: https://issues.apache.org/jira/browse/AMQ-2488
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.3.0
>            Reporter: Darren Davison
>            Assignee: Dejan Bosanac
>             Fix For: 5.6.0
>
>         Attachments: SMX4-424.diff, amq-error.log, amq-headers.log
>
>
> I have configured applications to use Log4J's JMSAppender in order to log messages on a queue as follows;
> {noformat}
> log4j.appender.jms=org.apache.log4j.net.JMSAppender
> log4j.appender.jms.InitialContextFactoryName=org.apache.activemq.jndi.ActiveMQInitialContextFactory
> log4j.appender.jms.ProviderURL=tcp://localhost:61616
> log4j.appender.jms.TopicBindingName=logTopic
> log4j.appender.jms.TopicConnectionFactoryBindingName=ConnectionFactory
> {noformat}
> Each application logging statement adds a new message to topic://logTopic on the broker.  I have a bundle deployed that attempts to route the messages from this topic with camel;
> {code}
> from("activemq:topic:logTopic")
>   .convertBodyTo(String.class)
>   .to("log:foo?level=DEBUG&showProperties=true&showHeaders=true");
> {code}
> When using servicemix 4 (Fuse 4.1.0.4), a stack trace is seen with the following message (enhanced using felix.log.level=4);
> {noformat}Caused by: java.lang.ClassNotFoundException: *** Class 'org.apache.log4j.spi.LoggingEvent' 
> was not found because bundle 56 does not import 'org.apache.log4j.spi' even though bundle 84 
> does export it. To resolve this issue, add an import for 'org.apache.log4j.spi' to bundle 56. ***
> {noformat}
> Bundles as follows;
> {noformat}smx@root:/> osgi/list|grep 56
> [  56] [Active     ] [       ] [   60] activemq-core (5.3.0.fuse)
> smx@root:/> osgi/list|grep 84
> [  84] [Active     ] [       ] [    8] OPS4J Pax Logging - API (1.3.0)
> {noformat}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira