activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Darren Davison (JIRA)" <j...@apache.org>
Subject [jira] Reopened: (AMQ-2488) Unable to access Serializable class when receiving ObjectMessage in OSGi environment
Date Mon, 19 Apr 2010 08:09:14 GMT

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

Darren Davison reopened AMQ-2488:
---------------------------------


I still appear to get similar issues even with the dynamic import in the manifest:


21:35:46,565 | ERROR | tenerContainer-2 | EndpointMessageListener          | rg.apache.camel.processor.Logger
 248 | Caused by: [org.apache.camel.RuntimeCamelException - Failed to extract body due to:
javax.jms.JMSException: Failed to build body from content. Serializable class not available
to broker. Reason: java.lang.ClassNotFoundException: org.apache.log4j.spi.LoggingEvent. Message:
ActiveMQObjectMessage {commandId = 5, responseRequired = true, messageId = ID:hepburn-51431-1271622946297-0:0:1:1:1,
originalDestination = null, originalTransactionId = null, producerId = ID:hepburn-51431-1271622946297-0:0:1:1,
destination = topic://logTopic, transactionId = null, expiration = 0, timestamp = 1271622946535,
arrival = 0, brokerInTime = 1271622946538, brokerOutTime = 1271622946539, correlationId =
null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence
= 0, targetConsumerId = null, compressed = false, userID = null, content = org.apache.activemq.util.ByteSequence@13bef50,
marshalledProperties = null, dataStructure = null, redeliveryCounter = 0, size = 0, properties
= null, readOnlyProperties = true, readOnlyBody = true, droppable = false}]
org.apache.camel.RuntimeCamelException: Failed to extract body due to: javax.jms.JMSException:
Failed to build body from content. Serializable class not available to broker. Reason: java.lang.ClassNotFoundException:
org.apache.log4j.spi.LoggingEvent. Message: ActiveMQObjectMessage {commandId = 5, responseRequired
= true, messageId = ID:hepburn-51431-1271622946297-0:0:1:1:1, originalDestination = null,
originalTransactionId = null, producerId = ID:hepburn-51431-1271622946297-0:0:1:1, destination
= topic://logTopic, transactionId = null, expiration = 0, timestamp = 1271622946535, arrival
= 0, brokerInTime = 1271622946538, brokerOutTime = 1271622946539, correlationId = null, replyTo
= null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId
= null, compressed = false, userID = null, content = org.apache.activemq.util.ByteSequence@13bef50,
marshalledProperties = null, dataStructure = null, redeliveryCounter = 0, size = 0, properties
= null, readOnlyProperties = true, readOnlyBody = true, droppable = false}
	at org.apache.camel.component.jms.JmsBinding.extractBodyFromJms(JmsBinding.java:158)
	at org.apache.camel.component.jms.JmsMessage.createBody(JmsMessage.java:183)
	at org.apache.camel.impl.MessageSupport.getBody(MessageSupport.java:42)
	at org.apache.camel.impl.DefaultUnitOfWork.<init>(DefaultUnitOfWork.java:60)
	at org.apache.camel.processor.UnitOfWorkProcessor.processNext(UnitOfWorkProcessor.java:56)
	at org.apache.camel.processor.DelegateProcessor.process(DelegateProcessor.java:48)
	at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
	at org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:84)
	at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:543)
	at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:482)
	at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:451)
	at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:323)
	at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:261)
	at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:982)
	at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:974)
	at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:876)
	at java.lang.Thread.run(Thread.java:619)
Caused by: javax.jms.JMSException: Failed to build body from content. Serializable class not
available to broker. Reason: java.lang.ClassNotFoundException: org.apache.log4j.spi.LoggingEvent
	at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
	at org.apache.activemq.command.ActiveMQObjectMessage.getObject(ActiveMQObjectMessage.java:179)
	at org.apache.camel.component.jms.JmsBinding.extractBodyFromJms(JmsBinding.java:125)
	... 16 more
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.spi.LoggingEvent
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:468)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:398)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:247)
	at org.apache.activemq.util.ClassLoadingAwareObjectInputStream.load(ClassLoadingAwareObjectInputStream.java:63)
	at org.apache.activemq.util.ClassLoadingAwareObjectInputStream.resolveClass(ClassLoadingAwareObjectInputStream.java:37)
	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575)
	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
	at org.apache.activemq.command.ActiveMQObjectMessage.getObject(ActiveMQObjectMessage.java:177)
	... 17 more


> Unable to access Serializable class when receiving ObjectMessage in OSGi environment
> ------------------------------------------------------------------------------------
>
>                 Key: AMQ-2488
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2488
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.3.0
>            Reporter: Darren Davison
>            Assignee: Dejan Bosanac
>             Fix For: 5.3.1, 5.4.0
>
>         Attachments: amq-error.log, amq-headers.log, SMX4-424.diff
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message