RE: Help with XML error

From: Morris, Rick <rick.morris@xxx.com>
Date: Tue Apr 02 2002 - 10:23:36 PST

I don't know what's causing this specific error, but a good way to track it
down would be to log each out from the codes.get[i] loop. At least that way
you would have a place to start looking. One of the elements of that array
looks like it's being left blank.

-----Original Message-----
From: Rowan [mailto:rowan@xxx.ky]
Sent: Tuesday, April 02, 2002 1:21 PM
To: Resin Interest
Subject: Help with XML error

I'm pulling my hair out on this one -- it was working perfectly, and
suddenly it's giving me this error! I'm parsing an XML doc and finding a
certain node based on values that the user has submitted. Here's the line
of code that's triggering the error:

Element thisProduct = (Element)XPath.find("//product[@id='"+ codes.get(i) =
"']", doc);

It's part of a for loop where I'm looping through the array of responses
(codes).

And here's the error:
java.lang.NullPointerException
        at com.caucho.xpath.Pattern.find(Pattern.java:86)
        at com.caucho.xpath.XPath.find(XPath.java:106)
        at _checkorder__jsp._jspService(/checkorder.jsp:52)
        at com.caucho.jsp.JavaPage.service(JavaPage.java:74)
        at com.caucho.jsp.Page.subservice(Page.java:485)
        at
com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:181)
        at com.caucho.server.http.Invocation.service(Invocation.java:291)
        at
com.caucho.server.http.RunnerRequest.handleRequest(RunnerRequest.java:341)
        at
com.caucho.server.http.RunnerRequest.handleConnection(RunnerRequest.java:271
)
        at com.caucho.server.TcpConnection.run(TcpConnection.java:136)
        at java.lang.Thread.run(Thread.java:484)

Any help is much appreciated.

Thanks,
Rowan

_____________________________________________________________
Get your Free, Permanent, and Private Email Today!
---------- www.email.ky -----------

_____________________________________________________________
Run a small business? Then you need professional email like you@xxx.com
from Everyone.net http://www.everyone.net?tag
Received on Tue 02 Apr 2002 10:23:36 -0800

This archive was generated by hypermail 2.1.8 : Thu Sep 28 2006 - 20:17:00 PDT