×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Mar 2009
    Posts
    5

    No Class Def Found Error

    The application works fine on the emulators i've tried but on cell phones I get this error

    No Class Def Found Error
    java/lang/NoClassDefFoundError
    Test/Webservice_Stub:Test/Webservice:jave/rmi/Remote

    I found the source code to Remote and tried to add it to my app but got the same error but with "Cannot create class in system package" at the end.

    Anyone have an idea of what could be wrong?

  2. #2
    Nokia Developer Champion
    Join Date
    Sep 2007
    Posts
    915

    Re: No Class Def Found Error

    Quote Originally Posted by itg2 View Post
    The application works fine on the emulators i've tried but on cell phones I get this error

    No Class Def Found Error
    java/lang/NoClassDefFoundError
    Test/Webservice_Stub:Test/Webservice:jave/rmi/Remote

    I found the source code to Remote and tried to add it to my app but got the same error but with "Cannot create class in system package" at the end.

    Anyone have an idea of what could be wrong?
    Can you tell us the device on which you have tested it ? We are also expecting the basic working purpose of your application. If your application is using JSR which is not implemented by the manufacturer on that device then this could be problem.

  3. #3
    Registered User
    Join Date
    Mar 2009
    Posts
    5

    Re: No Class Def Found Error

    It's tested on Nokia 6131, Nokia 6070 and HTC touch HD and didn't work an any of them. The application is supposed to send messages and check for new messages from a web service

  4. #4
    Super Contributor
    Join Date
    Sep 2008
    Location
    Noida, U.P.
    Posts
    1,330

    Thumbs up Re: No Class Def Found Error

    Hi,

    can u please mention the classes u have imported for ur application.

    thanks,
    jitu_goldie..
    thanks,
    jitu_goldie..

    KEEP TRYING..

  5. #5
    Registered User
    Join Date
    Mar 2009
    Posts
    5

    Re: No Class Def Found Error

    The class Webservice_Stub and the interface Webservice was generated by netbeans of a wsdl file downloaded from the web service.

    Webservice_Stub imports:
    import javax.xml.rpc.JAXRPCException;
    import javax.xml.namespace.QName;
    import javax.microedition.xml.rpc.Operation;
    import javax.microedition.xml.rpc.Type;
    import javax.microedition.xml.rpc.ComplexType;
    import javax.microedition.xml.rpc.Element;
    class Webservice_Stub implements WebService, javax.xml.rpc.Stub;

    Webservice imports
    import javax.xml.namespace.QName;
    interface Webservice extends java.rmi.Remote
    and its method throws java.rmi.RemoteException

    These are the two classes that seems to create the error

    Here are the imports from the other classes if you need them:
    import java.util.Vector;
    import java.util.Enumeration;

    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;

    import javax.microedition.rms.RecordEnumeration;
    import javax.microedition.rms.RecordStore;
    import javax.microedition.rms.RecordStoreException;

    import java.io.DataOutputStream;
    import java.io.ByteArrayOutputStream;
    import java.io.IOException;
    import java.io.ByteArrayInputStream;
    import java.io.DataInputStream;

    import javax.microedition.pim.Contact;
    import javax.microedition.pim.ContactList;
    import javax.microedition.pim.PIM;
    import javax.microedition.pim.PIMException;

  6. #6
    Registered User
    Join Date
    Mar 2009
    Posts
    5

    Re: No Class Def Found Error

    I'm having the same problem (Nokia 6131). It works on emulator, but not on phone.

    My classes:
    import javax.xml.rpc.JAXRPCException;
    import javax.xml.namespace.QName;
    import javax.microedition.xml.rpc.Operation;
    import javax.microedition.xml.rpc.Type;
    import javax.microedition.xml.rpc.ComplexType;
    import javax.microedition.xml.rpc.Element;

    I have added library j2me-ws.jar and j2me-xmlrpc properly but it writes the same error as user itg2 mentioned.

    Thanks for help.

  7. #7
    Registered User
    Join Date
    Jan 2009
    Posts
    1

    Unhappy Re: No Class Def Found Error

    Quote Originally Posted by honest_success View Post
    Can you tell us the device on which you have tested it ? We are also expecting the basic working purpose of your application. If your application is using JSR which is not implemented by the manufacturer on that device then this could be problem.
    Hey Guys,

    I am also facing the same problem and its too horrible , I am not be able to figure out the exact problem.

    The application works fine on emulator but shows ClassNotFoundException for javax.xml.rpc... when I am including it using WTK jar lib collection i.e. j2me-xmlrpc.jar with/or j2me-ws.jar its giving the same runtime exception of java/rmi/Remote: Cannot create class in system package.

    It will be too good if anybody can solve my confusion.

    I am testing my application on Nokia 3110 and its supporting jsr-172 but facing this error.

    Now my question is if I don't have optional api on my mobile instrument is it so that I will not be able to use that phone with my included api and If any possibility is there what I have to do?

    cheer
    Andy

Similar Threads

  1. error including vector
    By Lichtens in forum Open C/C++
    Replies: 5
    Last Post: 2009-04-03, 14:19
  2. Nokia 6280 No Class Def Found Error
    By dave200 in forum Mobile Java General
    Replies: 3
    Last Post: 2008-04-10, 20:02
  3. Prototype SDK 2.0 setup problem
    By jackmcardle in forum Mobile Java Tools & SDKs
    Replies: 4
    Last Post: 2007-01-09, 16:21
  4. error LNK2001: Please Help
    By sourish_khan in forum Symbian
    Replies: 9
    Last Post: 2006-04-19, 11:16
  5. Unresolved external symbols problem
    By georgica1979 in forum Symbian User Interface
    Replies: 1
    Last Post: 2003-04-06, 13:26

Posting Permissions

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