Java SLF4J在使用Weblogic进行war部署时失败

Java SLF4J在使用Weblogic进行war部署时失败,java,logging,weblogic-10.x,slf4j,Java,Logging,Weblogic 10.x,Slf4j,我在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 Ke

我在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
我很感激任何建议、暗示

注意:我在Tomcat6上成功地部署了这场战争

谢谢大家

最后我找到了解决log4j错误的方法。我将下面的weblogic.xml文件添加到WEB-INF文件夹中,以指示weblogic在war文件中使用slf4j JAR。我甚至不需要补充 将这些jar文件放入weblogic安装文件夹

<!DOCTYPE weblogic-web-app PUBLIC "-//BEA
Systems, Inc.//DTD Web Application 7.0//EN"
"http://www.bea.com/servers/wls700/dtd/weblogic700-web-jar.dtd">
<weblogic-web-app>
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
</weblogic-web-app>
请首先检查以上文件路径是否存在


希望这对那些需要帮助的人有所帮助。

在异常之前或之后是否记录了任何错误消息?org.slf4j.LoggerFactory无法成功初始化没有原因是不会发生的,通常会告诉您该原因。@Thomas,这就是我收到的所有错误消息。我怀疑我需要将这些jar文件添加到weblogic中,但我不确定将它们放在哪里。您是否阅读了异常中提到的网页?如果是这样的话,当你尝试它的建议时发生了什么?我读过,但没有找到解决方案。
<!DOCTYPE weblogic-web-app PUBLIC "-//BEA
Systems, Inc.//DTD Web Application 7.0//EN"
"http://www.bea.com/servers/wls700/dtd/weblogic700-web-jar.dtd">
<weblogic-web-app>
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
</weblogic-web-app>
 set PRE_CLASSPATH=%PRE_CLASSPATH%;C:\Oracle\Middleware\modules\javax.persistence_1.1.0.0_2-0.jar;C:\Oracle\Middleware\modules\com.oracle.jpa2support_1.0.0.0_2-1.jar