-
Bug
-
Resolution: Done
-
Major
-
JBossAS-4.0.1 SP1
-
None
-
None
The org.jboss.net.protocol.file.FileURLConnection object is unable to handle paths with spaces, and seems to die.
For example, when trying to parse an XML document through Xerces, calling the method:
DocumentBuilder.parse(File filename)
where "filename" is equal to "D:\path\with spaces\to\file.xml" will produce this:
java.io.FileNotFoundException: D:\path\with%20spaces\to\file.xml
at org.jboss.net.protocol.file.FileURLConnection.connect(FileURLConnection.java:71)
at org.jboss.net.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:80)
at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
...etc...
Note that the filename now suddenly has "%20" in it.
The problem persists inspite of setting JAVA_OPTS to "-Dorg.jboss.net.protocol.file.decodeFilePaths=true" as recommended in "JBAS-363" (yes, the output of "run.bat" was noted, and it did confirm that JAVA_OPTS was set).
This is a MAJOR blocker, as it is impossible to parse XML files if their path has a space in it, and there appears to be no workaround.
- duplicates
-
JBAS-363 FileURLConnection needs URL decode for JDK 1.4
- Closed