I am using an inner class in a Spring Controller. It is having problems accessing protected fields/methods from it's parent classes super class.
Research suggests that this is caused by differing class-loaders in some way but I don't know enough about Spring to be certain.
class SuperBaseController {
    protected String aField;
    protected void aMethod() {
    }
}
@Controller
class OuterMyController extends SuperBaseController {
    class Inner {
        public void itsMethod() {
            // java.lang.IllegalAccessError: tried to access method
            aMethod();
        }
        public void getField() {
            // java.lang.IllegalAccessError: tried to access field
            String s = aField;
        }
    }
    void doSomething () {
        // Obviously fine.
        aMethod();
        // Fails in the Inner method call.
        new Inner().itsMethod();
        // Obviously fine.
        String s = aField;
        // Fails in the Inner method call.
        new Inner().getField();
    }
}
Are there any simple techniques to avoid/fix this issue? Preferably ones that do not involve making the fields/methods public.
I have confirmed that the ClassLoader attributes of the outer class is not the same as that of the super class.