[ 
https://issues.apache.org/jira/browse/TUSCANY-1994?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12913522#action_12913522
 ] 

Simon Nash commented on TUSCANY-1994:
-------------------------------------

Something has changed since 1.2, as the sample jar is being generated now.

See the comments on TUSCANY-3461 for more information about why this sample 
can't be run from a jar file.

I've updated build.xml to unzip the sample jar file to the target/classes 
directory and run it from there.  This avoids the need to compile the sample 
before running it from the binary distribution.  I've also updated the README 
to describe how to do this, with a pointer to this JIRA for more details on the 
reason why the sample can't be run directly from the sample jar.

These changes are in r999904 and r999910.

I'm leaving this JIRA open to track the issue with the Tuscany runtime not 
being able to run a BPEL process file contained within a jar.

> helloworld-bpel sample cannot run from a jar file
> -------------------------------------------------
>
>                 Key: TUSCANY-1994
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1994
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Samples
>    Affects Versions: Java-SCA-1.1
>         Environment: Windows XP
>            Reporter: Simon Nash
>            Assignee: Luciano Resende
>            Priority: Minor
>             Fix For: Java-SCA-1.x
>
>
> The ant scripts for most samples have a "run" target to run the sample from a 
> pre-built jar and also a "run-classes" target to run from the target/classes 
> directory, with equivalent results from both modes of execution.  However, 
> when attempting to run the helloworld-bpel sample from a jar file, the error 
> shown below is produced.
> To avoid user confusion, I have updated the build.xml for helloworld-bpel so 
> that its run target points to target/classes, and I have removed the target 
> that runs from a jar file.  See revision r611954.  To recreate this error, 
> modify the build.xml file to replace line 83:
>                 <pathelement path="target/classes"/>
> by the following line:
>                 <pathelement path="target/${test.jar}"/>
> Here is the output showing the failure resulting from making this change. 
> This output was produced by running ant with the -d option to display the 
> classpath in use.  After the failure, the sample hangs and has to be stopped 
> by pressing Ctrl-C.
> run:
>      [java] Executing 'D:\jdk1.5.0_11\jre\bin\java.exe' with arguments:
>      [java] '-classpath'
>      [java] 
> 'H:\tuscany11a\sca-java-1.1\distribution\target\apache-tuscany-sca-1.1-incubating-SNAPSHOT.dir\tuscany-sca-1.1-incubating-SNAPSHOT\
> samples\helloworld-bpel\target\sample-helloworld-bpel.jar;
> H:\tuscany11a\sca-java-1.1\distribution\target\apache-tuscany-sca-1.1-incubating-SNAPSHOT.dir\tuscany-sca-1.1-incubating-SNAPSHOT\
> samples\helloworld-bpel\target\database;
> H:\tuscany11a\sca-java-1.1\distribution\target\apache-tuscany-sca-1.1-incubating-SNAPSHOT.dir\tuscany-sca-1.1-incubating-SNAPSHOT\
> lib\tuscany-sca-manifest.jar'
>      [java] 'helloworld.BPELClient'
>      [java]
>      [java] The ' characters around the executable and arguments are
>      [java] not part of the command.
> Execute:Java13CommandLauncher: Executing 'D:\jdk1.5.0_11\jre\bin\java.exe' 
> with arguments:
> '-classpath'
> 'H:\tuscany11a\sca-java-1.1\distribution\target\apache-tuscany-sca-1.1-incubating-SNAPSHOT.dir\tuscany-sca-1.1-incubating-SNAPSHOT\
> samples\helloworld-bpel\target\sample-helloworld-bpel.jar;
> H:\tuscany11a\sca-java-1.1\distribution\target\apache-tuscany-sca-1.1-incubating-SNAPSHOT.dir\tuscany-sca-1.1-incubating-SNAPSHOT\
> samples\helloworld-bpel\target\database;
> H:\tuscany11a\sca-java-1.1\distribution\target\apache-tuscany-sca-1.1-incubating-SNAPSHOT.dir\tuscany-sca-1.1-incubating-SNAPSHOT\
> lib\tuscany-sca-manifest.jar'
> 'helloworld.BPELClient'
> The ' characters around the executable and arguments are
> not part of the command.
>      [java] Starting BPELHelloWorldComponent
>      [java] Exception in thread "main" org.osoa.sca.ServiceRuntimeException: 
> java.lang.RuntimeException: BPEl Component Type implementation initialization 
> failure : null
>      [java]     at 
> org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.java:264)
>      [java]     at 
> org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(SCADomain.java:69)
>      [java]     at helloworld.BPELClient.main(BPELClient.java:33)
>      [java] Caused by: java.lang.RuntimeException: BPEl Component Type 
> Implementation initialization failure : null
>      [java]     at 
> org.apache.tuscany.sca.implementation.bpel.provider.BPELImplementationProvider.start(BPELImplementationProvider.java:105)
>      [java]     at 
> org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.start(CompositeActivatorImpl.java:495)
>      [java]     at 
> org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(DefaultSCADomain.java:189)
>      [java]     at 
> org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.java:230)
>      [java]     ... 2 more
>      [java] Caused by: java.lang.NullPointerException
>      [java]     at java.io.File.<init>(File.java:194)
>      [java]     at 
> org.apache.tuscany.sca.implementation.bpel.provider.BPELImplementationProvider.start(BPELImplementationProvider.java:87)
>      [java]     ... 5 more
> Terminate batch job (Y/N)? y

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to