Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate / Spring problem

 
Joel McNary
Bartender
Posts: 1840
Eclipse IDE Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Job.java? Sorry if this seems quite obvious but you didn't show that Job.java (Job.class) is in the classpath.
 
Joel McNary
Bartender
Posts: 1840
Eclipse IDE Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, it's there. I just listed out the hibernate files, but the appropriate class files are there, too.
 
Joel McNary
Bartender
Posts: 1840
Eclipse IDE Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1840
Eclipse IDE Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, those Job classes are the same.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic