You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by azwan <sl...@gmail.com> on 2006/08/07 06:07:42 UTC

2 bpel component in 1 servicemix instance

Hi All,
Can I have 2 bpel component in 1 servicemix instance.  I tried to configure
that and can start servicemix with success.  I can call only one of the bpel
endpoint, and not the other one.  I'm using servicemix-3.0-M2.  My partial
servicemix.xml

<sm:activationSpec>
				<sm:component>
<bpws:component bpelResource="classpath:ProcessA.bpel" />
<bpws:component bpelResource="classpath:ProcessB.bpel" />
				</sm:component>
			</sm:activationSpec>

The error i got is:
WARN  - DefaultBroker                  - ServiceName
({urn:imocha:soa:fileValidation}ProcessBService) specified for routing, but
can't find it registered
javax.jbi.messaging.MessagingException: Could not find route for exchange:
MessageExchange[
  id: ID:azwan-33122-1154922598825-7:0
  status: Active
  role: provider
  service: {urn:imocha:soa:processB}ProcessBService
  operation: getString
  in: <?xml version="1.0" encoding="UTF-8"?><getStringRequest
xmlns:e="http://schemas.xmlsoap.org/soap/envelope/"><message>hello</message></getStringRequest>
] for service: {urn:imocha:soa:processB}processBService and interface: null
        at
org.apache.servicemix.jbi.nmr.DefaultBroker.sendExchangePacket(DefaultBroker.java:311)
        at
org.apache.servicemix.jbi.container.JBIContainer.sendExchange(JBIContainer.java:713)
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:374)
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(DeliveryChannelImpl.java:
-- 
View this message in context: http://www.nabble.com/2-bpel-component-in-1-servicemix-instance-tf2061589.html#a5679307
Sent from the ServiceMix - User forum at Nabble.com.


Re: 2 bpel component in 1 servicemix instance

Posted by azwan <sl...@gmail.com>.
:) thanks a lot...it works now...
-- 
View this message in context: http://www.nabble.com/2-bpel-component-in-1-servicemix-instance-tf2061589.html#a5682824
Sent from the ServiceMix - User forum at Nabble.com.


Re: 2 bpel component in 1 servicemix instance

Posted by Guillaume Nodet <gn...@gmail.com>.
I think that the bpel engine read all the wsdl and bpel that are in the
folder.
You should put your two bpels and associated wsdl in separate folders and
use
   classpath:fileValidation/FileValidation.bpel
and
   classpath:login/Login.bpel

On 8/7/06, azwan <sl...@gmail.com> wrote:
>
>
> Below is the log
>
> At line "Activating component for:
> [container=ServiceMix,name=fileValidationProcess] with service: .." it
> initialize schema
> "file:/home/azwan/tmp/servicemix-3.0-M2/apache-
> servicemix-3.0-M2-incubating
> /examples/mytest/mytest/epf/build/components/Login.wsdl"
> which is wrong...it should be FileValidation.wsdl
>
> Activating component for:
> [container=ServiceMix,name=fileValidationProcess]
> with service: {urn:imocha:soa:fileValidation}FileValidationService
> component: org.apache.servicemix.bpe.BPESpringComponent@e99ce5
> Initializing component: fileValidationProcess
> Initializing component
> Initializing schema collection with baseUri:
> file:/home/azwan/tmp/servicemix-3.0-M2/apache-servicemix-3.0-M2-incubating
> /examples/mytest/mytest/epf/build/components/Login.wsdl
> Component initialized
> Activating component for: [container=ServiceMix,name=loginProcess] with
> service: {urn:imocha:soa:login}LoginService component:
> org.apache.servicemix.bpe.BPESpringComponent@31688f
> Initializing component: loginProcess
> Initializing component
> Initializing schema collection with baseUri:
> file:/home/azwan/tmp/servicemix-3.0-M2/apache-servicemix-3.0-M2-incubating
> /examples/mytest/mytest/epf/build/components/Login.wsdl
> Component initialized
> .....
> ......
> Starting component
> Component: fileValidationProcess activated endpoint:
> {urn:imocha:soa:login}LoginService : loginBroker
> Querying service description for
>
> ServiceEndpoint[service={urn:imocha:soa:login}LoginService,endpoint=loginBroker]
> Endpoint
>
> ServiceEndpoint[service={urn:imocha:soa:login}LoginService,endpoint=loginBroker]
> implements interface {urn:imocha:soa:login}StringBroker
> Component started
> Starting component
> Component: loginProcess activated endpoint:
> {urn:imocha:soa:login}LoginService : loginBroker
>
>
> My servicemix.xml:
>
> <sm:activationSpec id="fileValidationProcess"
> service="fv:FileValidationService" endpoint="fileValidationProcess">
>                                 <sm:component>
>                                         <bpws:component
> bpelResource="classpath:FileValidation.bpel" />
>                                 </sm:component>
>                         </sm:activationSpec>
>
>                         <sm:activationSpec id="loginProcess"
> service="login:LoginService"
> endpoint="loginProcess">
>                                 <sm:component>
>                                         <bpws:component
> bpelResource="classpath:Login.bpel" />
>                                 </sm:component>
>                         </sm:activationSpec>
>
>
> I place Login.bpel, FileValidation.bpel, Login.wsdl and
> FileValidation.wsdl
> in classpath.  And during activation of fileValidationProcess, it reads
> Login.wsdl.  How to specify the wsdl file to be read by
> fileValidationProcess?  I just specify bpelResources to
> FileValidation.bpel
> which then should read FileValidation.wsdl.  Is this the caused?
>
> Thanks..
> --
> View this message in context:
> http://www.nabble.com/2-bpel-component-in-1-servicemix-instance-tf2061589.html#a5681973
> Sent from the ServiceMix - User forum at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet

Re: 2 bpel component in 1 servicemix instance

Posted by azwan <sl...@gmail.com>.
Below is the log 

At line "Activating component for:
[container=ServiceMix,name=fileValidationProcess] with service: .." it
initialize schema
"file:/home/azwan/tmp/servicemix-3.0-M2/apache-servicemix-3.0-M2-incubating/examples/mytest/mytest/epf/build/components/Login.wsdl"
which is wrong...it should be FileValidation.wsdl

Activating component for: [container=ServiceMix,name=fileValidationProcess]
with service: {urn:imocha:soa:fileValidation}FileValidationService
component: org.apache.servicemix.bpe.BPESpringComponent@e99ce5
Initializing component: fileValidationProcess
Initializing component
Initializing schema collection with baseUri:
file:/home/azwan/tmp/servicemix-3.0-M2/apache-servicemix-3.0-M2-incubating/examples/mytest/mytest/epf/build/components/Login.wsdl
Component initialized
Activating component for: [container=ServiceMix,name=loginProcess] with
service: {urn:imocha:soa:login}LoginService component:
org.apache.servicemix.bpe.BPESpringComponent@31688f
Initializing component: loginProcess
Initializing component
Initializing schema collection with baseUri:
file:/home/azwan/tmp/servicemix-3.0-M2/apache-servicemix-3.0-M2-incubating/examples/mytest/mytest/epf/build/components/Login.wsdl
Component initialized
.....
......
Starting component
Component: fileValidationProcess activated endpoint:
{urn:imocha:soa:login}LoginService : loginBroker
Querying service description for
ServiceEndpoint[service={urn:imocha:soa:login}LoginService,endpoint=loginBroker]
Endpoint
ServiceEndpoint[service={urn:imocha:soa:login}LoginService,endpoint=loginBroker]
implements interface {urn:imocha:soa:login}StringBroker
Component started
Starting component
Component: loginProcess activated endpoint:
{urn:imocha:soa:login}LoginService : loginBroker


My servicemix.xml:

<sm:activationSpec id="fileValidationProcess"
service="fv:FileValidationService" endpoint="fileValidationProcess">
				<sm:component>
					<bpws:component bpelResource="classpath:FileValidation.bpel" />
				</sm:component>
			</sm:activationSpec>
			
			<sm:activationSpec id="loginProcess" service="login:LoginService"
endpoint="loginProcess">
				<sm:component>
					<bpws:component bpelResource="classpath:Login.bpel" />
				</sm:component>
			</sm:activationSpec>


I place Login.bpel, FileValidation.bpel, Login.wsdl and FileValidation.wsdl
in classpath.  And during activation of fileValidationProcess, it reads
Login.wsdl.  How to specify the wsdl file to be read by
fileValidationProcess?  I just specify bpelResources to FileValidation.bpel
which then should read FileValidation.wsdl.  Is this the caused?

Thanks..
-- 
View this message in context: http://www.nabble.com/2-bpel-component-in-1-servicemix-instance-tf2061589.html#a5681973
Sent from the ServiceMix - User forum at Nabble.com.


Re: 2 bpel component in 1 servicemix instance

Posted by Guillaume Nodet <gn...@gmail.com>.
The servicemix-http component will activate an external endpoint (when a
consumer)
using the service/endpoint attributes. So it will not conflict in any case
(because external
endpoints and internal endpoints do not conflict).

You can look at the log for endpoint activation and you should be able to
find which component
has activated the endpoint (or maybe using a jmx console and browsing at the
beans)

On 8/7/06, azwan <sl...@gmail.com> wrote:
>
>
> Actually I had another http endpoint and use wsdl file ProcessB.wsdl
> .  From
> the error previously, it show that the ProcessB already registered.  Is it
> because of this http endpoint that use same wsdl file?
> <http:endpoint service="demo:processBSoap"
>         endpoint="processBSoap"
>         role="consumer"
>         soap="true"
>         locationURI="http://localhost:8192/ProcessBService/"
>         defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
>         targetService="demo:receiver"
>         wsdlResource="classpath:ProcessB.wsdl"/>
> --
> View this message in context:
> http://www.nabble.com/2-bpel-component-in-1-servicemix-instance-tf2061589.html#a5680927
> Sent from the ServiceMix - User forum at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet

Re: 2 bpel component in 1 servicemix instance

Posted by azwan <sl...@gmail.com>.
Actually I had another http endpoint and use wsdl file ProcessB.wsdl.  From
the error previously, it show that the ProcessB already registered.  Is it
because of this http endpoint that use same wsdl file? 
<http:endpoint service="demo:processBSoap"
	endpoint="processBSoap"
	role="consumer"
	soap="true"
	locationURI="http://localhost:8192/ProcessBService/"
	defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
	targetService="demo:receiver"
	wsdlResource="classpath:ProcessB.wsdl"/>
-- 
View this message in context: http://www.nabble.com/2-bpel-component-in-1-servicemix-instance-tf2061589.html#a5680927
Sent from the ServiceMix - User forum at Nabble.com.


Re: 2 bpel component in 1 servicemix instance

Posted by Guillaume Nodet <gn...@gmail.com>.
Well, a component has already activated this endpoint.
See the error:
  service {urn:imocha:soa:login}LoginService and endpoint loginBroker

If both your bpel are the same, they will try to activate the same endpoints
when the bpel has an receive action.  You need to specify two different
service names
or endpoint names.

On 8/7/06, azwan <sl...@gmail.com> wrote:
>
>
> Hi,
> I've tried that but got error during startup.  Any idea?
>
> <sm:activationSpec>
>                                 <sm:component>
>                                         <bpws:component
> bpelResource="classpath:processA.bpel" />
>                                 </sm:component>
>                         </sm:activationSpec>
>
>                         <sm:activationSpec>
>                                 <sm:component>
>                                         <bpws:component
> bpelResource="classpath:ProcessB.bpel" />
>                                 </sm:component>
>                         </sm:activationSpec>
>
> Caught: org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'jbi' defined in file
> [/home/azwan/tmp/servicemix-3.0-M2/apache-servicemix-3.0-M2-incubating
> /examples/mytest/mytest/epf/servicemix.xml]:
> Invocation of init method failed; nested exception is
> javax.jbi.JBIException: An internal endpoint for service
> {urn:imocha:soa:login}LoginService and endpoint loginBroker is already
> registered
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean
> with name 'jbi' defined in file
> [/home/azwan/tmp/servicemix-3.0-M2/apache-servicemix-3.0-M2-incubating
> /examples/mytest/mytest/epf/servicemix.xml]:
> Invocation of init method failed; nested exception is
> javax.jbi.JBIException: An internal endpoint for service
> {urn:imocha:soa:login}LoginService and endpoint loginBroker is already
> registered
> Caused by: javax.jbi.JBIException: An internal endpoint for service
> {urn:imocha:soa:processB}ProcessBService and endpoint processBBroker is
> already registered
>         at
>
> org.apache.servicemix.jbi.framework.EndpointRegistry.registerInternalEndpoint
> (EndpointRegistry.java:157)
>         at
> org.apache.servicemix.jbi.framework.Registry.activateEndpoint(
> Registry.java:179)
>         at
> org.apache.servicemix.jbi.framework.ComponentContextImpl.activateEndpoint(
> ComponentContextImpl.java:135)
>         at
> org.apache.servicemix.bpe.BPEEndpoint.activate(BPEEndpoint.java:74)
>         at
> org.apache.servicemix.common.ServiceUnit.start(ServiceUnit.java:49)
>         at
> org.apache.servicemix.bpe.BPESpringComponent$LifeCycle.doStart(
> BPESpringComponent.java:61)
>         at
> org.apache.servicemix.common.AsyncBaseLifeCycle.start(
> AsyncBaseLifeCycle.java:198)
>         at
> org.apache.servicemix.jbi.framework.ComponentMBeanImpl.doStart(
> ComponentMBeanImpl.java:285)
>         at
>
> org.apache.servicemix.jbi.framework.ComponentRegistry.setInitialRunningStateFromStart
> (ComponentRegistry.java:155)
>         at
> org.apache.servicemix.jbi.framework.ComponentRegistry.start(
> ComponentRegistry.java:72)
>
> --
> View this message in context:
> http://www.nabble.com/2-bpel-component-in-1-servicemix-instance-tf2061589.html#a5680811
> Sent from the ServiceMix - User forum at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet

Re: 2 bpel component in 1 servicemix instance

Posted by azwan <sl...@gmail.com>.
Hi,
I've tried that but got error during startup.  Any idea?

<sm:activationSpec>
				<sm:component>
					<bpws:component bpelResource="classpath:processA.bpel" />
				</sm:component>
			</sm:activationSpec>
			
			<sm:activationSpec>
				<sm:component>
					<bpws:component bpelResource="classpath:ProcessB.bpel" />
				</sm:component>
			</sm:activationSpec>

Caught: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'jbi' defined in file
[/home/azwan/tmp/servicemix-3.0-M2/apache-servicemix-3.0-M2-incubating/examples/mytest/mytest/epf/servicemix.xml]:
Invocation of init method failed; nested exception is
javax.jbi.JBIException: An internal endpoint for service
{urn:imocha:soa:login}LoginService and endpoint loginBroker is already
registered
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'jbi' defined in file
[/home/azwan/tmp/servicemix-3.0-M2/apache-servicemix-3.0-M2-incubating/examples/mytest/mytest/epf/servicemix.xml]:
Invocation of init method failed; nested exception is
javax.jbi.JBIException: An internal endpoint for service
{urn:imocha:soa:login}LoginService and endpoint loginBroker is already
registered
Caused by: javax.jbi.JBIException: An internal endpoint for service
{urn:imocha:soa:processB}ProcessBService and endpoint processBBroker is
already registered
        at
org.apache.servicemix.jbi.framework.EndpointRegistry.registerInternalEndpoint(EndpointRegistry.java:157)
        at
org.apache.servicemix.jbi.framework.Registry.activateEndpoint(Registry.java:179)
        at
org.apache.servicemix.jbi.framework.ComponentContextImpl.activateEndpoint(ComponentContextImpl.java:135)
        at
org.apache.servicemix.bpe.BPEEndpoint.activate(BPEEndpoint.java:74)
        at
org.apache.servicemix.common.ServiceUnit.start(ServiceUnit.java:49)
        at
org.apache.servicemix.bpe.BPESpringComponent$LifeCycle.doStart(BPESpringComponent.java:61)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.start(AsyncBaseLifeCycle.java:198)
        at
org.apache.servicemix.jbi.framework.ComponentMBeanImpl.doStart(ComponentMBeanImpl.java:285)
        at
org.apache.servicemix.jbi.framework.ComponentRegistry.setInitialRunningStateFromStart(ComponentRegistry.java:155)
        at
org.apache.servicemix.jbi.framework.ComponentRegistry.start(ComponentRegistry.java:72)

-- 
View this message in context: http://www.nabble.com/2-bpel-component-in-1-servicemix-instance-tf2061589.html#a5680811
Sent from the ServiceMix - User forum at Nabble.com.


Re: 2 bpel component in 1 servicemix instance

Posted by Guillaume Nodet <gn...@gmail.com>.
You can not put two components in the same activation spec (it should fail,
but it seems it does not).
You need to use 2 activation specs.

On 8/7/06, azwan <sl...@gmail.com> wrote:
>
>
> Hi All,
> Can I have 2 bpel component in 1 servicemix instance.  I tried to
> configure
> that and can start servicemix with success.  I can call only one of the
> bpel
> endpoint, and not the other one.  I'm using servicemix-3.0-M2.  My partial
> servicemix.xml
>
> <sm:activationSpec>
>                                 <sm:component>
> <bpws:component bpelResource="classpath:ProcessA.bpel" />
> <bpws:component bpelResource="classpath:ProcessB.bpel" />
>                                 </sm:component>
>                         </sm:activationSpec>
>
> The error i got is:
> WARN  - DefaultBroker                  - ServiceName
> ({urn:imocha:soa:fileValidation}ProcessBService) specified for routing,
> but
> can't find it registered
> javax.jbi.messaging.MessagingException: Could not find route for exchange:
> MessageExchange[
>   id: ID:azwan-33122-1154922598825-7:0
>   status: Active
>   role: provider
>   service: {urn:imocha:soa:processB}ProcessBService
>   operation: getString
>   in: <?xml version="1.0" encoding="UTF-8"?><getStringRequest
> xmlns:e="http://schemas.xmlsoap.org/soap/envelope/
> "><message>hello</message></getStringRequest>
> ] for service: {urn:imocha:soa:processB}processBService and interface:
> null
>         at
> org.apache.servicemix.jbi.nmr.DefaultBroker.sendExchangePacket(
> DefaultBroker.java:311)
>         at
> org.apache.servicemix.jbi.container.JBIContainer.sendExchange(
> JBIContainer.java:713)
>         at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(
> DeliveryChannelImpl.java:374)
>         at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(
> DeliveryChannelImpl.java:
> --
> View this message in context:
> http://www.nabble.com/2-bpel-component-in-1-servicemix-instance-tf2061589.html#a5679307
> Sent from the ServiceMix - User forum at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet