异常HTTP Status 500 - Illegal access to constructor, is it public? java.lang.IllegalAccessException: Class com.opensymphony.xwork2.ObjectFactory can not access a member of class action.CoreAction with
Exception report
message Illegal access to constructor, is it public?
description The server encountered an internal error that prevented it from fulfilling this request.
exception
Illegal access to constructor, is it public?
com.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:297)
com.opensymphony.xwork2.DefaultActionInvocation.init(DefaultActionInvocation.java:393)
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:534)
org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
root cause
java.lang.IllegalAccessException: Class com.opensymphony.xwork2.ObjectFactory can not access a member of class action.CoreAction with modifiers ""
sun.reflect.Reflection.ensureMemberAccess(Reflection.java:109)
java.lang.Class.newInstance(Class.java:368)
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:293)
com.opensymphony.xwork2.DefaultActionInvocation.init(DefaultActionInvocation.java:393)
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:534)
org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
解决办法:有两个办法
1、原因是 自己的粗心造成的你的javaBean忘记写public关键字了
解决方法:javaBean类前加上public的修饰符
2、原因是 Class com.opensymphony.xwork2.ObjectFactory与JavaBean不在同一个包下,java的默认修饰符范围在同一个包下
解决方法:javaBean的构造方法不写或者加个public的修饰符
异常HTTP Status 500 - Illegal access to constructor, is it public? java.lang.IllegalAccessException: Class com.opensymphony.xwork2.ObjectFactory can not access a member of class action.CoreAction with的更多相关文章
- Mybatis异常There is no getter for property named 'XXX' in 'class java.lang.String'
1.当入参为 string类型时 (包括java.lang.String.) 我们使用#{xxx}引入参数.会抛异常There is no getter for property named 'XX ...
- mybatis 异常 There is no getter for property named 'bizId' in 'class java.lang.Long'
mybatis 异常 There is no getter for property named 'bizId' in 'class java.lang.Long' 当使用mybatis进行传参的时候 ...
- java.lang.IllegalAccessException: Class XX can not access a member of class XXX with modifiers "private static"
当前需求: 利用反射获取某一属性值运行结果:java.lang.IllegalAccessException: Class com.example.demo.test.Reflect can not ...
- SpringMVC开发中遇到的异常1:No primary or default constructor found for interface java.util.List
Request processing failed; nested exception is java.lang.IllegalStateException: No primary or defaul ...
- 【异常】idea执行Main方法出现 Exception in thread "main" java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest
一.异常复现步骤 1)首先得是一个Spring MVC项目 注:Spring Boot项目有内置的web 容器,不会出现该问题 2)main方法存在于使用HttpServletRequest类的类中 ...
- Validation异常:No validator could be found for constraint '.....' validating type 'java.lang.Integer'.
javax.validation.UnexpectedTypeException: HV000030: No validator could be found for constraint 'java ...
- 异常-----springmvc + ajaxfileupload解决ajax不能异步上传图片的问题。java.lang.ClassCastException: org.apache.catalina.connector.RequestFacade cannot be cast to org.springframework.web.multipart.
说明这个问题产生的原因主要是form表单上传图片的时候必须是Content-Type:"multipart/form-data,这种格式的,但是ajax在页面不刷新的情况下去加载的时候只会把 ...
- java.lang.IllegalAccessException: Class XXXcan not access xxx with modifiers "private"
field 或者 method 是 provate的 field.setAccessible(true); method.setAccessible(true); 有时候是因为 newinstance ...
- Mybatis异常--There is no getter for property named 'XXX' in 'class java.lang.String'
第一种 在service层加@Param(value="ip") void deleteIpsetup(@Param(value="ip")String ip) ...
随机推荐
- SpringBoot(十):读取application.yml下配置参数信息,java -jar启动时项目修改参数
读取application.yml下配置参数信息 在application.yml文件内容 my: remote-address: 192.168.1.1 yarn: weburl: http://1 ...
- JS 之 阻止事件冒泡,阻止默认事件,event.stopPropagation()和event.preventDefault(),return false的区别
在前端开发中,有时我们需要阻止冒泡和阻止默认事件的发生. 一.event.stopPropagation() 阻止事件的冒泡,不让事件向documen上蔓延,但是默认事件任然会执行,当调用这个方法的时 ...
- linux软连接
linux软连接.类似window的快捷方式可以跨磁盘块(硬连接不可以). #软硬链接 ln -sf source target ln source target #硬链接不能跨分区 #批量解压文件 ...
- [windows+cocos2dx]文本类
文字也是游戏最重要的元素之中的一个,以下就看看使用动态字体和静态字体库怎样创建文字.使用动态字体库创建的文字能够包括经常使用的不论什么字符,一般假设用户要输入名字,这就最好用动态字体库.由于你不知道用 ...
- Atitit 乌合之众读后感attilax总结 与读后感结构规范总结
Atitit 乌合之众读后感attilax总结 与读后感结构规范总结 1. 背景概览与鸟瞰overview 1 1.1. 社会背景 与 历史事件背景 与历史时间背景 1 1.2. 书籍简绍 2 1. ...
- vue-resource和vue-async-data两个插件的使用
vue-resource和vue-async-data两个插件的使用,看了一下文档http://cn.vuejs.org/guide/plugins.html#u5DF2_u6709_u63D2_u4 ...
- netstat实现原理
因为最近接手的项目是基于嵌入式Linux openwrt的,一开始以为会跟之前的服务器开发没什么大的区别,但是遇到问题去分析的时候才发现,工具链还是有些差别的,openwrt的netstat是属于一个 ...
- QLabel设置文字大小和颜色
https://blog.csdn.net/fm0517/article/details/4805462 ui.label是QLabel ui.label_4->setText("so ...
- java语言的优缺点
转载自:https://blog.csdn.net/bingshanyijiao_fkx/article/details/51613954 角度一: 优点:简单.安全.稳定.跨平台 缺点:需要运行环境 ...
- 【python】——python3 与 python2 的那些不兼容
python2 python3 string.uppercase string.ascii_uppercase string.lowercase string.ascii_lowercase xran ...