I use Hibernate 3.1.2 woth DB2 8.2 and Java 5
I have create table name Hibernate. wich stored the Hibernate-IDs
This Table have one row with the name next_value and is a Integer-field.
In the Mappings of the Tables I use the hilo Generatior to generate IDs
But, when I start my application I become the following Error Message:
08:53:11,062 DEBUG ConnectionManager:369 - connection already null in cleanup : no action
08:53:11,062 ERROR [schulung]:257 - Servlet.service() for servlet schulung threw exception
java.lang.RuntimeException: org.hibernate.id.IdentifierGenerationException:
could not read a hi value - you need to populate the table:
db2.HIBERNATE
at de.db.ProtectFilter.doFilter(ProtectFilter.java:179)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(
StandardWrapperValve.java:210)
at org.apache.catalina.core.StandardContextValve.invoke(
StandardContextValve.java:174)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(
AuthenticatorBase.java:525)
at org.apache.catalina.core.StandardHostValve.invoke(
StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(
ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(
StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(
CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process(
Http11Processor.java:870)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(
Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(
PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(
LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
ThreadPool.java:685)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.hibernate.id.IdentifierGenerationException: could not read a hi value - you need to populate the table: db2.HIBERNATE
at org.hibernate.id.TableGenerator.doWorkInCurrentTransaction(
TableGenerator.java:137)
at org.hibernate.engine.TransactionHelper$1Work.doWork(
TransactionHelper.java:38)
at
org.hibernate.engine.transaction.Isolater$JdbcDelegate.delegateWork(
Isolater.java:187)
at org.hibernate.engine.transaction.Isolater.doIsolatedWork(
Isolater.java:43)
at org.hibernate.engine.TransactionHelper.doWorkInNewTransaction(
TransactionHelper.java:51)
at org.hibernate.id.TableGenerator.generate(TableGenerator.java:94)
at org.hibernate.id.TableHiLoGenerator.generate(
TableHiLoGenerator.java:61)
at
org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(
AbstractSaveEventListener.java:98)
at
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(
DefaultSaveOrUpdateEventListener.java:186)
at
org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(
DefaultSaveEventListener.java:33)
at
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(
DefaultSaveOrUpdateEventListener.java:175)
at
org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(
DefaultSaveEventListener.java:27)
at
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(
DefaultSaveOrUpdateEventListener.java:70)
at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:535)
at org.hibernate.impl.SessionImpl.save(SessionImpl.java:523)
at org.hibernate.impl.SessionImpl.save(SessionImpl.java:519)
at de.bawv.schulungdb.dao.SchulungDAO.save(SchulungDAO.java:58)
at
What is to do to find the Problem?
HIBERNATE-Table is a special Hibernate-Table and haven't a mapping.
I think the Table-Creation is not ok, so Hibernate cant use it.
What is to do to create this Table right?
Thanks for ouer help
Three of twelve
|