×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Oct 2010
    Posts
    12

    kXML problem - Error at - KXmlParser parser = new KXmlParser();

    Hello Everyone

    I am new in kXML. I am trying to read a XML file from my computer disk not from any server.
    I am trying to read the file using - InputStream is=getClass().getResourceAsStream("NewsXML.xml");
    I am using kxml2-2.3.0 , JBuilder 2006, Sun WTK 2.5.2
    I have added the kxml2-2.3.0 jar file in my project lib folder. Then linked it using Panths-> Required Libraries->Add of JBuilder editor.

    If i debug the code it shows the following error message at line KXmlParser parser = new KXmlParser();

    "Error verifying method org/kxml2/io/KXmlParser <init>()V
    Approximate bytecode offset 65: Inconsistent or missing stackmap at target
    ALERT: java/lang/VerifyError: org/kxml2/io/KXmlParser."


    Please help me.

  2. #2
    Nokia Developer Champion
    Join Date
    Mar 2005
    Location
    Paris
    Posts
    814

    Re: kXML problem - Error at - KXmlParser parser = new KXmlParser();

    the file must be in the jar. place it in the res folder before compiling.
    also, did you checked the target of your project is java1.4 or less?

  3. #3
    Registered User
    Join Date
    Oct 2010
    Posts
    12

    Re: kXML problem - Error at - KXmlParser parser = new KXmlParser();

    Hi njzk2

    Thanks for your kind reply.
    Please clarify the things.

    Which file to be placed into jar? Is it my .xml file ?
    Which jar you are talking about ? Is it the project jar ?
    Where can i put the res folder ?
    How can i put the location of the xml file to the following line: InputStream is=getClass().getResourceAsStream("XML file location");

    I have the following directories inside my project folder.
    bak, jad-temp, src, lib, classes.
    I have put the kxml2-2.3.0 jar file inside the lib folder.

    Give me some suggestions, Please.

  4. #4
    Nokia Developer Champion
    Join Date
    Mar 2005
    Location
    Paris
    Posts
    814

    Re: kXML problem - Error at - KXmlParser parser = new KXmlParser();

    "res" is a folder commonly used for resources (such as your xml file). it is equivalent to the src folder, which means that your xml file can go there also. (you may need to access it via "/NewsXML.xml" instead of "NewsXML.xml"). Everything that is in that folder goes to the output jar.
    kxml must go indeed in the lib folder, and you must make sure to include this library in the output jar of your application (the classes must be in your_app.jar).

  5. #5
    Registered User
    Join Date
    Oct 2010
    Posts
    12

    Re: kXML problem - Error at - KXmlParser parser = new KXmlParser();

    Hi njzk2

    Thank you again for your quick and helpful reply.
    I have done everything you said me to do.
    But, still the same error is showing.

    I think if you see my project, it might be helpful for me.
    I know it's annoying to reveal email address in groups.
    So, not to bothering you, I request you to send your email address in my following email address :
    naim_05@yahoo.com

    I have no way to proceed without your help.
    Please, help me.

  6. #6
    Nokia Developer Champion
    Join Date
    Mar 2005
    Location
    Paris
    Posts
    814

    Re: kXML problem - Error at - KXmlParser parser = new KXmlParser();

    as much as i would like to help you, i am sorry but i do not have the time to dive into your project.
    i may however have found something that may be related to your problem :
    http://developer.sonyericsson.com/co...DF9D?tstart=-2
    also, may i suggest you use eclipse as an IDE? the MTJ plugins handle quite well this kind of situations.

  7. #7
    Registered User
    Join Date
    Oct 2010
    Posts
    12

    Re: kXML problem - Error at - KXmlParser parser = new KXmlParser();

    Hi njzk2

    Thank you for your valuable informations.

    I hope it will help me a lot.

    Thanks

Similar Threads

  1. Replies: 21
    Last Post: 2011-12-20, 06:28
  2. ERROR: java.lang.NoClassDefFoundError: org/kxml/parser/XmlParser
    By dhiraj.deka in forum Mobile Java General
    Replies: 9
    Last Post: 2009-11-07, 09:34
  3. kXML XML Parser versus Jsr172 API Parser
    By javame.developer in forum Mobile Java General
    Replies: 1
    Last Post: 2008-02-14, 20:23
  4. kxml parser problem!
    By kamoda_pawel in forum Mobile Java Tools & SDKs
    Replies: 2
    Last Post: 2007-02-26, 12:09
  5. kxml parser problem!
    By kamoda_pawel in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2007-02-22, 00:06

Posting Permissions

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