This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Urgent !! - Getting XmlMapper: Can't find resource for entity: on tomcat startup Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » Tomcat
Bookmark "Urgent !! - Getting XmlMapper: Can Watch "Urgent !! - Getting XmlMapper: Can New topic
Author

Urgent !! - Getting XmlMapper: Can't find resource for entity: on tomcat startup

Sachin Joshi
Ranch Hand

Joined: Mar 23, 2004
Posts: 43
Hi all,
I am getting following error on tomcat start up...Can anybody guide me in this ?
Apache Tomcat/4.0-b4-dev
XmlMapper: Can't find resource for entity: -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN --> http://java.sun.com/dtd/web-app_2_3.dtd "null"
PARSE error at line 2 column -1
java.net.UnknownHostException: java.sun.com
XmlMapper: Can't find resource for entity: -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN --> http://java.sun.com/dtd/web-app_2_2.dtd "null"
PARSE error at line 2 column -1
java.net.UnknownHostException: java.sun.com
XmlMapper: Can't find resource for entity: -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN --> http://java.sun.com/dtd/web-app_2_3.dtd "null"
PARSE error at line 2 column -1
java.net.UnknownHostException: java.sun.com
XmlMapper: Can't find resource for entity: -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN --> http://java.sun.com/dtd/web-app_2_2.dtd "null"
PARSE error at line 2 column -1
java.net.UnknownHostException: java.sun.com
XmlMapper: Can't find resource for entity: -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN --> http://java.sun.com/dtd/web-app_2_3.dtd "null"
PARSE error at line 2 column -1
java.net.UnknownHostException: java.sun.com
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 "n
ull"
PARSE error at line 3 column -1
java.net.UnknownHostException: java.sun.com

I am using SOlaris platform to run the tomcat.
My Guess:
1. during the tomcat startup, it is making call like
resolveEntity('-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN', 'http://java.sun.com/j2ee/dtds/web-app_2_2.dtd')
Now during this call, it gets the DTD file and then validates the web.xml file with it. But, if during this process if it is not connected to the internet, it will not find the required resource i.e. DTD file and hence it will throw the above exception. Is it right ???
2. If that is the case, how can we tell tomcat not to go to net for DTD , but refer local DTD file ? is their any setting in context definition ?
Any help is appreciated.
Thanks,
Sachin
Sachin Joshi
Ranch Hand

Joined: Mar 23, 2004
Posts: 43
Originally posted by Sachya Joshi:
Hi all,
I am getting following error on tomcat start up...Can anybody guide me in this ?
Apache Tomcat/4.0-b4-dev
XmlMapper: Can't find resource for entity: -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN --> http://java.sun.com/dtd/web-app_2_3.dtd "null"
PARSE error at line 2 column -1
java.net.UnknownHostException: java.sun.com
XmlMapper: Can't find resource for entity: -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN --> http://java.sun.com/dtd/web-app_2_2.dtd "null"
PARSE error at line 2 column -1
java.net.UnknownHostException: java.sun.com
XmlMapper: Can't find resource for entity: -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN --> http://java.sun.com/dtd/web-app_2_3.dtd "null"
PARSE error at line 2 column -1
java.net.UnknownHostException: java.sun.com
XmlMapper: Can't find resource for entity: -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN --> http://java.sun.com/dtd/web-app_2_2.dtd "null"
PARSE error at line 2 column -1
java.net.UnknownHostException: java.sun.com
XmlMapper: Can't find resource for entity: -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN --> http://java.sun.com/dtd/web-app_2_3.dtd "null"
PARSE error at line 2 column -1
java.net.UnknownHostException: java.sun.com
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 "n
ull"
PARSE error at line 3 column -1
java.net.UnknownHostException: java.sun.com

I am using SOlaris platform to run the tomcat.
My Guess:
1. during the tomcat startup, it is making call like
resolveEntity('-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN', 'http://java.sun.com/j2ee/dtds/web-app_2_2.dtd')
Now during this call, it gets the DTD file and then validates the web.xml file with it. But, if during this process if it is not connected to the internet, it will not find the required resource i.e. DTD file and hence it will throw the above exception. Is it right ???
2. If that is the case, how can we tell tomcat not to go to net for DTD , but refer local DTD file ? is their any setting in context definition ?
Any help is appreciated.
Thanks,
Sachin

Hi group,
My problem is solved. Actually, it was problem of required JRE version. In my application tomcat was not standalone. But it was embeded in
another e-commerce server. The manual of that server was mentioning to use JRE 1.4 or lower. So I started with using 1.3. Finally,
after getting no clue for this error, I tried to use JRE 1.4 and it was solved.
Thanks, you might have put some efforts on this.
Sachin
 
GeeCON Prague 2014
 
subject: Urgent !! - Getting XmlMapper: Can't find resource for entity: on tomcat startup