-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 15 posts ] 
Author Message
 Post subject: how can it not check the dtd in the *.hbm.xml
PostPosted: Tue Apr 26, 2005 9:39 am 
Newbie

Joined: Sun Jul 11, 2004 11:43 pm
Posts: 9
when i debug the program,It exception that :

connect refuse,because i can't connect to internet.

so,I have to change it to just like :
http://localhost:8080/appName/schema/hi ... ng-2.0.dtd

any body help me?

thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 26, 2005 9:55 am 
Senior
Senior

Joined: Mon Apr 04, 2005 8:04 am
Posts: 128
Location: Manchester, NH USA
Why don't you just remove the reference to the DTD?


Top
 Profile  
 
 Post subject: error when i remove the DOCTYPE
PostPosted: Tue Apr 26, 2005 10:01 am 
Newbie

Joined: Sun Jul 11, 2004 11:43 pm
Posts: 9


Top
 Profile  
 
 Post subject: error when i remove the DOCTYPE
PostPosted: Tue Apr 26, 2005 10:02 am 
Newbie

Joined: Sun Jul 11, 2004 11:43 pm
Posts: 9
error when i remove the DOCTYPE


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 26, 2005 10:57 am 
Senior
Senior

Joined: Mon Apr 04, 2005 8:04 am
Posts: 128
Location: Manchester, NH USA
And the error is...?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 27, 2005 7:09 am 
Newbie

Joined: Sun Jul 11, 2004 11:43 pm
Posts: 9
not valid DOCTYPE define


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 27, 2005 8:43 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
hibernate doesnt need to go across the net to find it since it has it in its jar.

you are probably using 2.0 mapping with a 3.0 jar - dont do that - use the dtd that matches the hibernate version.l

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 27, 2005 9:05 am 
Newbie

Joined: Sun Jul 11, 2004 11:43 pm
Posts: 9
I am use mapping 2 with 2.jar package.


when i change
PUBLIC
to
<!DOCTYPE hibernate-mapping SYSTEM
"hibernate-mapping-2.0.dtd">

BTW,my IDE is WSAD,and install dir is d:\wsad.

so I start the webapp,there is still error :

===========================
d:\wsad\hibernate-mapping-2.0.dtd not found
===========================
i have copy hibernate-mapping-2.0.dtd to the same dir (*.hbm.xml dir)

why not check hibernate-mapping-2.0.dtd in the same dir?

thanks a lot.
.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 27, 2005 9:09 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
it doesnt work that way. hibernate only can use its own dtd if you use the full standard url as noted in all documentation. anything else is governed by your xml parser.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 04, 2005 1:00 pm 
Beginner
Beginner

Joined: Wed Aug 11, 2004 3:50 pm
Posts: 26
eckal wrote:
I am use mapping 2 with 2.jar package.


when i change
PUBLIC
to
<!DOCTYPE hibernate-mapping SYSTEM
"hibernate-mapping-2.0.dtd">

BTW,my IDE is WSAD,and install dir is d:\wsad.

so I start the webapp,there is still error :

===========================
d:\wsad\hibernate-mapping-2.0.dtd not found
===========================
i have copy hibernate-mapping-2.0.dtd to the same dir (*.hbm.xml dir)

why not check hibernate-mapping-2.0.dtd in the same dir?

thanks a lot.
.


Although I hate it (because it is a pain with Linux) since we do demos from laptops with no internet connection, we use

<!DOCTYPE hibernate-mapping SYSTEM "hibernate-mapping-2.0.dtd" >

and place the DTDs in the server's classpath (I use jBoss and place it in jboss/bin in Windows, wherever you start from in Linux, and other people in my office are using it successfully with WSAD).

I hope that helped.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 04, 2005 6:29 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
why do you need to change the uri ?

just setup your editor with proper xcatalog configuration. no need for any connection.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: related thread
PostPosted: Thu Aug 04, 2005 6:37 pm 
Expert
Expert

Joined: Fri Jul 22, 2005 2:42 pm
Posts: 670
Location: Seattle, WA
thread about the same thing:
http://forum.hibernate.org/viewtopic.php?t=937010


Top
 Profile  
 
 Post subject: ..dtd
PostPosted: Thu Aug 04, 2005 8:50 pm 
Beginner
Beginner

Joined: Fri Jun 10, 2005 11:51 pm
Posts: 45
when u r using hibernate 3 u should use this DOCTYPE..even wihtout internet connection.

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

same for mapping :)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 04, 2005 10:06 pm 
Newbie

Joined: Thu Aug 04, 2005 3:06 pm
Posts: 3
Location: Chitizzle
Man, I wish I saw this thread before I spend three days slamming my dick in the door trying to disabled Xerces's fetching of the DTD. As a side note, my JVM seems to completely ignore the proxy settings. Either way, all I did was download the DTD to a local dir (DTD) and change the doctype to:

Code:
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "file:///DTD/hibernate-mapping-3.0.dtd">


Yes, changing is to to 'SYSTEM' and putting the DTD somewhere in the classpath might be the "right" thing to do... but java is such a pain in the ass when left to it's own devices to figure out the class path... telling it explicitly where to look is soooooo much more reliable.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 05, 2005 8:19 am 
Beginner
Beginner

Joined: Wed Aug 11, 2004 3:50 pm
Posts: 26
I finally discovered the "original cause" (at least in my case) for the problem, and it is no surprise that some people cannot understand why we are having the problem.

Turns out that the original "online" DOCTYPE is fine even for offline. But it only works if (a) your DTD declaration corresponds to the version of Hibernate you are using (i.e.: 2.0 or 3.0), and (b) Your version of the parser is recent enough to support the features expected by Hibernate (ie. Xerces 2.4.0 is new enough, I don't know about others).


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 15 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.