错误信息:
十月 18, 2017 9:56:32 下午 org.hibernate.cfg.Environment <clinit>
信息: Hibernate 3.2.6
十月 18, 2017 9:56:32 下午 org.hibernate.cfg.Environment <clinit>
信息: hibernate.properties not found
十月 18, 2017 9:56:32 下午 org.hibernate.cfg.Environment buildBytecodeProvider
信息: Bytecode provider name : cglib
十月 18, 2017 9:56:32 下午 org.hibernate.cfg.Environment <clinit>
信息: using JDK 1.4 java.sql.Timestamp handling
Exception in thread "main" java.lang.NoSuchMethodError: org.hibernate.cfg.Environment.verifyProperties(Ljava/util/Map;)V
at org.hibernate.boot.registry.StandardServiceRegistryBuilder.build(StandardServiceRegistryBuilder.java:245)
at com.myspringmvc.myhibernate.TestStudent.testShemaExprot(TestStudent.java:51)
at com.myspringmvc.myhibernate.TestStudent.main(TestStudent.java:61)
原因
引入memacched包中依赖了Hibernate 3.2.6版本
<dependency>
<groupId>com.googlecode</groupId>
<artifactId>hibernate-memcached</artifactId>
<version>1.3</version>
</dependency>
修改
<dependency>
<groupId>com.googlecode</groupId>
<artifactId>hibernate-memcached</artifactId>
<version>1.3</version>
<exclusions>
<exclusion>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
</exclusion>
</exclusions>
</dependency>