田麦
?一下ALL.:),我做了一个项目,没有做完 比如做到User和Role关系这里,现在重新装了系统,开发环境也搭建好了,怎么我系统才做到最开始User模块的时候,tomcat启动时报了User Role的错误?请高手指导解决方式
叶落.州广
insert into Zd(url,userId)values('aaaaa',select top 1 id from userInfo)
插入的数据有一项是查询出来的。怎么写SQL?
reklaW.东广
重新导入文件编译
应该就不会报错了
?麦田
田麦
我是小白,我把tomcat文件夹下的webapp,和work文件夹下的项目都删除了,重新部署还是报这个错
卖专机手牌品
为啥乱删了 田麦
tomcat启动直接报错,框架是SSH 田麦
org.hibernate.MappingException: An association from the table user_role refers to an unmapped class: cn.itcast.nsfw.role.entity.Role
at org.hibernate.cfg.Configuration.secondPassCompileForeignKeys(Configuration.java:1794)
at org.hibernate.cfg.Configuration.originalSecondPassCompile(Configuration.java:1726)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1393)
at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1345)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:717)
at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1469)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)
... 36 more
叶落.州广
右键项目-maven-update project 试试