Caused by: org.hibernate.boot.MappingNotFoundException: Mapping (JAR) not found : C:\Users\java-20170721103\StaffProject\out\artifacts\StaffProject_war_exploded\WEB-INF\classes\com\larry\domain\CrmStaff.hbm.xml : origin(C:\Users\java-20170721103\StaffProject\out\artifacts\StaffProject_war_exploded\WEB-INF\classes\com\larry\domain\CrmStaff.hbm.xml)
at org.hibernate.boot.MetadataSources.addJar(MetadataSources.java:448)
at org.hibernate.cfg.Configuration.addJar(Configuration.java:556)
at org.springframework.orm.hibernate5.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:433)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1687)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1624)
… 57 more
Caused by: java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:225)
at java.util.zip.ZipFile.(ZipFile.java:155)
at java.util.jar.JarFile.(JarFile.java:166)
at java.util.jar.JarFile.(JarFile.java:130)
at org.hibernate.boot.MetadataSources.addJar(MetadataSources.java:426)
… 61 more
今天遇到如上问题:
查询资料无果:
最后发现:
org.hibernate.dialect.MySQL5Dialect
true
true
加粗的地方改为mappingLocations就好了.
就好了,就好了.靠