Results 1 to 2 of 2

Thread: NoClassDefFoundError in loginRequest

Threaded View

  1. #1

    NoClassDefFoundError in loginRequest

    I am working on an application that is supposed to send a login request to a GroupWise server and use the response information to proceed. I use the libraries provided on Novell website but I face the runtime error "java.lang.NoClassDefFoundError: com/sun/xml/rpc/client/BasicService" while initiating a GroupwiseService_Impl object. The details of my code and the error log are as follows.

    I send a login request similar to "code example 1" on this page:
    Which is similar to the example provided by Novell in the zip file on this page:

    also, as of libraries, I am importing "gwws.jar" from the zip file in the latter link and "javax.xml.rpc-api-1.1.jar". (The compilation is successful.)

    This is my code snippet:
    GroupwiseService_Impl service = new GroupwiseService_Impl();
    GroupWisePortType gwPortType = service.getGroupwiseSOAPPort();
    Stub clientStub = (Stub)(gwPortType);

    And I get this error log on the first line (initiating a GroupwiseService_Impl object):
    "Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/xml/rpc/client/BasicService
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknow n 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)

    I would appreciate any help to resolve this error.
    In addition, I am suspicious of the cast of GroupWisePortType to a Stub (In the sample codes)
    It would be great if you could provide an explanation on why the cast is necessary.
    Last edited by anikzad; 05-Jun-2015 at 09:56 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts