| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 986 人关注过本帖
标题:求解ssh矿建中遇到的配置文件报错
只看楼主 加入收藏
夏世
Rank: 1
来 自:大竹
等 级:新手上路
帖 子:5
专家分:0
注 册:2010-6-25
结帖率:100%
收藏
已结贴  问题点数:20 回复次数:6 
求解ssh矿建中遇到的配置文件报错
       下面是我运行当中出现的问题,我下面给出关键代码,希望高手能够帮我解决.
         
    我是做一个修改页面,在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>
 
      applicationContext配置文件:
 
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.
 xmlns:xsi="http://www.
 xsi:schemaLocation="http://www. http://www.

 <bean id="dataSource" class="org.
  <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;
public class BaseAction extends ActionSupport {
 /**
  *
  */
 private static final long serialVersionUID = 1L;
 UserService userservice;
 DocumentService documentservice;
 EmployService employService;
 MailService mailService;
 IuserService iuserService;
 
 GtucoService gtucoService;
 public GtucoService getGtucoService() {
  return gtucoService;
 }
 public void setGtucoService(GtucoService gtucoService) {
  this.gtucoService = gtucoService;
 }
 public static long getSerialversionuid() {
  return serialVersionUID;
 }
 public IuserService getIuserService() {
  return iuserService;
 }
 public void setIuserService(IuserService iuserService) {
  this.iuserService = iuserService;
 }
 public MailService getMailService() {
  return mailService;
 }
 public void setMailService(MailService mailService) {
  this.mailService = mailService;
 }
 public EmployService getEmployService() {
  return employService;
 }
 public void setEmployService(EmployService employService) {
  this.employService = employService;
 }
 public DocumentService getDocumentservice() {
  return documentservice;
 }
 public void setDocumentservice(DocumentService documentservice) {
  this.documentservice = documentservice;
 }
 public UserService getUserservice() {
  return userservice;
 }
 public void setUserservice(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";
 }

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);//保存修改的信息
}
 
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;
 }
 
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);//保存修改的信息
}
 
UserServiceImpl:
 
 public Usertable findById(int id){
   return userdao.findById(id);
  }
  
been文件:
package com.elu.bean;
import java.util.Date;
/**
 * Usertable entity. @author MyEclipse Persistence Tools
 */
public class Usertable implements {
 // 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;
 // Constructors
 /** default constructor */
 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;
 }
 // Property accessors

 

 public Integer getUserid() {
  return this.userid;
 }
 public Integer getId() {
  return id;
 }
 public void setId(Integer id) {
  this.id = id;
 }
 public void setUserid(Integer userid) {
  this.userid = userid;
 }
 public String getUserusername() {
  return this.userusername;
 }
 public void setUserusername(String userusername) {
  this.userusername = userusername;
 }
 public String getUserpassword() {
  return this.userpassword;
 }
 public void setUserpassword(String userpassword) {
  this.userpassword = userpassword;
 }
 public String getUserrole() {
  return this.userrole;
 }
 public void setUserrole(String userrole) {
  this.userrole = userrole;
 }
 public String getUserstaffpositions() {
  return this.userstaffpositions;
 }
 public void setUserstaffpositions(String userstaffpositions) {
  this.userstaffpositions = userstaffpositions;
 }
 public String getUsersex() {
  return this.usersex;
 }
 public void setUsersex(String usersex) {
  this.usersex = usersex;
 }
 public Date getUserbirthday() {
  return this.userbirthday;
 }
 public void setUserbirthday(Date userbirthday) {
  this.userbirthday = userbirthday;
 }
 public String getUseraddress() {
  return this.useraddress;
 }
 public void setUseraddress(String useraddress) {
  this.useraddress = useraddress;
 }
 public String getUserimformation() {
  return this.userimformation;
 }
 public void setUserimformation(String userimformation) {
  this.userimformation = userimformation;
 }
 public String getUserparty() {
  return this.userparty;
 }
 public void setUserparty(String userparty) {
  this.userparty = userparty;
 }
 public String getUsertext() {
  return this.usertext;
 }
 public void setUsertext(String 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.
<!--
    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>
 
 
抛出的异常为:
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.(JIoEndpoint.java:447)
 at java.lang.Thread.run(Thread.java:619)
搜索更多相关主题的帖子: ssh 建中 文件 求解 
2010-09-14 23:10
hsh_1987
Rank: 5Rank: 5
等 级:职业侠客
威 望:4
帖 子:92
专家分:343
注 册:2010-3-30
收藏
得分:3 
抛出的异常为:
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

错误的地方:
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);//保存修改的信息
}

UserDaoImpl:
public Usertable findById(int id){
  // TODO Auto-generated method stub
  String hql="from Usertable u where u.id=:"+id;------>多了个冒号
        ==>String hql = "from UserTable u where u.id = '"+ id+"'";
        ==>String hql="from Usertable u where u.id="+id;
  Usertable u=(Usertable)this.getHibernateTemplate().load(hql,id);
  System.out.println("向下传值");
  return u;
}

努力很重要,决心比努力更重要...........
2010-09-15 13:30
ablikim
Rank: 3Rank: 3
等 级:论坛游侠
帖 子:47
专家分:104
注 册:2010-8-11
收藏
得分:3 
...........

妈妈问我:有女朋友嘛?  我:没有!  妈妈:这个可以有! 我:这个真没有!!
2010-09-15 14:58
wei0000
Rank: 3Rank: 3
等 级:论坛游侠
威 望:1
帖 子:80
专家分:136
注 册:2010-3-12
收藏
得分:3 
下次仔细阅读异常信息
2010-09-15 17:19
jackieli2074
Rank: 6Rank: 6
来 自:上海
等 级:侠之大者
威 望:1
帖 子:183
专家分:494
注 册:2010-8-3
收藏
得分:3 
好长
2010-09-15 17:41
夏世
Rank: 1
来 自:大竹
等 级:新手上路
帖 子:5
专家分:0
注 册:2010-6-25
收藏
得分:0 
回复 2楼 hsh_1987
那个不碍事   我试过的   

是其他地方出问题了
2010-09-15 19:28
fl135026209
Rank: 2
等 级:论坛游民
帖 子:19
专家分:10
注 册:2013-4-7
收藏
得分:0 
目前看到的 就是你的hql写的有问题,多了个:,这个查询肯定是会出错的,而且现在已经报错了...至于其他的错...报出来再解决!
2013-04-17 16:05
快速回复:求解ssh矿建中遇到的配置文件报错
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.050291 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved