...and I do have the same problem with the cat example from
http://www.hibernate.org/hib_docs/refer ... tart.html; the generated SQL is correct. What's the problem?! Please help!
[java] 14:42:57,480 INFO [Environment] Hibernate 2.1.2
[java] 14:42:57,484 INFO [Environment] hibernate.properties not found
[java] 14:42:57,489 INFO [Environment] using CGLIB reflection optimizer
[java] 14:42:57,542 INFO [Configuration] configuring from url:
http://localhost:8080/hibernate.cfg.xml
[java] 14:42:57,850 INFO [Configuration] Mapping resource: Cat.hbm.xml
[java] 14:42:58,095 INFO [Binder] Mapping class: f4t.Cat -> CAT
[java] 14:42:58,290 INFO [Configuration] Configured SessionFactory: null
[java] 14:42:58,296 INFO [Configuration] processing one-to-many association mappings
[java] 14:42:58,297 INFO [Configuration] processing one-to-one association property references
[java] 14:42:58,299 INFO [Configuration] processing foreign key constraints
[java] 14:42:58,475 INFO [Dialect] Using dialect: net.sf.hibernate.dialect.PostgreSQLDialect
[java] 14:42:58,479 INFO [SettingsFactory] Use outer join fetching: true
[java] 14:42:58,492 INFO [NamingHelper] JNDI InitialContext properties:{}
[java] 14:42:58,501 INFO [DatasourceConnectionProvider] Using datasource: java:comp/env/jdbc/hibernate
[java] 14:42:58,549 INFO [TransactionManagerLookupFactory] No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)
[java] 14:42:58,822 INFO [SettingsFactory] Use scrollable result sets: true
[java] 14:42:58,824 INFO [SettingsFactory] Use JDBC3 getGeneratedKeys(): false
[java] 14:42:58,825 INFO [SettingsFactory] Optimize cache for minimal puts: false
[java] 14:42:58,827 INFO [SettingsFactory] echoing all SQL to stdout
[java] 14:42:58,829 INFO [SettingsFactory] Query language substitutions: {}
[java] 14:42:58,831 INFO [SettingsFactory] cache provider: net.sf.ehcache.hibernate.Provider
[java] 14:42:58,854 INFO [Configuration] instantiating and configuring caches
[java] 14:42:59,260 INFO [SessionFactoryImpl] building session factory
[java] 14:43:00,488 INFO [SessionFactoryObjectFactory] no JNDI name configured
[java] Hibernate: insert into CAT (NAME, sex, weight, CAT_ID) values (?, ?, ?, ?)
[java] 14:43:00,717 ERROR [BatcherImpl] Exception executing batch:
[java] java.lang.ArrayIndexOutOfBoundsException: 1
[java] at org.postgresql.core.QueryExecutor.sendQuery(QueryExecutor.java:143)
[java] at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:65)
[java] at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:451)
[java] at org.postgresql.jdbc1.AbstractJdbc1Statement.execute(AbstractJdbc1Statement.java:281)
[java] at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:48)
[java] at org.postgresql.jdbc1.AbstractJdbc1Statement.executeUpdate(AbstractJdbc1Statement.java:179)
[java] at org.postgresql.jdbc1.AbstractJdbc1Statement.executeUpdate(AbstractJdbc1Statement.java:165)
[java] at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:80)
[java] at net.sf.hibernate.impl.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:54)
[java] at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:122)
[java] at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2385)
[java] at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2335)
[java] at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2204)
[java] at net.sf.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:61)
[java] at f4t.view.CommandAction.execute(CommandAction.java:72)
[java] at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
[java] at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
[java] at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
[java] at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
[java] at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
[java] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
[java] at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:354)
[java] at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:342)
[java] at f4t.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:35)
[java] at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:334)
[java] at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:286)
[java] at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
[java] at org.mortbay.http.HttpContext.handle(HttpContext.java:1808)
[java] at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:525)
[java] at org.mortbay.http.HttpContext.handle(HttpContext.java:1758)
[java] at org.mortbay.jetty.plus.PlusWebAppContext.handle(PlusWebAppContext.java:126)
[java] at org.mortbay.http.HttpServer.service(HttpServer.java:879)
[java] at org.mortbay.http.HttpConnection.service(HttpConnection.java:790)
[java] at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:952)
[java] at org.mortbay.http.HttpConnection.handle(HttpConnection.java:807)
[java] at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:197)
[java] at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
[java] at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:501)
[java] 14:43:00,741 ERROR [CommandAction] java.lang.ArrayIndexOutOfBoundsException: 1
[java] 14:43:00,837 WARN [SessionImpl] afterTransactionCompletion() was never called
[java] 14:43:00,837 WARN [SessionImpl] unclosed connection