Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.6, 2.2.7
    • Fix Version/s: 2.2.8
    • Component/s: runtime
    • Labels:
      None

      Description

      Hello,
      The release notes here: http://jax-ws.java.net/nonav/2.2.6-1/docs/ch02.html#required-software claim it should run on J2SE 5.0. Except that trying to run a JAXWS (standalone desktop) client with on-top JDK 1.5 fails with this message:

      Exception in thread "Main Thread" java.lang.UnsupportedClassVersionError:
       com/sun/xml/ws/spi/ProviderImpl : unsupported classversion 50.0
              at java.lang.ClassLoader.defineClass1(Native Method)
              at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
              at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
              at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
              at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
              at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
              at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
              at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
              at javax.xml.ws.spi.FactoryFinder.safeLoadClass(FactoryFinder.java:187)
              at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:66)
              at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:128)
              at javax.xml.ws.spi.Provider.provider(Provider.java:142)
              at javax.xml.ws.Service.<init>(Service.java:92)
              at org.me.calculator.ws.CalculatorWSService.<init>(CalculatorWSService.java:51)
              at org.me.calculator.CalculatorConsoleApp.main(CalculatorConsoleApp.java:26)
      

      I went ahead and downloaded the corresponding source tree from svn:

      svn co https://svn.java.net/svn/jax-ws~sources/tags/JAXWS_2_2_6_u1_04052012/jaxws-ri

      The build.xml (under rt subdir) does indeed specify "source=1.5" attribute on the javac tag. But this, unfortunately, isn't enough; "target=1.5" must also be specified (i.e. that's what JAXB build script does).
      To verify this I built with:

      ant -Dant.build.javac.target=1.5 dist

      and this produced a jaxws-rt.jar with JDK 1.5 class files.

      This last requirement gives rise to a second issue - this one with JDK 6. The javac help here: http://docs.oracle.com/javase/6/docs/technotes/tools/windows/javac.html#crosscomp-options proclaims that specifying the source as "1.5" would set the target to the same value - so target need not be explicitly set. But, javac doesn't behave this way!

      To complete the picture, JAX-WS also is missing to dependencies - activation.jar and jsr173_1.0_api.jar - to run on-top of JDK 1.5.

      BTW, Do I also file a bug with the javac subproject?

        Activity

        Hide
        Opher Shachar added a comment -

        But perhaps a case could be made that dependencies could be separated between compile time and run-time?
        Namely, require JDK6 at compile time, and JRE5 at run-time?
        It is not difficult to achieve and, in my case, I needed to support a standalone desktop app running on JRE5 that consumes WS.

        Thanks,
        Opher.

        Show
        Opher Shachar added a comment - But perhaps a case could be made that dependencies could be separated between compile time and run-time? Namely, require JDK6 at compile time, and JRE5 at run-time? It is not difficult to achieve and, in my case, I needed to support a standalone desktop app running on JRE5 that consumes WS. Thanks, Opher.
        Hide
        Martin Grebac added a comment -

        Fixed the docs. Will commit anytime svn goes up.

        Show
        Martin Grebac added a comment - Fixed the docs. Will commit anytime svn goes up.
        Hide
        Martin Grebac added a comment -

        We should fix the doc. JAXWS is not supposed to run on 1.5 because it depends on javac apis not present in jdk5.

        Show
        Martin Grebac added a comment - We should fix the doc. JAXWS is not supposed to run on 1.5 because it depends on javac apis not present in jdk5.

          People

          • Assignee:
            Martin Grebac
            Reporter:
            Opher Shachar
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: