-->
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.  [ 4 posts ] 
Author Message
 Post subject: How to Load Dtd Information From Classpath
PostPosted: Wed Oct 07, 2009 2:50 am 
Newbie

Joined: Wed Oct 07, 2009 2:35 am
Posts: 5
Hello I am a newbie for the topic I opened.
I use hibernate 2.0 and web logic as app.server with eclipse as ide.
The entity file starts with:
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
    "-//Hibernate/Hibernate Mapping DTD 2.0//EN"
   "http://x.com.tr/service/hibernate-mapping-2.0.dtd">

<hibernate-mapping>
....


The problem is I do not want get dtd information from internet but to load it from classpath in a jar.

(I don't konow how to use hibernate2.jar because in it there is the hibernate-mapping-2.0.dtd file )

To solve the problem locally without connecting internet may be a proper solution;
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
    "-//Hibernate/Hibernate Mapping DTD 2.0//EN"
    "file:///C:/DTD/hibernate-mapping-2.0.dtd">
but this is not the demanded solution.

So, I think I could tell about my question easily.
I wait your guides,recommendations about this easy question.

I do not want to write dtd information to my hbm.xml files since I have many files.
I want to show the path of related dtd information from classpath and how to do that respectively?


Thanks in advance,
Regards.

_________________
www.bursasportv.com


Top
 Profile  
 
 Post subject: Re: How to Load Dtd Information From Classpath
PostPosted: Wed Oct 07, 2009 8:09 am 
Newbie

Joined: Wed Oct 07, 2009 2:35 am
Posts: 5
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
    "-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">


When I changed the header of the hbm.xml like this with respect to the specifications,
and prevented the http://hibernate.sourceforge.net address in host file for accessing our dtd files from hibernate2.jar without internet access.
I have such kind of problem given:

[b<Oct 7, 2009 3:06:51 PM EEST> <Warning> <Net> <BEA-000905>
<Could not open connection with host: hibernate.sourceforge.net and port: 80.>
[07.10.2009 15:06:51] [ERROR] Could not configure datastore from input stream
org.dom4j.DocumentException: Socket Closed Nested exception: Socket Closed
at org.dom4j.io.SAXReader.read(SAXReader.java:358)][/b]

Caused by: net.sf.hibernate.MappingException:
Error reading resource: tr/com/mkk/ksp/service/account/ormapping/Member.hbm.xml

So what I am going to do right now to solve such a problem to run the server?
Now the server can not find the Member.hbm.xml then can not work properly even in login screen :(

Please tell about something for this easy problem.
Thanks in advance.

_________________
www.bursasportv.com


Top
 Profile  
 
 Post subject: Re: How to Load Dtd Information From Classpath
PostPosted: Thu Oct 08, 2009 2:27 am 
Newbie

Joined: Wed Oct 07, 2009 2:35 am
Posts: 5
I found that block but again I failed.
Code:
<!DOCTYPE hibernate-mapping PUBLIC
    "-//Hibernate/Hibernate Mapping DTD 2.0//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"
    [<!ENTITY types SYSTEM "classpath://hibernate-mapping-2.0.dtd">]
    >


I use hibernate 2 and I don't know either valid or not.
But it did not work any way.
Please help!

what I must do for accessing the dtd from hibernate2.jar (hibernate-mapping-2.0.dtd) to load from classpath and for that what must I change in xml file?


I wait your recommendations for the yesterday.

But no one answered yet.

Thanks in advance.

_________________
www.bursasportv.com


Top
 Profile  
 
 Post subject: Re: How to Load Dtd Information From Classpath
PostPosted: Mon Oct 12, 2009 5:01 am 
Newbie

Joined: Wed Oct 07, 2009 2:35 am
Posts: 5
Yet I could not get the required answer yet from nobody.
It made me obviously unhappy about that situation
Information gives life when it is shared.

I will be additional quesiton about my config. file.
This is hibernate-cfg.xml file header part:
Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
    "x.com.tr/service/hibernate-configuration-2.0.dtd">


Will I change some conf.here in this document with the hbm.xml file header?

Every where writes, dtd information looks for the classpath at first time,
but it does not make any sense because it goes to my url address and tries to even if I prevent.
Then gives the error "Could not configure data source" error.

I suppose it may be a common problem but I have not found a solution yet. :(

Please send your answers to this topic and help your friend.
Thanks in advance.

_________________
www.bursasportv.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.