[INFO] [2011-05-24 15:12:16] [ Class = org.hibernate.annotations.common.Version | Method = <clinit> | Line = 37 ] | Hibernate Commons Annotations 3.2.0.Final | [INFO] [2011-05-24 15:12:16] [ Class = org.hibernate.cfg.Environment | Method = <clinit> | Line = 593 ] | Hibernate 3.6.3.Final | [INFO] [2011-05-24 15:12:16] [ Class = org.hibernate.cfg.Environment | Method = <clinit> | Line = 626 ] | hibernate.properties not found | [INFO] [2011-05-24 15:12:16] [ Class = org.hibernate.cfg.Environment | Method = buildBytecodeProvider | Line = 804 ] | Bytecode provider name : javassist | [INFO] [2011-05-24 15:12:16] [ Class = org.hibernate.cfg.Environment | Method = <clinit> | Line = 685 ] | using JDK 1.4 java.sql.Timestamp handling | [INFO] [2011-05-24 15:12:16] [ Class = org.hibernate.ejb.Version | Method = <clinit> | Line = 42 ] | Hibernate EntityManager 3.6.3.Final | [INFO] [2011-05-24 15:12:16] [ Class = org.hibernate.cfg.Configuration | Method = addResource | Line = 762 ] | Reading mappings from resource : META-INF/hql_orm.xml | [ERROR] [2011-05-24 15:12:16] [ Class = org.hibernate.util.xml.ErrorLogger | Method = error | Line = 57 ] | Error parsing XML (2) : cvc-complex-type.3.1: Value '1.0' of attribute 'version' of element 'entity-mappings' is not valid with respect to the corresponding attribute use. Attribute 'version' has a fixed value of '2.0'. | [INFO] [2011-05-24 15:12:16] [ Class = org.hibernate.cfg.Configuration | Method = addResource | Line = 762 ] | Reading mappings from resource : META-INF/hql_jack_orm.xml | [ERROR] [2011-05-24 15:12:16] [ Class = org.hibernate.util.xml.ErrorLogger | Method = error | Line = 57 ] | Error parsing XML (2) : cvc-complex-type.3.1: Value '1.0' of attribute 'version' of element 'entity-mappings' is not valid with respect to the corresponding attribute use. Attribute 'version' has a fixed value of '2.0'. | [INFO] [2011-05-24 15:12:16] [ Class = org.hibernate.cfg.annotations.QueryBinder | Method = bindQuery | Line = 86 ] | Binding Named query: grade.getWaferAll => SELECT a FROM GradeEntity a | [INFO] [2011-05-24 15:12:16] [ Class = org.hibernate.cfg.annotations.QueryBinder | Method = bindQuery | Line = 86 ] | Binding Named query: grade.getWaferID => SELECT i FROM GradeEntity i WHERE i.waferTypeId = :longId | [INFO] [2011-05-24 15:12:16] [ Class = org.hibernate.cfg.annotations.QueryBinder | Method = bindQuery | Line = 86 ] | Binding Named query: workplace.getWaferAll => SELECT i FROM WorkplaceEntity i | [INFO] [2011-05-24 15:12:16] [ Class = org.hibernate.cfg.annotations.QueryBinder | Method = bindQuery | Line = 86 ] | Binding Named query: workplace.getWaferID => SELECT i FROM WorkplaceEntity i WHERE i.plantNumId= :longId |
少jar包了吧,项目从新整合一下也好!
此贴成了百度搜索这个异常:排名第一了;汗看来很多人都有这个异常咯高手们出来指点下吧:没有少jar包呀。如果少了的话,是那个包呢, 我eclipse里面运行是没有问题的,也没有错误; 但是打成jar后去运行就报上面的错误;DaoPublic :(getAll) javax.persistence.PersistenceException: Unable to configureEntityManagerFactory反正就是讲:链接hibernate配置文件错误,链接不到; 我反复的去把那些配置文件重新放置位置,还是一样。 急求解。。我昨天都搞了一天了,今天又是一天了还是没有发现原因。
antlr-2.7.6.jar
cglib-2.2.jar
commons-collections-3.1.jar
dom4j-1.6.1.jar
hibernate3.jar
hibernate-entitymanager.jar
hibernate-jpa-2.0-api-1.0.0.Final.jar
javassist-3.12.0.GA.jar
jta-1.1.jar
log4j-1.2.16.jar
slf4j-api-1.6.1.jar
slf4j-log4j12-1.6.1.jar
sqljdbc4.jar
sqljdbc.jar
[INFO] [2011-05-24 15:12:16] [ Class = org.hibernate.cfg.Environment | Method = <clinit> | Line = 593 ] | Hibernate 3.6.3.Final |
[INFO] [2011-05-24 15:12:16] [ Class = org.hibernate.cfg.Environment | Method = <clinit> | Line = 626 ] | hibernate.properties not found |
[INFO] [2011-05-24 15:12:16] [ Class = org.hibernate.cfg.Environment | Method = buildBytecodeProvider | Line = 804 ] | Bytecode provider name : javassist |
[INFO] [2011-05-24 15:12:16] [ Class = org.hibernate.cfg.Environment | Method = <clinit> | Line = 685 ] | using JDK 1.4 java.sql.Timestamp handling |
[INFO] [2011-05-24 15:12:16] [ Class = org.hibernate.ejb.Version | Method = <clinit> | Line = 42 ] | Hibernate EntityManager 3.6.3.Final |
[INFO] [2011-05-24 15:12:16] [ Class = org.hibernate.cfg.Configuration | Method = addResource | Line = 762 ] | Reading mappings from resource : META-INF/hql_orm.xml |
[ERROR] [2011-05-24 15:12:16] [ Class = org.hibernate.util.xml.ErrorLogger | Method = error | Line = 57 ] | Error parsing XML (2) : cvc-complex-type.3.1: Value '1.0' of attribute 'version' of element 'entity-mappings' is not valid with respect to the corresponding attribute use. Attribute 'version' has a fixed value of '2.0'. |
[INFO] [2011-05-24 15:12:16] [ Class = org.hibernate.cfg.Configuration | Method = addResource | Line = 762 ] | Reading mappings from resource : META-INF/hql_jack_orm.xml |
[ERROR] [2011-05-24 15:12:16] [ Class = org.hibernate.util.xml.ErrorLogger | Method = error | Line = 57 ] | Error parsing XML (2) : cvc-complex-type.3.1: Value '1.0' of attribute 'version' of element 'entity-mappings' is not valid with respect to the corresponding attribute use. Attribute 'version' has a fixed value of '2.0'. |
[INFO] [2011-05-24 15:12:16] [ Class = org.hibernate.cfg.annotations.QueryBinder | Method = bindQuery | Line = 86 ] | Binding Named query: grade.getWaferAll => SELECT a FROM GradeEntity a |
[INFO] [2011-05-24 15:12:16] [ Class = org.hibernate.cfg.annotations.QueryBinder | Method = bindQuery | Line = 86 ] | Binding Named query: grade.getWaferID => SELECT i FROM GradeEntity i WHERE i.waferTypeId = :longId |
[INFO] [2011-05-24 15:12:16] [ Class = org.hibernate.cfg.annotations.QueryBinder | Method = bindQuery | Line = 86 ] | Binding Named query: workplace.getWaferAll => SELECT i FROM WorkplaceEntity i |
[INFO] [2011-05-24 15:12:16] [ Class = org.hibernate.cfg.annotations.QueryBinder | Method = bindQuery | Line = 86 ] | Binding Named query: workplace.getWaferID => SELECT i FROM WorkplaceEntity i WHERE i.plantNumId= :longId |
我eclipse里面运行是没有问题的,也没有错误;
但是打成jar后去运行就报上面的错误;DaoPublic :(getAll) javax.persistence.PersistenceException: Unable to configureEntityManagerFactory反正就是讲:链接hibernate配置文件错误,链接不到;
我反复的去把那些配置文件重新放置位置,还是一样。
急求解。。我昨天都搞了一天了,今天又是一天了还是没有发现原因。
hibernate源代码判断获取配置文件路径错误。