Hello everybody, i am really fresh about how to create own SE. In fact, i
just want to try the example of Hello-World-SE in tutorials. What i wirte in
MyEndpoint.java is as followed:
public class MyEndpoint extends ProviderEndpoint implements
ExchangeProcessor{
protected void processInOut(MessageExchange exchange, NormalizedMessage
in, NormalizedMessage out) throws Exception {
SourceTransformer sourceTransformer = new SourceTransformer();
String inMessage=sourceTransformer.toString((in.getContent()));
System.out.println(inMessage);
out.setContent(new StringSource("<hello>hello world! Message of request
contains["+inMessage.getBytes().length+"] bytes</hello>."));
if (exchange.getStatus() == ExchangeStatus.ACTIVE) {
//out.setContent(in.getContent());
getChannel().send(exchange);
}
}
}
The deployment was successful but when i run my end-to-end client test, it
shows some error in serviceMix, however client can receive right feedback,
the error appeared as followed:
[Fatal Error] :-1:-1: Premature end of file.
[Fatal Error] :1:66: Content is not allowed in trailing section.
ERROR - MyComponent - Error processing exchange InOut[
id: ID:59.64.158.73-11d420e0785-11:0
status: Active
role: provider
service: {http://companyxyz.com}helloWorld
endpoint: helloWorld
in: Unable to display: org.xml.sax.SAXParseException: Premature end of
file.
out: Unable to display: org.xml.sax.SAXParseException: Content is not
allowed in trailing section.
]
java.lang.IllegalStateException: component is not owner
at
org.apache.servicemix.jbi.messaging.MessageExchangeImpl.setProperty(MessageExchangeImpl.java:403)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:428)
at
org.apache.servicemix.common.EndpointDeliveryChannel.send(EndpointDeliveryChannel.java:79)
at
org.apache.servicemix.common.endpoints.SimpleEndpoint.send(SimpleEndpoint.java:67)
at
org.apache.servicemix.common.endpoints.ProviderEndpoint.process(ProviderEndpoint.java:114)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:538)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:490)
at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:170)
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:650)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
ERROR - MyComponent - Error setting exchange status to
ERROR
java.lang.IllegalStateException: component is not owner when trying to set
error: java.lang.IllegalStateException: component
is not owner
at
org.apache.servicemix.jbi.messaging.MessageExchangeImpl.setError(MessageExchangeImpl.java:264)
at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:57)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:170)
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:650)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.IllegalStateException: component is not owner
at
org.apache.servicemix.jbi.messaging.MessageExchangeImpl.setProperty(MessageExchangeImpl.java:403)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:428)
at
org.apache.servicemix.common.EndpointDeliveryChannel.send(EndpointDeliveryChannel.java:79)
at
org.apache.servicemix.common.endpoints.SimpleEndpoint.send(SimpleEndpoint.java:67)
at
org.apache.servicemix.common.endpoints.ProviderEndpoint.process(ProviderEndpoint.java:114)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:538)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:490)
at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
... 7 more
Can any body help me about this mistake? I tried to search the related
issure in forum but it appears that no useful infomation.
--
View this message in context:
http://www.nabble.com/Help%21%7E-java.lang.IllegalStateException%3A-component-is-not-owner-tp20203569p20203569.html
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.