6 Replies Latest reply on Sep 26, 2006 5:08 AM by aguizar

    BPEL beta2 - com.sun.tools.javac.Main - Java 1.5.0_07

    kvak_tnt

      For anyone who will get the same error while starting wscompile in BPEL beta 2 - here is the error and following up the sollution:

      ERROR if you use Java 1.5.0_07

      Buildfile: C:\EWorkspace\bpel-beta2\jbpm.bpel\doc\examples\atm\build.xml
      wscompile:
      [wscompile] command line: wscompile C:\Programme\Java\jre1.5.0_07\bin\java.exe -Duser.dir=C:\EWorkspace\bpel-beta2\jbpm.bpel\doc\examples\atm -classpath C:\entwicklung\sun\jwsdp-1.6\jaxrpc\lib\jaxrpc-api.jar;C:\entwicklung\sun\jwsdp-1.6\jaxrpc\lib\jaxrpc-impl.jar;C:\entwicklung\sun\jwsdp-1.6\jaxrpc\lib\jaxrpc-spi.jar;C:\EWorkspace\bpel-beta2\jbpm.bpel\doc\examples\atm\src\main\resources com.sun.xml.rpc.tools.wscompile.Main -d C:\EWorkspace\bpel-beta2\jbpm.bpel\doc\examples\atm\output\classes -features:norpcstructures,wsi,strict -import -keep -mapping C:\EWorkspace\bpel-beta2\jbpm.bpel\doc\examples\atm\output\resources\WEB-INF\jaxrpc-mapping.xml -s C:\EWorkspace\bpel-beta2\jbpm.bpel\doc\examples\atm\output\java -verbose C:\EWorkspace\bpel-beta2\jbpm.bpel\doc\examples\atm\src\main\resources\wscompile.xml
      [wscompile] [ServiceInterfaceGenerator: creating service interface: org.jbpm.bpel.tutorial.atm.AtmFrontEndService]
      [wscompile] [CustomExceptionGenerator: generating CustomException for: org.jbpm.bpel.tutorial.atm.UnauthorizedAccess]
      [wscompile] [CustomExceptionGenerator: generating CustomException for: org.jbpm.bpel.tutorial.atm.InsufficientFunds]
      [wscompile] Fehler: com.sun.tools.javac.Main ist im Klassenpfad nicht verfügbar..
      [wscompile] Fehler: Kompilierung fehlgeschlagen, die Fehler wurden gemeldet
      
      BUILD FAILED
      C:\EWorkspace\bpel-beta2\jbpm.bpel\doc\examples\common\webservice.build.xml:116: wscompile failed
      
      Total time: 5 seconds
      

      (ERROR: com.sun.tools.javac.Main is not available in your classpath)

      SOLLUTION
      start Eclipse
      go to Window \ Preferences \ Java \ Installed JREs
      Change either to Java 1.5.0_06 or do the following:
      select Java 1.5.0_07 - edit
      select "add external jars"
      go to your java_home directory \ lib and select tools.jar
      Open \ OK \ Ok
      Thats it.


      Greetings

      Claus

        • 1. Re: BPEL beta2 - com.sun.tools.javac.Main - Java 1.5.0_07
          kvak_tnt

          Hi again!

          maybe another reason for the failure:

          Eclipse:
          Window \ Preferences \ Ant \ Runtime \Global Entries:
          There is actually my jdk 1.5.0_06\lib\tools.jar added.
          Maybe this has been the failure.

          Greetings

          Claus

          • 2. Re: BPEL beta2 - com.sun.tools.javac.Main - Java 1.5.0_07
            aguizar

            The wscompile task is configured to fork; otherwise, it does not accept the -mapping option for some unknown reason.

            Even if you are using a JDK in Eclipse (as opposed to a JRE) or have tools.jar in your global entires, only the private JRE libraries are passed when the task forks, and the java.home system property is set to [jdk-install-dir]/jre. As a workaround I added the following element to the wscompile path (webservice.build.xml):

            <path id="wscompile.path">
             <fileset dir="${jwsdp.home}/jaxrpc/lib" includes="*.jar" />
             <pathelement location="${java.home}/../lib/tools.jar" />
             <pathelement location="${resources.dir}" />
            </path>


            I guess your java 1.5.0_07 entry in Eclipse points to a public JRE, hence directory ${java.home}/../lib does not exist. However, when you add tools.jar to your java 1.5.0_07 entry, that JAR is also passed to the forked VM.

            • 3. Re: BPEL beta2 - com.sun.tools.javac.Main - Java 1.5.0_07
              kvak_tnt

              OK.

              First to your Information:
              JAVA_HOME as a shellvariable is set to C:\Programme\Java\jdk_1.5.0_06

              Secondly:
              If I use Java 1.5.0_06 I have NO problems
              If I use 1.5.0_07 I have to do the workarround mentioned above.

              OK - now I read your post and I looked into the webservice.build.xml
              If I move my mouse over the java.home - I can normaly see which path actually would be used.

              It is the following entry:

              C:\Programme\Java\jre1.5.0_07

              But I do not know where to configure here another path? It is completely wrong as I use jre / jdk 1.5.0_06 (If you think why I use this version: In BPEL beta1 I was not able to run a newer version of JAVA)

              So if you know something about this it would be a great hint (but as I actually works) it is not a fast response necessary .

              Greetings

              Claus

              • 4. Re: BPEL beta2 - com.sun.tools.javac.Main - Java 1.5.0_07
                kvak_tnt

                By the way:

                Can you tell me which Java version you (developers) are working with?
                1.5.0_07? _08? _06?

                I asked this question allready - but got no anwser...

                • 5. Re: BPEL beta2 - com.sun.tools.javac.Main - Java 1.5.0_07
                  aguizar

                  1.5.0_07 with endorsed XML APIs.

                  • 6. Re: BPEL beta2 - com.sun.tools.javac.Main - Java 1.5.0_07
                    aguizar

                    It is also tested on 1.4.2_10 with endorsements. But make sure you use jdks, not jres.