×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    May 2005
    Posts
    15

    Wink Exception on SvgImage.createImage from an HTTP Stream ?

    I am working with NetBeans 5.0, Nokia SDK 4.0 Beta for J2ME, Prototype S40_240x320
    and testing on a real 6280 phone.
    In my MIDlet i ask for a svg file on a distant HTTP site, it works fine on the
    emulator, but when trying on the physical Nokia 6280, first solution (HTTP) crashes on a Null Pointer Exception when trying to createImage from svgStream.
    With local solution (file.svg in the jar), all works fine.
    Has anyone an idea ?
    Thanks !

    First solution :
    // *** load an svg image from a file
    try {
    String uri="http://www.../file.svg";
    // get the file from HTTP Connection
    ContentConnection conn = (ContentConnection) Connector.open( uri );
    InputStream svgStream = conn.openInputStream();
    svgImage = (SVGImage)( SVGImage.createImage( svgStream, null ) ); // OK on emulator, Null Pointer Exception on 6280
    } catch ( Exception e ){

    Second solution :
    // *** load an svg image from a local file
    try {
    String localFile="/file.svg";
    InputStream svgStream = getClass().getResourceAsStream(localFile);
    svgImage = (SVGImage)( SVGImage.createImage( svgStream, null ) ); // OK on emulator AND 6280
    } catch ( Exception e ){

  2. #2
    Registered User
    Join Date
    Jun 2006
    Posts
    9

    Re: Exception on SvgImage.createImage from an HTTP Stream ?

    Avez-vous pensé à mettre les autorisations pour les transactions HTTP lors de la création du .jad ?

    Merci de nous tenir au courant si vous réglez le problème.

  3. #3
    Registered User
    Join Date
    May 2005
    Posts
    15

    Re: Exception on SvgImage.createImage from an HTTP Stream ?

    Oui, voila mon jad :
    MIDlet-1: LoadStaticMidlet,,LoadStaticMidlet
    MIDlet-Jar-Size: 10011
    MIDlet-Jar-URL: MobileLS.jar
    MIDlet-Name: MobileLS
    MIDlet-Permissions: javax.microedition.io.Connector.http
    MIDlet-Vendor: Vendor
    MIDlet-Version: 1.0
    MicroEdition-Configuration: CLDC-1.1
    MicroEdition-Profile: MIDP-2.0

  4. #4
    Registered User
    Join Date
    Jun 2006
    Posts
    9

    effectivement....

    Effectivement, on a le même problème pour les lectures en carte mémoires. Il semblerait que les autorisations mises dans le .jad ne sont utilisées que si la midlet est signée.
    Pour signer la midlet, c'est extrêmement compliqué et nous n'avons pas réussi à le faire.(plus d'infos sur le reste du forum.....)
    Last edited by bouncebounce; 2006-06-02 at 11:27.

  5. #5
    Registered User
    Join Date
    May 2005
    Posts
    15

    Re: Exception on SvgImage.createImage from an HTTP Stream ?

    Je vais essayer de fouiller dans ce sens. On s'etait pose la question sous cette forme sans insister.
    Merci beaucoup de la rapidite de votre reponse !

  6. #6
    Registered User
    Join Date
    May 2005
    Posts
    15

    Re: Exception on SvgImage.createImage from an HTTP Stream ?

    Apparemment il serait necessaire de signer la MIDlet (j'ai fait) ET d'introduire les cles sur le telephone. Or quand on ouvre "Security module settings" sur celui-ci, il repond "insert security module". Par ailleurs : http://www.nokia.co.uk/nokia/0,,18105,00.html qui fait comprendre que c'est au FAI qu'il faudrait demander une carte SIM avec module de securite qui pourrait gerer les certificats/signatures ....

  7. #7
    Super Contributor
    Join Date
    Mar 2006
    Posts
    516

    Re: Exception on SvgImage.createImage from an HTTP Stream ?

    Hi,

    it will be helpful to others if u made the postings & answers in english.

    Wang

  8. #8
    Registered User
    Join Date
    May 2005
    Posts
    15

    Smile Re: Exception on SvgImage.createImage from an HTTP Stream ?

    Yes, Wang, it is difficult for me but i will try :-)
    I have changed my SIM card for a new .. but the result is the same.
    Nokia says (6280 manual) "To view or change the security module settings, select Menu > Settings > Security > Security module settings."
    But "Security module settings" is grey on my phone, if i click on, i get the message "Insert the security module" ????
    I know how to sign a MIDlet, i have a personnal certificate, i don't know how to put it in my phone ... :-(

Similar Threads

  1. VS.Net 2003 Carbide 2.01 and epoc32.exe
    By ValentinK in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 2
    Last Post: 2007-01-12, 12:31
  2. http "invalid status line" exception
    By manmli in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2006-06-02, 03:40
  3. Using HTTP POST & Nokia 6600 to upload octet stream to server
    By ssandor in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2005-09-19, 11:00
  4. Http connection exception in Emulator
    By xrsu in forum Mobile Java General
    Replies: 0
    Last Post: 2002-12-12, 09:14
  5. can not successfully link any sample using .NET
    By lobotomat in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2002-08-20, 00:29

Posting Permissions

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