Re: failure of new entity resolver on some OS

George Cristian Bina <[email protected]>
Newsgroups gmane.text.xml.commons.devel
Message-ID <[email protected]>
Hi Norm,

The problem is that a file URL needs to either specify no host or 
specify it as empty, that is you can have either
file:/path
or
file:///path
Otherwise if you write file://c:/etc then c will be interpreated as host 
and thus the unknown host exception.

Hope that helps,
George
------------------------
http://www.oxygenxml.com

Norman Walsh wrote:
> / David Crossley <[email protected]> was heard to say:
> | Here are the unsuccessful startup messages on Win ...
> | (using Windows XP SP2 + Cygwin)
> 
> What is in your CatalogManager.properties file?
> 
> | ------
> | Parse catalog: 
> | file:/D:/openSource/forrest/main/webapp/resources/schema/catalog.
> | xcat
> | Loading catalog: 
> | file:/D:/openSource/forrest/main/webapp/resources/schema/catalo
> | g.xcat
> | Default BASE: 
> | file://D:/D:/openSource/forrest/main/webapp/resources/schema/catal
> | og.xcat
> 
> That looks really odd.
> 
> | Parse  text/plain catalog on input stream
> | No CatalogReader for MIME type:  text/plain
> 
> Why is there an extra space in there? How did it decide the media type
> was " text/plain"?
> 
> | When we revert to the old resolver.jar everything works
> | on both platforms.
> 
> I can't reproduce the problems your experience, though I am
> experiencing my own baffling problems.
> 
> C:\Documents and Settings\Norman Walsh\Java\tests\resolver>java -cp ..\..;..\..\
> resolver.jar org.apache.xml.resolver.apps.xread test1.xml
> Parse catalog: catalogs/main.catalog
> Loading catalog: catalogs/main.catalog
> Default BASE: file://C:/Documents and Settings/Norman Walsh/Java/tests/resolver/
> catalogs/main.catalog
> pcf: file://C:/Documents and Settings/Norman Walsh/Java/tests/resolver/catalogs/
> main.catalog
> java.net.UnknownHostException: C
>         at java.net.PlainSocketImpl.connect(Unknown Source)
>         at java.net.Socket.connect(Unknown Source)
>         at java.net.Socket.connect(Unknown Source)
>         at sun.net.NetworkClient.doConnect(Unknown Source)
>         at sun.net.NetworkClient.openServer(Unknown Source)
>         at sun.net.ftp.FtpClient.openServer(Unknown Source)
>         at sun.net.ftp.FtpClient.<init>(Unknown Source)
>         at sun.net.www.protocol.ftp.FtpURLConnection.connect(Unknown Source)
>         at sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(Unknown Sour
> ce)
>         at java.net.URL.openStream(Unknown Source)
>         at org.apache.xml.resolver.Catalog.parseCatalogFile(Unknown Source)
> 
> 
> The "pcf:" debugging message above convinces me that I've got a file: URI
> in a URL object and I called 
> 
>   inStream = new DataInputStream(base.openStream());
> 
> and it failed with
> 
> java.net.UnknownHostException: C
> 
> which seems completely bogus to me.
> 
> Any Windows users out there have a clue?
> 
>                                         Be seeing you,
>                                           norm
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.