[jdom-interest] jdk1.4 and SAXBuilder throwing FtpLoginException

Jones, Scott scott.jones at boeing.com
Fri Apr 4 06:37:23 PST 2003


I am working on migrating our applications to jdk1.4.1 and I have run into an issue with the way I have called the build method of the SAXBuilder.  There are many overloaded versions of this method, I have been using the build(java.net.URL url) instance.  With jdk1.4.1 I am getting an exception. The application is running in a J2EE container(oc4j) and uses context.getResource("/xml/column.xml") to get the url. This resolves the url to file://c:/apphome/xml/column.xml (or something close to that)  When I run in jdk1.3.1 it runs just fine but under 1.4.1 I receive the following exception.
sun.net.ftp.FtpLoginException: Not logged in
        at sun.net.ftp.FtpClient.readReply(FtpClient.java:225)
        at sun.net.ftp.FtpClient.issueCommand(FtpClient.java:187)
        at sun.net.ftp.FtpClient.login(FtpClient.java:451)
        at sun.net.www.protocol.ftp.FtpURLConnection.connect(FtpURLConnection.java:181)
        at sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(FtpURLConnection.java:257)
        at java.net.URL.openStream(URL.java:960)
        at oracle.xml.parser.v2.XMLReader.openURL(XMLReader.java:2093)
        at oracle.xml.parser.v2.XMLReader.pushXMLReader(XMLReader.java:203)
        at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:146)
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:354)
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:707)

It seems to me the URL.openStream() method may have changed, but I am not quite sure where the real problem lies.

I have come up with a workaround, simply changing the context.getResource() to context.getResourceAsStream() and it works,  but I am looking at 4 applications and several hundred instances of the call.  I already tried changing the parser with the same results.
Thanks for any input
Scott



More information about the jdom-interest mailing list