HTTP Status 500 - Unable to instantiate Action, bookAction, defined for 'addBook

ldlly0505 2017-12-07 04:54:02
structs.xml
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN" "http://struts.apache.org/dtds/struts-2.1.dtd">
<struts>
<constant name="struts.objectFactory" value="spring" />
<package name="book" extends="struts-default" >
<action name="addBook" class="bookAction" method="addBook">
<result name="success">/jsp/success.jsp</result>
<result name="error">/jsp/error.jsp</result>
</action>
<action name="findByNameBook" class="bookAction" method="findByNameBook">
<result name="success">/jsp/findResult.jsp</result>
<result name="error">/jsp/error.jsp</result>
</action>
<action name="findByPriceBook" class="bookAction" method="findByPriceBook">
<result name="success">/jsp/findResult.jsp</result>
</action>
<action name="updateBook" class="bookAction" method="updateBook">
<result name="success">/jsp/success.jsp</result>
<result name="error">/jsp/error.jsp</result>
</action>
</package>

</struts>
spring配置文件:
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">


<bean id="dataSource"
class="org.apache.commons.dbcp.BasicDataSource">
<property name="url"
value="jdbc:sqlserver://127.0.0.1:1433;DatabaseName=BOOK">
</property>
<property name="username" value="sa"></property>
<property name="password" value="abc123"></property>
</bean>
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref bean="dataSource" />
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.SQLServerDialect
</prop>
</props>
</property>
<property name="mappingResources">
<list>
<value>book/vo/TBook.hbm.xml</value></list>
</property></bean>
<bean id="bookDAOImpl" class="book.DAO.Impl.bookDAOImpl">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
<bean id="bookService" class="book.service.Impl.bookServiceImpl">
<property name="bookDaoImpl">
<ref bean="bookDAOImpl"/>
</property>
</bean>
<bean id="bookAction" class="book.Action.bookAction" scope="prototype">
<property name="bookServiceimpl">
<ref bean="bookService"></ref>
</property>
</bean>
</beans>
哪位高手帮我分析下,感激不尽!
...全文
191 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
ldlly0505 2017-12-07
  • 打赏
  • 举报
回复
HTTP Status 500 - Unable to instantiate Action, bookAction, defined for 'addBook' in namespace '/'Error creating bean with name 'bookAction' defined in class path resource [applicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.FatalBeanException: Failed to obtain BeanInfo for class [book.Action.bookAction]; nested exception is java.beans.IntrospectionException: type mismatch between read and write methods 以上是问题

5,655

社区成员

发帖
与我相关
我的任务
社区描述
Web开发应用服务器相关讨论专区
社区管理员
  • 应用服务器社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧