Tuscany
  1. Tuscany
  2. TUSCANY-1994

helloworld-bpel sample cannot run from a jar file

    Details

      Description

      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

        Activity

        Hide
        Luciano Resende added a comment -

        Tweaking the build.xml to not generate the sample jar as a temporary fix for 1.2 release. Moving to SCA-Next for further investigation.

        Show
        Luciano Resende added a comment - Tweaking the build.xml to not generate the sample jar as a temporary fix for 1.2 release. Moving to SCA-Next for further investigation.
        Hide
        Simon Nash added a comment -

        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.

        Show
        Simon Nash added a comment - 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.
        Hide
        Simon Nash added a comment -

        Updating the component to reflect the cause of this problem.

        Show
        Simon Nash added a comment - Updating the component to reflect the cause of this problem.

          People

          • Assignee:
            Luciano Resende
            Reporter:
            Simon Nash
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development