• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Using of AnnotationSessionFactoryBean with annotations in Spring 3.

Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I've been writing a Spring/Hibernate app for a local company. At the moment I'm at the prototyping stage just trying

out different ways of implementing the database (MySQL 5.1) functionality.

I've written some DAOs, Services and POJOs, and with Hibernate 3.3 and Spring 2.5, I had a working version with the

two DB tables of the schema that I've so far implemented.

These tables have a one to many relationship.

Then I ran into trouble when I decided to switch from Hibernate mappings to annotations for the POJOs and DAOs.

I cannot seem to get round this problem.

To start the ball rolling, I've posted my Spring applicationContext.xml

and the last few lines of the console log from MyEclipse 8.5. (I couldn't seem to attach a file of the whole unfortunately.)

I've not posted the POJOs or DAOs yet to try and keep the amount of code in this post down.

In the log, everything appears to build OK, i.e., all the Spring beans, etc, but then...nothing; no database

activity, no errors, everything just stops

It's quite possible I've messed up with the annotations, but I would have expected some related exception if that
was the case, but no.

One other interesting point, when I use the Hibernate view in Myeclipse, my HQL queries translate to SQL OK, but

won't run because of an exception, i.e., org.hibernate.exception.sqlGrammarException: could not execute query

I decided to post on this forum first because I've been reading it for years and you guys always seem so friendly

and helpful.

Could anyone give me some advice on what might be wrong here please?

Thanks a lot,

Neil Ramsey
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry guys,

I messed up in my first post. I should have said, I'm using Spring 3.0, although I have tested the same thing using Spring 2.5 and got the same problem.

You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic