×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Regular Contributor
    Join Date
    Mar 2008
    Posts
    76

    ClassCastException Problem

    Dear All
    I'm facing a problem for a ClassCastException. I am trying to create a sip application using JME_281_IMS_SDK_v40....

    Code:

    import nist.javax.microedition.sip.*;
    import javax.microedition.io.Connector;
    ......
    ......
    try{
    SipConnectionNotifier scn=(SipConnectionNotifier)Connector.open("sip:*;type=\""+ "application/sdp"+ '"');

    scn.setListener(this);
    }catch(Exception ex){ex.printStackTrace();}


    Exception:
    ClassCastException

    Note:
    If i use jsr180.jar as a library then it works fine. But by using JSR281.jar(where JSR180 is included) it shows the above Exception

    Will someone points out me how can i get the solution?

  2. #2
    Nokia Developer Expert
    Join Date
    Aug 2007
    Posts
    1,595

    Re: ClassCastException Problem

    Hello Aliencse,

    Which device/emulator are using for testing?

    Regards,
    r2j7
    [URL="http://library.forum.nokia.com/java"][B] >>> Java Developer's Library <<<[/B][/URL]
    [URL="https://www.developer.nokia.com/Resources/Support/Technical_support.xhtml"] [B]>>> Technical Support for Java ME development <<<[/B][/URL]
    [URL="https://publish.ovi.com/info/"][B]>>> Nokia Publish: reach millions of Nokia users worldwide through Nokia Store <<<[/B][/URL]

  3. #3
    Regular Contributor
    Join Date
    Mar 2008
    Posts
    76

    Re: ClassCastException Problem

    I'm using NetBeans IDE6.0.1 where wtk2.5.2 is included. I have also tried with S60 3rd Ed Fp1 Emulator and it shows me exception too.
    Last edited by Aliencse; 2008-05-30 at 06:49.

  4. #4
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,405

    Re: ClassCastException Problem

    Hi Aliencse,

    testing with JavaME 281 IMS SDK v4.1, downloaded from here:

    https://www.ims-developer-program.com/index.php?id=29

    and using jme281sdk41.jar together with your code, no ClassCastException is thrown.

    Pit

  5. #5
    Regular Contributor
    Join Date
    Mar 2008
    Posts
    76

    Re: ClassCastException Problem

    Thanks Jappit for your reply.
    From beginning I'm trying by the using jme281sdk40.jar but no progress it shows me ClassCastException, my imported package is import nist.javax.microedition.sip.*; not the import javax.microedition.sip.*;. By using import javax.microedition.sip.*; it works but I'm trying to do using import nist.javax.microedition.sip.*;

    Does anyone have update idea on it?

    BR
    Javed

  6. #6
    Regular Contributor
    Join Date
    Mar 2008
    Posts
    76

    Re: ClassCastException Problem

    Hello Guys
    Still I'm stacked at here. Does Someone of you have idea on it?

  7. #7
    Registered User
    Join Date
    Mar 2008
    Location
    Cairo-Egypt
    Posts
    23

    Re: ClassCastException Problem

    ClassCastException:
    Thrown to indicate that the code has attempted to cast an object to a subclass of which it is not an instance. For example, the following code generates a ClassCastException:

    Object x = new Integer(0);
    System.out.println((String)x);
    in your code:
    SipConnectionNotifier scn=(SipConnectionNotifier)Connector.open("sip:*;type=\""+ "application/sdp"+ '"');
    Try something other than (SipConnectionNotifier) if possible

    I had the same problem with (ContentConnection) but it was solved when I used (SocketConnection) instead.

    Hope that would help you

    Lamiaa
    Last edited by lamiaaMB; 2008-06-09 at 08:03.

  8. #8
    Regular Contributor
    Join Date
    Mar 2008
    Posts
    76

    Re: ClassCastException Problem

    Thanks Lamia for your reply.
    Its not working.........

Similar Threads

  1. Problem with CAknDoubleStyleListBox with a CAknSearchField
    By jjig in forum Symbian User Interface
    Replies: 2
    Last Post: 2009-09-17, 00:58
  2. Problem with eglSwapBuffers and heap corruption
    By greatape in forum Symbian Media (Closed)
    Replies: 2
    Last Post: 2007-05-24, 03:35
  3. netcards - Problem with opening adapter
    By kernj in forum Symbian Tools & SDKs
    Replies: 5
    Last Post: 2007-01-10, 08:56
  4. Problem: S60 SDK for CW in PC with .NET
    By anttij in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2005-02-28, 11:36
  5. wireless problem
    By sash_mca in forum Mobile Web Site Development
    Replies: 0
    Last Post: 2003-06-06, 11:34

Posting Permissions

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