我在 weblogic 10.3.3 上部署了一个 war 文件,但遇到了这个错误。
<May 7, 2012 2:40:10 PM ICT> <Error> <Deployer> <VIEAE747399> <AdminServer> <[STANDBY] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1336376410618> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1336376405480' for task '2'. Error is: 'weblogic.application.ModuleException: [HTTP:101216]Servlet: "quotation-service" failed to preload on startup in Web application: "service-quotation.war".
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0' defined in URL [zip:C:/Oracle/Middleware/user_projects/domains/a2_domain/servers/AdminServer/tmp/_WL_user/service-quotation/aio4oc/war/WEB-INF/lib/quotation-storage-2_0_0.jar!/config/quotation-storage-context.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in URL [zip:C:/Oracle/Middleware/user_projects/domains/a2_domain/servers/AdminServer/tmp/_WL_user/service-quotation/aio4oc/war/WEB-INF/lib/quotation-storage-2_0_0.jar!/config/quotation-storage-context.xml]: Invocation of init method failed; nested exception is java.lang.ExceptionInInitializerError
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
...
Caused by: java.lang.ExceptionInInitializerError
at org.hibernate.ejb.Ejb3Configuration.<clinit>(Ejb3Configuration.java:130)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:72)
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:225)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:308)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
... 70 more
Caused by: java.lang.IllegalStateException: org.slf4j.LoggerFactory could not be successfully initialized. See also http://www.slf4j.org/codes.html#unsuccessfulInit
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:282)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:248)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:261)
at org.hibernate.cfg.Configuration.<clinit>(Configuration.java:197)
... 76 more
在 service-quotation.war 的 WEB-INF/lib 中,包含以下文件
log4j-1.2.16.jar
slf4j-api-1.6.1.jar
slf4j-log4j12-1.6.1.jar
我感谢任何建议,提示。
注意:我在 Tomcat 6 上成功部署了这场战争。