Uploaded image for project: 'ActiveObjects'
  1. AO-697

After schema changes ActiveObjects yields exception "cached plan must not change result type" with PostgreSQL - JDBC driver 9.4

    Details

    • Type: Bug
    • Status: Backlog
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: 1.0.1
    • Fix Version/s: None
    • Component/s: ActiveObjects (lib)
    • Labels:
      None
    • Add-on Type:
      Server
    • Sprint:
      Sprint 16, Sprint 5
    • Story Points:
      2
    • Testing Notes:
      Hide

      Add notes...

      Show
      Add notes...

      Description

      Hi,

      From time to time customers report the following stack trace when they install an upgrade of my plug-in with PostgreSQL:

      org.postgresql.util.PSQLException: ERROR: cached plan must not change result type
      at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.find(EntityManagedActiveObjects.java:185) ~[na:na]
      at com.atlassian.activeobjects.osgi.TenantAwareActiveObjects.find(TenantAwareActiveObjects.java:335) ~[na:na]
      at com.mycompany.myplugin.RepoConfigDaoImpl.find(RepoConfigDaoImpl.scala:19) ~[na:na]
      at com.atlassian.activeobjects.tx.TransactionalProxy.invoke(TransactionalProxy.java:79) ~[na:na]
      at com.atlassian.activeobjects.tx.TransactionalProxy.access$000(TransactionalProxy.java:18) ~[na:na]
      at com.atlassian.activeobjects.tx.TransactionalProxy$1.doInTransaction(TransactionalProxy.java:63) ~[na:na]
      at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:25) ~[sal-core-2.13.4.jar:na]
      at com.atlassian.stash.internal.sal.spi.HostContextAccessorImpl.doInTransaction(HostContextAccessorImpl.java:27) ~[stash-platform-3.10.2.jar:na]
      at com.atlassian.sal.core.transaction.HostContextTransactionTemplate.execute(HostContextTransactionTemplate.java:21) ~[sal-core-2.13.4.jar:na]
      at com.atlassian.activeobjects.internal.SalTransactionManager.inTransaction(SalTransactionManager.java:48) ~[na:na]
      

      This one happened with the following PostgreSQL version:

      • name:PostgreSQL
      • version:9.3.4
      • minor version:3
      • major version:9
      • Driver:
      • name:PostgreSQL Native Driver
      • version:PostgreSQL 9.4 JDBC4.1 (build 1201)

      This normally happens when I add a new column to an entity. In the web I've seen similar issues and normally a restart of the application helps. PostgreSQL seams to have issues with cached plans that have been altered through table changes.

      The question is: can you clear those caches in ActiveObjects to circumvent such a restart?

      Thanks,
      Michael

      Related discussions:

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                mibex Mibex Software
              • Votes:
                8 Vote for this issue
                Watchers:
                17 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Who's Looking?