• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Hibernate with annotations problems

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,

I am trying to configure a hibernate java project using annotations and I am getting the following error:
org.postgresql.jdbc2.Jdbc2DatabaseMetaData.supportsGetGeneratedKeys()Z

I have the following jars in my project:
C:\Program Files\Java\jre1.6.0_07\lib\resources.jar
C:\Program Files\Java\jre1.6.0_07\lib\rt.jar
C:\Program Files\Java\jre1.6.0_07\lib\jsse.jar
C:\Program Files\Java\jre1.6.0_07\lib\jce.jar
C:\Program Files\Java\jre1.6.0_07\lib\charsets.jar
C:\Program Files\Java\jre1.6.0_07\lib\ext\dnsns.jar
C:\Program Files\Java\jre1.6.0_07\lib\ext\localedata.jar
C:\Program Files\Java\jre1.6.0_07\lib\ext\postgresql-8.3-603.jdbc2.jar
C:\Program Files\Java\jre1.6.0_07\lib\ext\sunjce_provider.jar
C:\Program Files\Java\jre1.6.0_07\lib\ext\sunmscapi.jar
C:\Program Files\Java\jre1.6.0_07\lib\ext\sunpkcs11.jar
C:\Users\Gunnar\Documents\Text\Java\Hibernate\hibernate-distribution-3.3.2.GA\lib\required\antlr-2.7.6.jar
C:\Users\Gunnar\Documents\Text\Java\Hibernate\hibernate-distribution-3.3.2.GA\lib\required\commons-collections-3.1.jar
C:\Users\Gunnar\Documents\Text\Java\Hibernate\hibernate-distribution-3.3.2.GA\lib\required\dom4j-1.6.1.jar
C:\Users\Gunnar\Documents\Text\Java\Hibernate\hibernate-distribution-3.3.2.GA\lib\required\javassist-3.9.0.GA.jar
C:\Users\Gunnar\Documents\Text\Java\Hibernate\hibernate-distribution-3.3.2.GA\lib\required\jta-1.1.jar
C:\Users\Gunnar\Documents\Text\Java\Hibernate\hibernate-distribution-3.3.2.GA\lib\required\slf4j-api-1.5.8.jar
C:\Users\Gunnar\Documents\Text\Java\Hibernate\hibernate-distribution-3.3.2.GA\hibernate3.jar
C:\Users\Gunnar\Documents\Text\Java\Hibernate\hibernate-annotations-3.4.0.GA\hibernate-annotations.jar
C:\Users\Gunnar\Documents\Text\Java\Hibernate\hibernate-annotations-3.4.0.GA\lib\ejb3-persistence.jar
C:\Users\Gunnar\Documents\Text\Java\Hibernate\hibernate-annotations-3.4.0.GA\lib\hibernate-commons-annotations.jar
C:\Users\Gunnar\Documents\Text\Java\Hibernate\slf4j-1.5.8\slf4j-nop-1.5.8.jar

and the following classes:










Any help is appreciatted.

best regards
Gunnar
 
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where are you getting this error, and what exactly is the error?

org.postgresql.jdbc2.Jdbc2DatabaseMetaData.supportsGetGeneratedKeys()Z

That isn't an exception. Is there a stack trace? In the table in the database how is the primary key getting set. With just @Id, it is your apps responsibility to set the id. Are you using a Sequence table?

Thanks

Mark
 
She'll be back. I'm just gonna wait here. With this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic