• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: WOXMLDecoder NullPointerException
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WOXMLDecoder NullPointerException


  • Subject: Re: WOXMLDecoder NullPointerException
  • From: "Shravan Kumar. M" <email@hidden>
  • Date: Sun, 14 Mar 2010 04:45:29 -0700 (PDT)

Okay. Will try it out! Thanks for your suggestion, Simon!


From: Simon <email@hidden>
To: Shravan Kumar. M <email@hidden>
Cc: WO Dev Group <email@hidden>
Sent: Sun, March 14, 2010 4:35:04 PM
Subject: Re: WOXMLDecoder NullPointerException

my advice is to use a mapping file. no mapping file = debugging nightmare

simon

On 13 March 2010 11:45, Shravan Kumar. M <email@hidden> wrote:
> Hi Group,
>
> Following code to decode an xml file or xml string is resuting in NPE, could
> you any one please advise what's going wrong here:
>
>         WOXMLDecoder xmlDecoder = WOXMLDecoder.decoder();
>         //InputStream is =
> application().resourceManager().inputStreamForResourceNamed("supra.xml",
> null, null);
>         //System.out.println("is..." + is);
>         //Object obj = xmlDecoder.decodeRootObject(new NSData(is, 1024));
>         String xmlString = "<?xml version='1.0'
> encoding='UTF-8'?><supra><childe>123</childe></supra>";
>         StringReader stringReader = new StringReader(xmlString);
>         InputSource is = new InputSource(stringReader);
>         Object obj = xmlDecoder.decodeRootObject(is);
>         System.out.println("childe: " + xmlDecoder.valueForKey("childe"));
>
> java.lang.NullPointerException
> [2010-03-13 17:08:56 IST] <WorkerThread0> java.lang.NullPointerException
>     at
> com.webobjects.appserver.xml.WOXMLDecoder.decodeObjectForKey(WOXMLDecoder.java:744)
>     at
> com.webobjects.appserver.xml._private._DecodingHandler.root(_DecodingHandler.java:31)
>     at
> href="mailto:email@hidden">email@hidden
>

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >WOXMLDecoder NullPointerException (From: "Shravan Kumar. M" <email@hidden>)
 >Re: WOXMLDecoder NullPointerException (From: Simon <email@hidden>)

  • Prev by Date: Re: WOXMLDecoder NullPointerException
  • Next by Date: Re: Long Fetch times
  • Previous by thread: Re: WOXMLDecoder NullPointerException
  • Next by thread: Fw: WOXMLDecoder NullPointerException
  • Index(es):
    • Date
    • Thread