搭建Hibernate过程中常见的错误

错误1:java.lang.ClassNotFoundException: javax.persistence.Cacheable

错误原因,javax.persistence.Cacheable 是 JPA 2.0 规范中的东西

需要加入hibernate-distribution-3.5.0-Final\lib\jpa目录下的hibernate-jpa-2.0-api-1.0.0.Final.jar

错误2:java.lang.ClassNotFoundException: javax.transaction.TransactionManager

错误原因:缺少jta-1.1.jar包,

错误3: org.hibernate.boot.registry.selector.spi.StrategySelectionException: Unable to resolve name [org.hibernate.dialect.MYSQLDialect] as strategy [org.hibernate.dialect.Dialect]

网上有其他的解决方法,我的是方言的那句配置错了,<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>

错误4: java.lang.ClassNotFoundException: org.apache.lucene.analysis.standard.StandardAnalyzer

缺少lucene-analyzers-3.6.2.jar这个包




你可能感兴趣的:(搭建Hibernate过程中常见的错误)