The error went away and the test files were copied from poller directory to
sender directory. I am seeing "ERROR - FileComponent -
java.lang.IllegalMonitorStateException" on the console but files are copied
successfully. Thank you for your help!
Best Regards,
Anna


Gert Vanthienen wrote:
> 
> L.S.,
> 
> No, any XML file should do.  Could you try actually something beyond the 
> PI in your XML file?  Something like <?xml version="1.0" 
> encoding="UTF-8"?><message>my message</message>
> I suspect not having a root element at all gives problems when a parser 
> tries to read it.
> 
> Regards,
> 
> Gert
> 
> asilchenko wrote:
>> Gert,
>> Thank you for your response. It's good to know the issue is being worked
>> on. 
>> After commenting the line in servicemix.xml, getting a different error.
>> Please see trace below. My test file is called file.xml and it has a
>> single
>> line: <?xml version="1.0" encoding="UTF-8"?>. Do you know whether certain
>> file format is expected?
>>
>> INFO  - ServiceAssemblyLifeCycle       - Starting service assembly:
>> tutorial-sa
>> INFO  - ServiceUnitLifeCycle           - Initializing service unit:
>> tutorial-file-su
>> INFO  - ServiceUnitLifeCycle           - Starting service unit:
>> tutorial-file-su
>> [Fatal Error] :-1:-1: Premature end of file.
>> ERROR - FileComponent                  - Error processing exchange
>> InOnly[
>>   id: ID:155.34.142.122-11d29e8104f-16:0
>>   status: Active
>>   role: provider
>>   service: {urn:servicemix:tutorial}file
>>   endpoint: sender
>>   in: Unable to display: java.io.IOException: Stream closed
>> ]
>> javax.jbi.messaging.MessagingException:
>> javax.xml.transform.TransformerException: org.xml.sax.SAXParseException:
>> Premature end of file.
>>         at
>> org.apache.servicemix.components.util.DefaultFileMarshaler.writeMessageContent(DefaultFileMarshaler.java:154)
>>         at
>> org.apache.servicemix.components.util.DefaultFileMarshaler.writeMessage(DefaultFileMarshaler.java:83)
>>         at
>> org.apache.servicemix.file.FileSenderEndpoint.processInOnly(FileSenderEndpoint.java:86)
>>         at
>> org.apache.servicemix.common.endpoints.ProviderEndpoint.process(ProviderEndpoint.java:100)
>>         at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:540)
>>         at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:492)
>>         at
>> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
>>         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.seda.SedaFlow.doRouting(SedaFlow.java:167)
>>         at
>> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
>>         at
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
>>         at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
>>         at java.lang.Thread.run(Thread.java:619)
>> 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.servicemix.jbi.jaxp.SourceTransformer.toResult(SourceTransformer.java:125)
>>         at
>> org.apache.servicemix.components.util.DefaultFileMarshaler.writeMessageContent(DefaultFileMarshaler.java:152)
>>         ... 13 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)
>>         ... 15 more
>> ERROR - FileComponent                  -
>> java.lang.IllegalMonitorStateException
>> ERROR - FileComponent                  - Error processing exchange
>> InOnly[
>>   id: ID:155.34.142.122-11d29e8104f-16:0
>>   status: Error
>>   role: consumer
>>   service: {urn:servicemix:tutorial}file
>>   endpoint: sender
>>   in: Unable to display: java.io.IOException: Stream closed
>>   error: javax.jbi.messaging.MessagingException:
>> javax.xml.transform.TransformerException: org.xml.sax.SAXParseException:
>> Premature end of file.
>> ]
>>
>> Best Regards,
>> Anna
>>
>>
>> Gert Vanthienen wrote:
>>   
>>> L.S.,
>>>
>>> It looks like you have run into 
>>> https://issues.apache.org/activemq/browse/SM-1456.  We should get that 
>>> issue fixed ASAP, but in the meanwhile you can work around this issue by 
>>> removing the <sm:statistics statsInterval="10" dumpStats="true" /> line 
>>> from conf/servicemix.xml (or commenting the line) to disable the 
>>> StatisticsService that is throwing this exception.
>>>
>>> Regards,
>>>
>>> Gert
>>>
>>> asilchenko wrote:
>>>     
>>>> I have created a service-assembly example from the tutorial (at
>>>> http://servicemix.apache.org/25-beginner-deploying-the-service-assembly.html).
>>>> My service-assembly example deploys/runs fine when there is no file to
>>>> copy
>>>> from "sender" directory to "poller". When there is a file, the
>>>> service-assembly example is throwing a NullPointerException. Has anyone
>>>> seeing same/similar problem? This happens when test file gets copied
>>>> from
>>>> "sender" directory to "poller". Please see details attached. Thank you.
>>>> INFO  - ServiceAssemblyLifeCycle       - Starting service assembly:
>>>> tutorial-sa
>>>> INFO  - ServiceUnitLifeCycle           - Initializing service unit:
>>>> tutorial-file-su
>>>> INFO  - ServiceUnitLifeCycle           - Starting service unit:
>>>> tutorial-file-su
>>>> WARN  - DeliveryChannelImpl            - Error calling listener: null
>>>> java.lang.NullPointerException
>>>>         at
>>>> org.apache.servicemix.jbi.monitoring.StatisticsService.onExchangeAccepted(StatisticsService.java:307)
>>>>         at
>>>> org.apache.servicemix.jbi.monitoring.StatisticsService$3.exchangeAccepted(StatisticsService.java:186)
>>>>         at
>>>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:608)
>>>>         at
>>>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)
>>>>         at
>>>> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:167)
>>>>         at
>>>> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
>>>>         at
>>>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
>>>>         at
>>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
>>>>         at java.lang.Thread.run(Thread.java:619)
>>>> [Fatal Error] :-1:-1: Premature end of file.
>>>> ERROR - FileComponent                  - Error processing exchange
>>>> InOnly[
>>>>   id: ID:155.34.142.122-11d2655c21a-16:0
>>>>   status: Active
>>>>   role: provider
>>>>   service: {urn:servicemix:tutorial}file
>>>>   endpoint: sender
>>>>   in: Unable to display: java.io.IOException: Stream closed
>>>> ]
>>>>
>>>>   
>>>>       
>>>
>>> -----
>>> ---
>>> Gert Vanthienen
>>> http://gertvanthienen.blogspot.com
>>>
>>>     
>>
>>   
> 
> 
> 
> -----
> ---
> Gert Vanthienen
> http://gertvanthienen.blogspot.com
> 

-- 
View this message in context: 
http://www.nabble.com/Problem-testing-service-assembly-example-from-tutorial-tp20120288p20132844.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to