Spring Plugin in Confluence

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 vote
Joseph Clark Atlassian Team Aug 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.

Hi Joseph,

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

Best Regards,

John

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.

Joseph Clark Atlassian Team Aug 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 :-)

0 vote
Joseph Clark Atlassian Team Aug 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.

Hi Joseph,

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

Greetings,

John

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

Joseph Clark Atlassian Team Apr 01, 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.

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?

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

361 views 0 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you