Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to fix "Method 'doDefault()' is not defined in action" in Confluence 3.5.5?

Am getting the following when clicking on "configure" on a plugin:

java.lang.IllegalArgumentException: Method 'doDefault()' is not defined in action 'class csum.confluence.permissionmgmt.config.CustomPermissionConfigAction'
	at com.opensymphony.xwork.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:305)
	at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:170)
	at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35)
	at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
	at com.atlassian.confluence.util.LoggingContextInterceptor.intercept(LoggingContextInterceptor.java:49)

The following is defined in the action class (and its superclass) and I've tried implementing Administrative and not implementing it (it is a problem with the plugin configuration action):

public String doDefault() throws Exception { ... }

Googling for this error, only 1-2 developers other than me have run into it, and the solutions previously mentioned don't seem to work (ensuring method is defined and Administrative interface, currently deprecated, is used).

Any ideas on what I could do to fix this?

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

6 votes
Answer accepted

Thanks to Colin's note and a note from Don Brown of Atlassian, I figured this out. The issue in my case was that I thought that Atlassian Plugins v2 supported constructor injection for all classes, but it doesn't work for webwork actions, so the config action class was failing to be instantiated by webwork. After switching it back to setter injection for that action, it worked perfectly!

Note: Ulrich Kuhnhardt also noted this in CONF-15011.

Yeah that should be much better documented somewhere. Constructor injection should always be used where possible, but for xwork actions, no go :(

That is interesting because I ran into a similar problem just the other way around. I always used setter injection for v2 plugins as learned from my colleagues. This worked fine until I implemented a Macro. For this only constructor injection works.

Grr, time lost remembering this again!

Thank you Gary! I was ready to give up.

For me the constructor instantiation works if there is no method attribute. It stops to work whenever you add a method:

<action name="test" class="com.adaptavist.ces.action.ConfigAction" method="someMethod">

Gary, check that the error is actually not caused by xwork not being able to instantiate the action.

I've run into this many times, specifically regarding Uli's comment on the issue below

See - https://jira.atlassian.com/browse/CONF-15011

TAGS

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you