Spring Plugin in Confluence

John Constantinou August 19, 2012

Hello,

Does anyone know if there are some MVC Spring Plugin examples in Confluence? I would appreciate it very much if you could provide some examples.

Best Regards,

John

2 answers

0 votes
Joe Clark
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 30, 2012

OK, I found an example! The LDAP Management interface for JIRA and Confluence is built using Spring MVC. If you have access to the JIRA or Confluence source code, it's the plugin in the root source directory called embedded-crowd-admin-plugin.

John Constantinou September 2, 2012

Hi Joseph,

Thank you for your response and your help! I already found that example, it was very helpful.

Greetings,

John

Made Mastika April 1, 2014

Hi Joseph,

I'm trying to build a Confluence (5.4.4) Plugin utilising Spring MVC and have been using the embedded-crowd-admin-plugin as a guide, however, no matter what I do I keep on getting the following error:

[INFO] [talledLocalContainer] 2014-04-02 17:12:10,459 ERROR [main] [atlassian.plugin.loaders.ScanningPluginLoader] deployPluginFromUnit Because of the following exception:
[INFO] [talledLocalContainer] java.lang.NoClassDefFoundError: freemarker/cache/TemplateLoader
[INFO] [talledLocalContainer] 	at java.lang.Class.getDeclaredMethods0(Native Method)
[INFO] [talledLocalContainer] 	at java.lang.Class.privateGetDeclaredMethods(Class.java:2484)
[INFO] [talledLocalContainer] 	at java.lang.Class.privateGetPublicMethods(Class.java:2604)
[INFO] [talledLocalContainer] 	at java.lang.Class.getMethods(Class.java:1446)
[INFO] [talledLocalContainer] 	at com.atlassian.plugin.osgi.factory.transform.stage.HostComponentSpringStage.addHostComponentsUsedInSuperClasses(HostComponentSpringStage.java:251)

I have attempted to include a FreeMarker bundle as a dependency, and I could see the library is being unarchived in the plugin however, the error persists.

Any thought on it? What would you recommend for a templating framework to use in the plugin that extends HTTPServlet in place of Spring MVC?

Regards,

Made

Joe Clark
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 1, 2014

We generally don't use FreeMarker in Confluence. Try using Apache Velocity or Google Closure Templates instead, as support for both of these is already handled by Confluence.

Vivek Sethi May 14, 2015

I am also facing the same issue.. for some reason, I have to use a spring boot app within the plugin, and I am getting the error as quoted above "java.lang.NoClassDefFoundError: freemarker/cache/TemplateLoader"... Any pointers..?? Anything I might be doing wrong?

0 votes
Joe Clark
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 19, 2012

Hi John,

Is there a specific reason you wish to use Spring MVC? Confluence is built around WebWork/XWork which offers reasonably equivalent functionality.

John Constantinou August 19, 2012

Hi Joseph,

Thank you very much for your answer! I will check WebWork/XWork for that.

Best Regards,

John

John Constantinou August 20, 2012

Actually i wanted to use a Spring Plugin, as the already implemented platform (for which i would like to create the plugin) is already implemented with Spring.

Joe Clark
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 30, 2012

I'm pretty sure it's possible to embed a Spring MVC app in Confluence as a plugin, but I'm having some trouble finding any examples for you and I don't have any experience with it myself - I'll keep looking :-)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events