wadl
  1. wadl
  2. WADL-52

Exception then trying to run wadl2java on Fedora

    Details

    • Type: Bug Bug
    • Status: Reopened
    • Priority: Critical Critical
    • Resolution: Unresolved
    • Affects Version/s: 1.1.3
    • Fix Version/s: 1.1.4
    • Component/s: None
    • Labels:
      None

      Description

      Tried to run the Yahoo example:

      ./wadl2java -o tst -s jaxrs20 -p test.yahoo YahooSearch.wadl

      And got the exception:

      Exception in thread "main" java.lang.RuntimeException: java.lang.ClassNotFoundException: com.sun.ws.rs.ext.RuntimeDelegateImpl
      at javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:122)
      at javax.ws.rs.ext.RuntimeDelegate.getInstance(RuntimeDelegate.java:91)
      at javax.ws.rs.core.UriBuilder.newInstance(UriBuilder.java:69)
      at javax.ws.rs.core.UriBuilder.fromUri(UriBuilder.java:80)
      at org.jvnet.ws.wadl2java.Wadl2Java.generateEndpointClass(Wadl2Java.java:618)
      at org.jvnet.ws.wadl2java.Wadl2Java.process(Wadl2Java.java:472)
      at org.jvnet.ws.wadl2java.Main.main(Main.java:143)
      Caused by: java.lang.ClassNotFoundException: com.sun.ws.rs.ext.RuntimeDelegateImpl
      at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:186)
      at javax.ws.rs.ext.FactoryFinder.newInstance(FactoryFinder.java:62)
      at javax.ws.rs.ext.FactoryFinder.find(FactoryFinder.java:155)
      at javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:105)
      ... 6 more

      1. application.wadl
        1 kB
        jkidd
      2. xsd0.xsd
        0.5 kB
        jkidd

        Issue Links

          Activity

          Hide
          Pavel Bucek added a comment -

          can you share your application.wadl and xsd0.xsd files? I can't reproduce locally, so looks like there is something special/not yet covered in your wadl.

          Show
          Pavel Bucek added a comment - can you share your application.wadl and xsd0.xsd files? I can't reproduce locally, so looks like there is something special/not yet covered in your wadl.
          Hide
          jkidd added a comment -

          Files attached to give Pavel a better change to debug

          Show
          jkidd added a comment - Files attached to give Pavel a better change to debug
          Hide
          Pavel Bucek added a comment - - edited

          thanks for the testcase! however, I'm not able to reproduce on my laptop:

          $ ./bin/wadl2java -o tst -p tst -a application.wadl 
          Info: Processing: file:/Users/pavel/wadl/wadl~svn/trunk/wadl/wadl-dist/target/wadl-dist-1.1.4-SNAPSHOT/application.wadl
          Info: Processing: file:/Users/pavel/wadl/wadl~svn/trunk/wadl/wadl-dist/target/wadl-dist-1.1.4-SNAPSHOT/xsd0.xsd
          
          $ find ./tst/
          ./tst/
          ./tst/generated
          ./tst/generated/ObjectFactory.java
          ./tst/generated/SecurityToken.java
          ./tst/tst
          ./tst/tst/Funk314i_FapiSecurity100.java

          I think this might be related to windows/wadl2java.bat..

          Show
          Pavel Bucek added a comment - - edited thanks for the testcase! however, I'm not able to reproduce on my laptop: $ ./bin/wadl2java -o tst -p tst -a application.wadl Info: Processing: file:/Users/pavel/wadl/wadl~svn/trunk/wadl/wadl-dist/target/wadl-dist-1.1.4-SNAPSHOT/application.wadl Info: Processing: file:/Users/pavel/wadl/wadl~svn/trunk/wadl/wadl-dist/target/wadl-dist-1.1.4-SNAPSHOT/xsd0.xsd $ find ./tst/ ./tst/ ./tst/generated ./tst/generated/ObjectFactory.java ./tst/generated/SecurityToken.java ./tst/tst ./tst/tst/Funk314i_FapiSecurity100.java I think this might be related to windows/wadl2java.bat..
          Hide
          jkidd added a comment -

          Same goes for cygwin
          jkv@STOUT /cygdrive/c/Users/jkv/Desktop/wadl-dist-1.1.4-SNAPSHOT-bin/wadl-dist-1.1.4-SNAPSHOT/bin
          $ ./wadl2java -o here -p com -a http://localhost:8081/fapi/user-1.0.0/application.wadl
          Info: Processing: http://localhost:8081/fapi/user-1.0.0/application.wadl
          Info: Processing: http://localhost:8081/fapi/user-1.0.0/application.wadl/xsd0.xsd
          Exception in thread "main" java.lang.NoClassDefFoundError: javax/ws/rs/core/MultivaluedMap
          at org.jvnet.ws.wadl.ast.WadlAstBuilder.addMethodToParent(WadlAstBuilder.java:375)
          at org.jvnet.ws.wadl.ast.WadlAstBuilder.addMethodToResource(WadlAstBuilder.java:330)
          at org.jvnet.ws.wadl.ast.WadlAstBuilder.buildResourceTree(WadlAstBuilder.java:225)
          at org.jvnet.ws.wadl.ast.WadlAstBuilder.buildResourceTree(WadlAstBuilder.java:222)
          at org.jvnet.ws.wadl.ast.WadlAstBuilder.buildAst(WadlAstBuilder.java:150)
          at org.jvnet.ws.wadl.ast.WadlAstBuilder.buildAst(WadlAstBuilder.java:113)
          at org.jvnet.ws.wadl2java.Wadl2Java.process(Wadl2Java.java:426)
          at org.jvnet.ws.wadl2java.Main.main(Main.java:143)
          Caused by: java.lang.ClassNotFoundException: javax.ws.rs.core.MultivaluedMap
          at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
          at java.security.AccessController.doPrivileged(Native Method)
          at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
          at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
          ... 8 more

          Show
          jkidd added a comment - Same goes for cygwin jkv@STOUT /cygdrive/c/Users/jkv/Desktop/wadl-dist-1.1.4-SNAPSHOT-bin/wadl-dist-1.1.4-SNAPSHOT/bin $ ./wadl2java -o here -p com -a http://localhost:8081/fapi/user-1.0.0/application.wadl Info: Processing: http://localhost:8081/fapi/user-1.0.0/application.wadl Info: Processing: http://localhost:8081/fapi/user-1.0.0/application.wadl/xsd0.xsd Exception in thread "main" java.lang.NoClassDefFoundError: javax/ws/rs/core/MultivaluedMap at org.jvnet.ws.wadl.ast.WadlAstBuilder.addMethodToParent(WadlAstBuilder.java:375) at org.jvnet.ws.wadl.ast.WadlAstBuilder.addMethodToResource(WadlAstBuilder.java:330) at org.jvnet.ws.wadl.ast.WadlAstBuilder.buildResourceTree(WadlAstBuilder.java:225) at org.jvnet.ws.wadl.ast.WadlAstBuilder.buildResourceTree(WadlAstBuilder.java:222) at org.jvnet.ws.wadl.ast.WadlAstBuilder.buildAst(WadlAstBuilder.java:150) at org.jvnet.ws.wadl.ast.WadlAstBuilder.buildAst(WadlAstBuilder.java:113) at org.jvnet.ws.wadl2java.Wadl2Java.process(Wadl2Java.java:426) at org.jvnet.ws.wadl2java.Main.main(Main.java:143) Caused by: java.lang.ClassNotFoundException: javax.ws.rs.core.MultivaluedMap at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) ... 8 more
          Hide
          AshleyRoss added a comment - - edited

          wadl-cmdline-1.1.3.jar's MANIFEST.MF file contains:

          Class-Path: wadl-core-1.1.3.jar localizer-1.0.jar comresrcgen-1.0.jar 
           activation-1.1.jar jaxb-xjc-2.2.jar jaxb-impl-2.2.jar jaxb-api-2.1.ja
           r stax-api-1.0-2.jar jsr311-api-1.1.1.jar
          

          I believe it should contain:

          Class-Path: wadl-core-1.1.3.jar localizer-1.0.jar comresrcgen-1.0.jar 
           activation-1.1.jar jaxb-xjc-2.2.jar jaxb-impl-2.2.jar jaxb-api-2.1.ja
           r stax-api-1.0-2.jar jsr311-api-1.1.1.jar jersey-core-1.13.jar jersey
           -client-1.13.jar
          

          Note the addition of jersey-client-1.13.jar, without which I receive:

          Exception in thread "main" java.lang.RuntimeException: java.lang.ClassNotFoundException: com.sun.ws.rs.ext.RuntimeDelegateImpl
          Show
          AshleyRoss added a comment - - edited wadl-cmdline-1.1.3.jar 's MANIFEST.MF file contains: Class -Path: wadl-core-1.1.3.jar localizer-1.0.jar comresrcgen-1.0.jar activation-1.1.jar jaxb-xjc-2.2.jar jaxb-impl-2.2.jar jaxb-api-2.1.ja r stax-api-1.0-2.jar jsr311-api-1.1.1.jar I believe it should contain: Class -Path: wadl-core-1.1.3.jar localizer-1.0.jar comresrcgen-1.0.jar activation-1.1.jar jaxb-xjc-2.2.jar jaxb-impl-2.2.jar jaxb-api-2.1.ja r stax-api-1.0-2.jar jsr311-api-1.1.1.jar jersey-core-1.13.jar jersey -client-1.13.jar Note the addition of jersey-client-1.13.jar , without which I receive: Exception in thread "main" java.lang.RuntimeException: java.lang.ClassNotFoundException: com.sun.ws.rs.ext.RuntimeDelegateImpl

            People

            • Assignee:
              Pavel Bucek
              Reporter:
              walec51
            • Votes:
              3 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: