Support for PostgreSQL

2005-09-12
2013-05-29
  • Ellen Strnod
    Ellen Strnod
    2005-09-12

    I'm trying to get Trackit to initialize the database on PostgreSQL 8.0.3 running on OS X 10.4.2 (Java 1.5).  As of TrackIt-1.0-rc2, the only problem I still seem to be having, but haven't been able to get around, is the followiing (I have turned show_sql on in hibernate.cfg.xml for debugging): Hibernate: insert into FloatMetadata (minValue, maxValue, FIELD_METADATA_ID) values (?, ?, ?)
    2005-09-11 19:52:36,144 WARN - SQL Error: 0, SQLState: 22003
    2005-09-11 19:52:36,145 ERROR - ERROR: type "real" value out of range: overflow

    If I temporarily delete the minvalue and maxvalue properties for FloatMetadata in FieldMetadata.hbm, the rest of it runs and finishes.  I've tried this also with the 1.4.2 VM and with PostgreSQL 7.3.  Has anyone else been able to successfully run Trackit with Postgres? (any combinations of versions or operating system)

    Thanks,
    Ellen

     
    • Chris Bozic
      Chris Bozic
      2005-09-21

      Ellen,

      Thanks for posting this.  I just checked in the fix for this problem.  I lowered the max Float value from Float.MAX_VALUE to 999999999.  This will be fixed in the next release candidate of TrackIt, or you can try it out sooner if you want to build the code from cvs.

      Thanks again for your help.

      Chris Bozic
      //TrackIt developer

       
    • I'm using PostgreSQL 8.0.3 and RHEL4 (CentOS).

      I've an error as such:

      Caused by: java.sql.BatchUpdateException: Batch entry 0 insert into PROJECT_ITEM_TYPE (name, id) values (Action Item, 52987ec3070910c101070912be5900e6) was aborted.  Call getNextException to see the cause

      Tell me if you need any other info regarding this, because I'm not really a Java developer, so I'm not very familiar on the error message.  Thanks :)

       
      • Chris Bozic
        Chris Bozic
        2005-10-19

        Thanks for posting this error.  It would be more helpful if you could give us the entire stack trace from the trackit log.  Also, could you tell us what action you were performing when you got this error?

        Thanks
        Chris Bozic
        //Trackit Developer

         
    • I'm doing initializing of the database through the setup page.  After quite a long create table and alter table and inserting, there's this error.  The stacktrace is quite long, but here it is:

      Hibernate: insert into CalendarMetadata (FIELD_METADATA_ID) values (?)
      Hibernate: insert into FIELD_METADATA (propertyName, required, defaultValue, displayName, description, projectItemName, customField, readOnly, section, id) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) Hibernate: insert into FloatMetadata (minValue, maxValue, FIELD_METADATA_ID) values (?, ?, ?)
      Hibernate: insert into PROJECT_ITEM_TYPE (name, id) values (?, ?)
      log4j:ERROR HibernateException org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
              at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:82)
              at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:70)         at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
              at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:181)
              at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:74)
              at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:69)         at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:150)
              at org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:1839)
              at org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:2200)         at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:46)
              at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:239)
              at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:223)         at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:136)
              at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:274)
              at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)         at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:730)
              at org.hibernate.logging.HibernateAppender.append(HibernateAppender.java:209)
              at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:230)         at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:65)
              at org.apache.log4j.Category.callAppenders(Category.java:203)
              at org.apache.log4j.Category.forcedLog(Category.java:388)
              at org.apache.log4j.Category.log(Category.java:853)
              at org.apache.commons.logging.impl.Log4JLogger.warn(Log4JLogger.java:157)
              at org.hibernate.util.JDBCExceptionReporter.logExceptions(JDBCExceptionReporter.java:71)
              at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:42)
              at org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:1869)
              at org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:2200)
              at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:46)
              at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:239)
              at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:223)
              at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:136)
              at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:274)
              at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
              at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:730)
              at org.trackit.api.BaseDao.flush(BaseDao.java:114)
              at org.trackit.api.BaseDao.add(BaseDao.java:43)
              at org.trackit.api.project.ProjectItemTypeService.add(ProjectItemTypeService.java:42)
              at org.trackit.data.BasicDataLoader.loadProjectItemTypes(BasicDataLoader.java:264)
              at org.trackit.data.BasicDataLoader.main(BasicDataLoader.java:89)
              at org.trackit.ui.app.SetupInstance.initializeDatabase(SetupInstance.java:123)
              at org.trackit.ui.app.SetupInstance.access$100(SetupInstance.java:52)
              at org.trackit.ui.app.SetupInstance$2.actionPerformed(SetupInstance.java:115)
              at nextapp.echo2.app.button.AbstractButton.fireActionPerformed(AbstractButton.java:127)
              at nextapp.echo2.app.button.AbstractButton$1.actionPerformed(AbstractButton.java:92)
              at nextapp.echo2.app.button.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:70)
              at nextapp.echo2.app.button.DefaultButtonModel.doAction(DefaultButtonModel.java:58)
              at nextapp.echo2.app.button.AbstractButton.doAction(AbstractButton.java:113)
              at nextapp.echo2.app.button.AbstractButton.processInput(AbstractButton.java:416)
              at nextapp.echo2.app.update.ClientUpdateManager.process(ClientUpdateManager.java:116)
              at nextapp.echo2.app.update.UpdateManager.processClientUpdates(UpdateManager.java:89)
              at nextapp.echo2.webcontainer.ContainerSynchronizeService.renderUpdate(ContainerSynchronizeService.java:353)
              at nextapp.echo2.webrender.service.SynchronizeService.service(SynchronizeService.java:281)
              at nextapp.echo2.webrender.WebRenderServlet.process(WebRenderServlet.java:264)
              at org.trackit.ui.app.SetupServer.processAction(SetupServer.java:59)
              at org.trackit.ui.app.SetupServer.process(SetupServer.java:46)
              at nextapp.echo2.webrender.WebRenderServlet.doPost(WebRenderServlet.java:186)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
              at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
              at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
              at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
              at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
              at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
              at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
              at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
              at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
              at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
              at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
              at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
              at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
              at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
              at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
              at java.lang.Thread.run(Thread.java:534)
      Caused by: java.sql.BatchUpdateException: Batch entry 0 insert into PROJECT_ITEM_TYPE (name, id) values (Action Item, 52987ec307090d100107090dcf4000e6) was aborted.  Call getNextException to see the cause.
              at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2376)
              at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1161)
              at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:328)
              at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2435)
              at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:57)
              at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:174)
              ... 78 more