You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by sachin2008 <es...@gmail.com> on 2008/03/06 14:48:43 UTC

probleam servicemix-bean example in servicemix 3.1

Hi , 
We are using  apache -servicemix 3.1. 
We could not able to execute a simple example on bean .  


We have a simple pojo that extends TransformComponentSupport and we created
a servicemix-bean endpoint for this pojo  in the xbean.xml file.  We are
able to deploy the SA with bean-su and http-su. 

But , the problem is when we send any request to the above created service
we are getting an exception as follows:

            - Unable to handle error: org.apache.serv
icemix.jbi.NotInitialisedYetException: Cannot perform operations on this
compone
nt until it has been initialised via init()
org.apache.servicemix.jbi.NotInitialisedYetException: Cannot perform
operations
on this component until it has been initialised via init()
        at
org.apache.servicemix.components.util.PojoSupport.getDeliveryChannel(
PojoSupport.java:168)
        at
org.apache.servicemix.components.util.PojoSupport.fail(PojoSupport.ja
va:244)
        at
org.apache.servicemix.components.util.TransformComponentSupport.onMes
sageExchange(TransformComponentSupport.java:92)
        at
org.apache.servicemix.bean.BeanEndpoint.onProviderExchange(BeanEndpoi
nt.java:224)
        at
org.apache.servicemix.bean.BeanEndpoint.process(BeanEndpoint.java:201
)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
feCycle.java:489)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
BaseLifeCycle.java:441)
        at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
Cycle.java:46)
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
d(DeliveryChannelImpl.java:593)
        at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
w.java:174)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
ava:176)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
a:134)
        at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Wor
ker.runTask(ThreadPoolExecutor.java:665)
        at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Wor
ker.run(ThreadPoolExecutor.java:690)
        at java.lang.Thread.run(Thread.java:595)

Note :  Files for the above example 
http://www.nabble.com/file/p15873123/xbean.xml xbean.xml 
http://www.nabble.com/file/p15873123/hi.java hi.java      ----- Java file
for which we need to  create an endpoint.
I think there is some problem with the initialisation of the component.  Can
you please tell how to solve this.

Thanks in advance...


-----
Cheers
Praveen Oruganti
"Think before you act and act on what you believe"
-- 
View this message in context: http://www.nabble.com/probleam-servicemix-bean-example-in-servicemix-3.1-tp15873123s12049p15873123.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: probleam servicemix-bean example in servicemix 3.1

Posted by sachin2008 <es...@gmail.com>.
As you said now i have written my own component support for the bean.

But i am getting an error like:

15:28:12,437 | ERROR | pool-flow.seda.servicemix-bean-thread-2 |
BeanComponent            | ervicemix.common.BaseLifeCycle   48 | Error
processing exchange InOut[
  id: ID:pc007869-4801-1205315650421-2:0
  status: Active
  role: consumer
  endpoint: endpoint
  in: <?xml version="1.0" encoding="UTF-8"?>
  out: <?xml version="1.0" encoding="UTF-8"?><GSRL>This is a GSRL
Response</GSRL>
]
java.lang.IllegalStateException: Receiving unknown consumer exchange: InOut[
  id: ID:pc007869-4801-1205315650421-2:0
  status: Active
  role: consumer
  endpoint: endpoint
  in: <?xml version="1.0" encoding="UTF-8"?>
  out: <?xml version="1.0" encoding="UTF-8"?><GSRL>This is a GSRL
Response</GSRL>
]
	at
org.apache.servicemix.bean.BeanEndpoint.onConsumerExchange(BeanEndpoint.java:266)
	at org.apache.servicemix.bean.BeanEndpoint.process(BeanEndpoint.java:198)
	at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:489)
	at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:463)
	at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
	at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:593)
	at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:174)
	at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:176)
	at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
	at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
	at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
	at java.lang.Thread.run(Thread.java:595)
15:28:12,437 | ERROR | pool-flow.seda.servicemix-bean-thread-3 |
BeanComponent            | ervicemix.common.BaseLifeCycle   48 | Error
processing exchange InOut[
  id: ID:pc007869-4801-1205315650421-2:1
  status: Active
  role: consumer
  endpoint: endpoint
  in: <?xml version="1.0" encoding="UTF-8"?><op
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><io>praveen</io></op>
 out: <?xml version="1.0" encoding="UTF-8"?><GSRL>This is a GSRL
Response</GSRL>
]
java.lang.IllegalStateException: Receiving unknown consumer exchange: InOut[
  id: ID:pc007869-4801-1205315650421-2:1
  status: Active
  role: consumer
  endpoint: endpoint
  in: <?xml version="1.0" encoding="UTF-8"?><GSRL
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><PAYL_HDR><DUNS_NBR>987654321</DUNS_NBR><GEO_REF_ID>994</GEO_REF_ID><GSRL_DT>20081201</GSRL_DT></PAYL_HDR><CHLD_LINK><ASSN><ASSN_TYPE_CD>1012</ASSN_TYPE_CD><NME_TEXT>BARCLAYS</NME_TEXT><NO_OF_SUBS>20</NO_OF_SUBS></ASSN><ASSN><ASSN_TYPE_CD>1014</ASSN_TYPE_CD><NME_TEXT>DENO</NME_TEXT><NO_OF_SUBS>12</NO_OF_SUBS></ASSN><ASSN><ASSN_TYPE_CD>112</ASSN_TYPE_CD><NME_TEXT>POM</NME_TEXT><NO_OF_SUBS>10</NO_OF_SUBS></ASSN></CHLD_LINK></GSRL>
  out: <?xml version="1.0" encoding="UTF-8"?><GSRL>This is a GSRL
Response</GSRL>
]
	at
org.apache.servicemix.bean.BeanEndpoint.onConsumerExchange(BeanEndpoint.java:266)
	at org.apache.servicemix.bean.BeanEndpoint.process(BeanEndpoint.java:198)
	at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:489)
	at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:463)
	at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
	at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:593)
	at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:174)
	at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:176)
	at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
	at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
	at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
	at java.lang.Thread.run(Thread.java:595)
15:28:12,437 | ERROR | pool-flow.seda.servicemix-bean-thread-4 |
BeanComponent            | ervicemix.common.BaseLifeCycle   48 | Error
processing exchange InOut[
  id: ID:pc007869-4801-1205315650421-2:2
  status: Active
  role: consumer
  endpoint: endpoint
  in: <?xml version="1.0" encoding="UTF-8"?>
  out: <?xml version="1.0" encoding="UTF-8"?><GSRL>This is a GSRL
Response</GSRL>
]
java.lang.IllegalStateException: Receiving unknown consumer exchange: InOut[
  id: ID:pc007869-4801-1205315650421-2:2
  status: Active
  role: consumer
  endpoint: endpoint
  in: <?xml version="1.0" encoding="UTF-8"?>
  out: <?xml version="1.0" encoding="UTF-8"?><GSRL>This is a GSRL
Response</GSRL>
]
	at
org.apache.servicemix.bean.BeanEndpoint.onConsumerExchange(BeanEndpoint.java:266)
	at org.apache.servicemix.bean.BeanEndpoint.process(BeanEndpoint.java:198)
	at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:489)
	at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:463)
	at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
	at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:593)
	at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:174)
	at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:176)
	at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
	at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
	at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
	at java.lang.Thread.run(Thread.java:595)

I am attaching the code for component support which i have written.
http://www.nabble.com/file/p16001323/CompSupport.java CompSupport.java  and 


please find the  attached main file where i am sending three inout messages
to three components at a time.

http://www.nabble.com/file/p16001323/ThreadTest.java ThreadTest.java 




gnodet wrote:
> 
> Currently, you can't use the TransformComponentSupport and related
> classes inside
> servicemix-bean.  We need to provide a better migration path, but you
> need to either:
>   * rewrite some part of TransformComponentSupport to use it inside
> servicemix-bean
>   * stay on the lightweight container
> 
> On Thu, Mar 6, 2008 at 2:48 PM, sachin2008 <es...@gmail.com> wrote:
>>
>>  Hi ,
>>  We are using  apache -servicemix 3.1.
>>  We could not able to execute a simple example on bean .
>>
>>
>>  We have a simple pojo that extends TransformComponentSupport and we
>> created
>>  a servicemix-bean endpoint for this pojo  in the xbean.xml file.  We are
>>  able to deploy the SA with bean-su and http-su.
>>
>>  But , the problem is when we send any request to the above created
>> service
>>  we are getting an exception as follows:
>>
>>             - Unable to handle error: org.apache.serv
>>  icemix.jbi.NotInitialisedYetException: Cannot perform operations on this
>>  compone
>>  nt until it has been initialised via init()
>>  org.apache.servicemix.jbi.NotInitialisedYetException: Cannot perform
>>  operations
>>  on this component until it has been initialised via init()
>>         at
>>  org.apache.servicemix.components.util.PojoSupport.getDeliveryChannel(
>>  PojoSupport.java:168)
>>         at
>>  org.apache.servicemix.components.util.PojoSupport.fail(PojoSupport.ja
>>  va:244)
>>         at
>>  org.apache.servicemix.components.util.TransformComponentSupport.onMes
>>  sageExchange(TransformComponentSupport.java:92)
>>         at
>>  org.apache.servicemix.bean.BeanEndpoint.onProviderExchange(BeanEndpoi
>>  nt.java:224)
>>         at
>>  org.apache.servicemix.bean.BeanEndpoint.process(BeanEndpoint.java:201
>>  )
>>         at
>>  org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
>>  feCycle.java:489)
>>         at
>>  org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
>>  BaseLifeCycle.java:441)
>>         at
>>  org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
>>  Cycle.java:46)
>>         at
>>  org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
>>  d(DeliveryChannelImpl.java:593)
>>         at
>>  org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
>>  w.java:174)
>>         at
>>  org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
>>  ava:176)
>>         at
>>  org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
>>  a:134)
>>         at
>>  edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Wor
>>  ker.runTask(ThreadPoolExecutor.java:665)
>>         at
>>  edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Wor
>>  ker.run(ThreadPoolExecutor.java:690)
>>         at java.lang.Thread.run(Thread.java:595)
>>
>>  Note :  Files for the above example
>>  http://www.nabble.com/file/p15873123/xbean.xml xbean.xml
>>  http://www.nabble.com/file/p15873123/hi.java hi.java      ----- Java
>> file
>>  for which we need to  create an endpoint.
>>  I think there is some problem with the initialisation of the component. 
>> Can
>>  you please tell how to solve this.
>>
>>  Thanks in advance...
>>
>>
>>  -----
>>  Cheers
>>  Praveen Oruganti
>>  "Think before you act and act on what you believe"
>>  --
>>  View this message in context:
>> http://www.nabble.com/probleam-servicemix-bean-example-in-servicemix-3.1-tp15873123s12049p15873123.html
>>  Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> 
> 


-----
Cheers
Praveen Oruganti
"Think before you act and act on what you believe"
-- 
View this message in context: http://www.nabble.com/probleam-servicemix-bean-example-in-servicemix-3.1-tp15873123s12049p16001323.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: problem servicemix-bean example in servicemix 3.1

Posted by Guillaume Nodet <gn...@gmail.com>.
servicemix-bean hosts low-level POJOs that have to deal with the JBI api.
servicemix-jsr181 hosts jax-ws annotated POJOs that use jaxb2 to
marshal / unmarshal the data and completely hides the JBI api.  Btw,
servicemix-jsr181 uses xfire which is deprecated, so using
servicemix-cxf-se instead may be better for the future.

On Fri, Mar 7, 2008 at 6:03 AM, sachin2008 <es...@gmail.com> wrote:
>
>  So , if we want to expose a POJO as some service ,  we can  use JSR instead
>  of servicmeix-bean.
>
>  What's the difference b/w servicemix-bean and  servicemix-JSR.
>
>  -----
>  Cheers
>  Praveen Oruganti
>  "Think before you act and act on what you believe"
>  --
>  View this message in context: http://www.nabble.com/probleam-servicemix-bean-example-in-servicemix-3.1-tp15873123s12049p15889951.html
>  Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Re: problem servicemix-bean example in servicemix 3.1

Posted by sachin2008 <es...@gmail.com>.
So , if we want to expose a POJO as some service ,  we can  use JSR instead
of servicmeix-bean.

What's the difference b/w servicemix-bean and  servicemix-JSR.

-----
Cheers
Praveen Oruganti
"Think before you act and act on what you believe"
-- 
View this message in context: http://www.nabble.com/probleam-servicemix-bean-example-in-servicemix-3.1-tp15873123s12049p15889951.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: probleam servicemix-bean example in servicemix 3.1

Posted by sachin2008 <es...@gmail.com>.
hi gnodet,

since context is not initialized for the bean. so whether i need to set the
context explicitly for the bean component.


gnodet wrote:
> 
> Currently, you can't use the TransformComponentSupport and related
> classes inside
> servicemix-bean.  We need to provide a better migration path, but you
> need to either:
>   * rewrite some part of TransformComponentSupport to use it inside
> servicemix-bean
>   * stay on the lightweight container
> 
> On Thu, Mar 6, 2008 at 2:48 PM, sachin2008 <es...@gmail.com> wrote:
>>
>>  Hi ,
>>  We are using  apache -servicemix 3.1.
>>  We could not able to execute a simple example on bean .
>>
>>
>>  We have a simple pojo that extends TransformComponentSupport and we
>> created
>>  a servicemix-bean endpoint for this pojo  in the xbean.xml file.  We are
>>  able to deploy the SA with bean-su and http-su.
>>
>>  But , the problem is when we send any request to the above created
>> service
>>  we are getting an exception as follows:
>>
>>             - Unable to handle error: org.apache.serv
>>  icemix.jbi.NotInitialisedYetException: Cannot perform operations on this
>>  compone
>>  nt until it has been initialised via init()
>>  org.apache.servicemix.jbi.NotInitialisedYetException: Cannot perform
>>  operations
>>  on this component until it has been initialised via init()
>>         at
>>  org.apache.servicemix.components.util.PojoSupport.getDeliveryChannel(
>>  PojoSupport.java:168)
>>         at
>>  org.apache.servicemix.components.util.PojoSupport.fail(PojoSupport.ja
>>  va:244)
>>         at
>>  org.apache.servicemix.components.util.TransformComponentSupport.onMes
>>  sageExchange(TransformComponentSupport.java:92)
>>         at
>>  org.apache.servicemix.bean.BeanEndpoint.onProviderExchange(BeanEndpoi
>>  nt.java:224)
>>         at
>>  org.apache.servicemix.bean.BeanEndpoint.process(BeanEndpoint.java:201
>>  )
>>         at
>>  org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
>>  feCycle.java:489)
>>         at
>>  org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
>>  BaseLifeCycle.java:441)
>>         at
>>  org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
>>  Cycle.java:46)
>>         at
>>  org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
>>  d(DeliveryChannelImpl.java:593)
>>         at
>>  org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
>>  w.java:174)
>>         at
>>  org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
>>  ava:176)
>>         at
>>  org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
>>  a:134)
>>         at
>>  edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Wor
>>  ker.runTask(ThreadPoolExecutor.java:665)
>>         at
>>  edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Wor
>>  ker.run(ThreadPoolExecutor.java:690)
>>         at java.lang.Thread.run(Thread.java:595)
>>
>>  Note :  Files for the above example
>>  http://www.nabble.com/file/p15873123/xbean.xml xbean.xml
>>  http://www.nabble.com/file/p15873123/hi.java hi.java      ----- Java
>> file
>>  for which we need to  create an endpoint.
>>  I think there is some problem with the initialisation of the component. 
>> Can
>>  you please tell how to solve this.
>>
>>  Thanks in advance...
>>
>>
>>  -----
>>  Cheers
>>  Praveen Oruganti
>>  "Think before you act and act on what you believe"
>>  --
>>  View this message in context:
>> http://www.nabble.com/probleam-servicemix-bean-example-in-servicemix-3.1-tp15873123s12049p15873123.html
>>  Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> 
> 


-----
Cheers
Praveen Oruganti
"Think before you act and act on what you believe"
-- 
View this message in context: http://www.nabble.com/probleam-servicemix-bean-example-in-servicemix-3.1-tp15873123s12049p15891123.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: problem servicemix-bean example in servicemix 3.1

Posted by Guillaume Nodet <gn...@gmail.com>.
Asynchronous exchange are not fully supported in servicemix-bean until recently.
Can you try with a 3.2.2-SNAPSHOT ?

On Thu, Mar 13, 2008 at 9:51 AM, sachin2008 <es...@gmail.com> wrote:
>
>  Hi gnodet,
>
>  As you said now i have written my own component support for the bean.
>
>  But i am getting an error like:
>
>  15:28:12,437 | ERROR | pool-flow.seda.servicemix-bean-thread-2 |
>  BeanComponent            | ervicemix.common.BaseLifeCycle   48 | Error
>  processing exchange InOut[
>   id: ID:pc007869-4801-1205315650421-2:0
>   status: Active
>   role: consumer
>   endpoint: endpoint
>   in: <?xml version="1.0" encoding="UTF-8"?>
>   out: <?xml version="1.0" encoding="UTF-8"?><GSRL>This is a GSRL
>  Response</GSRL>
>  ]
>  java.lang.IllegalStateException: Receiving unknown consumer exchange: InOut[
>   id: ID:pc007869-4801-1205315650421-2:0
>   status: Active
>   role: consumer
>   endpoint: endpoint
>   in: <?xml version="1.0" encoding="UTF-8"?>
>   out: <?xml version="1.0" encoding="UTF-8"?><GSRL>This is a GSRL
>  Response</GSRL>
>  ]
>         at
>  org.apache.servicemix.bean.BeanEndpoint.onConsumerExchange(BeanEndpoint.java:266)
>         at
>  org.apache.servicemix.bean.BeanEndpoint.process(BeanEndpoint.java:198)
>         at
>  org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:489)
>         at
>  org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:463)
>         at
>  org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
>         at
>  org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:593)
>         at
>  org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:174)
>         at
>  org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:176)
>         at
>  org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
>         at
>  edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
>         at
>  edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
>         at java.lang.Thread.run(Thread.java:595)
>  15:28:12,437 | ERROR | pool-flow.seda.servicemix-bean-thread-3 |
>  BeanComponent            | ervicemix.common.BaseLifeCycle   48 | Error
>  processing exchange InOut[
>   id: ID:pc007869-4801-1205315650421-2:1
>   status: Active
>   role: consumer
>   endpoint: endpoint
>   in: <?xml version="1.0" encoding="UTF-8"?><op
>  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
>  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><io>praveen</io></op>
>   out: <?xml version="1.0" encoding="UTF-8"?><GSRL>This is a GSRL
>  Response</GSRL>
>  ]
>  java.lang.IllegalStateException: Receiving unknown consumer exchange: InOut[
>   id: ID:pc007869-4801-1205315650421-2:1
>   status: Active
>   role: consumer
>   endpoint: endpoint
>   in: <?xml version="1.0" encoding="UTF-8"?><op
>  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
>  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance><lo>praveen</lo></op>
>   out: <?xml version="1.0" encoding="UTF-8"?><GSRL>This is a GSRL
>  Response</GSRL>
>  ]
>         at
>  org.apache.servicemix.bean.BeanEndpoint.onConsumerExchange(BeanEndpoint.java:266)
>         at
>  org.apache.servicemix.bean.BeanEndpoint.process(BeanEndpoint.java:198)
>         at
>  org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:489)
>         at
>  org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:463)
>         at
>  org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
>         at
>  org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:593)
>         at
>  org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:174)
>         at
>  org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:176)
>         at
>  org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
>         at
>  edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
>         at
>  edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
>         at java.lang.Thread.run(Thread.java:595)
>  15:28:12,437 | ERROR | pool-flow.seda.servicemix-bean-thread-4 |
>  BeanComponent            | ervicemix.common.BaseLifeCycle   48 | Error
>  processing exchange InOut[
>   id: ID:pc007869-4801-1205315650421-2:2
>   status: Active
>   role: consumer
>   endpoint: endpoint
>   in: <?xml version="1.0" encoding="UTF-8"?>
>   out: <?xml version="1.0" encoding="UTF-8"?><GSRL>This is a GSRL
>  Response</GSRL>
>  ]
>  java.lang.IllegalStateException: Receiving unknown consumer exchange: InOut[
>   id: ID:pc007869-4801-1205315650421-2:2
>   status: Active
>   role: consumer
>   endpoint: endpoint
>   in: <?xml version="1.0" encoding="UTF-8"?>
>   out: <?xml version="1.0" encoding="UTF-8"?><GSRL>This is a GSRL
>  Response</GSRL>
>  ]
>         at
>  org.apache.servicemix.bean.BeanEndpoint.onConsumerExchange(BeanEndpoint.java:266)
>         at
>  org.apache.servicemix.bean.BeanEndpoint.process(BeanEndpoint.java:198)
>         at
>  org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:489)
>         at
>  org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:463)
>         at
>  org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
>         at
>  org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:593)
>         at
>  org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:174)
>         at
>  org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:176)
>         at
>  org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
>         at
>  edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
>         at
>  edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
>         at java.lang.Thread.run(Thread.java:595)
>
>  I am attaching the code for component support which i have written.
>  http://www.nabble.com/file/p16023631/CompSupport.java CompSupport.java
>  and
>
>
>  please find the  attached main file where i am sending three inout messages
>  to three components at a time.
>  http://www.nabble.com/file/p16023631/ThreadTest.java ThreadTest.java
>
>
>
>  If the same logic is implemented in lw-container then it is working
>  fine.....
>
>  But when we are using bean component we are getting this issue.
>
>  So can you please help me to resolve this issue.
>
>
>  Thanks in advance...
>
>
>  gnodet wrote:
>  >
>  > Currently, you can't use the TransformComponentSupport and related
>  > classes inside
>  > servicemix-bean.  We need to provide a better migration path, but you
>  > need to either:
>  >   * rewrite some part of TransformComponentSupport to use it inside
>  > servicemix-bean
>  >   * stay on the lightweight container
>  >
>  > On Thu, Mar 6, 2008 at 2:48 PM, sachin2008 <es...@gmail.com> wrote:
>  >>
>  >>  Hi ,
>  >>  We are using  apache -servicemix 3.1.
>  >>  We could not able to execute a simple example on bean .
>  >>
>  >>
>  >>  We have a simple pojo that extends TransformComponentSupport and we
>  >> created
>  >>  a servicemix-bean endpoint for this pojo  in the xbean.xml file.  We are
>  >>  able to deploy the SA with bean-su and http-su.
>  >>
>  >>  But , the problem is when we send any request to the above created
>  >> service
>  >>  we are getting an exception as follows:
>  >>
>  >>             - Unable to handle error: org.apache.serv
>  >>  icemix.jbi.NotInitialisedYetException: Cannot perform operations on this
>  >>  compone
>  >>  nt until it has been initialised via init()
>  >>  org.apache.servicemix.jbi.NotInitialisedYetException: Cannot perform
>  >>  operations
>  >>  on this component until it has been initialised via init()
>  >>         at
>  >>  org.apache.servicemix.components.util.PojoSupport.getDeliveryChannel(
>  >>  PojoSupport.java:168)
>  >>         at
>  >>  org.apache.servicemix.components.util.PojoSupport.fail(PojoSupport.ja
>  >>  va:244)
>  >>         at
>  >>  org.apache.servicemix.components.util.TransformComponentSupport.onMes
>  >>  sageExchange(TransformComponentSupport.java:92)
>  >>         at
>  >>  org.apache.servicemix.bean.BeanEndpoint.onProviderExchange(BeanEndpoi
>  >>  nt.java:224)
>  >>         at
>  >>  org.apache.servicemix.bean.BeanEndpoint.process(BeanEndpoint.java:201
>  >>  )
>  >>         at
>  >>  org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
>  >>  feCycle.java:489)
>  >>         at
>  >>  org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
>  >>  BaseLifeCycle.java:441)
>  >>         at
>  >>  org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
>  >>  Cycle.java:46)
>  >>         at
>  >>  org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
>  >>  d(DeliveryChannelImpl.java:593)
>  >>         at
>  >>  org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
>  >>  w.java:174)
>  >>         at
>  >>  org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
>  >>  ava:176)
>  >>         at
>  >>  org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
>  >>  a:134)
>  >>         at
>  >>  edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Wor
>  >>  ker.runTask(ThreadPoolExecutor.java:665)
>  >>         at
>  >>  edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Wor
>  >>  ker.run(ThreadPoolExecutor.java:690)
>  >>         at java.lang.Thread.run(Thread.java:595)
>  >>
>  >>  Note :  Files for the above example
>  >>  http://www.nabble.com/file/p15873123/xbean.xml xbean.xml
>  >>  http://www.nabble.com/file/p15873123/hi.java hi.java      ----- Java
>  >> file
>  >>  for which we need to  create an endpoint.
>  >>  I think there is some problem with the initialisation of the component.
>  >> Can
>  >>  you please tell how to solve this.
>  >>
>  >>  Thanks in advance...
>
> >>
>  >>
>  >>  -----
>  >>  Cheers
>  >>  Praveen Oruganti
>  >>  "Think before you act and act on what you believe"
>  >>  --
>  >>  View this message in context:
>  >> http://www.nabble.com/probleam-servicemix-bean-example-in-servicemix-3.1-tp15873123s12049p15873123.html
>
> >>  Sent from the ServiceMix - User mailing list archive at Nabble.com.
>  >>
>  >>
>  >
>  >
>  >
>  > --
>  > Cheers,
>  > Guillaume Nodet
>  > ------------------------
>  > Blog: http://gnodet.blogspot.com/
>  >
>  >
>
>
>
> -----
>  Cheers
>  Praveen Oruganti
>  "Think before you act and act on what you believe"
>  --
>  View this message in context: http://www.nabble.com/probleam-servicemix-bean-example-in-servicemix-3.1-tp15873123s12049p16023631.html
>
>
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Re: problem servicemix-bean example in servicemix 3.1

Posted by sachin2008 <es...@gmail.com>.
Hi gnodet,

As you said now i have written my own component support for the bean. 

But i am getting an error like: 

15:28:12,437 | ERROR | pool-flow.seda.servicemix-bean-thread-2 |
BeanComponent            | ervicemix.common.BaseLifeCycle   48 | Error
processing exchange InOut[ 
  id: ID:pc007869-4801-1205315650421-2:0 
  status: Active 
  role: consumer 
  endpoint: endpoint 
  in: <?xml version="1.0" encoding="UTF-8"?> 
  out: <?xml version="1.0" encoding="UTF-8"?><GSRL>This is a GSRL
Response</GSRL> 
] 
java.lang.IllegalStateException: Receiving unknown consumer exchange: InOut[ 
  id: ID:pc007869-4801-1205315650421-2:0 
  status: Active 
  role: consumer 
  endpoint: endpoint 
  in: <?xml version="1.0" encoding="UTF-8"?> 
  out: <?xml version="1.0" encoding="UTF-8"?><GSRL>This is a GSRL
Response</GSRL> 
] 
        at
org.apache.servicemix.bean.BeanEndpoint.onConsumerExchange(BeanEndpoint.java:266) 
        at
org.apache.servicemix.bean.BeanEndpoint.process(BeanEndpoint.java:198) 
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:489) 
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:463) 
        at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46) 
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:593) 
        at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:174) 
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:176) 
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134) 
        at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665) 
        at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690) 
        at java.lang.Thread.run(Thread.java:595) 
15:28:12,437 | ERROR | pool-flow.seda.servicemix-bean-thread-3 |
BeanComponent            | ervicemix.common.BaseLifeCycle   48 | Error
processing exchange InOut[ 
  id: ID:pc007869-4801-1205315650421-2:1 
  status: Active 
  role: consumer 
  endpoint: endpoint 
  in: <?xml version="1.0" encoding="UTF-8"?><op
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><io>praveen</io></op> 
 out: <?xml version="1.0" encoding="UTF-8"?><GSRL>This is a GSRL
Response</GSRL> 
] 
java.lang.IllegalStateException: Receiving unknown consumer exchange: InOut[ 
  id: ID:pc007869-4801-1205315650421-2:1 
  status: Active 
  role: consumer 
  endpoint: endpoint 
  in: <?xml version="1.0" encoding="UTF-8"?><op
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance><lo>praveen</lo></op> 
  out: <?xml version="1.0" encoding="UTF-8"?><GSRL>This is a GSRL
Response</GSRL> 
] 
        at
org.apache.servicemix.bean.BeanEndpoint.onConsumerExchange(BeanEndpoint.java:266) 
        at
org.apache.servicemix.bean.BeanEndpoint.process(BeanEndpoint.java:198) 
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:489) 
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:463) 
        at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46) 
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:593) 
        at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:174) 
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:176) 
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134) 
        at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665) 
        at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690) 
        at java.lang.Thread.run(Thread.java:595) 
15:28:12,437 | ERROR | pool-flow.seda.servicemix-bean-thread-4 |
BeanComponent            | ervicemix.common.BaseLifeCycle   48 | Error
processing exchange InOut[ 
  id: ID:pc007869-4801-1205315650421-2:2 
  status: Active 
  role: consumer 
  endpoint: endpoint 
  in: <?xml version="1.0" encoding="UTF-8"?> 
  out: <?xml version="1.0" encoding="UTF-8"?><GSRL>This is a GSRL
Response</GSRL> 
] 
java.lang.IllegalStateException: Receiving unknown consumer exchange: InOut[ 
  id: ID:pc007869-4801-1205315650421-2:2 
  status: Active 
  role: consumer 
  endpoint: endpoint 
  in: <?xml version="1.0" encoding="UTF-8"?> 
  out: <?xml version="1.0" encoding="UTF-8"?><GSRL>This is a GSRL
Response</GSRL> 
] 
        at
org.apache.servicemix.bean.BeanEndpoint.onConsumerExchange(BeanEndpoint.java:266) 
        at
org.apache.servicemix.bean.BeanEndpoint.process(BeanEndpoint.java:198) 
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:489) 
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:463) 
        at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46) 
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:593) 
        at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:174) 
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:176) 
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134) 
        at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665) 
        at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690) 
        at java.lang.Thread.run(Thread.java:595) 

I am attaching the code for component support which i have written. 
http://www.nabble.com/file/p16023631/CompSupport.java CompSupport.java 
and 


please find the  attached main file where i am sending three inout messages
to three components at a time. 
http://www.nabble.com/file/p16023631/ThreadTest.java ThreadTest.java 



If the same logic is implemented in lw-container then it is working
fine..... 

But when we are using bean component we are getting this issue. 

So can you please help me to resolve this issue. 


Thanks in advance... 


gnodet wrote:
> 
> Currently, you can't use the TransformComponentSupport and related
> classes inside
> servicemix-bean.  We need to provide a better migration path, but you
> need to either:
>   * rewrite some part of TransformComponentSupport to use it inside
> servicemix-bean
>   * stay on the lightweight container
> 
> On Thu, Mar 6, 2008 at 2:48 PM, sachin2008 <es...@gmail.com> wrote:
>>
>>  Hi ,
>>  We are using  apache -servicemix 3.1.
>>  We could not able to execute a simple example on bean .
>>
>>
>>  We have a simple pojo that extends TransformComponentSupport and we
>> created
>>  a servicemix-bean endpoint for this pojo  in the xbean.xml file.  We are
>>  able to deploy the SA with bean-su and http-su.
>>
>>  But , the problem is when we send any request to the above created
>> service
>>  we are getting an exception as follows:
>>
>>             - Unable to handle error: org.apache.serv
>>  icemix.jbi.NotInitialisedYetException: Cannot perform operations on this
>>  compone
>>  nt until it has been initialised via init()
>>  org.apache.servicemix.jbi.NotInitialisedYetException: Cannot perform
>>  operations
>>  on this component until it has been initialised via init()
>>         at
>>  org.apache.servicemix.components.util.PojoSupport.getDeliveryChannel(
>>  PojoSupport.java:168)
>>         at
>>  org.apache.servicemix.components.util.PojoSupport.fail(PojoSupport.ja
>>  va:244)
>>         at
>>  org.apache.servicemix.components.util.TransformComponentSupport.onMes
>>  sageExchange(TransformComponentSupport.java:92)
>>         at
>>  org.apache.servicemix.bean.BeanEndpoint.onProviderExchange(BeanEndpoi
>>  nt.java:224)
>>         at
>>  org.apache.servicemix.bean.BeanEndpoint.process(BeanEndpoint.java:201
>>  )
>>         at
>>  org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
>>  feCycle.java:489)
>>         at
>>  org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
>>  BaseLifeCycle.java:441)
>>         at
>>  org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
>>  Cycle.java:46)
>>         at
>>  org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
>>  d(DeliveryChannelImpl.java:593)
>>         at
>>  org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
>>  w.java:174)
>>         at
>>  org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
>>  ava:176)
>>         at
>>  org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
>>  a:134)
>>         at
>>  edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Wor
>>  ker.runTask(ThreadPoolExecutor.java:665)
>>         at
>>  edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Wor
>>  ker.run(ThreadPoolExecutor.java:690)
>>         at java.lang.Thread.run(Thread.java:595)
>>
>>  Note :  Files for the above example
>>  http://www.nabble.com/file/p15873123/xbean.xml xbean.xml
>>  http://www.nabble.com/file/p15873123/hi.java hi.java      ----- Java
>> file
>>  for which we need to  create an endpoint.
>>  I think there is some problem with the initialisation of the component. 
>> Can
>>  you please tell how to solve this.
>>
>>  Thanks in advance...
>>
>>
>>  -----
>>  Cheers
>>  Praveen Oruganti
>>  "Think before you act and act on what you believe"
>>  --
>>  View this message in context:
>> http://www.nabble.com/probleam-servicemix-bean-example-in-servicemix-3.1-tp15873123s12049p15873123.html
>>  Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> 
> 


-----
Cheers
Praveen Oruganti
"Think before you act and act on what you believe"
-- 
View this message in context: http://www.nabble.com/probleam-servicemix-bean-example-in-servicemix-3.1-tp15873123s12049p16023631.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: probleam servicemix-bean example in servicemix 3.1

Posted by Guillaume Nodet <gn...@gmail.com>.
Currently, you can't use the TransformComponentSupport and related
classes inside
servicemix-bean.  We need to provide a better migration path, but you
need to either:
  * rewrite some part of TransformComponentSupport to use it inside
servicemix-bean
  * stay on the lightweight container

On Thu, Mar 6, 2008 at 2:48 PM, sachin2008 <es...@gmail.com> wrote:
>
>  Hi ,
>  We are using  apache -servicemix 3.1.
>  We could not able to execute a simple example on bean .
>
>
>  We have a simple pojo that extends TransformComponentSupport and we created
>  a servicemix-bean endpoint for this pojo  in the xbean.xml file.  We are
>  able to deploy the SA with bean-su and http-su.
>
>  But , the problem is when we send any request to the above created service
>  we are getting an exception as follows:
>
>             - Unable to handle error: org.apache.serv
>  icemix.jbi.NotInitialisedYetException: Cannot perform operations on this
>  compone
>  nt until it has been initialised via init()
>  org.apache.servicemix.jbi.NotInitialisedYetException: Cannot perform
>  operations
>  on this component until it has been initialised via init()
>         at
>  org.apache.servicemix.components.util.PojoSupport.getDeliveryChannel(
>  PojoSupport.java:168)
>         at
>  org.apache.servicemix.components.util.PojoSupport.fail(PojoSupport.ja
>  va:244)
>         at
>  org.apache.servicemix.components.util.TransformComponentSupport.onMes
>  sageExchange(TransformComponentSupport.java:92)
>         at
>  org.apache.servicemix.bean.BeanEndpoint.onProviderExchange(BeanEndpoi
>  nt.java:224)
>         at
>  org.apache.servicemix.bean.BeanEndpoint.process(BeanEndpoint.java:201
>  )
>         at
>  org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
>  feCycle.java:489)
>         at
>  org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
>  BaseLifeCycle.java:441)
>         at
>  org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
>  Cycle.java:46)
>         at
>  org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
>  d(DeliveryChannelImpl.java:593)
>         at
>  org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
>  w.java:174)
>         at
>  org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
>  ava:176)
>         at
>  org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
>  a:134)
>         at
>  edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Wor
>  ker.runTask(ThreadPoolExecutor.java:665)
>         at
>  edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Wor
>  ker.run(ThreadPoolExecutor.java:690)
>         at java.lang.Thread.run(Thread.java:595)
>
>  Note :  Files for the above example
>  http://www.nabble.com/file/p15873123/xbean.xml xbean.xml
>  http://www.nabble.com/file/p15873123/hi.java hi.java      ----- Java file
>  for which we need to  create an endpoint.
>  I think there is some problem with the initialisation of the component.  Can
>  you please tell how to solve this.
>
>  Thanks in advance...
>
>
>  -----
>  Cheers
>  Praveen Oruganti
>  "Think before you act and act on what you believe"
>  --
>  View this message in context: http://www.nabble.com/probleam-servicemix-bean-example-in-servicemix-3.1-tp15873123s12049p15873123.html
>  Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/