You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by Keertikar <ke...@globallogic.com> on 2007/03/12 07:31:00 UTC

Re: [jira] Getting "java.lang.IllegalStateException: component is not owner" Exception

I've tried with all combinations, as you suggested (sending the exchange and
modifying it after that). but not solved.

However, there is one more interesting issue. This problem is occuring not
every time, only sometimes. 
And not affecting my code. I'm able to achive the desired result but this
exception is occurring sometime on the Service Mix console.




gnodet wrote:
> 
> This exception is thrown when a component modify
> an exchange while it is not the owner of the exchange.
> The common cause is that you send the exchange back
> and modify it after that.
> 
> On 2/27/07, Keertikar <ke...@globallogic.com> wrote:
>>
>> Yes Juergen, I've put a check to process the message only if the exchange
>> is
>> active and since this block is skipped, so, this makes sure that exchange
>> is
>> Active. I've printed the status on the console it's showing active. But
>> still the same exception.
>>
>>
>> Juergen Mayrbaeurl wrote:
>> >
>> > Are you sure you're getting a InOut MessageExchange that's active. I'm
>> not
>> > sure but I think that the IllegalStateException comes from sending a
>> > response for an inactive MessageExchange.
>> >
>> > Kind regards
>> > Juergen
>> >
>> >
>> > Keertikar wrote:
>> >>
>> >> Hi All,
>> >>
>> >> I've written a simple application for publishing a message on the
>> Service
>> >> Bus and retrieving the same.
>> >> This is working fine and i'm able to receive the message in a proper
>> way
>> >> but an exception occurrs on ServiceMix console, (ERROR [CBRComponent]
>> >> Error processing exchange InOut[)as follows:
>> >>
>> >> java.lang.IllegalStateException: component is not owner
>> >>         at
>> >>
>> org.apache.servicemix.jbi.messaging.MessageExchangeImpl.setMessage(MessageExchangeImpl.java:297)
>> >>         at
>> >>
>> com.globallogic.chrysalis.esb.component.cbr.endpoint.ContentBasedRouter.sendResponse(ContentBasedRouter.java:231)
>> >>         at
>> >>
>> com.globallogic.chrysalis.esb.component.cbr.endpoint.ContentBasedRouter.process(ContentBasedRouter.java:124)
>> >>         at
>> >>
>> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:431)
>> >>         at
>> >>
>> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:43)
>> >>         at
>> >>
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:624)
>> >>         at
>> >>
>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:169)
>> >>         at
>> >>
>> org.apache.servicemix.jbi.nmr.flow.jms.JMSFlow.access$301(JMSFlow.java:73)
>> >>         at
>> >> org.apache.servicemix.jbi.nmr.flow.jms.JMSFlow$5.run(JMSFlow.java:534)
>> >>         at
>> >>
>> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
>> >>         at
>> >> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
>> >> Source)
>> >>         at java.lang.Thread.run(Thread.java:595)
>> >>
>> >> All suggestion are welcome.
>> >>
>> >> Keertikar
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Getting-%22java.lang.IllegalStateException%3A-component-is-not-owner%22-Exception-tf3298389s12049.html#a9177903
>> Sent from the ServiceMix - Dev mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Architect, LogicBlaze (http://www.logicblaze.com/)
> Blog: http://gnodet.blogspot.com/
> 
> 

-- 
View this message in context: http://www.nabble.com/Getting-%22java.lang.IllegalStateException%3A-component-is-not-owner%22-Exception-tf3298389s12049.html#a9429170
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.


Re: Getting "java.lang.IllegalStateException: component is not owner" Exception

Posted by aznmedia <di...@gmail.com>.
Here's the service units and service architectures.

file-consumer-su
xmpp-consumer-su
xmpp-sa

file-consumer-su's xbean.xml
<beans xmlns:file="http://servicemix.apache.org/file/1.0"
       xmlns:tut="urn:servicemix:tutorial">
  <file:sender service="tut:file" endpoint="sender"
             directory="file:///C:/opensrc/test/myOutbox"
             autoCreateDirectory="true">
             <property name="marshaler">
                   <bean
class="org.apache.servicemix.components.util.BinaryFileMarshaler" />
             </property>
  </file:sender>
  <file:poller service="tut:file" endpoint="poller"
             file="file:///C:/opensrc/test/myInbox"
             targetService="tut:file"
             targetEndpoint="xmpp"
             period="60000"
             recursive="true"
             autoCreateDirectory="true"/>
</beans>

xmpp-consumer-su's xbean.xml
<beans xmlns:xmpp="http://servicemix.apache.org/xmpp/1.0"
       xmlns:tut="urn:servicemix:tutorial">
  <xmpp:groupChatEndpoint service="tut:file" endpoint="xmpp"
    uri="xmpp://admin@eon-developer/Smack" password="secret"
room="discuss@eon-developer"/>
</beans>

Do you need any other files?

Cheers,
MethoD


Gert Vanthienen wrote:
> 
> L.S.,
> 
> Could you send us the xbean.xml file contents you are using? 
> 
> Regards,
> 
> Gert
> 
> aznmedia wrote:
>> I've got this error too.
>>
>> I'm currently using:
>> Smack 3.0.4
>> Openfire 3.6.0
>> Servicemix 3.2.2
>>
>> I've writed smack chat application on swing.
>> When I shutdown servicemix my chat application works properly.
>>
>> When I start servicemix my chat application cannot send receive messages.
>>
>> Do I have to provide sample code and servicemix xmpp unit that
>> demonstrates
>> this issue?
>>
>> Here's the servicemix console:
>> INFO  - ComponentMBeanImpl             - Initializing component:
>> servicemix-droo
>> ls
>> INFO  - ComponentMBeanImpl             - Setting running state for
>> Component: se
>> rvicemix-eip to Started
>> INFO  - ComponentMBeanImpl             - Initializing component:
>> servicemix-eip
>> INFO  - ComponentMBeanImpl             - Setting running state for
>> Component: se
>> rvicemix-file to Started
>> INFO  - ComponentMBeanImpl             - Initializing component:
>> servicemix-file
>>
>> INFO  - ComponentMBeanImpl             - Setting running state for
>> Component: se
>> rvicemix-ftp to Started
>> INFO  - ComponentMBeanImpl             - Initializing component:
>> servicemix-ftp
>> INFO  - ComponentMBeanImpl             - Setting running state for
>> Component: se
>> rvicemix-http to Started
>> INFO  - ComponentMBeanImpl             - Initializing component:
>> servicemix-http
>>
>> INFO  - ComponentMBeanImpl             - Setting running state for
>> Component: se
>> rvicemix-jms to Started
>> INFO  - ComponentMBeanImpl             - Initializing component:
>> servicemix-jms
>> INFO  - ComponentMBeanImpl             - Setting running state for
>> Component: se
>> rvicemix-jsr181 to Started
>> INFO  - ComponentMBeanImpl             - Initializing component:
>> servicemix-jsr1
>> 81
>> INFO  - ComponentMBeanImpl             - Setting running state for
>> Component: se
>> rvicemix-lwcontainer to Started
>> INFO  - ComponentMBeanImpl             - Initializing component:
>> servicemix-lwco
>> ntainer
>> INFO  - ComponentMBeanImpl             - Setting running state for
>> Component: se
>> rvicemix-osworkflow to Started
>> INFO  - ComponentMBeanImpl             - Initializing component:
>> servicemix-oswo
>> rkflow
>> INFO  - ComponentMBeanImpl             - Setting running state for
>> Component: se
>> rvicemix-quartz to Started
>> INFO  - ComponentMBeanImpl             - Initializing component:
>> servicemix-quar
>> tz
>> 1 name = quartz.properties
>> INFO  - SimpleThreadPool               - Job execution threads will use
>> class lo
>> ader of thread: main
>> INFO  - QuartzScheduler                - Quartz Scheduler v.1.5.2
>> created.
>> INFO  - RAMJobStore                    - RAMJobStore initialized.
>> INFO  - StdSchedulerFactory            - Quartz scheduler
>> 'DefaultQuartzSchedule
>> r' initialized from default resource file in Quartz package:
>> 'quartz.properties'
>>
>> INFO  - StdSchedulerFactory            - Quartz scheduler version: 1.5.2
>> INFO  - QuartzScheduler                - Scheduler
>> DefaultQuartzScheduler_$_NON_
>> CLUSTERED started.
>> INFO  - ComponentMBeanImpl             - Setting running state for
>> Component: se
>> rvicemix-saxon to Started
>> INFO  - ComponentMBeanImpl             - Initializing component:
>> servicemix-saxo
>> n
>> INFO  - ComponentMBeanImpl             - Setting running state for
>> Component: se
>> rvicemix-script to Started
>> INFO  - ComponentMBeanImpl             - Initializing component:
>> servicemix-scri
>> pt
>> INFO  - ComponentMBeanImpl             - Setting running state for
>> Component: se
>> rvicemix-truezip to Started
>> INFO  - ComponentMBeanImpl             - Initializing component:
>> servicemix-true
>> zip
>> INFO  - ComponentMBeanImpl             - Setting running state for
>> Component: se
>> rvicemix-wsn2005 to Started
>> INFO  - ComponentMBeanImpl             - Initializing component:
>> servicemix-wsn2
>> 005
>> INFO  - ComponentMBeanImpl             - Setting running state for
>> Component: se
>> rvicemix-xmpp to Started
>> INFO  - ComponentMBeanImpl             - Initializing component:
>> servicemix-xmpp
>>
>> INFO  - ServiceAssemblyLifeCycle       - Starting service assembly:
>> wsdl-first-s
>> a
>> INFO  - ServiceUnitLifeCycle           - Initializing service unit:
>> wsdl-first-j
>> sr181-su
>> INFO  - ServiceUnitLifeCycle           - Initializing service unit:
>> wsdl-first-h
>> ttp-su
>> INFO  - ServiceUnitLifeCycle           - Starting service unit:
>> wsdl-first-jsr18
>> 1-su
>> INFO  - ServiceUnitLifeCycle           - Starting service unit:
>> wsdl-first-http-
>> su
>> INFO  - jetty                          - jetty-6.1.6
>> INFO  - jetty                          - Started
>> SelectChannelConnector@0.0.0.0:
>> 8192
>> INFO  - ServiceAssemblyLifeCycle       - Starting service assembly:
>> xmpp-sa
>> INFO  - ServiceUnitLifeCycle           - Initializing service unit:
>> file-consume
>> r-su
>> INFO  - ServiceUnitLifeCycle           - Initializing service unit:
>> xmpp-consume
>> r-su
>> INFO  - ServiceUnitLifeCycle           - Starting service unit:
>> file-consumer-su
>>
>> INFO  - ServiceUnitLifeCycle           - Starting service unit:
>> xmpp-consumer-su
>>
>> INFO  - XMPPComponent                  - Logging in to Jabber as user:
>> admin
>> on
>> connection: org.jivesoftware.smack.XMPPConnection@63cd4d
>> INFO  - ServiceAssemblyLifeCycle       - Starting service assembly:
>> bridge-sa
>> INFO  - ServiceUnitLifeCycle           - Initializing service unit:
>> bridge-http-
>> su
>> INFO  - ServiceUnitLifeCycle           - Initializing service unit:
>> bridge-eip-s
>> u
>> INFO  - ServiceUnitLifeCycle           - Initializing service unit:
>> bridge-xslt-
>> su
>> INFO  - ServiceUnitLifeCycle           - Initializing service unit:
>> bridge-jms-s
>> u
>> INFO  - ServiceUnitLifeCycle           - Starting service unit:
>> bridge-http-su
>> INFO  - ServiceUnitLifeCycle           - Starting service unit:
>> bridge-eip-su
>> INFO  - ServiceUnitLifeCycle           - Starting service unit:
>> bridge-xslt-su
>> INFO  - ServiceUnitLifeCycle           - Starting service unit:
>> bridge-jms-su
>> INFO  - JBIContainer                   - ServiceMix JBI Container
>> (ServiceMix) s
>> tarted
>> INFO  - JDBCAdapterFactory             - Database driver recognized:
>> [apache_der
>> by_embedded_jdbc_driver]
>> INFO  - LogTask                        - Logging system reconfigured
>> using
>> file:
>>  file:/C:/Program%20Files/apache-servicemix-3.2.2/conf/log4j.xml
>> ERROR - XMPPComponent                  - Error processing exchange
>> InOnly[
>>   id: ID:150.2.216.89-11d33184a47-8:0
>>   status: Done
>>   role: provider
>>   service: {urn:servicemix:tutorial}file
>>   endpoint: xmpp
>>   in: Unable to display: java.io.IOException: Stream closed
>> ]
>> java.lang.IllegalStateException: component is not owner
>>         at
>> org.apache.servicemix.jbi.messaging.MessageExchangeImpl.setStatus(Mes
>> sageExchangeImpl.java:251)
>>         at
>> org.apache.servicemix.common.endpoints.SimpleEndpoint.done(SimpleEndp
>> oint.java:77)
>>         at
>> org.apache.servicemix.common.endpoints.ProviderEndpoint.process(Provi
>> derEndpoint.java:101)
>>         at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
>> feCycle.java:538)
>>         at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
>> BaseLifeCycle.java:490)
>>         at
>> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
>> Cycle.java:46)
>>         at
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
>> d(DeliveryChannelImpl.java:610)
>>         at
>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
>> w.java:172)
>>         at
>> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
>> ava:167)
>>         at
>> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
>> a:134)
>>         at
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
>> utor.java:886)
>>         at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
>> .java:908)
>>         at java.lang.Thread.run(Thread.java:619)
>> ERROR - XMPPComponent                  - 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(Mess
>> ageExchangeImpl.java:264)
>>         at
>> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
>> Cycle.java:57)
>>         at
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
>> d(DeliveryChannelImpl.java:610)
>>         at
>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
>> w.java:172)
>>         at
>> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
>> ava:167)
>>         at
>> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
>> a:134)
>>         at
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
>> utor.java:886)
>>         at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
>> .java:908)
>>         at java.lang.Thread.run(Thread.java:619)
>> Caused by: java.lang.IllegalStateException: component is not owner
>>         at
>> org.apache.servicemix.jbi.messaging.MessageExchangeImpl.setStatus(Mes
>> sageExchangeImpl.java:251)
>>         at
>> org.apache.servicemix.common.endpoints.SimpleEndpoint.done(SimpleEndp
>> oint.java:77)
>>         at
>> org.apache.servicemix.common.endpoints.ProviderEndpoint.process(Provi
>> derEndpoint.java:101)
>>         at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
>> feCycle.java:538)
>>         at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
>> BaseLifeCycle.java:490)
>>         at
>> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
>> Cycle.java:46)
>>         ... 7 more
>> ERROR - XMPPComponent                  - Error processing exchange
>> InOnly[
>>   id: ID:150.2.216.89-11d33184a47-8:1
>>   status: Done
>>   role: provider
>>   service: {urn:servicemix:tutorial}file
>>   endpoint: xmpp
>>   in: Unable to display: java.io.IOException: Stream closed
>> ]
>> java.lang.IllegalStateException: component is not owner
>>         at
>> org.apache.servicemix.jbi.messaging.MessageExchangeImpl.setStatus(Mes
>> sageExchangeImpl.java:251)
>>         at
>> org.apache.servicemix.common.endpoints.SimpleEndpoint.done(SimpleEndp
>> oint.java:77)
>>         at
>> org.apache.servicemix.common.endpoints.ProviderEndpoint.process(Provi
>> derEndpoint.java:101)
>>         at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
>> feCycle.java:538)
>>         at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
>> BaseLifeCycle.java:490)
>>         at
>> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
>> Cycle.java:46)
>>         at
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
>> d(DeliveryChannelImpl.java:610)
>>         at
>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
>> w.java:172)
>>         at
>> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
>> ava:167)
>>         at
>> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
>> a:134)
>>         at
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
>> utor.java:886)
>>         at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
>> .java:908)
>>         at java.lang.Thread.run(Thread.java:619)
>> ERROR - XMPPComponent                  - 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(Mess
>> ageExchangeImpl.java:264)
>>         at
>> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
>> Cycle.java:57)
>>         at
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
>> d(DeliveryChannelImpl.java:610)
>>         at
>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
>> w.java:172)
>>         at
>> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
>> ava:167)
>>         at
>> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
>> a:134)
>>         at
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
>> utor.java:886)
>>         at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
>> .java:908)
>>         at java.lang.Thread.run(Thread.java:619)
>> Caused by: java.lang.IllegalStateException: component is not owner
>>         at
>> org.apache.servicemix.jbi.messaging.MessageExchangeImpl.setStatus(Mes
>> sageExchangeImpl.java:251)
>>         at
>> org.apache.servicemix.common.endpoints.SimpleEndpoint.done(SimpleEndp
>> oint.java:77)
>>         at
>> org.apache.servicemix.common.endpoints.ProviderEndpoint.process(Provi
>> derEndpoint.java:101)
>>         at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
>> feCycle.java:538)
>>         at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
>> BaseLifeCycle.java:490)
>>         at
>> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
>> Cycle.java:46)
>>         ... 7 more
>> INFO  - JBIContainer                   - Shutting down ServiceMix JBI
>> Container
>> (ServiceMix) stopped
>> INFO  - JBIContainer                   - Deactivating component
>> #SubscriptionMan
>> ager#
>> INFO  - ServiceAssemblyLifeCycle       - Stopping service assembly:
>> xmpp-sa
>> INFO  - ServiceUnitLifeCycle           - Stopping service unit:
>> file-consumer-su
>>
>> INFO  - ServiceUnitLifeCycle           - Stopping service unit:
>> xmpp-consumer-su
>>
>> INFO  - ServiceAssemblyLifeCycle       - Shutting down service assembly:
>> xmpp-sa
>>
>> INFO  - ServiceUnitLifeCycle           - Shutting down service unit:
>> file-consum
>> er-su
>> INFO  - ServiceUnitLifeCycle           - Shutting down service unit:
>> xmpp-consum
>> er-su
>> INFO  - ServiceAssemblyLifeCycle       - Stopping service assembly:
>> bridge-sa
>> INFO  - ServiceUnitLifeCycle           - Stopping service unit:
>> bridge-http-su
>> INFO  - ServiceUnitLifeCycle           - Stopping service unit:
>> bridge-eip-su
>> INFO  - ServiceUnitLifeCycle           - Stopping service unit:
>> bridge-xslt-su
>> INFO  - ServiceUnitLifeCycle           - Stopping service unit:
>> bridge-jms-su
>> INFO  - ServiceAssemblyLifeCycle       - Shutting down service assembly:
>> bridge-
>> sa
>> INFO  - ServiceUnitLifeCycle           - Shutting down service unit:
>> bridge-http
>> -su
>> INFO  - ServiceUnitLifeCycle           - Shutting down service unit:
>> bridge-eip-
>> su
>> INFO  - ServiceUnitLifeCycle           - Shutting down service unit:
>> bridge-xslt
>> -su
>> INFO  - ServiceUnitLifeCycle           - Shutting down service unit:
>> bridge-jms-
>> su
>> INFO  - QuartzScheduler                - Scheduler
>> DefaultQuartzScheduler_$_NON_
>> CLUSTERED paused.
>> INFO  - QuartzScheduler                - Scheduler
>> DefaultQuartzScheduler_$_NON_
>> CLUSTERED shutting down.
>> INFO  - QuartzScheduler                - Scheduler
>> DefaultQuartzScheduler_$_NON_
>> CLUSTERED paused.
>> INFO  - QuartzScheduler                - Scheduler
>> DefaultQuartzScheduler_$_NON_
>> CLUSTERED shutdown complete.
>> INFO  - ServiceAssemblyLifeCycle       - Stopping service assembly:
>> wsdl-first-s
>> a
>> INFO  - ServiceUnitLifeCycle           - Stopping service unit:
>> wsdl-first-jsr18
>> 1-su
>> INFO  - ServiceUnitLifeCycle           - Stopping service unit:
>> wsdl-first-http-
>> su
>> INFO  - ServiceAssemblyLifeCycle       - Shutting down service assembly:
>> wsdl-fi
>> rst-sa
>> INFO  - ServiceUnitLifeCycle           - Shutting down service unit:
>> wsdl-first-
>> jsr181-su
>> INFO  - ServiceUnitLifeCycle           - Shutting down service unit:
>> wsdl-first-
>> http-su
>> INFO  - JBIContainer                   - ServiceMix JBI Container
>> (ServiceMix) s
>> topped
>> Terminate batch job (Y/N)? y
>>
>> C:\Program Files\apache-servicemix-3.2.2\bin>
>>   
> 
> 
> 
> -----
> ---
> Gert Vanthienen
> http://gertvanthienen.blogspot.com
> 
d
-- 
View this message in context: http://www.nabble.com/Getting-%22java.lang.IllegalStateException%3A-component-is-not-owner%22-Exception-tp9175449p20182888.html
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.


Re: Getting "java.lang.IllegalStateException: component is not owner" Exception

Posted by Gert Vanthienen <ge...@skynet.be>.
L.S.,

Could you send us the xbean.xml file contents you are using? 

Regards,

Gert

aznmedia wrote:
> I've got this error too.
>
> I'm currently using:
> Smack 3.0.4
> Openfire 3.6.0
> Servicemix 3.2.2
>
> I've writed smack chat application on swing.
> When I shutdown servicemix my chat application works properly.
>
> When I start servicemix my chat application cannot send receive messages.
>
> Do I have to provide sample code and servicemix xmpp unit that demonstrates
> this issue?
>
> Here's the servicemix console:
> INFO  - ComponentMBeanImpl             - Initializing component:
> servicemix-droo
> ls
> INFO  - ComponentMBeanImpl             - Setting running state for
> Component: se
> rvicemix-eip to Started
> INFO  - ComponentMBeanImpl             - Initializing component:
> servicemix-eip
> INFO  - ComponentMBeanImpl             - Setting running state for
> Component: se
> rvicemix-file to Started
> INFO  - ComponentMBeanImpl             - Initializing component:
> servicemix-file
>
> INFO  - ComponentMBeanImpl             - Setting running state for
> Component: se
> rvicemix-ftp to Started
> INFO  - ComponentMBeanImpl             - Initializing component:
> servicemix-ftp
> INFO  - ComponentMBeanImpl             - Setting running state for
> Component: se
> rvicemix-http to Started
> INFO  - ComponentMBeanImpl             - Initializing component:
> servicemix-http
>
> INFO  - ComponentMBeanImpl             - Setting running state for
> Component: se
> rvicemix-jms to Started
> INFO  - ComponentMBeanImpl             - Initializing component:
> servicemix-jms
> INFO  - ComponentMBeanImpl             - Setting running state for
> Component: se
> rvicemix-jsr181 to Started
> INFO  - ComponentMBeanImpl             - Initializing component:
> servicemix-jsr1
> 81
> INFO  - ComponentMBeanImpl             - Setting running state for
> Component: se
> rvicemix-lwcontainer to Started
> INFO  - ComponentMBeanImpl             - Initializing component:
> servicemix-lwco
> ntainer
> INFO  - ComponentMBeanImpl             - Setting running state for
> Component: se
> rvicemix-osworkflow to Started
> INFO  - ComponentMBeanImpl             - Initializing component:
> servicemix-oswo
> rkflow
> INFO  - ComponentMBeanImpl             - Setting running state for
> Component: se
> rvicemix-quartz to Started
> INFO  - ComponentMBeanImpl             - Initializing component:
> servicemix-quar
> tz
> 1 name = quartz.properties
> INFO  - SimpleThreadPool               - Job execution threads will use
> class lo
> ader of thread: main
> INFO  - QuartzScheduler                - Quartz Scheduler v.1.5.2 created.
> INFO  - RAMJobStore                    - RAMJobStore initialized.
> INFO  - StdSchedulerFactory            - Quartz scheduler
> 'DefaultQuartzSchedule
> r' initialized from default resource file in Quartz package:
> 'quartz.properties'
>
> INFO  - StdSchedulerFactory            - Quartz scheduler version: 1.5.2
> INFO  - QuartzScheduler                - Scheduler
> DefaultQuartzScheduler_$_NON_
> CLUSTERED started.
> INFO  - ComponentMBeanImpl             - Setting running state for
> Component: se
> rvicemix-saxon to Started
> INFO  - ComponentMBeanImpl             - Initializing component:
> servicemix-saxo
> n
> INFO  - ComponentMBeanImpl             - Setting running state for
> Component: se
> rvicemix-script to Started
> INFO  - ComponentMBeanImpl             - Initializing component:
> servicemix-scri
> pt
> INFO  - ComponentMBeanImpl             - Setting running state for
> Component: se
> rvicemix-truezip to Started
> INFO  - ComponentMBeanImpl             - Initializing component:
> servicemix-true
> zip
> INFO  - ComponentMBeanImpl             - Setting running state for
> Component: se
> rvicemix-wsn2005 to Started
> INFO  - ComponentMBeanImpl             - Initializing component:
> servicemix-wsn2
> 005
> INFO  - ComponentMBeanImpl             - Setting running state for
> Component: se
> rvicemix-xmpp to Started
> INFO  - ComponentMBeanImpl             - Initializing component:
> servicemix-xmpp
>
> INFO  - ServiceAssemblyLifeCycle       - Starting service assembly:
> wsdl-first-s
> a
> INFO  - ServiceUnitLifeCycle           - Initializing service unit:
> wsdl-first-j
> sr181-su
> INFO  - ServiceUnitLifeCycle           - Initializing service unit:
> wsdl-first-h
> ttp-su
> INFO  - ServiceUnitLifeCycle           - Starting service unit:
> wsdl-first-jsr18
> 1-su
> INFO  - ServiceUnitLifeCycle           - Starting service unit:
> wsdl-first-http-
> su
> INFO  - jetty                          - jetty-6.1.6
> INFO  - jetty                          - Started
> SelectChannelConnector@0.0.0.0:
> 8192
> INFO  - ServiceAssemblyLifeCycle       - Starting service assembly: xmpp-sa
> INFO  - ServiceUnitLifeCycle           - Initializing service unit:
> file-consume
> r-su
> INFO  - ServiceUnitLifeCycle           - Initializing service unit:
> xmpp-consume
> r-su
> INFO  - ServiceUnitLifeCycle           - Starting service unit:
> file-consumer-su
>
> INFO  - ServiceUnitLifeCycle           - Starting service unit:
> xmpp-consumer-su
>
> INFO  - XMPPComponent                  - Logging in to Jabber as user: admin
> on
> connection: org.jivesoftware.smack.XMPPConnection@63cd4d
> INFO  - ServiceAssemblyLifeCycle       - Starting service assembly:
> bridge-sa
> INFO  - ServiceUnitLifeCycle           - Initializing service unit:
> bridge-http-
> su
> INFO  - ServiceUnitLifeCycle           - Initializing service unit:
> bridge-eip-s
> u
> INFO  - ServiceUnitLifeCycle           - Initializing service unit:
> bridge-xslt-
> su
> INFO  - ServiceUnitLifeCycle           - Initializing service unit:
> bridge-jms-s
> u
> INFO  - ServiceUnitLifeCycle           - Starting service unit:
> bridge-http-su
> INFO  - ServiceUnitLifeCycle           - Starting service unit:
> bridge-eip-su
> INFO  - ServiceUnitLifeCycle           - Starting service unit:
> bridge-xslt-su
> INFO  - ServiceUnitLifeCycle           - Starting service unit:
> bridge-jms-su
> INFO  - JBIContainer                   - ServiceMix JBI Container
> (ServiceMix) s
> tarted
> INFO  - JDBCAdapterFactory             - Database driver recognized:
> [apache_der
> by_embedded_jdbc_driver]
> INFO  - LogTask                        - Logging system reconfigured using
> file:
>  file:/C:/Program%20Files/apache-servicemix-3.2.2/conf/log4j.xml
> ERROR - XMPPComponent                  - Error processing exchange InOnly[
>   id: ID:150.2.216.89-11d33184a47-8:0
>   status: Done
>   role: provider
>   service: {urn:servicemix:tutorial}file
>   endpoint: xmpp
>   in: Unable to display: java.io.IOException: Stream closed
> ]
> java.lang.IllegalStateException: component is not owner
>         at
> org.apache.servicemix.jbi.messaging.MessageExchangeImpl.setStatus(Mes
> sageExchangeImpl.java:251)
>         at
> org.apache.servicemix.common.endpoints.SimpleEndpoint.done(SimpleEndp
> oint.java:77)
>         at
> org.apache.servicemix.common.endpoints.ProviderEndpoint.process(Provi
> derEndpoint.java:101)
>         at
> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
> feCycle.java:538)
>         at
> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
> BaseLifeCycle.java:490)
>         at
> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
> Cycle.java:46)
>         at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
> d(DeliveryChannelImpl.java:610)
>         at
> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
> w.java:172)
>         at
> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
> ava:167)
>         at
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
> a:134)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
> utor.java:886)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
> .java:908)
>         at java.lang.Thread.run(Thread.java:619)
> ERROR - XMPPComponent                  - 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(Mess
> ageExchangeImpl.java:264)
>         at
> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
> Cycle.java:57)
>         at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
> d(DeliveryChannelImpl.java:610)
>         at
> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
> w.java:172)
>         at
> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
> ava:167)
>         at
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
> a:134)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
> utor.java:886)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
> .java:908)
>         at java.lang.Thread.run(Thread.java:619)
> Caused by: java.lang.IllegalStateException: component is not owner
>         at
> org.apache.servicemix.jbi.messaging.MessageExchangeImpl.setStatus(Mes
> sageExchangeImpl.java:251)
>         at
> org.apache.servicemix.common.endpoints.SimpleEndpoint.done(SimpleEndp
> oint.java:77)
>         at
> org.apache.servicemix.common.endpoints.ProviderEndpoint.process(Provi
> derEndpoint.java:101)
>         at
> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
> feCycle.java:538)
>         at
> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
> BaseLifeCycle.java:490)
>         at
> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
> Cycle.java:46)
>         ... 7 more
> ERROR - XMPPComponent                  - Error processing exchange InOnly[
>   id: ID:150.2.216.89-11d33184a47-8:1
>   status: Done
>   role: provider
>   service: {urn:servicemix:tutorial}file
>   endpoint: xmpp
>   in: Unable to display: java.io.IOException: Stream closed
> ]
> java.lang.IllegalStateException: component is not owner
>         at
> org.apache.servicemix.jbi.messaging.MessageExchangeImpl.setStatus(Mes
> sageExchangeImpl.java:251)
>         at
> org.apache.servicemix.common.endpoints.SimpleEndpoint.done(SimpleEndp
> oint.java:77)
>         at
> org.apache.servicemix.common.endpoints.ProviderEndpoint.process(Provi
> derEndpoint.java:101)
>         at
> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
> feCycle.java:538)
>         at
> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
> BaseLifeCycle.java:490)
>         at
> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
> Cycle.java:46)
>         at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
> d(DeliveryChannelImpl.java:610)
>         at
> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
> w.java:172)
>         at
> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
> ava:167)
>         at
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
> a:134)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
> utor.java:886)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
> .java:908)
>         at java.lang.Thread.run(Thread.java:619)
> ERROR - XMPPComponent                  - 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(Mess
> ageExchangeImpl.java:264)
>         at
> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
> Cycle.java:57)
>         at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
> d(DeliveryChannelImpl.java:610)
>         at
> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
> w.java:172)
>         at
> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
> ava:167)
>         at
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
> a:134)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
> utor.java:886)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
> .java:908)
>         at java.lang.Thread.run(Thread.java:619)
> Caused by: java.lang.IllegalStateException: component is not owner
>         at
> org.apache.servicemix.jbi.messaging.MessageExchangeImpl.setStatus(Mes
> sageExchangeImpl.java:251)
>         at
> org.apache.servicemix.common.endpoints.SimpleEndpoint.done(SimpleEndp
> oint.java:77)
>         at
> org.apache.servicemix.common.endpoints.ProviderEndpoint.process(Provi
> derEndpoint.java:101)
>         at
> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
> feCycle.java:538)
>         at
> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
> BaseLifeCycle.java:490)
>         at
> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
> Cycle.java:46)
>         ... 7 more
> INFO  - JBIContainer                   - Shutting down ServiceMix JBI
> Container
> (ServiceMix) stopped
> INFO  - JBIContainer                   - Deactivating component
> #SubscriptionMan
> ager#
> INFO  - ServiceAssemblyLifeCycle       - Stopping service assembly: xmpp-sa
> INFO  - ServiceUnitLifeCycle           - Stopping service unit:
> file-consumer-su
>
> INFO  - ServiceUnitLifeCycle           - Stopping service unit:
> xmpp-consumer-su
>
> INFO  - ServiceAssemblyLifeCycle       - Shutting down service assembly:
> xmpp-sa
>
> INFO  - ServiceUnitLifeCycle           - Shutting down service unit:
> file-consum
> er-su
> INFO  - ServiceUnitLifeCycle           - Shutting down service unit:
> xmpp-consum
> er-su
> INFO  - ServiceAssemblyLifeCycle       - Stopping service assembly:
> bridge-sa
> INFO  - ServiceUnitLifeCycle           - Stopping service unit:
> bridge-http-su
> INFO  - ServiceUnitLifeCycle           - Stopping service unit:
> bridge-eip-su
> INFO  - ServiceUnitLifeCycle           - Stopping service unit:
> bridge-xslt-su
> INFO  - ServiceUnitLifeCycle           - Stopping service unit:
> bridge-jms-su
> INFO  - ServiceAssemblyLifeCycle       - Shutting down service assembly:
> bridge-
> sa
> INFO  - ServiceUnitLifeCycle           - Shutting down service unit:
> bridge-http
> -su
> INFO  - ServiceUnitLifeCycle           - Shutting down service unit:
> bridge-eip-
> su
> INFO  - ServiceUnitLifeCycle           - Shutting down service unit:
> bridge-xslt
> -su
> INFO  - ServiceUnitLifeCycle           - Shutting down service unit:
> bridge-jms-
> su
> INFO  - QuartzScheduler                - Scheduler
> DefaultQuartzScheduler_$_NON_
> CLUSTERED paused.
> INFO  - QuartzScheduler                - Scheduler
> DefaultQuartzScheduler_$_NON_
> CLUSTERED shutting down.
> INFO  - QuartzScheduler                - Scheduler
> DefaultQuartzScheduler_$_NON_
> CLUSTERED paused.
> INFO  - QuartzScheduler                - Scheduler
> DefaultQuartzScheduler_$_NON_
> CLUSTERED shutdown complete.
> INFO  - ServiceAssemblyLifeCycle       - Stopping service assembly:
> wsdl-first-s
> a
> INFO  - ServiceUnitLifeCycle           - Stopping service unit:
> wsdl-first-jsr18
> 1-su
> INFO  - ServiceUnitLifeCycle           - Stopping service unit:
> wsdl-first-http-
> su
> INFO  - ServiceAssemblyLifeCycle       - Shutting down service assembly:
> wsdl-fi
> rst-sa
> INFO  - ServiceUnitLifeCycle           - Shutting down service unit:
> wsdl-first-
> jsr181-su
> INFO  - ServiceUnitLifeCycle           - Shutting down service unit:
> wsdl-first-
> http-su
> INFO  - JBIContainer                   - ServiceMix JBI Container
> (ServiceMix) s
> topped
> Terminate batch job (Y/N)? y
>
> C:\Program Files\apache-servicemix-3.2.2\bin>
>   


Re: Getting "java.lang.IllegalStateException: component is not owner" Exception

Posted by aznmedia <di...@gmail.com>.
I've got this error too.

I'm currently using:
Smack 3.0.4
Openfire 3.6.0
Servicemix 3.2.2

I've writed smack chat application on swing.
When I shutdown servicemix my chat application works properly.

When I start servicemix my chat application cannot send receive messages.

Do I have to provide sample code and servicemix xmpp unit that demonstrates
this issue?

Here's the servicemix console:
INFO  - ComponentMBeanImpl             - Initializing component:
servicemix-droo
ls
INFO  - ComponentMBeanImpl             - Setting running state for
Component: se
rvicemix-eip to Started
INFO  - ComponentMBeanImpl             - Initializing component:
servicemix-eip
INFO  - ComponentMBeanImpl             - Setting running state for
Component: se
rvicemix-file to Started
INFO  - ComponentMBeanImpl             - Initializing component:
servicemix-file

INFO  - ComponentMBeanImpl             - Setting running state for
Component: se
rvicemix-ftp to Started
INFO  - ComponentMBeanImpl             - Initializing component:
servicemix-ftp
INFO  - ComponentMBeanImpl             - Setting running state for
Component: se
rvicemix-http to Started
INFO  - ComponentMBeanImpl             - Initializing component:
servicemix-http

INFO  - ComponentMBeanImpl             - Setting running state for
Component: se
rvicemix-jms to Started
INFO  - ComponentMBeanImpl             - Initializing component:
servicemix-jms
INFO  - ComponentMBeanImpl             - Setting running state for
Component: se
rvicemix-jsr181 to Started
INFO  - ComponentMBeanImpl             - Initializing component:
servicemix-jsr1
81
INFO  - ComponentMBeanImpl             - Setting running state for
Component: se
rvicemix-lwcontainer to Started
INFO  - ComponentMBeanImpl             - Initializing component:
servicemix-lwco
ntainer
INFO  - ComponentMBeanImpl             - Setting running state for
Component: se
rvicemix-osworkflow to Started
INFO  - ComponentMBeanImpl             - Initializing component:
servicemix-oswo
rkflow
INFO  - ComponentMBeanImpl             - Setting running state for
Component: se
rvicemix-quartz to Started
INFO  - ComponentMBeanImpl             - Initializing component:
servicemix-quar
tz
1 name = quartz.properties
INFO  - SimpleThreadPool               - Job execution threads will use
class lo
ader of thread: main
INFO  - QuartzScheduler                - Quartz Scheduler v.1.5.2 created.
INFO  - RAMJobStore                    - RAMJobStore initialized.
INFO  - StdSchedulerFactory            - Quartz scheduler
'DefaultQuartzSchedule
r' initialized from default resource file in Quartz package:
'quartz.properties'

INFO  - StdSchedulerFactory            - Quartz scheduler version: 1.5.2
INFO  - QuartzScheduler                - Scheduler
DefaultQuartzScheduler_$_NON_
CLUSTERED started.
INFO  - ComponentMBeanImpl             - Setting running state for
Component: se
rvicemix-saxon to Started
INFO  - ComponentMBeanImpl             - Initializing component:
servicemix-saxo
n
INFO  - ComponentMBeanImpl             - Setting running state for
Component: se
rvicemix-script to Started
INFO  - ComponentMBeanImpl             - Initializing component:
servicemix-scri
pt
INFO  - ComponentMBeanImpl             - Setting running state for
Component: se
rvicemix-truezip to Started
INFO  - ComponentMBeanImpl             - Initializing component:
servicemix-true
zip
INFO  - ComponentMBeanImpl             - Setting running state for
Component: se
rvicemix-wsn2005 to Started
INFO  - ComponentMBeanImpl             - Initializing component:
servicemix-wsn2
005
INFO  - ComponentMBeanImpl             - Setting running state for
Component: se
rvicemix-xmpp to Started
INFO  - ComponentMBeanImpl             - Initializing component:
servicemix-xmpp

INFO  - ServiceAssemblyLifeCycle       - Starting service assembly:
wsdl-first-s
a
INFO  - ServiceUnitLifeCycle           - Initializing service unit:
wsdl-first-j
sr181-su
INFO  - ServiceUnitLifeCycle           - Initializing service unit:
wsdl-first-h
ttp-su
INFO  - ServiceUnitLifeCycle           - Starting service unit:
wsdl-first-jsr18
1-su
INFO  - ServiceUnitLifeCycle           - Starting service unit:
wsdl-first-http-
su
INFO  - jetty                          - jetty-6.1.6
INFO  - jetty                          - Started
SelectChannelConnector@0.0.0.0:
8192
INFO  - ServiceAssemblyLifeCycle       - Starting service assembly: xmpp-sa
INFO  - ServiceUnitLifeCycle           - Initializing service unit:
file-consume
r-su
INFO  - ServiceUnitLifeCycle           - Initializing service unit:
xmpp-consume
r-su
INFO  - ServiceUnitLifeCycle           - Starting service unit:
file-consumer-su

INFO  - ServiceUnitLifeCycle           - Starting service unit:
xmpp-consumer-su

INFO  - XMPPComponent                  - Logging in to Jabber as user: admin
on
connection: org.jivesoftware.smack.XMPPConnection@63cd4d
INFO  - ServiceAssemblyLifeCycle       - Starting service assembly:
bridge-sa
INFO  - ServiceUnitLifeCycle           - Initializing service unit:
bridge-http-
su
INFO  - ServiceUnitLifeCycle           - Initializing service unit:
bridge-eip-s
u
INFO  - ServiceUnitLifeCycle           - Initializing service unit:
bridge-xslt-
su
INFO  - ServiceUnitLifeCycle           - Initializing service unit:
bridge-jms-s
u
INFO  - ServiceUnitLifeCycle           - Starting service unit:
bridge-http-su
INFO  - ServiceUnitLifeCycle           - Starting service unit:
bridge-eip-su
INFO  - ServiceUnitLifeCycle           - Starting service unit:
bridge-xslt-su
INFO  - ServiceUnitLifeCycle           - Starting service unit:
bridge-jms-su
INFO  - JBIContainer                   - ServiceMix JBI Container
(ServiceMix) s
tarted
INFO  - JDBCAdapterFactory             - Database driver recognized:
[apache_der
by_embedded_jdbc_driver]
INFO  - LogTask                        - Logging system reconfigured using
file:
 file:/C:/Program%20Files/apache-servicemix-3.2.2/conf/log4j.xml
ERROR - XMPPComponent                  - Error processing exchange InOnly[
  id: ID:150.2.216.89-11d33184a47-8:0
  status: Done
  role: provider
  service: {urn:servicemix:tutorial}file
  endpoint: xmpp
  in: Unable to display: java.io.IOException: Stream closed
]
java.lang.IllegalStateException: component is not owner
        at
org.apache.servicemix.jbi.messaging.MessageExchangeImpl.setStatus(Mes
sageExchangeImpl.java:251)
        at
org.apache.servicemix.common.endpoints.SimpleEndpoint.done(SimpleEndp
oint.java:77)
        at
org.apache.servicemix.common.endpoints.ProviderEndpoint.process(Provi
derEndpoint.java:101)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
feCycle.java:538)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
BaseLifeCycle.java:490)
        at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
Cycle.java:46)
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
d(DeliveryChannelImpl.java:610)
        at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
w.java:172)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
ava:167)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
a:134)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
        at java.lang.Thread.run(Thread.java:619)
ERROR - XMPPComponent                  - 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(Mess
ageExchangeImpl.java:264)
        at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
Cycle.java:57)
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
d(DeliveryChannelImpl.java:610)
        at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
w.java:172)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
ava:167)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
a:134)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.IllegalStateException: component is not owner
        at
org.apache.servicemix.jbi.messaging.MessageExchangeImpl.setStatus(Mes
sageExchangeImpl.java:251)
        at
org.apache.servicemix.common.endpoints.SimpleEndpoint.done(SimpleEndp
oint.java:77)
        at
org.apache.servicemix.common.endpoints.ProviderEndpoint.process(Provi
derEndpoint.java:101)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
feCycle.java:538)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
BaseLifeCycle.java:490)
        at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
Cycle.java:46)
        ... 7 more
ERROR - XMPPComponent                  - Error processing exchange InOnly[
  id: ID:150.2.216.89-11d33184a47-8:1
  status: Done
  role: provider
  service: {urn:servicemix:tutorial}file
  endpoint: xmpp
  in: Unable to display: java.io.IOException: Stream closed
]
java.lang.IllegalStateException: component is not owner
        at
org.apache.servicemix.jbi.messaging.MessageExchangeImpl.setStatus(Mes
sageExchangeImpl.java:251)
        at
org.apache.servicemix.common.endpoints.SimpleEndpoint.done(SimpleEndp
oint.java:77)
        at
org.apache.servicemix.common.endpoints.ProviderEndpoint.process(Provi
derEndpoint.java:101)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
feCycle.java:538)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
BaseLifeCycle.java:490)
        at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
Cycle.java:46)
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
d(DeliveryChannelImpl.java:610)
        at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
w.java:172)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
ava:167)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
a:134)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
        at java.lang.Thread.run(Thread.java:619)
ERROR - XMPPComponent                  - 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(Mess
ageExchangeImpl.java:264)
        at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
Cycle.java:57)
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
d(DeliveryChannelImpl.java:610)
        at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
w.java:172)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
ava:167)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
a:134)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.IllegalStateException: component is not owner
        at
org.apache.servicemix.jbi.messaging.MessageExchangeImpl.setStatus(Mes
sageExchangeImpl.java:251)
        at
org.apache.servicemix.common.endpoints.SimpleEndpoint.done(SimpleEndp
oint.java:77)
        at
org.apache.servicemix.common.endpoints.ProviderEndpoint.process(Provi
derEndpoint.java:101)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
feCycle.java:538)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
BaseLifeCycle.java:490)
        at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
Cycle.java:46)
        ... 7 more
INFO  - JBIContainer                   - Shutting down ServiceMix JBI
Container
(ServiceMix) stopped
INFO  - JBIContainer                   - Deactivating component
#SubscriptionMan
ager#
INFO  - ServiceAssemblyLifeCycle       - Stopping service assembly: xmpp-sa
INFO  - ServiceUnitLifeCycle           - Stopping service unit:
file-consumer-su

INFO  - ServiceUnitLifeCycle           - Stopping service unit:
xmpp-consumer-su

INFO  - ServiceAssemblyLifeCycle       - Shutting down service assembly:
xmpp-sa

INFO  - ServiceUnitLifeCycle           - Shutting down service unit:
file-consum
er-su
INFO  - ServiceUnitLifeCycle           - Shutting down service unit:
xmpp-consum
er-su
INFO  - ServiceAssemblyLifeCycle       - Stopping service assembly:
bridge-sa
INFO  - ServiceUnitLifeCycle           - Stopping service unit:
bridge-http-su
INFO  - ServiceUnitLifeCycle           - Stopping service unit:
bridge-eip-su
INFO  - ServiceUnitLifeCycle           - Stopping service unit:
bridge-xslt-su
INFO  - ServiceUnitLifeCycle           - Stopping service unit:
bridge-jms-su
INFO  - ServiceAssemblyLifeCycle       - Shutting down service assembly:
bridge-
sa
INFO  - ServiceUnitLifeCycle           - Shutting down service unit:
bridge-http
-su
INFO  - ServiceUnitLifeCycle           - Shutting down service unit:
bridge-eip-
su
INFO  - ServiceUnitLifeCycle           - Shutting down service unit:
bridge-xslt
-su
INFO  - ServiceUnitLifeCycle           - Shutting down service unit:
bridge-jms-
su
INFO  - QuartzScheduler                - Scheduler
DefaultQuartzScheduler_$_NON_
CLUSTERED paused.
INFO  - QuartzScheduler                - Scheduler
DefaultQuartzScheduler_$_NON_
CLUSTERED shutting down.
INFO  - QuartzScheduler                - Scheduler
DefaultQuartzScheduler_$_NON_
CLUSTERED paused.
INFO  - QuartzScheduler                - Scheduler
DefaultQuartzScheduler_$_NON_
CLUSTERED shutdown complete.
INFO  - ServiceAssemblyLifeCycle       - Stopping service assembly:
wsdl-first-s
a
INFO  - ServiceUnitLifeCycle           - Stopping service unit:
wsdl-first-jsr18
1-su
INFO  - ServiceUnitLifeCycle           - Stopping service unit:
wsdl-first-http-
su
INFO  - ServiceAssemblyLifeCycle       - Shutting down service assembly:
wsdl-fi
rst-sa
INFO  - ServiceUnitLifeCycle           - Shutting down service unit:
wsdl-first-
jsr181-su
INFO  - ServiceUnitLifeCycle           - Shutting down service unit:
wsdl-first-
http-su
INFO  - JBIContainer                   - ServiceMix JBI Container
(ServiceMix) s
topped
Terminate batch job (Y/N)? y

C:\Program Files\apache-servicemix-3.2.2\bin>
-- 
View this message in context: http://www.nabble.com/Getting-%22java.lang.IllegalStateException%3A-component-is-not-owner%22-Exception-tp9175449p20172446.html
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.


Re: [jira] Getting "java.lang.IllegalStateException: component is not owner" Exception

Posted by Guillaume Nodet <gn...@gmail.com>.
Did you check that the exchange that you are processing has its status
set to ACTIVE ?  In JBI, exchanges always come back, so you will receive
exchanges acknowledgements: exchanges have been processed but come back
in a DONE status.  You have to discard those.

On 3/12/07, Keertikar <ke...@globallogic.com> wrote:
>
>
> I've tried with all combinations, as you suggested (sending the exchange
> and
> modifying it after that). but not solved.
>
> However, there is one more interesting issue. This problem is occuring not
> every time, only sometimes.
> And not affecting my code. I'm able to achive the desired result but this
> exception is occurring sometime on the Service Mix console.
>
>
>
>
> gnodet wrote:
> >
> > This exception is thrown when a component modify
> > an exchange while it is not the owner of the exchange.
> > The common cause is that you send the exchange back
> > and modify it after that.
> >
> > On 2/27/07, Keertikar <ke...@globallogic.com> wrote:
> >>
> >> Yes Juergen, I've put a check to process the message only if the
> exchange
> >> is
> >> active and since this block is skipped, so, this makes sure that
> exchange
> >> is
> >> Active. I've printed the status on the console it's showing active. But
> >> still the same exception.
> >>
> >>
> >> Juergen Mayrbaeurl wrote:
> >> >
> >> > Are you sure you're getting a InOut MessageExchange that's active.
> I'm
> >> not
> >> > sure but I think that the IllegalStateException comes from sending a
> >> > response for an inactive MessageExchange.
> >> >
> >> > Kind regards
> >> > Juergen
> >> >
> >> >
> >> > Keertikar wrote:
> >> >>
> >> >> Hi All,
> >> >>
> >> >> I've written a simple application for publishing a message on the
> >> Service
> >> >> Bus and retrieving the same.
> >> >> This is working fine and i'm able to receive the message in a proper
> >> way
> >> >> but an exception occurrs on ServiceMix console, (ERROR
> [CBRComponent]
> >> >> Error processing exchange InOut[)as follows:
> >> >>
> >> >> java.lang.IllegalStateException: component is not owner
> >> >>         at
> >> >>
> >> org.apache.servicemix.jbi.messaging.MessageExchangeImpl.setMessage(
> MessageExchangeImpl.java:297)
> >> >>         at
> >> >>
> >>
> com.globallogic.chrysalis.esb.component.cbr.endpoint.ContentBasedRouter.sendResponse
> (ContentBasedRouter.java:231)
> >> >>         at
> >> >>
> >>
> com.globallogic.chrysalis.esb.component.cbr.endpoint.ContentBasedRouter.process
> (ContentBasedRouter.java:124)
> >> >>         at
> >> >>
> >> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(
> AsyncBaseLifeCycle.java:431)
> >> >>         at
> >> >>
> >> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(
> BaseLifeCycle.java:43)
> >> >>         at
> >> >>
> >> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(
> DeliveryChannelImpl.java:624)
> >> >>         at
> >> >>
> >> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(
> AbstractFlow.java:169)
> >> >>         at
> >> >>
> >> org.apache.servicemix.jbi.nmr.flow.jms.JMSFlow.access$301(JMSFlow.java
> :73)
> >> >>         at
> >> >> org.apache.servicemix.jbi.nmr.flow.jms.JMSFlow$5.run(JMSFlow.java
> :534)
> >> >>         at
> >> >>
> >> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java
> :291)
> >> >>         at
> >> >> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
> >> >> Source)
> >> >>         at java.lang.Thread.run(Thread.java:595)
> >> >>
> >> >> All suggestion are welcome.
> >> >>
> >> >> Keertikar
> >> >>
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Getting-%22java.lang.IllegalStateException%3A-component-is-not-owner%22-Exception-tf3298389s12049.html#a9177903
> >> Sent from the ServiceMix - Dev mailing list archive at Nabble.com.
> >>
> >>
> >
> >
> > --
> > Cheers,
> > Guillaume Nodet
> > ------------------------
> > Architect, LogicBlaze (http://www.logicblaze.com/)
> > Blog: http://gnodet.blogspot.com/
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Getting-%22java.lang.IllegalStateException%3A-component-is-not-owner%22-Exception-tf3298389s12049.html#a9429170
> Sent from the ServiceMix - Dev mailing list archive at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Architect, LogicBlaze (http://www.logicblaze.com/)
Blog: http://gnodet.blogspot.com/