Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: hibernate-3.0.5
I used the example at
http://www.hibernate.org/hib_docs/v3/re ... orial.html
However the table I used was different.
Also, instead of HSQLDB I used IBM DB2
Mapping documents:
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
D:\Dhanya\Projects\FastForward\Test>C:\apache-ant-1.6.5\bin\ant.bat run -Daction
=list
Buildfile: build.xml
clean:
[delete] Deleting directory D:\Dhanya\Projects\FastForward\Test\bin
[mkdir] Created dir: D:\Dhanya\Projects\FastForward\Test\bin
copy-resources:
[copy] Copying 3 files to D:\Dhanya\Projects\FastForward\Test\bin
compile:
[javac] Compiling 3 source files to D:\Dhanya\Projects\FastForward\Test\bin
run:
[java] 16:26:00,748 INFO Environment:464 - Hibernate 3.0.5
[java] 16:26:00,748 INFO Environment:477 - hibernate.properties not found
[java] 16:26:00,764 INFO Environment:510 - using CGLIB reflection optimize
r
[java] 16:26:00,764 INFO Environment:540 - using JDK 1.4 java.sql.Timestam
p handling
[java] 16:26:00,842 INFO Configuration:1110 - configuring from resource: /
hibernate.cfg.xml
[java] 16:26:00,842 INFO Configuration:1081 - Configuration resource: /hib
ernate.cfg.xml
[java] 16:26:00,936 INFO Configuration:444 - Mapping resource: Consumer.hb
m.xml
[java] 16:26:01,045 INFO HbmBinder:260 - Mapping class: Consumer -> common
_enroll
[java] 16:26:01,061 INFO Configuration:1222 - Configured SessionFactory: n
ull
[java] 16:26:01,061 INFO Configuration:875 - processing extends queue
[java] 16:26:01,076 INFO Configuration:879 - processing collection mapping
s
[java] 16:26:01,076 INFO Configuration:888 - processing association proper
ty references
[java] 16:26:01,076 INFO Configuration:917 - processing foreign key constr
aints
[java] 16:26:01,139 INFO DriverManagerConnectionProvider:41 - Using Hibern
ate built-in connection pool (not for production use!)
[java] 16:26:01,139 INFO DriverManagerConnectionProvider:42 - Hibernate co
nnection pool size: 1
[java] 16:26:01,139 INFO DriverManagerConnectionProvider:45 - autocommit m
ode: false
[java] 16:26:01,217 INFO DriverManagerConnectionProvider:80 - using driver
: COM.ibm.db2.jdbc.app.DB2Driver at URL: jdbc:db2:BHFFDB
[java] 16:26:01,217 INFO DriverManagerConnectionProvider:86 - connection p
roperties: {user=bh00ff, password=****}
[java] 16:26:05,967 INFO SettingsFactory:77 - RDBMS: DB2/6000, version: 08
.01.0006
[java] Initial SessionFactory creation failed.java.lang.AbstractMethodError
: COM.ibm.db2.jdbc.app.DB2DatabaseMetaData.supportsResultSetType(I)Z
[java] 16:26:05,967 INFO SettingsFactory:78 - JDBC driver: IBM DB2 JDBC 1.
2 Type 2, version: 07.02.0000
[java] java.lang.ExceptionInInitializerError
[java] at HibernateUtil.<clinit>(Unknown Source)
[java] at EventManager.listEvents(Unknown Source)
[java] at EventManager.main(Unknown Source)
[java] Caused by: java.lang.AbstractMethodError: COM.ibm.db2.jdbc.app.DB2Da
tabaseMetaData.supportsResultSetType(I)Z
[java] at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFacto
ry.java:80)
[java] at org.hibernate.cfg.Configuration.buildSettings(Configuration.j
ava:1463)
[java] at org.hibernate.cfg.Configuration.buildSessionFactory(Configura
tion.java:1004)
[java] ... 3 more
[java] Exception in thread "main"
[java] Java Result: 1
BUILD SUCCESSFUL
Total time: 7 seconds
Please help