• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic