运行ssh项目出现"HTTP Status 500 - Unable to instantiate Action"

开始整合ssh框架报的错:

HTTP Status 500 - Unable to instantiate Action, employeeAction, defined for ‘show‘ in namespace ‘/‘Error creating bean with name ‘employeeAction‘ defined in file [E:\javaTools\apache-tomcat-8.0.15\webapps\ssh\WEB-INF\classes\bean-action.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property ‘employeeService‘ of bean class [cn.itcast.action.EmployeeAction]: Bean property ‘employeeService‘ is not writable or has an invalid setter method. Did you mean ‘empoyeeService‘?

type Exception report

message Unable to instantiate Action, employeeAction, defined for ‘show‘ in namespace ‘/‘Error creating bean with name ‘employeeAction‘ defined in file [E:\javaTools\apache-tomcat-8.0.15\webapps\ssh\WEB-INF\classes\bean-action.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property ‘employeeService‘ of bean class [cn.itcast.action.EmployeeAction]: Bean property ‘employeeService‘ is not writable or has an invalid setter method. Did you mean ‘empoyeeService‘?

description The server encountered an internal error that prevented it from fulfilling this request.

exception

Unable to instantiate Action, employeeAction,  defined for ‘show‘ in namespace ‘/‘Error creating bean with name ‘employeeAction‘ defined in file [E:\javaTools\apache-tomcat-8.0.15\webapps\ssh\WEB-INF\classes\bean-action.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property ‘employeeService‘ of bean class [cn.itcast.action.EmployeeAction]: Bean property ‘employeeService‘ is not writable or has an invalid setter method. Did you mean ‘empoyeeService‘?
	com.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:319)
	com.opensymphony.xwork2.DefaultActionInvocation.init(DefaultActionInvocation.java:400)
	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:501)
	org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
	org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)

root cause

org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘employeeAction‘ defined in file [E:\javaTools\apache-tomcat-8.0.15\webapps\ssh\WEB-INF\classes\bean-action.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property ‘employeeService‘ of bean class [cn.itcast.action.EmployeeAction]: Bean property ‘employeeService‘ is not writable or has an invalid setter method. Did you mean ‘empoyeeService‘?
	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1453)
	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1158)
	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
	org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)
	org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
	org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1117)
	com.opensymphony.xwork2.spring.SpringObjectFactory.buildBean(SpringObjectFactory.java:151)
	com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:151)
	com.opensymphony.xwork2.ObjectFactory.buildAction(ObjectFactory.java:121)
	com.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:300)
	com.opensymphony.xwork2.DefaultActionInvocation.init(DefaultActionInvocation.java:400)
	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:501)
	org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
	org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)

root cause

org.springframework.beans.NotWritablePropertyException: Invalid property ‘employeeService‘ of bean class [cn.itcast.action.EmployeeAction]: Bean property ‘employeeService‘ is not writable or has an invalid setter method. Did you mean ‘empoyeeService‘?
	org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:1042)
	org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:902)
	org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:75)
	org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:57)
	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1450)
	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1158)
	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
	org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)
	org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
	org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1117)
	com.opensymphony.xwork2.spring.SpringObjectFactory.buildBean(SpringObjectFactory.java:151)
	com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:151)
	com.opensymphony.xwork2.ObjectFactory.buildAction(ObjectFactory.java:121)
	com.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:300)
	com.opensymphony.xwork2.DefaultActionInvocation.init(DefaultActionInvocation.java:400)
	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:501)
	org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
	org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)

note The full stack trace of the root cause is available in the Apache Tomcat/8.0.15 logs.


Apache Tomcat/8.0.15

时间: 2025-01-05 15:47:36

运行ssh项目出现"HTTP Status 500 - Unable to instantiate Action"的相关文章

spring与struts2整合出现错误HTTP Status 500 - Unable to instantiate Action

在进行spring和struts2整合的时候因为大意遇到了一个问题,费了半天神终于找到了问题所在,故分享出来望广大博友引以为戒!! 我们都知道在spring和struts2整合时,spring接管了action对象的创建,所以一定要在spring配置文件中配置action,这里需要注意的是配置<bean id="???">中的id时, 要与struts.xml配置action中的<action class="???">class一致,否则就会

解决 HTTP Status 500 - Unable to show problem report: freemarker.core.InvalidReferenceException:

HTTP Status 500 - Unable to show problem report: freemarker.core.InvalidReferenceException: The following has evaluated to null or missing: ==> msg [in template "org/apache/struts2/dispatcher/error.ftl" at line 68, column 31] Tip: If the fail

【FAQ】HTTP Status 500 - Unable to compile class for JSP:&#39;***&#39; cannot be resolved to a type

1.问题现象 2.解决方法 原因分析:cannot be resolved to a type 基本上是该类没有被识别出来,编译的时候,编译路径下没有该类对应的库文件, 可以通过下面几步解决: 1.拷贝类对应的jar到tomcat lib目录下:C:\Program Files\Java\apache-tomcat-8.0.9\lib 1.关闭tomcat服务器:执行bat文件 C:\Program Files\Java\apache-tomcat-8.0.9\bin\shutdown.bat

HTTP Status 500 - Unable to compile class for JSP:Syntax error on token &quot;=&quot;, @ expected

jsp页面中使用<% = com.xunge.base.constant.PlatInfo.title %>取静态字段的值,报HTTP Status 500 - Unable to compile class for JSP:Syntax error on token "=", @ expected错误. 详细错误信息如下: 在网上搜索了很久也没找到解决方法,后来发现是因为"<% ="百分号和等号之间多了一个空格的原因,去掉就OK了.

jsp调用javabean出现错误HTTP Status 500 - Unable to compile class for JSP

HTTP Status 500 - Unable to compile class for JSP: type Exception report message Unable to compile class for JSP: description The server encountered an internal error that prevented it from fulfilling this request. exception org.apache.jasper.JasperE

Unable to instantiate Action, xxxAction, defined for &#39;xxx&#39; in namespace &#39;/&#39;xxxAction解决方案

出现这个问题的原因主要有两个 1.如果项目没有使用Spring,则struts.xml配置文件中,这个action的class属性的路径没有写完整,应该是包名.类名 2.如果项目使用了Spring,那就是applicationContext.xml里面没有为这个action定义bean.这样strus.xml中的对应action的class属性的值就是Spring配置文件中bean的id,比如: applicationContext.xml <bean id="adminAction&qu

Unable to instantiate Action, xxxAction, defined for &amp;#39;xxx&amp;#39; in namespace &amp;#39;/&amp;#39;xxxAction解决方式

出现这个问题的解决办法主要有两个 1.假设项目没有使用Spring,则struts.xml配置文件里,这个action的class属性的路径没有写完整,应该是包名.类名 2.假设项目使用了Spring.那就是applicationContext.xml里面没有为这个action定义bean.这样strus.xml中的相应action的class属性的值就是Spring配置文件里bean的id.比方: applicationContext.xml <bean id="adminAction&

Unable to instantiate Action, xxxAction, defined for &lsquo;xxx&rsquo; in namespace &lsquo;/&rsquo;xxxAction

Unable to instantiate Action, xxxAction, defined for 'xxx' in namespace '/'xxxAction解决方案 2014年09月05日 ? 综合 ? 共 401字 ? 字号 小 中 大 ? 评论关闭 出现这个问题的原因主要有两个 1.如果项目没有使用Spring,则struts.xml配置文件中,这个action的class属性的路径没有写完整,应该是包名.类名 2.如果项目使用了Spring,那就是applicationCont

Unable to instantiate Action, xxxAction, defined for &#39;showBlogDetails&#39;

(忘了截图错误信息...) 使用SSH框架配置applicationContext.xml与struts.xml之间的映射关系 解决方案:保证applicationContext.xml中注册的bean元素的name属性名与struts.xml的action元素的class属性名一致,但我这里有点奇怪,我之前使用的blogActionBean不行,要换成blogAction才行,也许是语法限制? Unable to instantiate Action, xxxAction, defined f