• 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

org.hibernate.exception.SQLGrammarException: could not execute query

Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everybody. Firstly I must apologize you because I'm from Spain and my English is not as good as it should...

I introduce myself... I'm developing my five years course computer engineering's final proyect in JSP/Java/Struts and I need to use Hibernate framework to support concurrency. I'm using NetBeans 6.9 running in Windows and Tomcat.

Well, I have coded everything that is shown on the Hibernate tutorials but I cannot run my first query. Hibernate.cfg.xml file is recognized by the development environment and the mapping file is parsed too (it compiles and runs perfectly). I mean that both are recognized by the plattform and the problem in my opinion might stay in the mapping file if any of the attributs cannot be parsed.

Here you are the code. Sorry but attributes' names are in spanish:

hibernate.cfg.xml file:

Bean mapping:

Fragment of the class where the query is invoked:

I think it is not neccesary to paste the bean class, named ConsultarDatosUsuarioHibernate.java, because it is a simple bean. I must say that the data base is a MySQL data base and there are records introduced previously by myself on it, with a SQL "insert".

Any idea? The first error in the stack is org.hibernate.exception.SQLGrammarException: could not execute query at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)

Thank you so much!
    Bookmark Topic Watch Topic
  • New Topic