Errors after upgrading from Confluence 7.4.0 to 7.11.1 (on Kubernetes)
Asked by ChrisB:

Hi.

I transferred Confluence from a virtual machine (database and home directory export):  
ubuntu 16.04, mysql 5.7.32 (utf8), confluence 7.4.0

to Kubernetes (database change was done according to <https://confluence.atlassian.com/kb/how-to-fix-the-collation-and-character-set-of-a-mysql-database-manually-744326173>. html):  
mysql 8.0.21 (utf8mb4), confluence 7.4.0 (official Atlassian image)

and then updated confluence to 7.11.1. I had to add confluence -Dconfluence.upgrade.recovery.file.enabled = false to the boot parameters for the image and --log-bin-trust-function-creators = 1 for the mysql image. The update was successful, i.e. confluence is working. You can write, edit, use plugins, and so on.

However, new bugs appeared in the logs.

**Webhooks are not working**. The following errors appear in the logs when starting the tab from Webhooks:
> Cannot drop index 'index_ao_a0b856_web1050270930': needed in a foreign key constraint  
> Cannot drop index 'index_ao_a0b856_web110787824': needed in a foreign key constraint

```
SHOW CREATE TABLE AO_A0B856_WEBHOOK_CONFIG;

AO_A0B856_WEBHOOK_CONFIG | CREATE TABLE `AO_A0B856_WEBHOOK_CONFIG` (
`ID` int NOT NULL AUTO_INCREMENT,
`KEY` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
`VALUE` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
`WEBHOOKID` int NOT NULL,
PRIMARY KEY (`ID`),
KEY `index_ao_a0b856_web1050270930` (`WEBHOOKID`),
CONSTRAINT `fk_ao_a0b856_webhook_config_webhookid` FOREIGN KEY (`WEBHOOKID`) REFERENCES `AO_A0B856_WEBHOOK` (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin

SHOW CREATE TABLE AO_A0B856_WEBHOOK_EVENT;

AO_A0B856_WEBHOOK_EVENT | CREATE TABLE `AO_A0B856_WEBHOOK_EVENT` (
`EVENT_ID` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
`ID` int NOT NULL AUTO_INCREMENT,
`WEBHOOKID` int NOT NULL,
PRIMARY KEY (`ID`),
KEY `index_ao_a0b856_web110787824` (`WEBHOOKID`),
CONSTRAINT `fk_ao_a0b856_webhook_event_webhookid` FOREIGN KEY (`WEBHOOKID`) REFERENCES `AO_A0B856_WEBHOOK` (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin
```

I fixed them like this:

```
ALTER TABLE AO_A0B856_WEBHOOK_CONFIG DROP FOREIGN KEY fk_ao_a0b856_webhook_config_webhookid;
ALTER TABLE AO_A0B856_WEBHOOK_EVENT DROP FOREIGN KEY fk_ao_a0b856_webhook_event_webhookid;
```

After restarting deployment, errors disappear, Webhooks tab starts.

**Another error that I don't understand and don't know what it is about**
> ERROR \[AtlassianEvent::CustomizableThreadFactory-2\] \[confluence.macro.browser.DefaultMacroMetadataManager\] buildMacroMetadata Error getting data from MacroMetadataProvider,  
> java.lang.NullPointerException  
> at com.atlassian.gadgets.renderer.internal.http.HttpClientFetcher.addResponseToCacheIfSuccessful(HttpClientFetcher.java:81)  
> at com.atlassian.gadgets.renderer.internal.http.HttpClientFetcher.performRequest(HttpClientFetcher.java:102)  
> at com.atlassian.gadgets.renderer.internal.http.HttpClientFetcher.fetch(HttpClientFetcher.java:59)  
> at org.apache.shindig.gadgets.DefaultMessageBundleFactory.fetchBundle(DefaultMessageBundleFactory.java:138)  
> at org.apache.shindig.gadgets.DefaultMessageBundleFactory.getNestedBundle(DefaultMessageBundleFactory.java:111)  
> at org.apache.shindig.gadgets.DefaultMessageBundleFactory.getBundle(DefaultMessageBundleFactory.java:79)  
> at org.apache.shindig.gadgets.DefaultMessageBundleFactory.getParentBundle(DefaultMessageBundleFactory.java:124)  
> at org.apache.shindig.gadgets.DefaultMessageBundleFactory.getNestedBundle(DefaultMessageBundleFactory.java:101)  
> at org.apache.shindig.gadgets.DefaultMessageBundleFactory.getBundle(DefaultMessageBundleFactory.java:79)  
> at org.apache.shindig.gadgets.DefaultMessageBundleFactory.getParentBundle(DefaultMessageBundleFactory.java:127)  
> at org.apache.shindig.gadgets.DefaultMessageBundleFactory.getNestedBundle(DefaultMessageBundleFactory.java:101)  
> at org.apache.shindig.gadgets.DefaultMessageBundleFactory.getBundle(DefaultMessageBundleFactory.java:79)  
> at org.apache.shindig.gadgets.variables.VariableSubstituter.substitute(VariableSubstituter.java:47)  
> at com.atlassian.gadgets.renderer.internal.GadgetSpecFactoryImpl.getGadgetSpec(GadgetSpecFactoryImpl.java:127)  
> at com.atlassian.gadgets.renderer.internal.GadgetSpecFactoryImpl.getGadgetSpec(GadgetSpecFactoryImpl.java:83)  
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)  
> at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)  
> at java.base/java.lang.reflect.Method.invoke(Method.java:566)  
> at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)  
> at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)  
> at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)  
> at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)  
> at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136)  
> at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)  
> at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)  
> at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)  
> at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)  
> at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)  
> at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)  
> at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)  
> at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136)  
> at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)  
> at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)  
> at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)  
> at com.sun.proxy.$Proxy2385.getGadgetSpec(Unknown Source)  
> at com.atlassian.confluence.plugins.gadgets.metadata.GadgetsMacroMetadataProvider.generateMacroMetadata(GadgetsMacroMetadataProvider.java:188)  
> at com.atlassian.confluence.plugins.gadgets.metadata.GadgetsMacroMetadataProvider.getMacroMetadata(GadgetsMacroMetadataProvider.java:90)  
> at com.atlassian.confluence.plugins.gadgets.metadata.CachingGadgetsMacroMetadataProvider.retrieveMetadataAndUpdateCache(CachingGadgetsMacroMetadataProvider.java:236)  
> at com.atlassian.confluence.plugins.gadgets.metadata.CachingGadgetsMacroMetadataProvider.getData(CachingGadgetsMacroMetadataProvider.java:172)  
> at com.atlassian.confluence.macro.browser.DefaultMacroMetadataManager.buildMacroMetadata(DefaultMacroMetadataManager.java:144)  
> at com.atlassian.confluence.macro.browser.DefaultMacroMetadataManager.onPluginFrameworkStartedEvent(DefaultMacroMetadataManager.java:72)  
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)  
> at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)  
> at java.base/java.lang.reflect.Method.invoke(Method.java:566)  
> at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:42)  
> at com.atlassian.confluence.event.ConfluenceListenerHandlersConfiguration$TimedListenerInvoker.invoke(ConfluenceListenerHandlersConfiguration.java:96)  
> at com.atlassian.confluence.event.ConfluenceEventDispatcher$VCacheRequestContextRunnableFactory$1.lambda$run$0(ConfluenceEventDispatcher.java:93)  
> at com.atlassian.confluence.vcache.VCacheRequestContextOperations.lambda$doInRequestContext$0(VCacheRequestContextOperations.java:50)  
> 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.doInRequestContext(VCacheRequestContextOperations.java:49)  
> at com.atlassian.confluence.event.ConfluenceEventDispatcher$VCacheRequestContextRunnableFactory$1.run(ConfluenceEventDispatcher.java:93)  
> at com.atlassian.confluence.event.ConfluenceEventDispatcher$1.run(ConfluenceEventDispatcher.java:61)  
> at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)  
> at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)  
> at java.base/java.lang.Thread.run(Thread.java:834)

Despite this, confluence still seems to be working properly.

I have no idea how to get rid of this error. I will be grateful for your help


Answers:
author: Brant Schroeder
body: I believe this is your issue <https://confluence.atlassian.com/confkb/error-loading-macro-browser-due-to-corrupted-plugin-cache-320603002.html>


Tags: confluence-server

server