1 Reply Latest reply on Jan 16, 2012 12:06 PM by 793190

    java.lang.NoClassDefFoundError: javax/xml/rpc/Service

    793190
      Hello,

      I have created a java application in JDeveloper, using axis for webservices in order to create and modify records in CRMOD. The application works fine in JDeveloper, but when I want to run it in command promot with java -jar crmod1.jar I receive the following error:

      Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/rpc/Service

      at java.lang.ClassLoader.defineClass1(Native Method)
      at java.lang.ClassLoader.defineClass(Unknown Source)
      at java.security.SecureClassLoader.defineClass(Unknown Source)
      at java.net.URLClassLoader.defineClass(Unknown Source)
      at java.net.URLClassLoader.access$100(Unknown Source)
      at java.net.URLClassLoader$1.run(Unknown Source)
      at java.net.URLClassLoader$1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at java.lang.Class.getDeclaredMethods0(Native Method)
      at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
      at java.lang.Class.getMethod0(Unknown Source)
      at java.lang.Class.getMethod(Unknown Source)
      at sun.launcher.LauncherHelper.getMainMethod(Unknown Source)
      at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
      Caused by: java.lang.ClassNotFoundException: javax.xml.rpc.Service
      at java.net.URLClassLoader$1.run(Unknown Source)
      at java.net.URLClassLoader$1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      ... 18 more

      I have searched a solution, but niothing seems to work.

      Could you help mw with this?
        • 1. Re: java.lang.NoClassDefFoundError: javax/xml/rpc/Service
          793190
          I have managed to run the application from command prompt like this:

          java -classpath C:\JDeveloper\mywork\CRMODApp\.adf;C:\JDeveloper\mywork\CRMODApp\CRMOD\classes;D:\Axis\lib\axis-ant.jar;D:\Axis\lib\axis.jar;D:\Axis\lib\commons-discovery-0.2.jar;D:\Axis\lib\commons-logging-1.0.4.jar;D:\Axis\lib\jaxrpc.jar;D:\Axis\lib\log4j-1.2.8.jar;D:\Axis\lib\saaj.jar;D:\Axis\lib\wsdl4j-1.5.1.jar CRMOD