dorado7(二) 错误目录

//以下解决方法,只是个人意见,不保证一定可行
1、debug jet运行报错:

Could not instantiate listener com.bstek.dorado.web.servlet.SpringContextLoaderListener
java.lang.ClassNotFoundException: com.bstek.dorado.web.servlet.SpringContextLoaderListener
....
Failed to read file : dorado-core-7.4.0.jar
....
Failed to read file :ehcache-core-2.6.3.jar
...

分析:在jet运行时,项目没有扫描到jar包,故问题大概锁定到WebContent文件夹
。出错前后比较:添加了一定一些jar包文件。加包时没有添加相关的包文件或者包已损坏
解决方法:
1)debug server运行没有错,正常运行,但是项目上有感叹号
2)从案例中lib全部的包文件全部考过来,删除h2(嵌入数据库包),dorado开头的相关包,只保留core 和hibernate包。

2、错误:

rror creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/dorado-home/app-context.xml]: Invocation of init method failed; 
nested exception is org.hibernate.AnnotationException: No identifier specified for entity:

数据库的表必须要定义主键,此类没有定义主键
在getId前头加上(此处设置ID为主键)
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = “id”, nullable = false)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值