You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Guochao Ren <rg...@gmail.com> on 2013/06/05 09:02:19 UTC

about bpel implmentation example in tuscany 2.0

Hi, guys
I'm running the helloworld-bpel sample in tags/2.0-M4, and i encounter the
following problem

六月 05, 2013 2:53:43 下午 org.apache.tuscany.sca.impl.NodeImpl startComposite
Info: startComposite: helloworld-bpel/helloworld.composite
Exception in thread "main" java.lang.IllegalArgumentException: Business
interface helloworld.Hello is not compatible with {http://testing/}Hello
 at
org.apache.tuscany.sca.core.context.impl.ComponentContextImpl.getInterfaceContract(ComponentContextImpl.java:494)
at
org.apache.tuscany.sca.core.context.impl.ComponentContextImpl.createEndpointReference(ComponentContextImpl.java:424)
 at
org.apache.tuscany.sca.core.context.impl.ComponentContextImpl.createEndpointReference(ComponentContextImpl.java:400)
at
org.apache.tuscany.sca.core.context.impl.ComponentContextImpl.createSelfReference(ComponentContextImpl.java:301)
 at
org.apache.tuscany.sca.core.context.impl.ComponentContextImpl.createSelfReference(ComponentContextImpl.java:255)
at
org.apache.tuscany.sca.core.assembly.impl.RuntimeComponentImpl.getServiceReference(RuntimeComponentImpl.java:127)
 at
org.apache.tuscany.sca.impl.ServiceHelper.getService(ServiceHelper.java:82)
at org.apache.tuscany.sca.impl.NodeImpl.getService(NodeImpl.java:470)
 at helloworld.HelloworldLauncher.accessServices(HelloworldLauncher.java:34)
at helloworld.HelloworldLauncher.main(HelloworldLauncher.java:28)



and i debug into ComponentContextImpl in tuscany-core-2.0, and found that
in line 466, we never go into this if sentence, because in bpel this
interfaze is not instanceof JavaInterface

   if (interfaze instanceof JavaInterface) {
                Class<?> cls = ((JavaInterface)interfaze).getJavaClass();
                if (businessInterface.isAssignableFrom(cls)) {
                    compatible = true;
                }

Can anyone tell me what's wrong has happened?
Or can anyone give me a runnable bpel implementation example?
I cannot find bpel implementation in the distribution of 2.0.

Regards,
Guochao

Re: about bpel implmentation example in tuscany 2.0

Posted by Luciano Resende <lu...@gmail.com>.
On Wed, Jun 5, 2013 at 12:02 AM, Guochao Ren <rg...@gmail.com> wrote:

> Hi, guys
> I'm running the helloworld-bpel sample in tags/2.0-M4, and i encounter the
> following problem
>
> 六月 05, 2013 2:53:43 下午 org.apache.tuscany.sca.impl.NodeImpl startComposite
> Info: startComposite: helloworld-bpel/helloworld.composite
> Exception in thread "main" java.lang.IllegalArgumentException: Business
> interface helloworld.Hello is not compatible with {http://testing/}Hello
>  at
> org.apache.tuscany.sca.core.context.impl.ComponentContextImpl.getInterfaceContract(ComponentContextImpl.java:494)
> at
> org.apache.tuscany.sca.core.context.impl.ComponentContextImpl.createEndpointReference(ComponentContextImpl.java:424)
>  at
> org.apache.tuscany.sca.core.context.impl.ComponentContextImpl.createEndpointReference(ComponentContextImpl.java:400)
> at
> org.apache.tuscany.sca.core.context.impl.ComponentContextImpl.createSelfReference(ComponentContextImpl.java:301)
>  at
> org.apache.tuscany.sca.core.context.impl.ComponentContextImpl.createSelfReference(ComponentContextImpl.java:255)
> at
> org.apache.tuscany.sca.core.assembly.impl.RuntimeComponentImpl.getServiceReference(RuntimeComponentImpl.java:127)
>  at
> org.apache.tuscany.sca.impl.ServiceHelper.getService(ServiceHelper.java:82)
> at org.apache.tuscany.sca.impl.NodeImpl.getService(NodeImpl.java:470)
>  at
> helloworld.HelloworldLauncher.accessServices(HelloworldLauncher.java:34)
> at helloworld.HelloworldLauncher.main(HelloworldLauncher.java:28)
>
>
>
> and i debug into ComponentContextImpl in tuscany-core-2.0, and found that
> in line 466, we never go into this if sentence, because in bpel this
> interfaze is not instanceof JavaInterface
>
>    if (interfaze instanceof JavaInterface) {
>                 Class<?> cls = ((JavaInterface)interfaze).getJavaClass();
>                 if (businessInterface.isAssignableFrom(cls)) {
>                     compatible = true;
>                 }
>
> Can anyone tell me what's wrong has happened?
> Or can anyone give me a runnable bpel implementation example?
> I cannot find bpel implementation in the distribution of 2.0.
>
> Regards,
> Guochao
>
>

You should be able to see a few BPEL examples at :
https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk/testing/itest/bpel/

-- 
Luciano Resende
http://people.apache.org/~lresende
http://twitter.com/lresende1975
http://lresende.blogspot.com/