Re: Connect Exception
Tor Norbye <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.tasklist.devel |
|---|---|
| Organization | Sun Microsystems, Inc |
| Message-ID | <1041613644.7481.23.camel@proto> |
I don't know what this could be, but I remember from experience that one of the XML parsers (could be crimson, could be xerces, I don't remember) "swallows" exceptions during parsing and pretends its a SAX Exception when really it's for example a null pointer exception encountered by user code as part of the startElement, endElement, characters(), etc. implementations. So it might help to add some additional try-blocks around the XML parsing code and dump out any exceptions (e.printStackTrace()). I haven't seen this before, but I think the issuezilla code was written specifically for NetBeans' issuezilla, so it might be that some assumption somewhere doesn't hold and results in an unexpected assumption during bug parsing, and that manifests itself as a parsing error. Sorry I can't be of more help - I haven't looked much at this code (and the issuezilla parsing code was lifted directly from the nbbuild module - I think the exact class is listed at the top of each file when I copied it. I copied this code without reading it carefully so I'm not familiar with how it works - I just replaced dump-to-console messages with dump-to-status-area messages...) -- Tor On Fri, 2003-01-03 at 08:51, Andrew Serff wrote: > Hey Tor, I have a question for you. I'm to the point where my bugzilla > stuff will lookup the bugs, and then it puts the "Fetching bug 22 from > DB" in the status and then it throws a connect exception. This seems > weird to me because it connects to get the list of bugs, but it can't > connect to get the actual bug through the xml.cgi. A little info might > help with what I'm doing: > > Everything works EXACTALLY the same as issuezilla. The only thing > different is the name of the attributes in the document returned by the > xml.cgi. So basically all I have done is changed the class names in my > stuff to Bugzilla and changed the XMLHandler to use the correct names in > the xml document. So it does the Bugzilla.query() and then it goes to > do the Bugzilla.getBugs(). In there, it creates another URL. I print > this url out and it is fine. I copied it and pasted it into my web > browser and it works great (no, I'm not behind a firewall at all). So > then in getBugs it makes the URL and then does u.openStream(). This > doesn't throw an IOException. Then it calls the getBugs(InputStream). > I think here is it throwing a SAXException that has a connect exception > in it. It isn't throwing a IOException I don't think because it isn't > being caught and printing the Cannot connect message on the status. So > I don't know why I'm getting this exception. Could it be an actual XML > parsing exception being masked by the connect exception? Or have you > run into this before? Any help would be great. (Let me know if you > want to see the exception.) > > Thanks! > Andrew > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] -- Tor Norbye <[email protected]> Sun Microsystems, Inc