• 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

WebSphere 6.0 looking up Internet for dtd file

 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi, I am using RAD 6.0 and hibernate 3.2.1. Inside my hibernate config file(hibernate.cfg.xml), I have a dtd declaration

< !DOCTYPE hibernate-configuration PUBLIC<br /> "-//Hibernate/Hibernate Configuration DTD//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

The actual dtd is found inside hibernate3.jar file which is under lib folder of my web application.

Even then, RAD is showing an error message for this dtd declaration namely 'unable to connect to host: hibernate.sourceforge.net'

Can anybody knows how to resolve this?

Pramodh
 
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
well, the file is there. So it's most likely a problem with proxy or firewall settings on your end.

Quite a bit better than a problem I had with the bundled Spring 2 tutorial which referred to a nonexistent DTD.
 
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually, it's not really a good idea to resolve DTDs/schemas back out over the Internet. It slows down your development, puts an extra burden on your network and the Internet, and of course, also on the DTD/schema server. And if the server or a critical network link goes down, you're in big trouble. I had some major irritations with Sun DTDs a couple of years back on that account. It wasn't too cool when using an offline laptop, either!

Systems like Hibernate and MyFaces JSF actually store a local copy of the DTD in one of their component jars and use a redirecting entity resolver so that that copy will get picked up instead of the original off the Internet.

However, IDEs like Eclipse and IntelliJ aren't capable of deducing whether a given app has such a mechanism or how to tap into it. Fortunately, both of the aforementioned IDEs has a way of maintaining a local catalog of DTDs and schemas. I can't speak for any other IDE, except for Emacs, which supports a local catalog too.

In the case of IntelliJ, the local catalog facility is built-in and the mechanism for getting stuff into it is fairly obvious. In Eclipse I'm not sure. I think I have a plugin that's handling that, but I don't know which one or whether there's a fallback that's part of the vanilla install.

If you yank down a copy of the DTD of interest - or in the case of Hibernate, pull it out of the org/hibernate directory of the hibernate jar, you can map it to its system ID using the IDE's local catalog facility. This will make life more fun.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic