1 Reply Latest reply: Oct 12, 2013 2:58 PM by 978472 RSS

    NoClassDefFoundError: org/ksoap2/SoapFault at TestXlet.java:15

      Hi I have a problem with my xlet.

      I have the GUI that works correct and now i'm trying to add a connection to a remote web service.

      The TestXlet.java is the main class of the xlet and I have also another class: interfaceCW.java that contains the connection to the ws code and this class uses others classes stored in another package.

      I'm testing the xlet with the XletView emulator.

      To compile I'm using this command:

      javac -classpath /Users/bernardo/Documents/workspace/TestCW/src/:/Users/bernardo/Desktop/mhpstubs.jar:/Users/bernardo/Desktop/ksoap2-j2me-core-2.1.2.jar:/Users/bernardo/Desktop/ksoap2-j2me-extras-2.1.2.jar -Xlint /Users/bernardo/Documents/workspace/TestCW/src/interfaceCW.java /Users/bernardo/Documents/workspace/TestCW/src/TestXlet.java

      and to run the xlet this command:

      java -jar xletview.jar -xletpath /Users/bernardo/Desktop/ -xletclass TestXlet

      but the xletview returns this error:

      XleTView, Copyright (C) 2003 - 2004 Martin Sveden XleTView comes with ABSOLUTELY NO WARRANTY.
      This is free software, and you are welcome to redistribute
      it under certain conditions;
      see license document for details.
      setting properties...
      free/used/total: 60604 K / 22403 K / 83008 K
      running gc...
      after gc...
      free/used/total: 61940 K / 21067 K / 83008 K
      [XleTView]-INFO->loading Xlet... [TestXlet]
      [XleTView]-INFO->XLET started... [TestXlet]
      java.lang.NoClassDefFoundError: org/ksoap2/SoapFault
           at TestXlet.<init>(TestXlet.java:15)
           at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
           at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
           at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
           at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
           at java.lang.Class.newInstance0(Class.java:355)
           at java.lang.Class.newInstance(Class.java:308)
           at net.beiker.xletview.xlet.XletManager.initXlet(Unknown Source)
           at net.beiker.xletview.xlet.XletManager.run(Unknown Source)
           at java.lang.Thread.run(Thread.java:680)
      Caused by: java.lang.ClassNotFoundException
           at net.beiker.xletview.classloader.XletClassLoader.loadClass(Unknown Source)
           ... 10 more
      [XleTView]-INFO->Application not loaded!

      Where at the line 15 i'm calling the connect object:


      Which is a:

      private interfaceCW connect = new interfaceCW();

      I tried to add to the extra.classpath in the config.txt the path of the classes that I need in the runtime environment.

      So I have 3 jars:


      and they are all in:


      and the class soapfault is in ksoap2-j2me-core-2.1.2.jar

      I added this path /Users/bernardo/Desktop/ but it's still not working...maybe I have to extract the jars?

      the xletview folder is in the same path (/Users/bernardo/Desktop)

      Please could you help me?