You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Mike Edwards <mi...@gmail.com> on 2008/05/08 15:59:10 UTC

Re: Build failure in helloworld-bpel sample - HELP PLEASE

Folks,

The problem seems to be with the testcase itself, in my opinion, but before I go and hack the 
testcase, I'm posting to the list to see if anyone knows why the sample is the way it is.

Look at the BPEL process - helloworld.bpel

It contains an import for the WSDL referenced by the process.  This import uses a quite 
extraordinary namespace:

namespace="file:///home/mriou/dev/projects/ode/distro-axis2/src/examples/HelloWorld2/HelloWorld2.wsdl"

This is bizarre and bears no relationship to the actual WSDL used, which has the more expected 
namespace of:

targetNamespace="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl"

....my first step is going to be to correct the namespace (the BPEL processing code needs a fix too 
- this error should be flagged much earlier than is the case currently)

- HOWEVER - am I being dim and have I missed something here?

Yours, puzzled, Mike.


PS The reason this never caused a problem before is that I believe that NO-ONE was using the import 
statement !!  The componentType file was overriding everything, including this.


Mike Edwards wrote:
> Folks,
> 
> I'll take a look at this - this is new code I checked in yesterday - 
> built OK for me.
> 
> 
> Yours,  Mike.
> 
> Simon Laws wrote:
>> On Thu, May 8, 2008 at 10:24 AM, Simon Nash <na...@apache.org> wrote:
>>
>>> I just did a full checkout and build.  The build failed in the
>>> helloworld-bpel sample with the following exception.
>>>
>>>  Simon
>>>
>>> Running helloworld.BPELHelloWorldTestCase
>>> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.479 
>>> sec
>>> <<< FA
>>> ILURE!
>>> testInvoke(helloworld.BPELHelloWorldTestCase)  Time elapsed: 1.456 sec
>>>  <<< ERRO
>>> R!
>>> org.osoa.sca.ServiceRuntimeException: java.lang.NullPointerException
>>>        at
>>> org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCAD
>>> omain.java:276)
>>>        at
>>> org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(SCADomain.
>>> java:70)
>>>        at
>>> helloworld.BPELHelloWorldTestCase.setUp(BPELHelloWorldTestCase.java:4
>>> 2)
>>>        at junit.framework.TestCase.runBare(TestCase.java:125)
>>>        at junit.framework.TestResult$1.protect(TestResult.java:106)
>>>        at junit.framework.TestResult.runProtected(TestResult.java:124)
>>>        at junit.framework.TestResult.run(TestResult.java:109)
>>>        at junit.framework.TestCase.run(TestCase.java:118)
>>>        at junit.framework.TestSuite.runTest(TestSuite.java:208)
>>>        at junit.framework.TestSuite.run(TestSuite.java:203)
>>>        at
>>> org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.
>>> java:35)
>>>        at
>>> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.
>>> java:62)
>>>        at
>>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTes
>>> tSet(AbstractDirectoryTestSuite.java:138)
>>>        at
>>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(Ab
>>> stractDirectoryTestSuite.java:125)
>>>        at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
>>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>        at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
>>> java:39)
>>>        at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
>>> sorImpl.java:25)
>>>        at java.lang.reflect.Method.invoke(Method.java:585)
>>>        at
>>> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(Su
>>> refireBooter.java:308)
>>>        at
>>> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.j
>>> ava:879)
>>> Caused by: java.lang.NullPointerException
>>>        at
>>> org.apache.tuscany.sca.implementation.bpel.impl.BPELDocumentProcessor
>>> .getPartnerLinkTypes(BPELDocumentProcessor.java:206)
>>>        at
>>> org.apache.tuscany.sca.implementation.bpel.impl.BPELDocumentProcessor
>>> .resolve(BPELDocumentProcessor.java:172)
>>>        at
>>> org.apache.tuscany.sca.implementation.bpel.impl.BPELDocumentProcessor
>>> .resolve(BPELDocumentProcessor.java:77)
>>>        at
>>> org.apache.tuscany.sca.contribution.processor.DefaultURLArtifactProce
>>>
>>> ssorExtensionPoint$LazyURLArtifactProcessor.resolve(DefaultURLArtifactProcessorE 
>>>
>>> xtensionPoint.java:195)
>>>        at
>>> org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactPr
>>> ocessor.resolve(ExtensibleURLArtifactProcessor.java:86)
>>>        at
>>> org.apache.tuscany.sca.contribution.service.impl.ContributionServiceI
>>> mpl.processResolvePhase(ContributionServiceImpl.java:497)
>>>        at
>>> org.apache.tuscany.sca.contribution.service.impl.ContributionServiceI
>>> mpl.addContribution(ContributionServiceImpl.java:372)
>>>        at
>>> org.apache.tuscany.sca.contribution.service.impl.ContributionServiceI
>>> mpl.contribute(ContributionServiceImpl.java:168)
>>>        at
>>> org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.addContrib
>>> ution(DefaultSCADomain.java:291)
>>>        at
>>> org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.init(Defau
>>> ltSCADomain.java:171)
>>>        at
>>> org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(Def
>>> aultSCADomain.java:113)
>>>        at
>>> org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCAD
>>> omain.java:242)
>>>        ... 20 more
>>>
>>>
>>> Results :
>>>
>>> Tests in error:
>>>  testInvoke(helloworld.BPELHelloWorldTestCase)
>>>
>>>
>> I just got that too.
>>
>> Simon
>>
> 
> 


Re: Build failure in helloworld-bpel sample - HELP PLEASE

Posted by Luciano Resende <lu...@gmail.com>.
The BPEL process was only really processed by the ODE BPEL Engine
before, and looks like they were tolerant to that. The namespace was
there probably from it's original content when we copied from ODE
sample. But note that the BPEL process in the iTests does not have
this issue and they have either :

itest/bpel/helloworld
<import location="helloworld.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"
     namespace="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl"/>

itest/bpel/helloworld-reference
  <import location="helloworld.wsdl"
importType="http://schemas.xmlsoap.org/wsdl/"
     namespace="http://helloworld"/>

Well, this is just an observation, but I didn't have time to debug
this yet... let me try to debug it little bit later today.

On Thu, May 8, 2008 at 6:59 AM, Mike Edwards
<mi...@gmail.com> wrote:
> Folks,
>
> The problem seems to be with the testcase itself, in my opinion, but before
> I go and hack the testcase, I'm posting to the list to see if anyone knows
> why the sample is the way it is.
>
> Look at the BPEL process - helloworld.bpel
>
> It contains an import for the WSDL referenced by the process.  This import
> uses a quite extraordinary namespace:
>
> namespace="file:///home/mriou/dev/projects/ode/distro-axis2/src/examples/HelloWorld2/HelloWorld2.wsdl"
>
> This is bizarre and bears no relationship to the actual WSDL used, which has
> the more expected namespace of:
>
> targetNamespace="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl"
>
> ....my first step is going to be to correct the namespace (the BPEL
> processing code needs a fix too - this error should be flagged much earlier
> than is the case currently)
>
> - HOWEVER - am I being dim and have I missed something here?
>
> Yours, puzzled, Mike.
>
>
> PS The reason this never caused a problem before is that I believe that
> NO-ONE was using the import statement !!  The componentType file was
> overriding everything, including this.
>
>
> Mike Edwards wrote:
>>
>> Folks,
>>
>> I'll take a look at this - this is new code I checked in yesterday - built
>> OK for me.
>>
>>
>> Yours,  Mike.
>>
>> Simon Laws wrote:
>>>
>>> On Thu, May 8, 2008 at 10:24 AM, Simon Nash <na...@apache.org> wrote:
>>>
>>>> I just did a full checkout and build.  The build failed in the
>>>> helloworld-bpel sample with the following exception.
>>>>
>>>>  Simon
>>>>
>>>> Running helloworld.BPELHelloWorldTestCase
>>>> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.479
>>>> sec
>>>> <<< FA
>>>> ILURE!
>>>> testInvoke(helloworld.BPELHelloWorldTestCase)  Time elapsed: 1.456 sec
>>>>  <<< ERRO
>>>> R!
>>>> org.osoa.sca.ServiceRuntimeException: java.lang.NullPointerException
>>>>       at
>>>> org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCAD
>>>> omain.java:276)
>>>>       at
>>>> org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(SCADomain.
>>>> java:70)
>>>>       at
>>>> helloworld.BPELHelloWorldTestCase.setUp(BPELHelloWorldTestCase.java:4
>>>> 2)
>>>>       at junit.framework.TestCase.runBare(TestCase.java:125)
>>>>       at junit.framework.TestResult$1.protect(TestResult.java:106)
>>>>       at junit.framework.TestResult.runProtected(TestResult.java:124)
>>>>       at junit.framework.TestResult.run(TestResult.java:109)
>>>>       at junit.framework.TestCase.run(TestCase.java:118)
>>>>       at junit.framework.TestSuite.runTest(TestSuite.java:208)
>>>>       at junit.framework.TestSuite.run(TestSuite.java:203)
>>>>       at
>>>> org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.
>>>> java:35)
>>>>       at
>>>> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.
>>>> java:62)
>>>>       at
>>>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTes
>>>> tSet(AbstractDirectoryTestSuite.java:138)
>>>>       at
>>>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(Ab
>>>> stractDirectoryTestSuite.java:125)
>>>>       at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
>>>>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>       at
>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
>>>> java:39)
>>>>       at
>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
>>>> sorImpl.java:25)
>>>>       at java.lang.reflect.Method.invoke(Method.java:585)
>>>>       at
>>>> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(Su
>>>> refireBooter.java:308)
>>>>       at
>>>> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.j
>>>> ava:879)
>>>> Caused by: java.lang.NullPointerException
>>>>       at
>>>> org.apache.tuscany.sca.implementation.bpel.impl.BPELDocumentProcessor
>>>> .getPartnerLinkTypes(BPELDocumentProcessor.java:206)
>>>>       at
>>>> org.apache.tuscany.sca.implementation.bpel.impl.BPELDocumentProcessor
>>>> .resolve(BPELDocumentProcessor.java:172)
>>>>       at
>>>> org.apache.tuscany.sca.implementation.bpel.impl.BPELDocumentProcessor
>>>> .resolve(BPELDocumentProcessor.java:77)
>>>>       at
>>>> org.apache.tuscany.sca.contribution.processor.DefaultURLArtifactProce
>>>>
>>>>
>>>> ssorExtensionPoint$LazyURLArtifactProcessor.resolve(DefaultURLArtifactProcessorE
>>>> xtensionPoint.java:195)
>>>>       at
>>>> org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactPr
>>>> ocessor.resolve(ExtensibleURLArtifactProcessor.java:86)
>>>>       at
>>>> org.apache.tuscany.sca.contribution.service.impl.ContributionServiceI
>>>> mpl.processResolvePhase(ContributionServiceImpl.java:497)
>>>>       at
>>>> org.apache.tuscany.sca.contribution.service.impl.ContributionServiceI
>>>> mpl.addContribution(ContributionServiceImpl.java:372)
>>>>       at
>>>> org.apache.tuscany.sca.contribution.service.impl.ContributionServiceI
>>>> mpl.contribute(ContributionServiceImpl.java:168)
>>>>       at
>>>> org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.addContrib
>>>> ution(DefaultSCADomain.java:291)
>>>>       at
>>>> org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.init(Defau
>>>> ltSCADomain.java:171)
>>>>       at
>>>> org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(Def
>>>> aultSCADomain.java:113)
>>>>       at
>>>> org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCAD
>>>> omain.java:242)
>>>>       ... 20 more
>>>>
>>>>
>>>> Results :
>>>>
>>>> Tests in error:
>>>>  testInvoke(helloworld.BPELHelloWorldTestCase)
>>>>
>>>>
>>> I just got that too.
>>>
>>> Simon
>>>
>>
>>
>
>



-- 
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/

Re: Build failure in helloworld-bpel sample - fixed

Posted by Mike Edwards <mi...@gmail.com>.
OK,

I committed fixes to the BPEL Sample, iTest and implementation code to fix the problems that folks 
found in the build.

Sorry that I did not spot all these before I made the previous commit.


Yours,  Mike.

Re: Build failure in helloworld-bpel sample - further progress

Posted by Mike Edwards <mi...@gmail.com>.
Mike Edwards wrote:
> Folks,
> 
> The problem seems to be with the testcase itself, in my opinion, but 
> before I go and hack the testcase, I'm posting to the list to see if 
> anyone knows why the sample is the way it is.
> 
> Look at the BPEL process - helloworld.bpel
> 
> It contains an import for the WSDL referenced by the process.  This 
> import uses a quite extraordinary namespace:
> 
> namespace="file:///home/mriou/dev/projects/ode/distro-axis2/src/examples/HelloWorld2/HelloWorld2.wsdl" 
> 
> 
> This is bizarre and bears no relationship to the actual WSDL used, which 
> has the more expected namespace of:
> 
> targetNamespace="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl" 
> 
> 
> ....my first step is going to be to correct the namespace (the BPEL 
> processing code needs a fix too - this error should be flagged much 
> earlier than is the case currently)
> 
> - HOWEVER - am I being dim and have I missed something here?
> 
> Yours, puzzled, Mike.
> 
> 
> PS The reason this never caused a problem before is that I believe that 
> NO-ONE was using the import statement !!  The componentType file was 
> overriding everything, including this.
> 
> 
Well, more investigating allowed me to get the test working correctly, with the following changes:

a) Change the namespace in the <import.../> statement in the BPEL process, to match the actual 
namespace of the WSDL document (as above)

b) Change the name of the service identified in the componentType file.  The name originally in 
there - "HelloService" violates the SCA BPEL specification which clearly states that the name of the 
service for a BPEL partnerLink is the name of the partnerLink (and it can't be overridden).  So I 
updated the componentType file to use the name "helloPartnerLink".

I am considering stiffening the handling of the componentType information from the side file to 
PREVENT the use of services or refernences that do not match the services and references found from 
introspection of the BPEL process, since the effect of not matching is to imply that there are more 
services/references than are actually present in the BPEL process implementation.

Yours,  Mike.