Joined: Tue Sep 06, 2005 2:45 pm Posts: 3
|
Wie man gleich merken wird bin ich recht neu in Hibernate
Ich bin im Tutorial nun so weit gekommen, dass ich folgende zeile entfernen soll.
<property name="hbm2ddl.auto">create</property>
Wenn ich dies jedoch tue erhalte ich beim ausführen von "ant run -Daction=store" folgenden Fehler:
[java] log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
[java] log4j:WARN Please initialize the log4j system properly.
[java] Exception in thread "main" org.hibernate.exception.SQLGrammarException: could not fetch initial value
[java] at org.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:70)
[java] at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
[java] at org.hibernate.id.IncrementGenerator.getNext(IncrementGenerator.java:107)
[java] at org.hibernate.id.IncrementGenerator.generate(IncrementGenerator.java:45)
[java] at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:85)
[java] at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:184)
[java] at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:33)
[java] at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:173)
[java] at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:27)
[java] at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:69)
[java] at org.hibernate.impl.SessionImpl.save(SessionImpl.java:481)
[java] at org.hibernate.impl.SessionImpl.save(SessionImpl.java:476)
[java] at EventManager.createAndStoreEvent(Unknown Source)
[java] at EventManager.main(Unknown Source)
[java] Caused by: java.sql.SQLException: Table not found in statement [select max(EVENT_ID) from EVENTS]
[java] at org.hsqldb.jdbc.Util.throwError(Unknown Source)
[java] at org.hsqldb.jdbc.jdbcPreparedStatement.<init>(Unknown Source)
[java] at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source)
[java] at org.hibernate.id.IncrementGenerator.getNext(IncrementGenerator.java:86)
[java] ... 11 more
[java] Java Result: 1
Wenn die Zeile in der Konfiguration vorhanden ist
kann mir da jemand vielleicht einen Tip geben?
|
|