If you get an error like the one below when you attempt to use your plugin, check that your atlassian-plugin.xml
file (i.e. your plugin descriptor) contains plugins-version="2"
.
Unable to render content due to system error: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.sarah.confluence.plugins.ExampleMacro': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.sarah.confluence.plugins.ExampleMacro]: No default constructor found; nested exception is java.lang.NoSuchMethodException: com.sarah.confluence.plugins.ExampleMacro.<init>()
To fix the problem:
Stop the Confluence server. (Go to the server command window and press Ctrl-C.)
Add plugins-version="2"
to the <atlassian-plugin>
element in your atlassian-plugin.xml
file. It will look something like this:
1 2<atlassian-plugin key="${groupId}.${artifactId}" name="${artifactId}" plugins-version="2">
Or this:
1 2<atlassian-plugin key="com.atlassian.confluence.plugins.example" name="Example Plugin" plugins-version="2">
Run amps-clean
.
Run amps-run
again.
Go to the application in your browser and try again.
Rate this page: