Convoyer Unable to instantiate Action

ket.pjwstk
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 18, 2011
Hi,

I am trying to override the editpage action using convoyer, however I get the following error:

com.opensymphony.xwork.XworkException: Unable to instantiate Action, com.atlassian.confluence.pages.actions.EditPageAction, defined for 'editpage_2' in namespace '/pages'com.atlassian.confluence.pages.actions.EditPageAction with nested exception
java.lang.ClassNotFoundException: com.atlassian.confluence.pages.actions.EditPageAction at com.opensymphony.xwork.DefaultActionInvocation.createAction(DefaultActionInvocation.java:220) at com.opensymphony.xwork.DefaultActionInvocation.init(DefaultActionInvocation.java:272) at com.opensymphony.xwork.DefaultActionInvocation.<init>(DefaultActionInvocation.java:65)

My convoyer-config is
<?xml version="1.0"?>
<conveyor-config>
<package-override name="pages" namespace="/pages">
<action-override name="doeditcomment" inherit="true">
<result-override name="input" type="velocity">/templates/editcomment-preview.vm</result-override>
</action-override>

<action-override name="editpage" inherit="true">
<result-override name="error" type="velocity">/templates/editpage.vm</result-override>
<result-override name="input" type="velocity">/templates/editpage.vm</result-override>
</action-override>

</package-override>
</conveyor-config>

In my atlassian plugin xml I have:
<conveyor name="Action Conveyor" key="actionConveyor" resource="/conveyor-config.xml"/>

and plugin-version=2

I also added dependencies in pom.xml

Any idea?


3 answers

1 accepted

1 vote
Answer accepted
David Peterson
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 18, 2011

It means you need to import the 'com.atlassian.confluence.*' package into your plugin in the <Import-Package> section of the 'maven-confluence-plugin' plugin. You will probably also need to import some other packages once you've done that, such as com.atlassian.plugin, com.atlassian.user, etc, depending on what packages your Actions and components are using. Example is below:

&lt;Import-Package&gt;
com.atlassian.confluence.*;version="[3.4,4)",
etc,
etc.
&lt;/Import-Package&gt;

ket.pjwstk
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 22, 2011

It works. Thanks!

2 votes
David Peterson
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 14, 2012
Hi Raffy, Firstly, in case you haven't found them, read the docs here: https://studio.plugins.atlassian.com/wiki/display/LIBCNV/Conveyor+Plugin Secondly, the Conveyor Plugin will be installed alongside your plugin, not bundled inside it. You can bundle them together in an OBR file, rather than a .jar file. Thirdly, if you're installing into Confluence 4, change the above to '[3.4,5)' so that it will match to Confluence 4.
dy raffy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 14, 2012

Hi David. Thank you very much for your answers. I am installing the plugin into Confluence 4. What does the parameter '[3.4,5)' mean?

0 votes
dy raffy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 14, 2012

Could you please tell how? I am trying to use the conveyor-Plugin too, But getting a lot of Problems with it.

Did you bundle the conveyor-Plugin into yout Plugin or just used it and installed it manuelly?

Wich Packages did you add to the <import-Package>...</import-Package>?

Is it exactelly as above to override the File editcomment-preview.vm?

Regardy

Raffy

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events