今天用myeclipse自动生成POJO类时一直找不到java src folder。后来通过下面的步骤解决了。按下面的做会生成一个HibernateSessionFactory类。这个不需要可以删除。
问题 web 项目中 打开 hibernate.cfg.xml 文件时 提示:The project is not a myEclipse hibernate project。
并且:在 dbbrower中使用 hibernate reverse engineering 建立 表对应的bean 和 配置文件时:找不到可用的javasource路径。
原因:
使用版本控制的时候,工程根目录下的: .project 和 .myhibernatedata 文件不在版本控制范围内,因此组内成员更新source后,缺少
.project 内的 <nature>com.genuitec.eclipse.hibernate.hibernatenature</nature>
和
.myhibernatedata 文件。
解决;
项目名上右键--〉myeclipse-->add hibernate capabilites -->next-->hibernate config file --> existing --> end
这样就可以生成HibernateSessionFactory.Java类。
注:如果生成HBM.XML文件时出现An internal error occurred during: "Generating Artifacts" 空指针错误时,可能是没有引数据库驱动包。或者工程第一次导入。如果是工程第一次导入则重新启动下eclipse就可以了
分享到:
相关推荐
NULL 博文链接:https://webqq.iteye.com/blog/1067595
实现了struts2 hibernate的一个demo例程。
hibernate 3.3完成CRUD的一个java项目,很完整,对于初学者来说可以起到帮助的作用,这也是我初学的时候写的一个例子,对初学者比较实用
Could not roll back Hibernate transaction.doc
Spring hibernate jpa Project sample
java project整合spring和hibernate 例子
一个最简单的Hibernate project(不涉及Struts, Tomcat, XDoclet,JBoss等东东)必须的几个东东: 1. Hibernate工具包。 2. JDBC数据库连接驱动。以mysql为例,mysql-connector-java-3.1.×-bin.jar。 3. 配置...
SpringMVC Spring Hibernate 框架整合 Annotation Maven Project
实现了spring hibernate框架的demo实例。
hibernate 资料hibernate 资料hibernate 资料hibernate 资料
hibernate链接数据库的详细配置信息,包含各种数据库的链接方式
Hibernate, an open source project that is almost 15 years old. In a recent poll, Hibernate was among the top five tools used by many Java developers every day. This shows that SQL databases are still ...
这是一个ajax+spring+hibernate整合project,里面有数据库创建语句。代码清晰,适用于初学者。
hibernate3hibernate3hibernate3hibernate3hibernate3hibernate3hibernate3hibernate3
hibernate教程hibernate教程hibernate教程
hibernate annotation hibernate3
hibernate5 hibernate PDF 讲义 动力 hibernate ssh hibernate5 节点
Hibernate Search in Action aims not only at providing practical knowledge of Hibernate Search but also uncovering some of the background behind Hibernate Search’s design. We will start by describing ...
hibernate 5.2.15 hibernate 5.2.15 hibernate 5.2.15 hibernate 5.2.15 hibernate 5.2.15hibernate 5.2.15
Hibernate.jar包,Hibernate可以应用在任何使用JDBC的场合,包含 hibernate-commons-annotations-4.0.1.Final.jar hibernate-core-4.1.12.Final.jar hibernate-ehcache-4.1.12.Final.jar hibernate-entitymanager-...