Custom Confluence plugin fails to enable after upgrade to 8.5.3

Hi there,

A while ago we developed a custom plugin that makes use of the K15t HTML Exporter libraries and it worked perfectly however we tested an upgrade from 7.19.2 to 8.5.3 on a test instance because of the recent security advisories.
After the upgrade was successful I began doing some tests and noticed that our custom plugin failed to enable. I check the logs and the below was all that displayed. There was nothing specific pointing to a cause:

2023-11-15 09:30:40,601 WARN [http-nio-8181-exec-5 url: /plugins/servlet/upm; user: ########] [confluence.plugin.descriptor.VelocityContextItemModuleDescriptor] logThrowable Unable to access module for descriptor ‘com.adaptavist.confluence.survey:survey-velocity-helper’ of class ‘com.atlassian.confluence.plugin.descriptor.VelocityContextItemModuleDescriptor’ because of ‘org.springframework.beans.factory.BeanCreationException - Error creating bean with name ‘com.adaptavist.confluence.survey.util.SurveyVelocityHelper’: Lookup method resolution failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [com.adaptavist.confluence.survey.util.SurveyVelocityHelper] from ClassLoader [com.adaptavist.confluence.survey [238]]’. Continuing

– url: /plugins/servlet/upm | userName: ######## | referer: https://wiki2.####.co.za/plugins/servlet/upm | traceId: bb5677d3d7dae10b
2023-11-15 09:30:40,782 ERROR [http-nio-8181-exec-10 url: /rest/plugins/1.0/com.####.mis.plugins.ExportHTML-key; user: ########] [plugin.osgi.factory.OsgiPluginInstalledHelper] availableForTraversal Cannot determine required plugins, cannot resolve bundle ‘com.####.mis.plugins.ExportHTML’
– url: /rest/plugins/1.0/com.####.mis.plugins.ExportHTML-key | userName: ######## | referer: https://wiki2.####.co.za/plugins/servlet/upm | traceId: cd9f4993e94dd234

Please feel free to ask any questions if more information is required.
Thanks.

1 Like

Some basic questions:

The k15t HTML Exporter is installed on the new 8.5.3 instance?

You set the version to 8.5.3 in your plugins POM.xml?

Is there a new version of the K15t HTML Exporter that you need to add to see changes reflect in the library in your IDE?

Hi @David8,

  1. Yes the k15t HTML Exporter is installed on the new 8.5.3 instance.

  2. I added it now however I have seen some issues with some artifacts missing with 8.5.3 so I added 8.5.1 instead but after running atlas-package, I am now getting an error relating to package com.opensymphony.webwork does not exist.
    The import exists in the code and the jar file exists under Referenced Libraries in the project.
    import com.opensymphony.webwork.ServletActionContext;

  3. Not that I am aware of.

It may just be due to changes since this plugin was first created (before my time) as the referenced Confluence version was for version 5 so its possible there may just be a ton of deprecated references and what not.

Kind regards,
Daniel

I managed to sort it out. I used 8.5.2 in the pom.xml and just had to change/replace a few deprecated imports used in the project. This is the link where I found the info: Struts 2 upgrade | Confluence Data Center and Server 8.6 | Atlassian Documentation.

1 Like

Hello @DanielHurrell, I believe we have encounter very similar issue in our instance of Confluence. I am trying to follow your answer, but I am not skilled in plugin creation or updating of an existing one. Would there be a way to contact you somehow directly, where would guide me through the process?

Kind Regards,
Adam

1 Like

Hi @AdamProchzka, could you provide me with some more information please and then I can try to assist you.
You should be able to send me a direct message if you click on my name and then select message.

1 Like

Hello @DanielHurrell, thank you for responding so quickly. Unfortunately I seemingly do not have any option to send direct messages nor do I have Messages section under my own profile (maybe my account is too new).
Anyway we are jumping from Confluence Data Center 7.19.26 to 8.5.17. We have a plugin called echocat Adam with discontinued support. After the upgrade, the add-on stopped working. It cannot be enabled.
I suspect it is caused by the usage of WebWork 2.1.x in the add-on code. In attempt to negate the issue, I have followed your advice (and the Struts 2 upgrade guide, you linked) and tried to replace the WebWork 2.1.x packages in the pom.xml.
However when I tried to update the Confluence version property, I have errors from Maven as I cannot overwrite certain dependencies and files, which still reference the old version of Confluence (version 6.0.2) and there are probably WebWork 2.1.x packages in those files and dependencies i cannot change.
Should the changes to the pom.xml be sufficient, even with the errors and how do I successfully deploy the “updated” version of the add-on?

If you would shed some light on some of these issues and questions, you would be a tremendous help and I would be grateful.

With Regards,
Adam

Hello @DanielHurrell, just wanted to follow up on this thread. If you could confirm if I am on the right path with the fix of the issue or if there are any details I should add?

Thank you
Adam ProchĂĄzka

Hi @AdamProchzka, apologies for the delayed response. I missed the reply.
From what I can recall I had to remove some import statements in the code for some of the classes I had since those imports could not longer be used. In the POM.xml I think I changed the following under the tag. I remember having an issue if I specified a confluence version past 8.5.4 but can’t remember the exact reason:
<confluence.version>8.5.4</confluence.version><confluence.data.version>8.5.4</confluence.data.version>
<amps.version>8.1.2</amps.version>
<atlassian.spring.scanner.version>2.2.1</atlassian.spring.scanner.version>