Friday, November 11, 2011

STRUTS : java.lang.IllegalAccessException

STRUTS : java.lang.IllegalAccessException: Class org.apache.struts.util.RequestUtils can not access a member of class view.myAction with modifiers "

PROBLEM

When I hit action class, I get the following exception.

java.lang.IllegalAccessException: Class org.apache.struts.util.RequestUtils can not access a member of class view.myAction with modifiers ""

All the member functions of the Action class are public.(There is only one method execute in the class and it was public)

SOLUTION

The problem was that I had not made myAction class public. It was made with default access specifier.

Make sure that your Action and ActionForm class is public.

No comments:

Post a Comment