I am developing a Spring application using Struts and the Struts JSON plugin. When I run the application it gives the following error (in Firebug):
org.apache.st
This class is not public itself. It is package protected (see here). You have to call setAccessible(true)
before access its member exactly as when you access private or protected member.
EDIT. Unfortunately you have not provided full stack trace. If this exception is result of your activity (I mean you try to access member of Spring class yourself) the solution is above. If however this happened as result of frameworks collision please send more details. Probably your versions of Struts and Spring are not compatible or some additional configuration is required.
In my case I was trying to access public constructor of a non public class.
class MyClass {
public MyClass() {}
}
//...
MyClass c = JsonIterator.deserialize(bytes, MyClass.class)
Throws:
ReflectionMapDecoder can not access a member of class MyClass with modifiers "public"
Added public
and it works.
public class MyClass {
public MyClass() {}
}
HTH