作者在 2010-09-14 16:02:28 发布以下内容
下面是我运行当中出现的问题,我下面给出关键代码,希望高手能够帮我解决.
我是做一个修改页面,在hibernate的映射文件出问题了
这个是修改前的jsp查询页面:
<s:iterator value="#session['listuser']" status="stx">
<tr>
<td height="36" class=gridViewItem style="WIDTH: 50px">
<img src="../images/bg_users.gif" width="33">
</td>
<td class=gridViewItem type="hide"><s:property value="id"/></td>
<td class=gridViewItem><s:property value="userid"/></td>
<td class=gridViewItem><s:property value="userusername"/></td>
<td class=gridViewItem><s:property value="userpassword"/></td>
<td class=gridViewItem><s:property value="userrole"/></td>
<td class=gridViewItem><s:property value="userstaffpositions"/></td>
<td class=gridViewItem><s:property value="usersex"/></td>
<td class=gridViewItem><s:property value="userbirthday"/></td>
<td class=gridViewItem><s:property value="useraddress"/></td>
<td class=gridViewItem><s:property value="userimformation"/></td>
<td class=gridViewItem><s:property value="userparty"/></td>
<td class=gridViewItem><s:property value="usertext"/></td>
<td class=gridViewItem>
<a class=cmdField href="editUserInf.action?id=<s:property value="id"/>">更新</a>
</td>
<tr>
<td height="36" class=gridViewItem style="WIDTH: 50px">
<img src="../images/bg_users.gif" width="33">
</td>
<td class=gridViewItem type="hide"><s:property value="id"/></td>
<td class=gridViewItem><s:property value="userid"/></td>
<td class=gridViewItem><s:property value="userusername"/></td>
<td class=gridViewItem><s:property value="userpassword"/></td>
<td class=gridViewItem><s:property value="userrole"/></td>
<td class=gridViewItem><s:property value="userstaffpositions"/></td>
<td class=gridViewItem><s:property value="usersex"/></td>
<td class=gridViewItem><s:property value="userbirthday"/></td>
<td class=gridViewItem><s:property value="useraddress"/></td>
<td class=gridViewItem><s:property value="userimformation"/></td>
<td class=gridViewItem><s:property value="userparty"/></td>
<td class=gridViewItem><s:property value="usertext"/></td>
<td class=gridViewItem>
<a class=cmdField href="editUserInf.action?id=<s:property value="id"/>">更新</a>
</td>
applicationContext配置文件:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver">
</property>
<property name="url"
value="jdbc:mysql://127.0.0.1:3306/elu_management_system">
</property>
<property name="username" value="root"></property>
<property name="password" value="6131637"></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.MySQLDialect
</prop>
<prop key="hibernate.connection.autocommit">true</prop>
<prop key="show_sql">true</prop>
</props>
</property>
<property name="mappingResources">
<list>
<value>com/elu/bean/Boardactivitiestable.hbm.xml</value>
<value>com/elu/bean/Usertable.hbm.xml</value>
<value>com/elu/bean/Documenttable.hbm.xml</value>
<value>
com/elu/bean/Financialdisbursementtable.hbm.xml
</value>
<value>com/elu/bean/Financialincometable.hbm.xml</value>
<value>com/elu/bean/Gtucotable.hbm.xml</value>
<value>
com/elu/bean/Informationpaperstable.hbm.xml
</value>
<value>com/elu/bean/Injurytable.hbm.xml</value>
<value>com/elu/bean/Jmoptable.hbm.xml</value>
<value>com/elu/bean/Labormonitoringtable.hbm.xml</value>
<value>com/elu/bean/Laomotable.hbm.xml</value>
<value>com/elu/bean/Leadingtable.hbm.xml</value>
<value>com/elu/bean/Mailtable.hbm.xml</value>
<value>com/elu/bean/Publishedtable.hbm.xml</value>
<value>
com/elu/bean/Supervisoryactivitiestable.hbm.xml
</value>
<value>com/elu/bean/Trainingtable.hbm.xml</value>
<value>com/elu/bean/Txtable.hbm.xml</value>
<value>com/elu/bean/Wxtable.hbm.xml</value>
<value>com/elu/bean/Xianjitable.hbm.xml</value>
<value>com/elu/bean/Zhidutable.hbm.xml</value>
<value>com/elu/bean/Zhuzhitable.hbm.xml</value>
</list>
</property>
</bean>
<bean id="transactionInterceptor" class="org.springframework.transaction.interceptor.TransactionInterceptor">
<!-- 事务拦截器bean需要依赖注入一个事务管理器 -->
<property name="transactionManager" ref="transactionManager"/>
<property name="transactionAttributes">
<!-- 下面定义事务传播属性 -->
<props>
<prop key="add*,save*,update*,delete*">PROPAGATION_REQUIRED</prop>
<prop key="find*,get*">PROPAGATION_REQUIRED,readOnly</prop>
</props>
</property>
</bean>
<bean class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
<!-- 指定对满足哪些bean name的bean自动生成业务代理 -->
<property name="beanNames">
<!-- 下面是所有需要自动创建事务代理的bean -->
<list>
<value>userservice</value>
</list>
</property>
<!-- 下面定义BeanNameAutoProxyCreator所需的事务拦截器 -->
<property name="interceptorNames">
<list>
<value>transactionInterceptor</value>
</list>
</property>
</bean>
<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory">
</property>
</bean>
<!-- 对Dao进行依赖注入 -->
<bean id="loginDao" class="com.elu.daoimpl.LoginDaoImpl">
<property name="sessionFactory" ref="sessionFactory"></property>
</bean>
<!-- 对业务逻辑进行依赖注入 -->
<bean id="loginService" class="com.elu.serviceimpl.LoginServiceImpl">
<property name="loginDao" ref="loginDao"></property>
</bean>
<!-- 对Action进行依赖注入 -->
<bean id="loginAction" class="com.elu.action.LoginAction">
<property name="loginService" ref="loginService">
</property>
</bean>
<bean id="userdaoImpl" class="com.elu.daoimpl.UserDaoImpl">
<property name="sessionFactory" ref="sessionFactory"></property>
</bean>
<!-- 对业务逻辑进行依赖注入 -->
<bean id="userserviceImpl" class="com.elu.serviceimpl.UserServiceImpl">
<property name="userdao" ref="userdaoImpl"></property>
</bean>
<!-- 对Action进行依赖注入 -->
<bean id="userAction" class="com.elu.action.UserAction">
<property name="userservice" ref="userserviceImpl"></property>
</bean>
</beans>
Action文件:
BaseAction:
package com.elu.action;
import com.elu.service.DocumentService;
import com.elu.service.EmployService;
import com.elu.service.GtucoService;
import com.elu.service.IuserService;
import com.elu.service.MailService;
import com.elu.service.UserService;
import com.opensymphony.xwork2.ActionSupport;
import com.elu.service.EmployService;
import com.elu.service.GtucoService;
import com.elu.service.IuserService;
import com.elu.service.MailService;
import com.elu.service.UserService;
import com.opensymphony.xwork2.ActionSupport;
public class BaseAction extends ActionSupport {
/**
*
*/
private static final long serialVersionUID = 1L;
/**
*
*/
private static final long serialVersionUID = 1L;
UserService userservice;
DocumentService documentservice;
EmployService employService;
MailService mailService;
IuserService iuserService;
GtucoService gtucoService;
GtucoService gtucoService;
public GtucoService getGtucoService() {
return gtucoService;
}
return gtucoService;
}
public void setGtucoService(GtucoService gtucoService) {
this.gtucoService = gtucoService;
}
this.gtucoService = gtucoService;
}
public static long getSerialversionuid() {
return serialVersionUID;
}
return serialVersionUID;
}
public IuserService getIuserService() {
return iuserService;
}
return iuserService;
}
public void setIuserService(IuserService iuserService) {
this.iuserService = iuserService;
}
this.iuserService = iuserService;
}
public MailService getMailService() {
return mailService;
}
return mailService;
}
public void setMailService(MailService mailService) {
this.mailService = mailService;
}
this.mailService = mailService;
}
public EmployService getEmployService() {
return employService;
}
return employService;
}
public void setEmployService(EmployService employService) {
this.employService = employService;
}
this.employService = employService;
}
public DocumentService getDocumentservice() {
return documentservice;
}
return documentservice;
}
public void setDocumentservice(DocumentService documentservice) {
this.documentservice = documentservice;
}
this.documentservice = documentservice;
}
public UserService getUserservice() {
return userservice;
}
return userservice;
}
public void setUserservice(UserService userservice) {
this.userservice = userservice;
}
}
this.userservice = userservice;
}
}
UserAction:
public String findbyid() throws Exception {
System.out.println("掉到了这个方法");
Usertable r = userservice.findById(Integer.parseInt(id));
System.out.println("调到了dao层的方法");
Map session = ActionContext.getContext().getSession();
session.put("id", this.getId());
session.put("usertable", r);
return "updataUser";
System.out.println("掉到了这个方法");
Usertable r = userservice.findById(Integer.parseInt(id));
System.out.println("调到了dao层的方法");
Map session = ActionContext.getContext().getSession();
session.put("id", this.getId());
session.put("usertable", r);
return "updataUser";
}
dao层:
UserDao:
public interface UserDao {
public List findAll();//显示所有的成员组成
public void addUser(Usertable p);//添加一个成员
public void deleteUser(int id);//删除成员
public Usertable findById(int id);//修改成员前的成员信息
public void saveUpdate(Usertable u);//保存修改的信息
}
public List findAll();//显示所有的成员组成
public void addUser(Usertable p);//添加一个成员
public void deleteUser(int id);//删除成员
public Usertable findById(int id);//修改成员前的成员信息
public void saveUpdate(Usertable u);//保存修改的信息
}
UserDaoImpl:
public Usertable findById(int id){
// TODO Auto-generated method stub
String hql="from Usertable u where u.id=:"+id;
Usertable u=(Usertable)this.getHibernateTemplate().load(hql,id);
System.out.println("向下传值");
return u;
}
// TODO Auto-generated method stub
String hql="from Usertable u where u.id=:"+id;
Usertable u=(Usertable)this.getHibernateTemplate().load(hql,id);
System.out.println("向下传值");
return u;
}
Service层:
public interface UserService {
public List findAll();//显示所有的成员组成
public void addUser(Usertable p);//添加一个成员
public void deleteUser(int id);//删除成员
public Usertable findById(int id);//修改成员前的成员信息
public void saveUpdate(Usertable u);//保存修改的信息
}
public List findAll();//显示所有的成员组成
public void addUser(Usertable p);//添加一个成员
public void deleteUser(int id);//删除成员
public Usertable findById(int id);//修改成员前的成员信息
public void saveUpdate(Usertable u);//保存修改的信息
}
UserServiceImpl:
public Usertable findById(int id){
return userdao.findById(id);
}
return userdao.findById(id);
}
been文件:
package com.elu.bean;
import java.util.Date;
/**
* Usertable entity. @author MyEclipse Persistence Tools
*/
* Usertable entity. @author MyEclipse Persistence Tools
*/
public class Usertable implements java.io.Serializable {
// Fields
private Integer id;
private Integer userid;
private String userusername;
private String userpassword;
private String userrole;
private String userstaffpositions;
private String usersex;
private Date userbirthday;
private String useraddress;
private String userimformation;
private String userparty;
private String usertext;
private Integer userid;
private String userusername;
private String userpassword;
private String userrole;
private String userstaffpositions;
private String usersex;
private Date userbirthday;
private String useraddress;
private String userimformation;
private String userparty;
private String usertext;
// Constructors
/** default constructor */
public Usertable() {
}
public Usertable() {
}
/** full constructor */
public Usertable(Integer userid, String userusername, String userpassword,
String userrole, String userstaffpositions, String usersex,
Date userbirthday, String useraddress, String userimformation,
String userparty, String usertext) {
this.userid = userid;
this.userusername = userusername;
this.userpassword = userpassword;
this.userrole = userrole;
this.userstaffpositions = userstaffpositions;
this.usersex = usersex;
this.userbirthday = userbirthday;
this.useraddress = useraddress;
this.userimformation = userimformation;
this.userparty = userparty;
this.usertext = usertext;
}
public Usertable(Integer userid, String userusername, String userpassword,
String userrole, String userstaffpositions, String usersex,
Date userbirthday, String useraddress, String userimformation,
String userparty, String usertext) {
this.userid = userid;
this.userusername = userusername;
this.userpassword = userpassword;
this.userrole = userrole;
this.userstaffpositions = userstaffpositions;
this.usersex = usersex;
this.userbirthday = userbirthday;
this.useraddress = useraddress;
this.userimformation = userimformation;
this.userparty = userparty;
this.usertext = usertext;
}
// Property accessors
public Integer getUserid() {
return this.userid;
}
public Integer getId() {
return id;
}
return id;
}
public void setId(Integer id) {
this.id = id;
}
this.id = id;
}
public void setUserid(Integer userid) {
this.userid = userid;
}
this.userid = userid;
}
public String getUserusername() {
return this.userusername;
}
return this.userusername;
}
public void setUserusername(String userusername) {
this.userusername = userusername;
}
this.userusername = userusername;
}
public String getUserpassword() {
return this.userpassword;
}
return this.userpassword;
}
public void setUserpassword(String userpassword) {
this.userpassword = userpassword;
}
this.userpassword = userpassword;
}
public String getUserrole() {
return this.userrole;
}
return this.userrole;
}
public void setUserrole(String userrole) {
this.userrole = userrole;
}
this.userrole = userrole;
}
public String getUserstaffpositions() {
return this.userstaffpositions;
}
return this.userstaffpositions;
}
public void setUserstaffpositions(String userstaffpositions) {
this.userstaffpositions = userstaffpositions;
}
this.userstaffpositions = userstaffpositions;
}
public String getUsersex() {
return this.usersex;
}
return this.usersex;
}
public void setUsersex(String usersex) {
this.usersex = usersex;
}
this.usersex = usersex;
}
public Date getUserbirthday() {
return this.userbirthday;
}
return this.userbirthday;
}
public void setUserbirthday(Date userbirthday) {
this.userbirthday = userbirthday;
}
this.userbirthday = userbirthday;
}
public String getUseraddress() {
return this.useraddress;
}
return this.useraddress;
}
public void setUseraddress(String useraddress) {
this.useraddress = useraddress;
}
this.useraddress = useraddress;
}
public String getUserimformation() {
return this.userimformation;
}
return this.userimformation;
}
public void setUserimformation(String userimformation) {
this.userimformation = userimformation;
}
this.userimformation = userimformation;
}
public String getUserparty() {
return this.userparty;
}
return this.userparty;
}
public void setUserparty(String userparty) {
this.userparty = userparty;
}
this.userparty = userparty;
}
public String getUsertext() {
return this.usertext;
}
return this.usertext;
}
public void setUsertext(String usertext) {
this.usertext = usertext;
}
this.usertext = usertext;
}
}
Usertable.hbm.xml
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!--
Mapping file autogenerated by MyEclipse Persistence Tools
-->
<hibernate-mapping>
<class name="com.elu.bean.Usertable" table="usertable" catalog="elu_management_system">
<id name="id" type="java.lang.Integer">
<column name="id" length="11" />
<generator class="identity" />
</id>
<property name="userid" type="java.lang.Integer">
<column name="userid" not-null="true" />
</property>
<property name="userusername" type="java.lang.String">
<column name="userusername" length="30" not-null="true" />
</property>
<property name="userpassword" type="java.lang.String">
<column name="userpassword" length="30" not-null="true" />
</property>
<property name="userrole" type="java.lang.String">
<column name="userrole" length="30" not-null="true" />
</property>
<property name="userstaffpositions" type="java.lang.String">
<column name="userstaffpositions" length="30" not-null="true" />
</property>
<property name="usersex" type="java.lang.String">
<column name="usersex" length="30" not-null="true" />
</property>
<property name="userbirthday" type="java.util.Date">
<column name="userbirthday" length="10" not-null="true" />
</property>
<property name="useraddress" type="java.lang.String">
<column name="useraddress" length="30" not-null="true" />
</property>
<property name="userimformation" type="java.lang.String">
<column name="userimformation" length="30" not-null="true" />
</property>
<property name="userparty" type="java.lang.String">
<column name="userparty" length="30" not-null="true" />
</property>
<property name="usertext" type="java.lang.String">
<column name="usertext" length="30" not-null="true" />
</property>
</class>
</hibernate-mapping>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!--
Mapping file autogenerated by MyEclipse Persistence Tools
-->
<hibernate-mapping>
<class name="com.elu.bean.Usertable" table="usertable" catalog="elu_management_system">
<id name="id" type="java.lang.Integer">
<column name="id" length="11" />
<generator class="identity" />
</id>
<property name="userid" type="java.lang.Integer">
<column name="userid" not-null="true" />
</property>
<property name="userusername" type="java.lang.String">
<column name="userusername" length="30" not-null="true" />
</property>
<property name="userpassword" type="java.lang.String">
<column name="userpassword" length="30" not-null="true" />
</property>
<property name="userrole" type="java.lang.String">
<column name="userrole" length="30" not-null="true" />
</property>
<property name="userstaffpositions" type="java.lang.String">
<column name="userstaffpositions" length="30" not-null="true" />
</property>
<property name="usersex" type="java.lang.String">
<column name="usersex" length="30" not-null="true" />
</property>
<property name="userbirthday" type="java.util.Date">
<column name="userbirthday" length="10" not-null="true" />
</property>
<property name="useraddress" type="java.lang.String">
<column name="useraddress" length="30" not-null="true" />
</property>
<property name="userimformation" type="java.lang.String">
<column name="userimformation" length="30" not-null="true" />
</property>
<property name="userparty" type="java.lang.String">
<column name="userparty" length="30" not-null="true" />
</property>
<property name="usertext" type="java.lang.String">
<column name="usertext" length="30" not-null="true" />
</property>
</class>
</hibernate-mapping>
Struts配置文件关键代码:
</action>
<action name="editUserInf" class="userAction" method="findbyid">
<result name="updataUser">/mainfrom/updataBranch.jsp</result>
<result name="ERROR">/login.jsp</result>
</action>
<action name="editUserInf" class="userAction" method="findbyid">
<result name="updataUser">/mainfrom/updataBranch.jsp</result>
<result name="ERROR">/login.jsp</result>
</action>
抛出的异常为:
2010-9-14 15:44:34 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet default threw exception
org.hibernate.MappingException: Unknown entity: from Usertable u where u.id=:7
at org.hibernate.impl.SessionFactoryImpl.getEntityPersister(SessionFactoryImpl.java:550)
at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:68)
at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:878)
at org.hibernate.impl.SessionImpl.load(SessionImpl.java:795)
at org.springframework.orm.hibernate3.HibernateTemplate$4.doInHibernate(HibernateTemplate.java:527)
at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:372)
at org.springframework.orm.hibernate3.HibernateTemplate.load(HibernateTemplate.java:521)
at org.springframework.orm.hibernate3.HibernateTemplate.load(HibernateTemplate.java:515)
at com.elu.daoimpl.UserDaoImpl.findById(UserDaoImpl.java:36)
at com.elu.serviceimpl.UserServiceImpl.findById(UserServiceImpl.java:28)
at com.elu.action.UserAction.findbyid(UserAction.java:175)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:404)
at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:267)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:229)
at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:221)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:150)
at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:48)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:123)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:167)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:105)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:83)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:207)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:74)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:127)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept(ProfilingActivationInterceptor.java:107)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:206)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:115)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:143)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:121)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:170)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:123)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50)
at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:504)
at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
严重: Servlet.service() for servlet default threw exception
org.hibernate.MappingException: Unknown entity: from Usertable u where u.id=:7
at org.hibernate.impl.SessionFactoryImpl.getEntityPersister(SessionFactoryImpl.java:550)
at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:68)
at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:878)
at org.hibernate.impl.SessionImpl.load(SessionImpl.java:795)
at org.springframework.orm.hibernate3.HibernateTemplate$4.doInHibernate(HibernateTemplate.java:527)
at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:372)
at org.springframework.orm.hibernate3.HibernateTemplate.load(HibernateTemplate.java:521)
at org.springframework.orm.hibernate3.HibernateTemplate.load(HibernateTemplate.java:515)
at com.elu.daoimpl.UserDaoImpl.findById(UserDaoImpl.java:36)
at com.elu.serviceimpl.UserServiceImpl.findById(UserServiceImpl.java:28)
at com.elu.action.UserAction.findbyid(UserAction.java:175)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:404)
at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:267)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:229)
at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:221)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:150)
at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:48)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:123)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:167)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:105)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:83)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:207)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:74)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:127)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept(ProfilingActivationInterceptor.java:107)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:206)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:115)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:143)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:121)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:170)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:123)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50)
at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:504)
at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)