Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-3052

NoClassDefFoundError: com/sun/xml/ws/policy/sourcemodel/wspolicy/NamespaceVersion

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • None
    • tools-jaxws
    • None
    • Hide
      • Add com.sun.xml.ws:policy jar to client and common/lib folder. That should be named policy.jar, while the already included policy.jar (org.apache.ws.policy:wscommons-policy) should be renamed to wscommons-policy.jar to be automatically picked up by jbossws (through the manifest in jbossws-native-client.jar). Otherwise the classpath in wsconsume script needs to be modified.
      • Install a newer version of jbossws (3.3.1 for instance) over AS 6 M3; the jbossws installation process should automatically restore the missing jar.
      Show
      Add com.sun.xml.ws:policy jar to client and common/lib folder. That should be named policy.jar, while the already included policy.jar (org.apache.ws.policy:wscommons-policy) should be renamed to wscommons-policy.jar to be automatically picked up by jbossws (through the manifest in jbossws-native-client.jar). Otherwise the classpath in wsconsume script needs to be modified. Install a newer version of jbossws (3.3.1 for instance) over AS 6 M3; the jbossws installation process should automatically restore the missing jar.

      jlukas@lukas-laptop:/tmp/aaa$ /space/java/servers/jboss-6.0.0.20100429-M3/bin/wsconsume.sh -k --verbose http://www.ecubicle.net/iptocountry.asmx?wsdl
      parsing WSDL...

      Error: Could not import. (use --verbose to see full traces)
      java.lang.NoClassDefFoundError: com/sun/xml/ws/policy/sourcemodel/wspolicy/NamespaceVersion
      at com.sun.tools.ws.wsdl.parser.PolicyExtensionHandler.getNamespaceURI(PolicyExtensionHandler.java:57)
      at com.sun.tools.ws.wsdl.parser.WSDLParser.register(WSDLParser.java:131)
      at com.sun.tools.ws.wsdl.parser.WSDLParser.<init>(WSDLParser.java:123)
      at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:109)
      at com.sun.tools.ws.wscompile.WsimportTool.run(WsimportTool.java:185)
      at org.jboss.ws.tools.jaxws.impl.SunRIConsumerImpl.consume(SunRIConsumerImpl.java:246)
      at org.jboss.wsf.spi.tools.cmd.WSConsume.importServices(WSConsume.java:240)
      at org.jboss.wsf.spi.tools.cmd.WSConsume.main(WSConsume.java:86)
      Caused by: java.lang.ClassNotFoundException: com.sun.xml.ws.policy.sourcemodel.wspolicy.NamespaceVersion
      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:307)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
      ... 8 more

      jlukas@lukas-laptop:/tmp/aaa$ java -version
      java version "1.6.0_20"
      Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
      Java HotSpot(TM) Server VM (build 16.3-b01, mixed mode)

      This works fine if I use JBossWS included in JBossAS 5.x
      see also JBIDE-6390

              rhn-support-asoldano Alessio Soldano
              lukas.jungmann@gmail.com Lukas Jungmann (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: