Creating a configuration for custom field type - compilation errors Edited

I'm trying to create a configurable custom item, following the tutorial in Practical JIRA Plugins book. My problem is that when I try to create the configuration class EditConfiguration (following this source code  EditConfiguration class), I get this error

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.2:compile (default-compile) on project jiraPlugin: Compilation failure
[ERROR] xxxx/jira/customfields/EditConfiguration.java:[125,17] name clash: setErrorMessages(java.util.Collection<java.lang.String>) in xxxx.jira.customfields.EditConfiguration and setErrorMessages(java.util.Collection) in webwork.action.ActionSupport have the same erasure, yet neither overrides the other

 There seems to be a problem with method setErrorMessages, which needs to be overriden, but the overriden version is the same as the generic one in com.atlassian.jira.util.ErrorCollection class.

I suppose the main problem is that the book is working with some older JIRA version, but being very new to JIRA development, I have no idea how to solve this.

 

UPDATE:

The problem seems to be in conflict with OpenSymphony webwork framework. When I add dependency to newest version 2.2.5, problem disappears, but I get another error

[ERROR] xxx/jira/customfields/EditConfiguration.java:[13,8] cannot access webwork.action.CommandDriven
[ERROR] class file for webwork.action.CommandDriven not found

Logically, because this class was either moved somewhere else or removed completely in this version. When I go back to lower version 1.4, which does contain the CommandDriven class, I also go back to the error mentioned earlier.

JiraActionSupport class seems to be implementing the CommandDriven interface, so I have to stick with the older version of OpenSymphony webwork, which gives me the name clash error.

I have these in my pom.xml, which I think is right.

<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-api</artifactId>
<version>${jira.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-core</artifactId>
<version>${jira.version}</version>
<scope>provided</scope>
</dependency>

And I have tried to add this with both 1.4 and 2.2.5 versions, getting the said errors.

<dependency>
<groupId>opensymphony</groupId>
<artifactId>webwork</artifactId>
<version>1.4</version>
</dependency>

I also have this set to jira.version - that was default when I created the project.

<jira.version>7.4.1</jira.version>

 

0 answers

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,335 views 14 20
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot