smx-camel stream caching not working as expected
------------------------------------------------
Key: SMXCOMP-587
URL: https://issues.apache.org/activemq/browse/SMXCOMP-587
Project: ServiceMix Components
Issue Type: Bug
Components: servicemix-camel
Affects Versions: servicemix-camel-2009.02
Environment: smx-camel trunk configured to use camel-1.6.2-SNAPSHOT
Reporter: Ron Gavlin
Priority: Critical
smx-camel stream caching is no longer working as expected. A slightly revised
version of unit test
servicemix-camel\src\test\java\org\apache\servicemix\camel\JbiInOnlyWithErrorHandledTrueSpringDSLTest.java
is now failing. The generated smx log with only INFO-level logging enabled is
listed below. A patch with the revised unit test is attached to this issue.
INFO - SpringJbiTestSupport - Using temporary root directory
[C:\Temp\servicemix9303rootDir]
INFO - JBIContainer - ServiceMix 3.3 JBI Container
(ServiceMix) is starting
INFO - JBIContainer - For help or more information please
see: http://servicemix.apache.org/
INFO - ComponentMBeanImpl - Initializing component:
#SubscriptionManager#
INFO - DeploymentService - Restoring service assemblies
INFO - ComponentMBeanImpl - Initializing component:
ID:10.10.10.10-12273dd7020-0:0
INFO - ComponentMBeanImpl - Initializing component:
ID:10.10.10.10-12273dd7020-0:1
INFO - ComponentMBeanImpl - Initializing component:
ID:10.10.10.10-12273dd7020-0:2
INFO - ComponentMBeanImpl - Initializing component:
ID:10.10.10.10-12273dd7020-0:3
INFO - ComponentMBeanImpl - Initializing component:
ID:10.10.10.10-12273dd7020-0:4
WARN - ClientFactory - Cound not start ClientFactory:
javax.naming.NoInitialContextException: Need to specify class name in
environment or system property, or as an applet parameter, or in an application
resource file: java.naming.factory.initial
INFO - JBIContainer - ServiceMix JBI Container (ServiceMix)
started
WARN - AnnotationTypeConverterLoader - Ignoring converter type:
org.apache.activemq.camel.converter.ActiveMQMessageConverter as a dependent
class could not be found: java.lang.NoClassDefFoundError:
org/apache/camel/component/jms/JmsBinding
java.lang.NoClassDefFoundError: org/apache/camel/component/jms/JmsBinding
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
at java.lang.Class.getDeclaredMethods(Class.java:1791)
at
org.apache.camel.impl.converter.AnnotationTypeConverterLoader.loadConverterMethods(AnnotationTypeConverterLoader.java:147)
at
org.apache.camel.impl.converter.AnnotationTypeConverterLoader.load(AnnotationTypeConverterLoader.java:78)
at
org.apache.camel.impl.converter.DefaultTypeConverter.checkLoaded(DefaultTypeConverter.java:250)
at
org.apache.camel.impl.converter.DefaultTypeConverter.convertTo(DefaultTypeConverter.java:93)
at
org.apache.camel.impl.converter.DefaultTypeConverter.convertTo(DefaultTypeConverter.java:69)
at
org.apache.camel.util.CamelContextHelper.convertTo(CamelContextHelper.java:118)
at
org.apache.camel.component.bean.ConstantBeanHolder.<init>(ConstantBeanHolder.java:38)
at
org.apache.camel.component.bean.BeanProcessor.<init>(BeanProcessor.java:50)
at
org.apache.camel.component.bean.BeanProcessor.<init>(BeanProcessor.java:54)
at
org.apache.camel.component.bean.BeanComponent.createEndpoint(BeanComponent.java:55)
at
org.apache.servicemix.camel.CamelSpringDeployer.getServices(CamelSpringDeployer.java:108)
at
org.apache.servicemix.common.xbean.AbstractXBeanDeployer.deploy(AbstractXBeanDeployer.java:94)
at
org.apache.servicemix.camel.CamelSpringDeployer.deploy(CamelSpringDeployer.java:77)
at
org.apache.servicemix.common.BaseServiceUnitManager.doDeploy(BaseServiceUnitManager.java:88)
at
org.apache.servicemix.common.BaseServiceUnitManager.deploy(BaseServiceUnitManager.java:69)
at
org.apache.servicemix.camel.SpringJbiTestSupport.configureComponent(SpringJbiTestSupport.java:46)
at
org.apache.servicemix.camel.JbiTestSupport.setUp(JbiTestSupport.java:142)
at
org.apache.servicemix.camel.JbiInOnlyWithErrorHandledTrueSpringDSLTest.setUp(JbiInOnlyWithErrorHandledTrueSpringDSLTest.java:65)
at junit.framework.TestCase.runBare(TestCase.java:132)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: java.lang.ClassNotFoundException:
org.apache.camel.component.jms.JmsBinding
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 35 more
[Fatal Error] :-1:-1: Premature end of file.
[Fatal Error] :-1:-1: Premature end of file.
INFO - ComponentMBeanImpl - Initializing component:
ID:10.10.10.10-12273dd7020-0:5
INFO - ComponentMBeanImpl - Starting component:
ID:10.10.10.10-12273dd7020-0:5
ERROR - CamelJbiComponent - Error processing exchange InOnly[
id: ID:10.10.10.10-12273dd7020-10:0
status: Active
role: provider
service: {urn:test}error-handled-true
endpoint: camel10-10-10-10-12273dd7020-9-0
in: Unable to display: org.xml.sax.SAXParseException: Premature end of file.
]
org.apache.camel.RuntimeCamelException:
javax.xml.transform.TransformerException: org.xml.sax.SAXParseException:
Premature end of file.
at
org.apache.camel.util.ObjectHelper.invokeMethod(ObjectHelper.java:559)
at
org.apache.camel.impl.converter.InstanceMethodTypeConverter.convertTo(InstanceMethodTypeConverter.java:57)
at
org.apache.camel.impl.converter.DefaultTypeConverter.convertTo(DefaultTypeConverter.java:98)
at org.apache.camel.impl.MessageSupport.getBody(MessageSupport.java:65)
at org.apache.camel.impl.MessageSupport.getBody(MessageSupport.java:51)
at
org.apache.camel.processor.interceptor.StreamCachingInterceptor.process(StreamCachingInterceptor.java:74)
at
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:52)
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:41)
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:66)
at
org.apache.servicemix.camel.CamelProviderEndpoint.handleActiveProviderExchange(CamelProviderEndpoint.java:95)
at
org.apache.servicemix.camel.CamelProviderEndpoint.process(CamelProviderEndpoint.java:74)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:627)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:581)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(AsyncBaseLifeCycle.java:535)
at
org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(SyncLifeCycleWrapper.java:60)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:620)
at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)
at org.apache.servicemix.jbi.nmr.flow.st.STFlow.doSend(STFlow.java:49)
at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.send(AbstractFlow.java:123)
at
org.apache.servicemix.jbi.nmr.DefaultBroker.sendExchangePacket(DefaultBroker.java:283)
at
org.apache.servicemix.jbi.container.JBIContainer.sendExchange(JBIContainer.java:894)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:395)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:431)
at
org.apache.servicemix.client.DefaultServiceMixClient.send(DefaultServiceMixClient.java:148)
at
org.apache.servicemix.camel.JbiInOnlyWithErrorHandledTrueSpringDSLTest.testErrorHandledByExceptionClause(JbiInOnlyWithErrorHandledTrueSpringDSLTest.java:83)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: javax.xml.transform.TransformerException:
org.xml.sax.SAXParseException: Premature end of file.
at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:501)
at
org.apache.camel.converter.jaxp.XmlConverter.toResult(XmlConverter.java:130)
at
org.apache.camel.converter.jaxp.XmlConverter.toResult(XmlConverter.java:114)
at
org.apache.camel.converter.jaxp.XmlConverter.toString(XmlConverter.java:179)
at
org.apache.camel.converter.stream.StreamCacheConverter.convertToStreamCache(StreamCacheConverter.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.camel.util.ObjectHelper.invokeMethod(ObjectHelper.java:555)
... 43 more
Caused by: org.xml.sax.SAXParseException: Premature end of file.
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)
... 52 more
INFO - JBIContainer - Deactivating component
ID:10.10.10.10-12273dd7020-0:5
INFO - JBIContainer - ServiceMix JBI Container (ServiceMix)
stopping
INFO - JBIContainer - Shutting down ServiceMix JBI Container
(ServiceMix) stopped
INFO - JBIContainer - Waiting another 1000 ms for complete
shutdown of the components and service assemblies
INFO - JBIContainer - Components and service assemblies have
been shut down
INFO - JBIContainer - Deactivating component
#SubscriptionManager#
INFO - JBIContainer - ServiceMix JBI Container (ServiceMix)
stopped
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.