Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-2758

PostgreSQL exceptions unusable

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 2.2 M2
    • 1.4.1
    • Storage
    • None
    • Red Head Linux 4AS, Postgresql 8.2.4, xwiki 1.4.1
    • postgresql exception storage errors getNextException
    • Unit

    Description

      I run xwiki on postgresql and see a lot of exceptions when storing documents. An example is posted below. A big problem in that stacktrace is that the ACTUAL error is not present in it! The actual error that occured can only be seen when getNextException is called on the original exception, and this is not part of the exception logging code. Because this info is not present it is hard to know what goes wrong...
      I know that this method of creating exceptions is idiotic but sadly enough it IS used by PostgreSQL.

      ---- Stack dump ----
      Error number 3201 in 3: Exception while saving document
      Main.AanmakenUpdate
      Wrapped Exception: Could not execute JDBC batch update
      com.xpn.xwiki.XWikiException: Error number 3201 in 3: Exception while saving
      document Main.AanmakenUpdate
      Wrapped Exception: Could not execute JDBC batch update
              at
      com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.jav
      a:538)
              at
      com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:97)
              at
      com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:91)
              at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1111)
              at com.xpn.xwiki.web.SaveAction.save(SaveAction.java:120)
              at com.xpn.xwiki.web.SaveAction.action(SaveAction.java:129)
              at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:201)
              at
      org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces
      sor.java:431)
              at
      org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
              at
      org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
              at
      org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
              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(Application
      FilterChain.java:252)
              at
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
      ain.java:173)
              at
      com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFi
      lter.java:117)
              at
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
      FilterChain.java:202)
              at
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
      ain.java:173)
              at
      org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
      va:213)
              at
      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
      va:178)
              at
      org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126
      )
              at
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105
      )
              at
      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
      :107)
              at
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
              at
      org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
              at
      org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
              at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754)
              at
      org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:684)
              at
      org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java
      :876)
              at
      org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
      a:684)
              at java.lang.Thread.run(Thread.java:595)
       
       
      Wrapped Exception:
       
      java.sql.BatchUpdateException: Batch entry 0 insert into xwikircs (XWR_DATE,
      XWR_COMMENT, XWR_AUTHOR, XWR_DOCID, XWR_VERSION1, XWR_VERSION2) values
      (2008-10-13 09:38:49.000000 +02:00:00, , XWiki.lenzo, -1030818576, 4, 1) was
      aborted.  Call getNextException to see the cause.
              at
      org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(A
      bstractJdbc2Statement.java:2530)
              at
      org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.ja
      va:1317)
              at
      org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:350)
              at
      org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statem
      ent.java:2592)
              at
      org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement
      .java:294)
              at
      org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement
      .java:294)
              at
      org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
              at
      org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:246)
              at
      org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:237)
              at
      org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:141)
              at
      org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(Abst
      ractFlushingEventListener.java:298)
              at
      org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventL
      istener.java:27)
              at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
              at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
              at
      org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
              at
      com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHibernateBas
      eStore.java:781)
              at
      com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHibernateBas
      eStore.java:752)
              at
      com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.jav
      a:528)
              at
      com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:97)
              at
      com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:91)
              at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1111)
              at com.xpn.xwiki.web.SaveAction.save(SaveAction.java:120)
              at com.xpn.xwiki.web.SaveAction.action(SaveAction.java:129)
              at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:201)
              at
      org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces
      sor.java:431)
              at
      org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
              at
      org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
              at
      org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
              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(Application
      FilterChain.java:252)
              at
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
      ain.java:173)
              at
      com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFi
      lter.java:117)
              at
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
      FilterChain.java:202)
              at
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
      ain.java:173)
              at
      org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
      va:213)
              at
      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
      va:178)
              at
      org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126
      )
              at
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105
      )
              at
      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
      :107)
              at
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
              at
      org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
              at
      org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
              at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754)
              at
      org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:684)
              at
      org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java
      :876)
              at
      org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
      a:684)
              at java.lang.Thread.run(Thread.java:595)
       

      Attachments

        Activity

          People

            vmassol Vincent Massol
            fjalvingh Frits Jalvingh
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: