Forums Register Login

Error: Hibernate operation: could not retrieve snapshot

+Pie Number of slices to send: Send
I have a program using Spring and Hibernate3.

I am getting the following error, and cannot seem to find a solution or hint anywhere:

work.jdbc.BadSqlGrammarException: Hibernate operation: could not retrieve snapshot: [com.x.pmo.vo.Project#12345]; bad SQL grammar [select project_.project_id, project_.project_name as project2_0_, project_.project_date_added as project3_0_, project_.project_priority as project4_0_, project_.project_sponsor as project5_0_, project_.project_manager as project6_0_, project_.project_health as project7_0_, project_.project_fiscal as project8_0_, project_.project_organization as project9_0_, project_.scope_comments as scope10_0_, project_.scope_health as scope11_0_, project_.scope as scope0_, project_.scope_override as scope13_0_, project_.budget_health as budget14_0_, project_.budget_comments as budget15_0_, project_.budget_pj1_status as budget16_0_, project_.budget_pj2_status as budget17_0_, project_.budget_pj3_status as budget18_0_, project_.budget_pj4_status as budget19_0_, project_.budget_pj1_override as budget20_0_, project_.budget_pj2_override as budget21_0_, project_.budget_pj3_override as budget22_0_, project_.budget_pj4_override as budget23_0_, project_.milestone_concept_plan as milestone24_0_, project_.milestone_concept_act as milestone25_0_, project_.milestone_feas_plan as milestone26_0_, project_.milestone_feas_act as milestone27_0_, project_.milestone_dev_plan as milestone28_0_, project_.milestone_dev_act as milestone29_0_, project_.milestone_prod_plan as milestone30_0_, project_.milestone_prod_act as milestone31_0_, project_.milestone_concept_met as milestone32_0_, project_.milestone_feas_met as milestone33_0_, project_.milestone_dev_met as milestone34_0_, project_.milestone_prod_met as milestone35_0_, project_.milestone_concept_override as milestone36_0_, project_.milestone_feas_override as milestone37_0_, project_.milestone_dev_override as milestone38_0_, project_.milestone_prod_override as milestone39_0_, project_.milestone_health as milestone40_0_, project_.milestone_comments as milestone41_0_, project_.project_status as project42_0_, project_.project_cost_center as project43_0_, project_.project_date_updated as project44_0_ from projects__project project_ where project_.project_id=?]; nested exception is com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'projects.projects__project' doesn't exist
com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'projects.projects__project' doesn't exist



ProjectDAOImpl.java:


applicationContext.xml


Test.java:
+Pie Number of slices to send: Send
Does your MySQL script for Project have 'projects__project' column entry?
can you check it?
+Pie Number of slices to send: Send
No, project is a table of projects and every value in the table is in the form of project_id, projcet_name etc... . I checked my hibernate mapping and it's looking good:


My Spring config looks to be calling the mapping fine:

[ August 16, 2006: Message edited by: Chris Boldon ]
+Pie Number of slices to send: Send
I see this line in the SQL generated by hibernate.

from projects__project project_



what is projects__project? Table Name?
[ August 16, 2006: Message edited by: Arun Kumarr ]
Get meta with me! What pursues us is our own obsessions! But not this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 9809 times.
Similar Threads
Error: Error registering bean with name 'transactionManager'
Dirty Checking not occuring.
Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/transactio
hibernate_springs
Hiberante transaction in Spring
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 04:10:18.