异常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) ...
随机推荐
- How do I remove a particular element from an array in JavaScript?
9090down voteaccepted Find the index of the array element you want to remove, then remove that index ...
- Deep Learning.ai学习笔记_第四门课_卷积神经网络
目录 第一周 卷积神经网络基础 第二周 深度卷积网络:实例探究 第三周 目标检测 第四周 特殊应用:人脸识别和神经风格转换 第一周 卷积神经网络基础 垂直边缘检测器,通过卷积计算,可以把多维矩阵进行降 ...
- 使用Git Subtree在多个项目中共用同一个子项目
转载请注明原文地址:http://www.cnblogs.com/ygj0930/p/8427796.html 场景一:已有一个大项目,需要把其中一部分内容独立出来作为共用子项目,被其他项目引用 一: ...
- 关于Gerrit code review 介绍与安装
代码审核(Code Review)是软件研发质量保障机制中非常重要的一环,但在实际项目执行过程中,却因为种种原因被Delay甚至是忽略.在实践中,给大家推荐一款免费.开放源代码的代码审查软件Gerri ...
- 单片机成长之路(51基础篇) - 007 CH340CH341最全说明
比较全的CH340,CH341应用说明 CH340 以前用USB转串口时图方便一般也都是直接买现成的USB转串口模块,但是后面设计需要,不等不将CH340这个模块集成到电路板中,经过多次失败,终于得到 ...
- Mathematica查看内部定义
<< GeneralUtilities`; PrintDefinitions[IntegerReverse]
- MySQL InnoDB 引擎的持久性与性能
MySQL 事务的 ACID 特性中,D 代表持久性(Durability):在使用 InnoDB 引擎时,当返回客户端一个成功完成事务的确认时, InnoDB 就会保证数据的一致性,即使该数据在此时 ...
- php获取当前被调函数的参数列表
下面是php中的一个获取当前别调用函数的参数列表的测试程序,感受一下php类库的强大之处: // 测试获取参数列表 getArgs('aaa', 'bbb', 'ccc', 123, true); f ...
- 重读redis设计与实现
重读了一遍redis设计与实现,这次收获也不错,把之前还有些疑惑的点:redis跳跃表的原理.redis持久化的方法.redis复制.redis sentinel.redis集群等,都重新熟悉了一遍, ...
- Ubuntu安装cuda
到官网选择对应的cuda版本.cuda跟显卡的驱动是有个依赖关系的.参见这篇博客 然后按照提示,运行按照程序 sudo sh cuda_10..130_410.48_linux.run 然后安装完成后 ...