You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ru...@us.ibm.com on 2000/07/26 02:21:23 UTC

Trouble starting Tomcat on a non-internet connected computer...


Has anybody seen these message before?

D:\>tomcat run

D:\build\tomcat>SET
CLASSPATH=C:\jaxp1.0.1\jaxp.jar;C:\jaxp1.0.1\parser.jar;.;C:\jdk1.2.2\lib\tools.jar

Using CLASSPATH:
D:\build\tomcat\classes;D:\build\tomcat\lib\ant.jar;D:\build\tomcat\lib\servlet.jar;C:\jaxp1.0.1\jaxp.jar;C:\jaxp1.0.1\parser.jar;.;C:\jdk1.2.2\lib\tools.jar;C:\jdk1.2.2\lib\tools.jar

2000-07-25 08:16:31 - ContextManager: Adding context Ctx( /examples )
2000-07-25 08:16:31 - ContextManager: Adding context Ctx( /admin )
Starting tomcat. Check logs/tomcat.log for error messages
2000-07-25 08:16:31 - ContextManager: Adding context Ctx( /cocoon )
2000-07-25 08:16:31 - ContextManager: Adding context Ctx(  )
2000-07-25 08:16:31 - ContextManager: Adding context Ctx( /test )
XXX resource not found !!! /org/apache/tomcat/resources/web.dtd
sun.misc.Launcher$AppClassLoader
XmlMapper: Can't find resource for entity: -//Sun Microsystems, Inc.//DTD
Web Application 2.2//EN --> http://java.sun.com/j2ee/dtds/web-app_2_2.dtd
"/org/apache/tomcat/resources/web.dtd"
ERROR reading D:\build\tomcat\webapps\examples\WEB-INF\web.xml
At External entity not found:
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd".

ERROR reading D:\build\tomcat\webapps\examples\WEB-INF\web.xml
java.net.UnknownHostException: java.sun.com
        at java.net.InetAddress.getAllByName0(InetAddress.java:577)
        at java.net.InetAddress.getAllByName0(InetAddress.java:546)
        at java.net.InetAddress.getByName(InetAddress.java:455)
        at java.net.Socket.<init>(Socket.java:98)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:54)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:320)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:431)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:260)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:270)
        at sun.net.www.http.HttpClient.New(HttpClient.java:282)
        at
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:370)

        at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:455)

        at
java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:145)
        at com.sun.xml.parser.Resolver.createInputSource(Resolver.java:248)
        at
com.sun.xml.parser.ExternalEntity.getInputSource(ExternalEntity.java:49)
        at com.sun.xml.parser.Parser.pushReader(Parser.java:2768)
        at
com.sun.xml.parser.Parser.externalParameterEntity(Parser.java:2504)
        at com.sun.xml.parser.Parser.maybeDoctypeDecl(Parser.java:1137)
        at com.sun.xml.parser.Parser.parseInternal(Parser.java:481)
        at com.sun.xml.parser.Parser.parse(Parser.java:284)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:155)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:126)
        at org.apache.tomcat.util.xml.XmlMapper.readXml(XmlMapper.java:214)
        at
org.apache.tomcat.context.WebXmlReader.processWebXmlFile(WebXmlReader.java:202)

        at
org.apache.tomcat.context.WebXmlReader.contextInit(WebXmlReader.java:109)
        at
org.apache.tomcat.core.ContextManager.initContext(ContextManager.java,
Compiled Code)
        at org.apache.tomcat.core.ContextManager.init(ContextManager.java,
Compiled Code)
        at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:197)
        at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:237)
XXX resource not found !!! /org/apache/tomcat/resources/web.dtd
sun.misc.Launcher$AppClassLoader
XmlMapper: Can't find resource for entity: -//Sun Microsystems, Inc.//DTD
Web Application 2.2//EN --> http://java.sun.com/j2ee/dtds/web-app_2_2.dtd
"/org/apache/tomcat/resources/web.dtd"
ERROR reading D:\build\tomcat\webapps\admin\WEB-INF\web.xml
At External entity not found:
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd".

ERROR reading D:\build\tomcat\webapps\admin\WEB-INF\web.xml
java.net.UnknownHostException: java.sun.com
        at java.net.InetAddress.getAllByName0(InetAddress.java:577)
        at java.net.InetAddress.getAllByName0(InetAddress.java:546)
        at java.net.InetAddress.getByName(InetAddress.java:455)
        at java.net.Socket.<init>(Socket.java:98)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:54)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:320)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:431)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:260)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:270)
        at sun.net.www.http.HttpClient.New(HttpClient.java:282)
        at
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:370)

        at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:455)

        at
java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:145)
        at com.sun.xml.parser.Resolver.createInputSource(Resolver.java:248)
        at
com.sun.xml.parser.ExternalEntity.getInputSource(ExternalEntity.java:49)
        at com.sun.xml.parser.Parser.pushReader(Parser.java:2768)
        at
com.sun.xml.parser.Parser.externalParameterEntity(Parser.java:2504)
        at com.sun.xml.parser.Parser.maybeDoctypeDecl(Parser.java:1137)
        at com.sun.xml.parser.Parser.parseInternal(Parser.java:481)
        at com.sun.xml.parser.Parser.parse(Parser.java:284)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:155)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:126)
        at org.apache.tomcat.util.xml.XmlMapper.readXml(XmlMapper.java:214)
        at
org.apache.tomcat.context.WebXmlReader.processWebXmlFile(WebXmlReader.java:202)

        at
org.apache.tomcat.context.WebXmlReader.contextInit(WebXmlReader.java:109)
        at
org.apache.tomcat.core.ContextManager.initContext(ContextManager.java,
Compiled Code)
        at org.apache.tomcat.core.ContextManager.init(ContextManager.java,
Compiled Code)
        at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:197)
        at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:237)
XXX resource not found !!! /org/apache/tomcat/resources/web.dtd
sun.misc.Launcher$AppClassLoader
XmlMapper: Can't find resource for entity: -//Sun Microsystems, Inc.//DTD
Web Ap
plication 2.2//EN --> http://java.sun.com/j2ee/dtds/web-app_2_2.dtd
"/org/apache/tomcat/resources/web.dtd"
ERROR reading D:\build\tomcat\webapps\ROOT\WEB-INF\web.xml
At External entity not found:
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd".

ERROR reading D:\build\tomcat\webapps\ROOT\WEB-INF\web.xml
java.net.UnknownHostException: java.sun.com
        at java.net.InetAddress.getAllByName0(InetAddress.java:577)
        at java.net.InetAddress.getAllByName0(InetAddress.java:546)
        at java.net.InetAddress.getByName(InetAddress.java:455)
        at java.net.Socket.<init>(Socket.java:98)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:54)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:320)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:431)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:260)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:270)
        at sun.net.www.http.HttpClient.New(HttpClient.java:282)
        at
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:370)

        at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:455)

        at
java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:145)
        at com.sun.xml.parser.Resolver.createInputSource(Resolver.java:248)
        at
com.sun.xml.parser.ExternalEntity.getInputSource(ExternalEntity.java:49)
        at com.sun.xml.parser.Parser.pushReader(Parser.java:2768)
        at
com.sun.xml.parser.Parser.externalParameterEntity(Parser.java:2504)
        at com.sun.xml.parser.Parser.maybeDoctypeDecl(Parser.java:1137)
        at com.sun.xml.parser.Parser.parseInternal(Parser.java:481)
        at com.sun.xml.parser.Parser.parse(Parser.java:284)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:155)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:126)
        at org.apache.tomcat.util.xml.XmlMapper.readXml(XmlMapper.java:214)
        at
org.apache.tomcat.context.WebXmlReader.processWebXmlFile(WebXmlReader.java:202)

        at
org.apache.tomcat.context.WebXmlReader.contextInit(WebXmlReader.java:109)
        at
org.apache.tomcat.core.ContextManager.initContext(ContextManager.java,
Compiled Code)
        at org.apache.tomcat.core.ContextManager.init(ContextManager.java,
Compiled Code)
        at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:197)
        at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:237)
XXX resource not found !!! /org/apache/tomcat/resources/web.dtd
sun.misc.Launcher$AppClassLoader
XmlMapper: Can't find resource for entity: -//Sun Microsystems, Inc.//DTD
Web Application 2.2//EN --> http://java.sun.com/j2ee/dtds/web-app_2_2.dtd
"/org/apache/tomcat/resources/web.dtd"
ERROR reading D:\build\tomcat\webapps\test\WEB-INF\web.xml
At External entity not found:
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd".

ERROR reading D:\build\tomcat\webapps\test\WEB-INF\web.xml
java.net.UnknownHostException: java.sun.com
        at java.net.InetAddress.getAllByName0(InetAddress.java:577)
        at java.net.InetAddress.getAllByName0(InetAddress.java:546)
        at java.net.InetAddress.getByName(InetAddress.java:455)
        at java.net.Socket.<init>(Socket.java:98)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:54)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:320)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:431)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:260)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:270)
        at sun.net.www.http.HttpClient.New(HttpClient.java:282)
        at
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:370)

        at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:455)

        at
java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:145)
        at com.sun.xml.parser.Resolver.createInputSource(Resolver.java:248)
        at
com.sun.xml.parser.ExternalEntity.getInputSource(ExternalEntity.java:49)
        at com.sun.xml.parser.Parser.pushReader(Parser.java:2768)
        at
com.sun.xml.parser.Parser.externalParameterEntity(Parser.java:2504)
        at com.sun.xml.parser.Parser.maybeDoctypeDecl(Parser.java:1137)
        at com.sun.xml.parser.Parser.parseInternal(Parser.java:481)
        at com.sun.xml.parser.Parser.parse(Parser.java:284)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:155)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:126)
        at org.apache.tomcat.util.xml.XmlMapper.readXml(XmlMapper.java:214)
        at
org.apache.tomcat.context.WebXmlReader.processWebXmlFile(WebXmlReader.java:202)

        at
org.apache.tomcat.context.WebXmlReader.contextInit(WebXmlReader.java:109)
        at
org.apache.tomcat.core.ContextManager.initContext(ContextManager.java,
Compiled Code)
        at org.apache.tomcat.core.ContextManager.init(ContextManager.java,
Compiled Code)
        at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:197)
        at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:237)
2000-07-25 08:16:35 - PoolTcpConnector: Starting HttpConnectionHandler on
8080
2000-07-25 08:16:36 - PoolTcpConnector: Starting Ajp12ConnectionHandler on
8007

- Sam Ruby



Re: Trouble starting Tomcat on a non-internet connected computer...

Posted by Costin Manolache <co...@eng.sun.com>.
> Has anybody seen these message before?

Well, it's very strange - it means org/apache/tomcat/resources/web.dtd is not
present in webserver.jar or classes or the class loader can't read it.

Please check that you do have the file first.

Costin

>
>
> D:\>tomcat run
>
> D:\build\tomcat>SET
> CLASSPATH=C:\jaxp1.0.1\jaxp.jar;C:\jaxp1.0.1\parser.jar;.;C:\jdk1.2.2\lib\tools.jar
>
> Using CLASSPATH:
> D:\build\tomcat\classes;D:\build\tomcat\lib\ant.jar;D:\build\tomcat\lib\servlet.jar;C:\jaxp1.0.1\jaxp.jar;C:\jaxp1.0.1\parser.jar;.;C:\jdk1.2.2\lib\tools.jar;C:\jdk1.2.2\lib\tools.jar
>
> 2000-07-25 08:16:31 - ContextManager: Adding context Ctx( /examples )
> 2000-07-25 08:16:31 - ContextManager: Adding context Ctx( /admin )
> Starting tomcat. Check logs/tomcat.log for error messages
> 2000-07-25 08:16:31 - ContextManager: Adding context Ctx( /cocoon )
> 2000-07-25 08:16:31 - ContextManager: Adding context Ctx(  )
> 2000-07-25 08:16:31 - ContextManager: Adding context Ctx( /test )
> XXX resource not found !!! /org/apache/tomcat/resources/web.dtd
> sun.misc.Launcher$AppClassLoader
> XmlMapper: Can't find resource for entity: -//Sun Microsystems, Inc.//DTD
> Web Application 2.2//EN --> http://java.sun.com/j2ee/dtds/web-app_2_2.dtd
> "/org/apache/tomcat/resources/web.dtd"
> ERROR reading D:\build\tomcat\webapps\examples\WEB-INF\web.xml
> At External entity not found:
> "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd".


Re: Trouble starting Tomcat on a non-internet connected computer...

Posted by Costin Manolache <co...@eng.sun.com>.
Geoff Soutter wrote:

> Not sure about what Costin said, but perhaps this is the relevant part:
>
> > ERROR reading D:\build\tomcat\webapps\examples\WEB-INF\web.xml
> > java.net.UnknownHostException: java.sun.com
>
> Are you using Win9x or WinNT?
>
> I know that running Tomcat (and even JSWDK) on Win9x is _really_ sensitive
> to the internet settings. It's something to do with DNS being broken when
> not connected to the internet or something, but from what I can recall its
> pretty hard to figure out whats really going on, I remember even localhost
> stops working...! I've never used NT under dialup so I'm not sure if it has
> the same problems, probably not since I think the TCP/IP stacks are
> different... (apparently WinMe (yuck) has the same TCPIP as NT)
>
> Does anyone know the real story of what happens with Tomcat, Win9x and
> connecting to the internet? I'd really like to hear the details if anyone
> does...

No, this shoulnd't be an issue.

Tomcat should work stand-alone without any problem, and it shouldn't even
try to connect  to java.sun.com to get the DTD - it should use the local
copy.

How it works:
- WebXmlReader set up the parser to look for
org/apache/tomcat/resources/web.dtd
- SAX parser finds the external reference and calls the handler
- the sax handler will try to load the resource ( using
Class.getResourceAsStream())

The message show that all this happens, but getResourcesAsStream() returns
null.
This shouldn't happen - either the file is not present or the class loader
have big
problems.

Costin


Re: Trouble starting Tomcat on a non-internet connected computer...

Posted by Geoff Soutter <ge...@whitewolf.com.au>.
Not sure about what Costin said, but perhaps this is the relevant part:

> ERROR reading D:\build\tomcat\webapps\examples\WEB-INF\web.xml
> java.net.UnknownHostException: java.sun.com

Are you using Win9x or WinNT?

I know that running Tomcat (and even JSWDK) on Win9x is _really_ sensitive
to the internet settings. It's something to do with DNS being broken when
not connected to the internet or something, but from what I can recall its
pretty hard to figure out whats really going on, I remember even localhost
stops working...! I've never used NT under dialup so I'm not sure if it has
the same problems, probably not since I think the TCP/IP stacks are
different... (apparently WinMe (yuck) has the same TCPIP as NT)

Does anyone know the real story of what happens with Tomcat, Win9x and
connecting to the internet? I'd really like to hear the details if anyone
does...

cheers

Geoff