Hi!
I ran into a Hibernate Tools problem - "entity class not found". SW versions are:
Hibernate Tools version: 3.2.0 beta9a
Hibernate version: 3.2.2
JDK version: 1.5.0
Name and version of the database I am using: MySQL 5
Here's what I've done:
1. I have added a configuration - provided the name for it, project name and the location of the cfg.xml file, all on the "general" tab, leaving everything else blank
2. On "classpath" tab I left the "Include default classpath from project" chekbox checked
3. On "mappings" tab I added nothing, since my mapping files are mentioned in the cfg.xml
4. I right-clicked on the name of the config and selected "Create session factory"
5. As the subject says, I got "...entity class not found: some.valid.classpath.ClassName" I would like to say "some.valid.classpath" is a directory inside my WEB-INF/classes directory and contains both the SomeClass(.class of course) and the appropriate "...hbm.xml" file.
The next thing I tried was to uncheck the checkbox "Include default classpath from project" on "classpath" tab, and added the mysqlconnector.jar and the relevant WEB-INF/classes directory containing the mapping and the .class files to the classpath (no, I didn't add the source path instead of the class path), but to no avail.
The next thing I tried was to comment out the resource mapping entries from the cfg.xml and added them in the "mappings" tab, but that didn't help either.
The web application itself works OK with those cfg and mapping files.
I also tried selecting "Run SchemaExport" from the context menu, but also got "entity class not found"...
After a couple of retries I also got a message from Eclipse saying it's out of memory and would it be OK to restart the IDE so I played along. After restart I tried the mentioned steps again, with the same result. The "out of memory" problem is probably a conseqence, not a cause, because I did nothing else inbetween.
Am I doing something wrong or is there maybe a workaround for this problem?
Help appreciated, thanks!
Alex
|