×

Discussion Board

Results 1 to 13 of 13
  1. #1
    Registered User
    Join Date
    Feb 2009
    Posts
    30

    Error at the time of Running Client Midlet for accessing Web Service

    Hi:

    I am creating EJB web service and for accessing that i write J2ME client.

    I am using KSoap.

    But after running the midlet i am getting the following error:

    Code:
    Locking assertion failure.  Backtrace:
    #0 /usr/lib/libxcb-xlib.so.0 [0x875767]
    #1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_unlock+0x31) [0x875831]
    #2 /usr/lib/libX11.so.6(_XReply+0x254) [0x789fc4]
    #3 /home/crayom/projects/tools/jdk1.5.0/jdk/jre/lib/i386/xawt/libmawt.so [0xa9dcac7e]
    #4 /home/crayom/projects/tools/jdk1.5.0/jdk/jre/lib/i386/xawt/libmawt.so [0xa9db4c87]
    #5 /home/crayom/projects/tools/jdk1.5.0/jdk/jre/lib/i386/xawt/libmawt.so [0xa9db4e03]
    #6 /home/crayom/projects/tools/jdk1.5.0/jdk/jre/lib/i386/xawt/libmawt.so(Java_sun_awt_X11GraphicsEnvironment_initDisplay+0x26) [0xa9db5046]
    #7 [0xb2947c2a]
    #8 [0xb2941b3b]
    #9 [0xb2941b3b]
    #10 [0xb293f217]
    #11 /home/crayom/projects/tools/jdk1.5.0/jdk/jre/lib/i386/client/libjvm.so [0xb7aa075c]
    #12 /home/crayom/projects/tools/jdk1.5.0/jdk/jre/lib/i386/client/libjvm.so [0xb7bb0fd8]
    #13 /home/crayom/projects/tools/jdk1.5.0/jdk/jre/lib/i386/client/libjvm.so [0xb7aa058f]
    #14 /home/crayom/projects/tools/jdk1.5.0/jdk/jre/lib/i386/client/libjvm.so(JVM_DoPrivileged+0x32d) [0xb7afdd4d]
    #15 /home/crayom/projects/tools/jdk1.5.0/jdk/jre/lib/i386/libjava.so(Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2+0x3d) [0xb78e22cd]
    #16 [0xb29474db]
    #17 [0xb2941a64]
    #18 [0xb293f217]
    #19 /home/crayom/projects/tools/jdk1.5.0/jdk/jre/lib/i386/client/libjvm.so [0xb7aa075c]
    Locking assertion failure.  Backtrace:
    #0 /usr/lib/libxcb-xlib.so.0 [0x875767]
    #1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_lock+0x2e) [0x87590e]
    #2 /usr/lib/libX11.so.6 [0x789159]
    #3 /usr/lib/libX11.so.6(XGetVisualInfo+0x26) [0x77f246]
    #4 /home/crayom/projects/tools/jdk1.5.0/jdk/jre/lib/i386/xawt/libmawt.so [0xa9db3fc9]
    #5 /home/crayom/projects/tools/jdk1.5.0/jdk/jre/lib/i386/xawt/libmawt.so [0xa9db4213]
    #6 /home/crayom/projects/tools/jdk1.5.0/jdk/jre/lib/i386/xawt/libmawt.so [0xa9db4eb1]
    #7 /home/crayom/projects/tools/jdk1.5.0/jdk/jre/lib/i386/xawt/libmawt.so(Java_sun_awt_X11GraphicsEnvironment_initDisplay+0x26) [0xa9db5046]
    #8 [0xb2947c2a]
    #9 [0xb2941b3b]
    #10 [0xb2941b3b]
    #11 [0xb293f217]
    #12 /home/crayom/projects/tools/jdk1.5.0/jdk/jre/lib/i386/client/libjvm.so [0xb7aa075c]
    #13 /home/crayom/projects/tools/jdk1.5.0/jdk/jre/lib/i386/client/libjvm.so [0xb7bb0fd8]
    #14 /home/crayom/projects/tools/jdk1.5.0/jdk/jre/lib/i386/client/libjvm.so [0xb7aa058f]
    #15 /home/crayom/projects/tools/jdk1.5.0/jdk/jre/lib/i386/client/libjvm.so(JVM_DoPrivileged+0x32d) [0xb7afdd4d]
    #16 /home/crayom/projects/tools/jdk1.5.0/jdk/jre/lib/i386/libjava.so(Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2+0x3d) [0xb78e22cd]
    #17 [0xb29474db]
    #18 [0xb2941a64]
    #19 [0xb293f217]
    /usr/share/themes/Nodoka/gtk-2.0/gtkrc:37: error: lexical error or unexpected token, expected valid token
    Running with storage root /home/crayom/j2mewtk/2.5.2/appdb/DefaultColorPhone
    Running with locale: en_US.UTF-8
    Running in the identified_third_party security domain
    /dev/dsp: Device or resource busy
    java.lang.NoClassDefFoundError: org/ksoap2/SoapEnvelope
    	at com.sun.midp.midlet.MIDletState.createMIDlet(+29)
    	at com.sun.midp.midlet.Scheduler.schedule(+52)
    	at com.sun.midp.main.Main.runLocalClass(+28)
    	at com.sun.midp.main.Main.main(+80)
    Execution completed.
    3411734 bytecodes executed
    50 thread switches
    1669 classes in the system (including system classes)
    17723 dynamic objects allocated (534732 bytes)
    3 garbage collections (458616 bytes collected)

    I am also adding KSoap2-j2me-core-2.1.2.jar.



    Thank You.

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,087

    Re: Error at the time of Running Client Midlet for accessing Web Service

    Have you copied the KSoap2-j2me-core-2.1.2.jar in the BIN folder of your WTK... .or it is inside your application Midlet JAR ?

    thanks,
    ~Amitabh

  3. #3
    Registered User
    Join Date
    Feb 2009
    Posts
    30

    Re: Error at the time of Running Client Midlet for accessing Web Service

    Hi:

    I have copied that jar into the library of my application.


    Thank you

  4. #4
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,087

    Re: Error at the time of Running Client Midlet for accessing Web Service

    java.lang.NoClassDefFoundError: org/ksoap2/SoapEnvelope
    Check you the final jar file of your application package, does it contains this jar file as well.... and is this class reachable...

    thanks,
    ~Amitabh

  5. #5
    Registered User
    Join Date
    Feb 2009
    Posts
    30

    Re: Error at the time of Running Client Midlet for accessing Web Service

    Hi:

    Yes that Jar file is reachable, because there will be no any error in my code.

    Is there any need to extract that Jar and add into application directory structure?


    Thank You.

  6. #6
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,087

    Re: Error at the time of Running Client Midlet for accessing Web Service

    It may be a problem of Obfascation (try w/o Obfascation)... you can extract all the files add in your app; directory and try.

    thanks,
    ~Amitabh

  7. #7
    Registered User
    Join Date
    Feb 2009
    Posts
    30

    Re: Error at the time of Running Client Midlet for accessing Web Service

    Hi:

    I am extracting that Jar and add it in my workspace.
    But there is error for the line :import org.ksoap2.SoapEnvelope;

    Because no such package is there in that jar.

    So what to do for that?

    Thank You.

  8. #8
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,087

    Re: Error at the time of Running Client Midlet for accessing Web Service

    Its a part of ksoap2

    http://ksoap2.sourceforge.net/doc/ap...pEnvelope.html

    you download the Ksoap2 src from sourceforge and include all files needed for J2me in your project.

    Please note that SOAP introduces some significant overhead for web services that may be problematic for mobile devices. If you have full control over the client and the server, a REST based architecture may be more adequate.

    kSOAP 2 is a complete redesign, taking the lessons learned from kSOAP 1.x into account. Some important changes are:

    Structure cleaned up
    kSOAP2 has improved support for literal encoding
    SOAP Serialization support is now optional and contained in a separate package
    Several separate classes have been integrated into the class SoapSerializationEnvelope, providing SOAP serialization support. SoapSerializationEnvelope extends the base class SoapEnvelope.


    Download this optional seperate package.

    thanks,
    ~Amitabh

  9. #9
    Registered User
    Join Date
    Feb 2009
    Posts
    30

    Re: Error at the time of Running Client Midlet for accessing Web Service

    Hi:

    After doing that also i am getting the same error.

    Can you help me?

    Thank You.

  10. #10
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,087

    Re: Error at the time of Running Client Midlet for accessing Web Service

    So did you place SoapEnvelope class at the right place,
    is the Error with Import for this class is fixed ?

    thanks,
    ~Amitabh

  11. #11
    Registered User
    Join Date
    Feb 2009
    Posts
    30

    Re: Error at the time of Running Client Midlet for accessing Web Service

    Hi:

    Actually i am not getting the reason for that error.

    So can you help me?


    Thank You.

  12. #12
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,087

    Re: Error at the time of Running Client Midlet for accessing Web Service

    Please copy KSoap2-j2me-core-2.1.2.jar and all other optional jars of kSoap2(for SoapEnvelope) in the BIN folder of your WTK, create the build again and try to run on the same default color phone emulator.

    thanks,
    ~Amitabh
    PS: Whats your development enviornoment, which IDE you are using?

  13. #13
    Registered User
    Join Date
    Feb 2009
    Posts
    30

    Re: Error at the time of Running Client Midlet for accessing Web Service

    Hi:


    I am using Eclipse3.4 for development.

    And I have already tested by adding jar into project libraries.


    Thank You.

Similar Threads

  1. problem calling web service from j2me app
    By mmartins in forum Mobile Java Networking & Messaging & Security
    Replies: 4
    Last Post: 2010-04-23, 08:45
  2. networking illegal argument image from web service
    By jaakkie in forum Mobile Java Networking & Messaging & Security
    Replies: 5
    Last Post: 2009-02-02, 13:47
  3. Web service
    By HasithaRandika in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2009-01-30, 05:16
  4. How to call a Web Service?
    By sunil_bhambani123 in forum Mobile Java Networking & Messaging & Security
    Replies: 3
    Last Post: 2008-12-15, 12:50
  5. How to develop a web service client for Nokia communicator 9500?
    By tm09332 in forum Mobile Java Networking & Messaging & Security
    Replies: 2
    Last Post: 2007-06-04, 14:48

Posting Permissions

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