ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 34102] - xmlcatalog won't load dtd if the dtd location contains spaces
Date Mon, 21 Mar 2005 12:29:15 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=34102>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34102





------- Additional Comments From adagoubard@chello.nl  2005-03-21 13:29 -------
Please find at the end a small test that fails because of this bug.

(In reply to comment #1)
> Is this using the Apache resolver or the built-in one?
I don't know, I just use the default one. I don't set any specific property.

> 
> Can you give us Ant's -debug output, please?
C:\temp\dtdpb>ant -debug
Apache Ant version 1.6.2 compiled on July 16 2004
Buildfile: build.xml
Adding reference: ant.PropertyHelper
Detected Java version: 1.4 in: c:\Java\Jdk1.4\jre
Detected OS: Windows 2000
Adding reference: ant.ComponentHelper
Setting ro project property: ant.version -> Apache Ant version 1.6.2 compiled on
 July 16 2004
Setting ro project property: ant.file -> C:\temp\dtdpb\build.xml
Adding reference: ant.projectHelper
Adding reference: ant.parsing.context
Adding reference: ant.targets
parsing buildfile C:\temp\dtdpb\build.xml with URI = file:///C:/temp/dtdpb/build
.xml
Setting ro project property: ant.project.name -> dtdproblem
Adding reference: dtdproblem
Setting ro project property: ant.file.dtdproblem -> C:\temp\dtdpb\build.xml
Project base dir set to: C:\temp\dtdpb
 +Target:
 +Target: load-dtd
Adding reference: all-dtds
 +Target: validate
Build sequence for target `validate' is [load-dtd, validate]
Complete build sequence is [load-dtd, validate, ]

load-dtd:
Could not load a dependent class (com/sun/media/jai/codec/FileSeekableStream) fo
r type image
Could not load class (org.apache.tools.ant.tasksdefs.cvslib.CvsVersion) for type
 cvsversion
Could not load a dependent class (jdepend/xmlui/JDepend) for type jdepend
Adding reference: all-dtds

validate:
[xmlvalidate] Using SAX2 reader org.apache.xerces.parsers.SAXParser
[xmlvalidate] Validating xins-project.xml...
resolveEntity: '-//XINS//DTD XINS Project 1.0//EN': 'http://xins.sourceforge.net
/dtd/xins-project_1_0.dtd'
Apache resolver library not found, internal resolver will be used
Failed to load Apache resolver: java.lang.NoClassDefFoundError: org/apache/xml/r
esolver/tools/CatalogResolver
Matching catalog entry found for publicId: '-//XINS//DTD XINS Project 1.0//EN' l
ocation: 'C:\Program Files\xins-1.1.0/src/dtd/xins-project_1_0.dtd'
uri : 'C:/Program Files/xins-1.1.0/src/dtd/xins-project_1_0.dtd' matches a reada
ble file
fileName /C:/Program%20Files/xins-1.1.0/src/dtd/xins-project_1_0.dtd
Couldn't load ResourceStream for C:\Program Files\xins-1.1.0/src/dtd/xins-projec
t_1_0.dtd
No matching catalog entry found, parser will use: 'http://xins.sourceforge.net/d
td/xins-project_1_0.dtd'

BUILD FAILED
C:\temp\dtdpb\build.xml:12: Could not validate document C:\temp\dtdpb\xins-proje
ct.xml
        at org.apache.tools.ant.taskdefs.optional.XMLValidateTask.doValidate(XML
ValidateTask.java:469)
        at org.apache.tools.ant.taskdefs.optional.XMLValidateTask.execute(XMLVal
idateTask.java:279)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
        at org.apache.tools.ant.Main.runBuild(Main.java:673)
        at org.apache.tools.ant.Main.startAnt(Main.java:188)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
Caused by: java.net.UnknownHostException: xins.sourceforge.net
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:153)
        at java.net.Socket.connect(Socket.java:452)
        at java.net.Socket.connect(Socket.java:402)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:402)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:618)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:306)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:267)
        at sun.net.www.http.HttpClient.New(HttpClient.java:339)
        at sun.net.www.http.HttpClient.New(HttpClient.java:320)
        at sun.net.www.http.HttpClient.New(HttpClient.java:315)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConne
ction.java:521)
        at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection
.java:498)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
nection.java:626)
        at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown So
urce)
        at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
        at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown Source
)
        at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown Sourc
e)
        at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(
Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known 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.AbstractSAXParser.parse(Unknown Source)
        at org.apache.tools.ant.taskdefs.optional.XMLValidateTask.doValidate(XML
ValidateTask.java:460)
        ... 11 more
--- Nested Exception ---
java.net.UnknownHostException: xins.sourceforge.net
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:153)
        at java.net.Socket.connect(Socket.java:452)
        at java.net.Socket.connect(Socket.java:402)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:402)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:618)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:306)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:267)
        at sun.net.www.http.HttpClient.New(HttpClient.java:339)
        at sun.net.www.http.HttpClient.New(HttpClient.java:320)
        at sun.net.www.http.HttpClient.New(HttpClient.java:315)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConne
ction.java:521)
        at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection
.java:498)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
nection.java:626)
        at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown So
urce)
        at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
        at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown Source
)
        at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown Sourc
e)
        at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(
Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known 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.AbstractSAXParser.parse(Unknown Source)
        at org.apache.tools.ant.taskdefs.optional.XMLValidateTask.doValidate(XML
ValidateTask.java:460)
        at org.apache.tools.ant.taskdefs.optional.XMLValidateTask.execute(XMLVal
idateTask.java:279)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
        at org.apache.tools.ant.Main.runBuild(Main.java:673)
        at org.apache.tools.ant.Main.startAnt(Main.java:188)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)

Total time: 0 seconds


------------------------------
build.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project name="dtdproblem" basedir="." default="validate">

<target name="load-dtd">
<xmlcatalog id="all-dtds">
<!--dtd location="c:\projects\xins/src/dtd/xins-project_1_0.dtd"
publicId="-//XINS//DTD XINS Project 1.0//EN"/--> <!-- This works -->
<dtd location="C:\Program Files\xins-1.1.0/src/dtd/xins-project_1_0.dtd"
publicId="-//XINS//DTD XINS Project 1.0//EN"/> <!-- This doesn't work -->
</xmlcatalog>
</target>

<target name="validate" depends="load-dtd">
<xmlvalidate file="xins-project.xml">
<xmlcatalog refid="all-dtds" />
</xmlvalidate>
</target>

</project>

xins-project.xml:

<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE project PUBLIC "-//XINS//DTD XINS Project 1.0//EN"
"http://xins.sourceforge.net/dtd/xins-project_1_0.dtd">
<project
name="myprojects"
rcsversion="$Revision: 1.7 $"
rcsdate="$Date: 2004/10/12 15:19:40 $"
domain="com.mycompany">

	<api name="myproject" >
		<impl />
		<environments />
	</api>
</project>

The DTD is available at
http://xins.sourceforge.net/dtd/xins-project_1_0.dtd

XINS is available at http://xins.sourceforge.net/


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message