Hi there, I am not new to Hibernate. I developed a full fat client/server application with it and Swing. Now I need to present some of the database with Tomcat. I use the same mapping file, same classes etc.
Here is my hibernate.cfg.xml file:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN" "http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">
both hibernate.cfg.xml and my mapping file tima.hbm.xml are under WEB-INF/classes
The problem is not that it cannot find the tima.hbm.xml file in place. Because I tried to rename it to some other thing and it is not the same error. When it cannot find the mapping file, the error becomes:
javax.servlet.ServletException: Resource: tima.hbm.xml not found
So it can find it but something ugly happens while reading it. I am sure nothing is wrong with the mapping as it is already in use by the fat client app. and it passes XML validation.
What could I be missing? Levent
Joined: Nov 24, 2004
Got it by myself. It was because it could not find my mapped classes on the classpath. I had to go into Tomcat logs to find this. Good luck with everyone.