This page constitutes random notes from my work day as an Atlassian product consultant, put up in the vague hope they might benefit others. Expect rambling, reference to unsolved problems, and plenty of stacktraces. Check the date as any information given is likely to be stale.

Some Google fodder for fellow Confluence upgraders.

When upgrading to Confluence 7.x, you may get an ugly stacktrace on startup:

2020-01-07 09:13:44,605 WARN [active-objects-init-system tenant-0] [atlassian.activeobjects.internal.DataSourceProviderActiveObjectsFactory$PostgresActiveObjectsUpgradeTask] configureConnectionAndRun Failed to retrieve prepare threshold
java.lang.NoSuchMethodException: org.apache.tomcat.dbcp.dbcp2.PoolingDataSource$PoolGuardConnectionWrapper.getPrepareThreshold()
at java.lang.Class.getMethod(Class.java:1786)
at com.atlassian.activeobjects.internal.DataSourceProviderActiveObjectsFactory$PostgresActiveObjectsUpgradeTask.configureConnectionAndRun(DataSourceProviderActiveObjectsFactory.java:219)
at com.atlassian.activeobjects.internal.DataSourceProviderActiveObjectsFactory$PostgresActiveObjectsUpgradeTask.upgrade(DataSourceProviderActiveObjectsFactory.java:188)
at com.atlassian.activeobjects.internal.ActiveObjectUpgradeManagerImpl.lambda$upgrade$0(ActiveObjectUpgradeManagerImpl.java:64)
at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:21)
at com.atlassian.sal.spring.component.SpringHostContextAccessor.lambda$doInTransaction$0(SpringHostContextAccessor.java:70)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140)
at com.atlassian.sal.spring.component.SpringHostContextAccessor.doInTransaction(SpringHostContextAccessor.java:68)
at com.atlassian.confluence.spring.transaction.interceptor.ConfluenceSpringHostContextAccessor.access$001(ConfluenceSpringHostContextAccessor.java:21)
at com.atlassian.confluence.spring.transaction.interceptor.ConfluenceSpringHostContextAccessor.lambda$doInTransaction$3(ConfluenceSpringHostContextAccessor.java:72)
at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContextInternal(VCacheRequestContextManager.java:84)
at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContext(VCacheRequestContextManager.java:68)
at com.atlassian.confluence.spring.transaction.interceptor.ConfluenceSpringHostContextAccessor.doInTransaction(ConfluenceSpringHostContextAccessor.java:72)
at com.atlassian.sal.core.transaction.HostContextTransactionTemplate.execute(HostContextTransactionTemplate.java:18)
at sun.reflect.GeneratedMethodAccessor255.invoke(Unknown Source)
...
at com.sun.proxy.$Proxy1155.execute(Unknown Source)
at com.atlassian.activeobjects.internal.SalTransactionManager.inTransaction(SalTransactionManager.java:42)
at com.atlassian.activeobjects.internal.AbstractLoggingTransactionManager.doInTransaction(AbstractLoggingTransactionManager.java:16)
at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.executeInTransaction(EntityManagedActiveObjects.java:204)
at com.atlassian.activeobjects.internal.ActiveObjectUpgradeManagerImpl.upgrade(ActiveObjectUpgradeManagerImpl.java:62)
at com.atlassian.activeobjects.internal.ActiveObjectUpgradeManagerImpl.upgrade(ActiveObjectUpgradeManagerImpl.java:34)
at com.atlassian.activeobjects.internal.DataSourceProviderActiveObjectsFactory.upgrade(DataSourceProviderActiveObjectsFactory.java:84)
at com.atlassian.activeobjects.internal.AbstractActiveObjectsFactory.create(AbstractActiveObjectsFactory.java:65)
at com.atlassian.activeobjects.internal.DelegatingActiveObjectsFactory.create(DelegatingActiveObjectsFactory.java:32)
at com.atlassian.activeobjects.osgi.TenantAwareActiveObjects$1$1$1.call(TenantAwareActiveObjects.java:90)
at com.atlassian.activeobjects.osgi.TenantAwareActiveObjects$1$1$1.call(TenantAwareActiveObjects.java:85)
at com.atlassian.sal.core.executor.ThreadLocalDelegateCallable.call(ThreadLocalDelegateCallable.java:38)
at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContextInternal(VCacheRequestContextManager.java:84)
at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContext(VCacheRequestContextManager.java:68)
at com.atlassian.confluence.vcache.VCacheRequestContextOperations.lambda$withRequestContext$1(VCacheRequestContextOperations.java:59)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

This happens (only?) when configuring the database via a DataSource. Atlassian Support assure me that it is harmless.

Update: it also happens when going through the setup wizard:


 -- url: /setup/setuppaths.action | referer: https://confluence.example.com/setup/setupdatasourcedb-start.action | traceId: 00cb004caa9ab274 | userName: anonymous | action: setuppaths
java.lang.NoSuchMethodException: org.apache.tomcat.dbcp.dbcp2.PoolingDataSource$PoolGuardConnectionWrapper.getPrepareThreshold()
        at java.base/java.lang.Class.getMethod(Class.java:2108)
        at com.atlassian.activeobjects.internal.DataSourceProviderActiveObjectsFactory$PostgresActiveObjectsUpgradeTask.configureConnectionAndRun(DataSourceProviderActiveObjectsFactory.java:219)
        at com.atlassian.activeobjects.internal.DataSourceProviderActiveObjectsFactory$PostgresActiveObjectsUpgradeTask.upgrade(DataSourceProviderActiveObjectsFactory.java:188)
        at com.atlassian.activeobjects.internal.ActiveObjectUpgradeManagerImpl.lambda$upgrade$0(ActiveObjectUpgradeManagerImpl.java:64)
        at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:21)
        at com.atlassian.sal.spring.component.SpringHostContextAccessor.lambda$doInTransaction$0(SpringHostContextAccessor.java:70)
        at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140)
        at com.atlassian.sal.spring.component.SpringHostContextAccessor.doInTransaction(SpringHostContextAccessor.java:68)
        at com.atlassian.confluence.spring.transaction.interceptor.ConfluenceSpringHostContextAccessor.access$001(ConfluenceSpringHostContextAccessor.java:21)
        at com.atlassian.confluence.spring.transaction.interceptor.ConfluenceSpringHostContextAccessor.lambda$doInTransaction$3(ConfluenceSpringHostContextAccessor.java:72)
        at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContextInternal(VCacheRequestContextManager.java:84)
        at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContext(VCacheRequestContextManager.java:68)
        at com.atlassian.confluence.spring.transaction.interceptor.ConfluenceSpringHostContextAccessor.doInTransaction(ConfluenceSpringHostContextAccessor.java:72)
        at com.atlassian.sal.core.transaction.HostContextTransactionTemplate.execute(HostContextTransactionTemplate.java:18)
        at jdk.internal.reflect.GeneratedMethodAccessor311.invoke(Unknown Source)
....

So; not harmless.

Atlassian has never had much interest in supporting DataSources, despite their practical benefits. Best not to use them.

  • No labels