当前位置: 首页 > >

java 问题之一“can not access a member of with modifiers

发布时间:

原因: ?类名直接定义class #### ?






更改成:public class ####










Illegal access to constructor, is it public?
com.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:301)
com.opensymphony.xwork2.DefaultActionInvocation.init(DefaultActionInvocation.java:397)
com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:194)
org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:63)
org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:39)
com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:58)
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:553)
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:434)


root cause


java.lang.IllegalAccessException: Class com.opensymphony.xwork2.ObjectFactory can not access a member of class com.revenco.web.action.TestAction with modifiers "public"
sun.reflect.Reflection.ensureMemberAccess(Unknown Source)
java.lang.Class.newInstance0(Unknown Source)
java.lang.Class.newInstance(Unknown Source)
com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:131)
com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:162)
com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:151)
com.opensymphony.xwork2.ObjectFactory.buildAction(ObjectFactory.java:121)
com.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:297)
com.opensymphony.xwork2.DefaultActionInvocation.init(DefaultActionInvocation.java:397)
com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:194)
org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:63)
org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:39)
com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:58)
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:553)
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:434)




友情链接: 时尚网 总结汇报 幼儿教育 小学教育 初中学习资料网