Hi,
Ok, I am writing this post in a new thread because I really think that this issue deserves some importance. To start with I must say the web-application is now working fine :) which means that the problem is solved … however the confusion in my mind is not! :(
Basically I have been reading on this DocType problem for more then a week now. I had two problems that all of a sudden came out. The first problem was that Hibernate was telling me that I had the incorrect DocType, and the second problem was that XDoclet no longer wanted to generate the hbm.xml files.
Over here I was informed both times that I needed to change my DocType in order to make my system work again. I changed the DocType that very same day, but it still gave me the same problem. I thus continued searching, and was actually taking in consideration to change all my configuration using Annotations.
Last Friday I noticed that XDoclet re-started to generate the hbm.xml files again! This was very weird for me since I had done no changes to my code! Just a week before, XDoclet was giving me the following error when I tried to compile the hbm.xml files
Code:
XJavaDoc Ignoring class com.company.app.Global in C:\Java\app\src\java\com\company\app\Global.java. It was generated (Thu Jun 22 16:30:58 CEST 2006) after XJavaDoc's timestamp was reset (Wed Sep 28 09:26:33 CEST 2005)
This error has now vanished without me actually doing anything to correct it! (The first mystery!). Today (5th October 2006) I waked and said to myself; “If XDoclet started to work on it’s own, then why doesn’t the DocType start to work as well”. Therefore I went to work (I had the DocType set to 3.0) compiled my code and deployed it on JBoss (4.0.3SP1). To my amazment .. it worked!!
Since only a week before, with the same DocType and same code it did not want to work, I decided to try going back to the 2.0 DocType! … and the application worked fine again! What I mean is that my application is working fine both with this DocType:
Code:
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">
and also with the following DocType
Code:
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
However since I am using version 3.1 of Hibernate, I am using the second one now.
The problem I have is that this problem came out in an un-logical way, and it has been solved also in an un-logical way. For met this does not make sense. I believe in the saying “For every action there is an equal and opposite reaction”. I did no action to break it, or to solve it.
My question is … what happened?
How can an application be working fine on a live server, break up, and then start working fine again without me actually doing any changes to the code.
Please note that I am not doing this post as a sign of anger or anything like that … far from it… to say the truth I am just very cuirass. The problem has interested me from the very beginning and I took it as a challenge. However I can not leave it to rest until I know what happened. I have a question in my brain that I really would like to have answers for!
I could be not seeing something that for you is very obvious! Thanks for any comments given, if you need any additional information please just let me know ... i will be more then happy to give it.
Regards,
Bormli