java.lang.IncompatibleClassChangeError: class org.hibernate.cfg.ExtendedMappings has interface org.hibernate.cfg.Mappings as super class
我的问题解决啦!
hibernate3.5中的hibernate3.0包,已经包涵了hibernate-annotations,hibernate-commons-annotations.jar,commons-collections 这三个包,所以你要去掉commons-collections 包试试,
或许就成功了!
我的解决方案就是这样的!
========================
hxzon:
移除hibernate-annotations,hibernate-commons-annotations.jar,成功。
移除了persistence.jar和ejb3-persistence.jar,添加了hibernate-jpa-2.0-api-1.0.0.Final.jar。
- 浏览: 45300 次
相关推荐
at org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.java:1885) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1843) at org.hibernate.cfg.Configuration...
hibernate.cfg.xml hibernate框架的配置文件
3. **Hibernate配置**:在`hibernate.cfg.xml`或`persistence.xml`中确认缓存提供者的配置,包括缓存策略、区域配置等。 4. **Spring集成Hibernate**:学习如何在Spring应用中配置和使用Hibernate,包括...
1. org.hibernate.cfg.Configuration Interface:配置并启动 Hibernate,指定 Hibernate 配置文件的位置或动态配置 Hibernate 的属性,接着创建 SessionFactory。 2. org.hibernate.SessionFactory Interface:从该...
org.hibernate.cfg This package defines APIs for configuring Hibernate, and classes for building the Hibernate configuration-time metamodel. org.hibernate.classic This package implements backward-...
org.hibernate.cfg This package defines APIs for configuring Hibernate, and classes for building the Hibernate configuration-time metamodel. org.hibernate.classic This package implements backward-...
at org.hibernate.cfg.Mappings.addTable(Mappings.java:120) at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:251) at org.hibernate.cfg.HbmBinder.bindRootClass...
1. **配置**:首先,需要在项目中引入Hibernate库,并创建一个配置文件(通常是hibernate.cfg.xml),配置数据库连接信息。 2. **实体定义**:使用注解定义实体类及其属性,指定与数据库表的对应关系。 3. **...
标题 "maven+hibernate" 暗示我们讨论的是使用 Maven 作为构建工具,与 Hibernate 这一流行的对象关系映射(ORM)框架整合的项目。在Java开发中,Maven 和 Hibernate 是两个非常重要的组件。Maven 用于自动化项目的...
1. org.hibernate.cfg.Configuration Interface:配置并启动 Hibernate。通过该接口可以指定 Hibernate 配置文件(hibernate.cfg.xml 或者 hibernate.properties)的位置或动态配置 Hibernate 的属性,接着创建 ...
接下来,我们需要在项目的src/main/resources目录下创建Hibernate的配置文件(例如:hibernate.cfg.xml)。此文件用于定义数据源、JDBC连接信息、Hibernate的属性以及映射文件的位置。配置文件应包含如下内容: ```...
2.1、将“hibernate\hibernate.cfg.xml”拷贝到“\WEB-INF\classes”文件夹下,替换原先的文件。 2.2、打开此文件,将“<property name="hibernate.connection.url">jdbc:sqlite:D:/EGSDatabase.egsdata”一行中的...
高级Hibernate4开发技术:ORM思想,hibernate介绍,hibernate.cfg.xml配置,hbm.xml映射文件详解,主键生成策略使用,PO对象状态及状态的转换分析、一级缓存,Hibernate数据检索技术,Hibernate高级映射技术,...
Hibernate 3.2 是一个流行的Java对象关系映射(ORM)框架,它允许开发者使用面向对象的编程模型来操作数据库,而无需直接编写SQL语句。这个版本的Hibernate引入了许多改进和新特性,旨在提高性能和开发效率。CGlib...
Hibernate配置文件hibernate.cfg.xml中配置信息详解!
在你的`hibernate.cfg.xml`配置文件中,找到或添加以下行: ```xml <property name="hibernate.show_sql">true ``` 这将让Hibernate在控制台打印出执行的SQL语句,但它们仍然是带有问号占位符的形式。 要显示不带...
通常,Hibernate的配置文件以`hibernate.cfg.xml`的形式存在,它是项目初始化和连接数据库的关键。 首先,配置文件会定义数据源,包括数据库URL、用户名和密码。例如: ```xml <property name="hibernate....
《深入理解Hibernate配置文件hibernate.cfg.xml》 在Java应用程序开发中,Hibernate是一个非常流行的对象关系映射(ORM)框架,它简化了数据库操作,将数据库操作与业务逻辑解耦。而`hibernate.cfg.xml`是Hibernate...
在这个场景中,我们关注的是不通过传统的`hibernate.cfg.xml`文件来配置Hibernate,而是借助Spring框架的`LocalSessionFactoryBean`进行整合。 首先,`hibernate.cfg.xml`是Hibernate传统配置文件,它包含了数据库...
《Hibernate.cfg.xml配置详解》 Hibernate作为一款强大的Java对象关系映射框架,其核心配置文件Hibernate.cfg.xml在项目中起着至关重要的作用。这个文件主要负责定义数据源、连接池、SQL方言、日志以及实体类映射等...