jackmot 2012-02-19 12:47
浏览 194
已采纳

hibernate的问题

我在写User.hbm.xml时这样配置(包是com.hyctl.hibernate.beans,类名未User,对应的表名是user的属性都没错)。

<class name="User" table="user">
    <id name="id" column="ID" type="integer">
        <generator class="increment"/>
    </id>

    <property name="username" column="username" type="string" />
    <property name="password" column="password" type="string" />
    <property name="email" column="email" type="string" />
</class>


但是在跑起来是却出现了以下的异常,什么原因啊?我在另一台机器上是可以跑的,但代码放到另一台机器就不行了。
2012-2-19 11:42:59 org.apache.catalina.core.StandardContext listenerStart
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.MappingException: entity class not found: com.hyctl.hibernate.beans.User
Caused by: org.hibernate.MappingException: entity class not found: com.hyctl.hibernate.beans.User

  • 写回答

4条回答

  • ll89308839 2012-02-20 09:10
    关注

    是不是没有把编译文件放过去
    提示找不到entiy实体类的对象

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥15 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥20 java项目连接sqlserver时报ssl相关错误
  • ¥15 一道python难题3
  • ¥15 用matlab 设计一个不动点迭代法求解非线性方程组的代码
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试