Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-13726

Site import fails on WebLogic 9.2, PostgreSQL data source, "relation with OID 4024106 does not exist"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Obsolete
    • Medium
    • None
    • 2.9.2
    • None
    • Weblogic 9.2.3, Postgres 8.1/8.2

    Description

      Doing a full site import when using a PostgreSQL 8.1 or 8.2 data source configured in WebLogic results in an inconsistent database state which cannot be fixed. The following error is shown, even after restarting WebLogic:

      org.postgresql.util.PSQLException: ERROR: relation with OID 4024106 does not exist

      The workaround for this issue is to use Confluence's built-in C3P0 connection pool (configured when setting up Confluence initially, or via confluence.cfg.xml), which does not experience this problem.

      Upgrading to PostgreSQL 8.3 may potentially fix the problem (as suggested by this PostgreSQL FAQ entry), but this has not been tested by Atlassian.

      Below is the full exception message.

      2008-11-14 17:46:07,841 ERROR [DefaultQuartzScheduler_Worker-9] [org.quartz.core.JobRunShell] run Job DEFAULT.ClusterSafetyJob threw an unhandled Exception:
      org.springframework.jdbc.BadSqlGrammarException: Hibernate operation: Could not execute query; bad SQL grammar []; nested exception is org.postgresql.util.PSQLE
      xception: ERROR: relation with OID 4024106 does not exist
      Caused by: org.postgresql.util.PSQLException: ERROR: relation with OID 4024106 does not exist
              at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1592)
              at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1327)
              at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:192)
              at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:451)
              at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:350)
              at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:254)
              at weblogic.jdbc.wrapper.PreparedStatement.executeQuery(PreparedStatement.java:100)
              at net.sf.hibernate.impl.BatcherImpl.getResultSet(BatcherImpl.java:89)
              at net.sf.hibernate.loader.Loader.getResultSet(Loader.java:880)
              at net.sf.hibernate.loader.Loader.doQuery(Loader.java:273)
              at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:138)
              at net.sf.hibernate.loader.Loader.doList(Loader.java:1063)
              at net.sf.hibernate.loader.Loader.list(Loader.java:1054)
              at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:854)
              at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1554)
              at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:49)
              at org.springframework.orm.hibernate.HibernateTemplate$23.doInHibernate(HibernateTemplate.java:832)
              at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:370)
              at org.springframework.orm.hibernate.HibernateTemplate.findByNamedQuery(HibernateTemplate.java:818)
              at org.springframework.orm.hibernate.HibernateTemplate.findByNamedQuery(HibernateTemplate.java:797)
              at com.atlassian.confluence.cluster.safety.HibernateClusterSafetyDao.findSafetyNumberData(HibernateClusterSafetyDao.java:47)
              at com.atlassian.confluence.cluster.safety.HibernateClusterSafetyDao.safetyNumberExists(HibernateClusterSafetyDao.java:16)
              at com.atlassian.confluence.cluster.safety.DefaultClusterSafetyManager.verify(DefaultClusterSafetyManager.java:24)
              at sun.reflect.GeneratedMethodAccessor189.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
              at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
              at com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:20)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
              at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
              at $Proxy114.verify(Unknown Source)
              at com.atlassian.confluence.cluster.safety.ClusterSafetyJob.executeJob(ClusterSafetyJob.java:13)
              at com.atlassian.confluence.setup.quartz.AbstractClusterAwareQuartzJobBean.surroundJobExecutionWithLogging(AbstractClusterAwareQuartzJobBean.java:64)
              at com.atlassian.confluence.setup.quartz.AbstractClusterAwareQuartzJobBean.executeInternal(AbstractClusterAwareQuartzJobBean.java:47)
              at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
              at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
              at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
      2008-11-14 17:46:07,851 ERROR [DefaultQuartzScheduler_Worker-9] [org.quartz.core.ErrorLogger] schedulerError Job (DEFAULT.ClusterSafetyJob threw an exception.
      org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: org.springframework.jdbc.BadSqlGrammarException: Hibernate operation: Co
      uld not execute query; bad SQL grammar []; nested exception is org.postgresql.util.PSQLException: ERROR: relation with OID 4024106 does not exist]
              at org.quartz.core.JobRunShell.run(JobRunShell.java:214)
              at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
      * Nested Exception (Underlying Cause) ---------------
      org.springframework.jdbc.BadSqlGrammarException: Hibernate operation: Could not execute query; bad SQL grammar []; nested exception is org.postgresql.util.PSQLE
      xception: ERROR: relation with OID 4024106 does not exist
      Caused by: org.postgresql.util.PSQLException: ERROR: relation with OID 4024106 does not exist
              at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1592)
              at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1327)
              at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:192)
              at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:451)
              at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:350)
              at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:254)
              at weblogic.jdbc.wrapper.PreparedStatement.executeQuery(PreparedStatement.java:100)
              at net.sf.hibernate.impl.BatcherImpl.getResultSet(BatcherImpl.java:89)
              at net.sf.hibernate.loader.Loader.getResultSet(Loader.java:880)
              at net.sf.hibernate.loader.Loader.doQuery(Loader.java:273)
              at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:138)
              at net.sf.hibernate.loader.Loader.doList(Loader.java:1063)
              at net.sf.hibernate.loader.Loader.list(Loader.java:1054)
              at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:854)
              at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1554)
              at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:49)
              at org.springframework.orm.hibernate.HibernateTemplate$23.doInHibernate(HibernateTemplate.java:832)
              at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:370)
              at org.springframework.orm.hibernate.HibernateTemplate.findByNamedQuery(HibernateTemplate.java:818)
              at org.springframework.orm.hibernate.HibernateTemplate.findByNamedQuery(HibernateTemplate.java:797)
              at com.atlassian.confluence.cluster.safety.HibernateClusterSafetyDao.findSafetyNumberData(HibernateClusterSafetyDao.java:47)
              at com.atlassian.confluence.cluster.safety.HibernateClusterSafetyDao.safetyNumberExists(HibernateClusterSafetyDao.java:16)
              at com.atlassian.confluence.cluster.safety.DefaultClusterSafetyManager.verify(DefaultClusterSafetyManager.java:24)
              at sun.reflect.GeneratedMethodAccessor189.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
              at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
              at com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:20)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
              at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
              at $Proxy114.verify(Unknown Source)
              at com.atlassian.confluence.cluster.safety.ClusterSafetyJob.executeJob(ClusterSafetyJob.java:13)
              at com.atlassian.confluence.setup.quartz.AbstractClusterAwareQuartzJobBean.surroundJobExecutionWithLogging(AbstractClusterAwareQuartzJobBean.java:64)
              at com.atlassian.confluence.setup.quartz.AbstractClusterAwareQuartzJobBean.executeInternal(AbstractClusterAwareQuartzJobBean.java:47)
              at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
              at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
              at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
      

      Sometimes (but not always) your install is now broken since all requests for main.vmd will result in errors like -

      2008-11-14 09:45:08,771 ERROR [[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'] [confluen
      ce.util.velocity.VelocityUtils] getRenderedTemplate Error occurred rendering template: /decorators/main.vmd
       -- url: /confluence/longrunningtask.action | userName: admin
      org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getResources' in  class $Proxy113 threw e
      xception org.springframework.jdbc.BadSqlGrammarException: Hibernate operation: Could not execute query; bad SQL grammar
      []; nested exception is org.postgresql.util.PSQLException: ERROR: relation with OID 4015048 does not exist @ /decorators
      /includes/header.vm[18,21]
              at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:286)
              at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:203)
              at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:294)
              at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
              at org.apache.velocity.runtime.directive.Parse.render(Parse.java:224)
              at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:170)
              at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
              at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:194)
              at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:170)
              at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
              at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:194)
              at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:170)
              at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
              at org.apache.velocity.Template.merge(Template.java:254)
              at com.atlassian.confluence.util.velocity.VelocityUtils.getRenderedTemplateWithoutSwallowingErrors(VelocityUtils
      .java:58)
              at com.atlassian.confluence.util.velocity.VelocityUtils.getRenderedTemplate(VelocityUtils.java:36)
              at com.atlassian.confluence.util.profiling.ProfilingPageFilter.applyDecoratorUsingVelocity(ProfilingPageFilter.j
      ava:133)
              at com.atlassian.confluence.util.profiling.ProfilingPageFilter.applyDecorator(ProfilingPageFilter.java:76)
              at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:61)
              ...
              at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
      

      An acceptance test that will show this behaviour is BrokenSpacePermissionsImportAcceptanceTest.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              pcurren Paul Curren
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: