aspose file tools*
The moose likes Object Relational Mapping and the fly likes Hibernate / Spring problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate / Spring problem" Watch "Hibernate / Spring problem" New topic
Author

Hibernate / Spring problem

Joel McNary
Bartender

Joined: Aug 20, 2001
Posts: 1821

I'm working on a Hibernate / Spring / Tomcat application (my first foray into this particular combination ), and after working through several configuration issues that prevented the application from deploying, it now deploys. But when I'm using the application, I'm now facing an Unknown entity exception:



which seems to indicate that it cannot locate the Job.hbm.xml file, but elsewhere in the log I see things like:

which, to me, indicates that the Job.hbm.xml file can be located

The relevent section of my applicationContext-hibernate.xml file looks like:


And the .hbm.xml files are located:


What am I missing here?
[ April 14, 2008: Message edited by: Joel McNary ]

Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Job.java? Sorry if this seems quite obvious but you didn't show that Job.java (Job.class) is in the classpath.


GenRocket - Experts at Building Test Data
Joel McNary
Bartender

Joined: Aug 20, 2001
Posts: 1821

No, it's there. I just listed out the hibernate files, but the appropriate class files are there, too.
Joel McNary
Bartender

Joined: Aug 20, 2001
Posts: 1821

More information:

It seems that this may be more a Spring issue than a Hibernate issue, since the application can, in fact, access Jobs during the application initialization phase. It's just afterward, when I go to check the status of a job, that I'm getting this error.

Still not working, though.
Pedro Erencia
Ranch Hand

Joined: Apr 03, 2008
Posts: 70
Is this Job

<2008-04-14 20:49:49,718> [DEBUG] - select job0_.JOB_ID as JOB1_, job0_.JOB_STATUS as JOB2_0_, job0_.JOB_START_TIME as JOB3_0_,
job0_.JOB_END_TIME as JOB4_0_, job0_.PARAMETER_FILE_NAME as PARAMETER5_0_, job0_.ERROR_FILE_NAME as ERROR6_0_, job0_.JOB_REQUEST_TIME as JOB7_0_
from JOB job0_ where job0_.JOB_STATUS='QUEUED' (AbstractBatcher.java:log:324)


the same Job as

com.octagonresearch.contentgenerator.invoker.model.Job


Are you using Quartz ? It has a Job class, if i remember well..
Joel McNary
Bartender

Joined: Aug 20, 2001
Posts: 1821

Yes, those Job classes are the same.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Hibernate / Spring problem