我正在尝试实现一个使用axis作为其库之一的salesforce API。当我将所需的axis.jar文件部署到lib / ext目录时,我在启动时收到以下警告,并且当API被使用时,它也会失败并显示“无法初始化类org.apache.axis.components.logger” .LogFactory“运行时错误到屏幕。
Rex 06 Aug 2013 19:55:44,091 WARN [EngineConfigurationFactoryFinder:184] Factory org.apache.axis.configuration.EngineConfigurationFactoryServlet Ignored: missing required method: public static EngineConfigurationFactory newFactory(Object).
Exception in thread "Thread-12" java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at org.apache.axis.utils.ClassUtils$2.run(ClassUtils.java:177)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.axis.utils.ClassUtils.loadClass(ClassUtils.java:160)
at org.apache.axis.utils.ClassUtils.forName(ClassUtils.java:100)
at org.apache.axis.deployment.wsdd.WSDDTypeMapping.getSerializer(WSDDTypeMapping.java:217)
at org.apache.axis.deployment.wsdd.WSDDService.deployTypeMapping(WSDDService.java:542)
at org.apache.axis.deployment.wsdd.WSDDService.initTMR(WSDDService.java:253)
at org.apache.axis.deployment.wsdd.WSDDService.<init>(WSDDService.java:233)
at org.apache.axis.deployment.wsdd.WSDDDeployment.<init>(WSDDDeployment.java:192)
at org.apache.axis.deployment.wsdd.WSDDDocument.setDocument(WSDDDocument.java:139)
at org.apache.axis.deployment.wsdd.WSDDDocument.<init>(WSDDDocument.java:65)
at org.apache.axis.configuration.FileProvider.configureEngine(FileProvider.java:179)
at org.apache.axis.AxisEngine.init(AxisEngine.java:172)
at org.apache.axis.AxisEngine.<init>(AxisEngine.java:156)
at org.apache.axis.server.AxisServer.<init>(AxisServer.java:88)
at org.apache.axis.server.DefaultAxisServerFactory.createServer(DefaultAxisServerFactory.java:109)
at org.apache.axis.server.DefaultAxisServerFactory.getServer(DefaultAxisServerFactory.java:73)
at org.apache.axis.server.AxisServer.getServer(AxisServer.java:73)
at org.apache.axis.transport.http.AxisServletBase.getEngine(AxisServletBase.java:185)
at org.apache.axis.transport.http.AxisServletBase.getOption(AxisServletBase.java:396)
at org.apache.axis.transport.http.AxisServletBase.init(AxisServletBase.java:112)
at org.apache.axis.transport.http.AxisServlet.init(AxisServlet.java:156)
at javax.servlet.GenericServlet.init(GenericServlet.java:212)
at com.liferay.util.axis.AxisServlet.doInit(AxisServlet.java:171)
at com.liferay.util.axis.AxisServlet$InitThread.run(AxisServlet.java:275)
Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.) (Caused by org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.))
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:370)
at org.apache.axis.components.logger.LogFactory.getLog(LogFactory.java:37)
at org.apache.axis.encoding.ser.BaseSerializerFactory.<clinit>(BaseSerializerFactory.java:42)
... 27 more
Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.)
at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:397)
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
... 31 more
Caused by: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.
at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:385)
... 32 more
Aug 6, 2013 7:55:44 PM org.apache.catalina.startup.HostConfig deployDirectory
答案 0 :(得分:0)
Liferay包含axis.jar并使用它。如果你将它放在全局类路径上,以便你的优先级达到Liferay已经交付/测试过的那个,那么它的可能性是不行的。如果没有进一步的分析,我会说很有可能就是这种情况。
您可以通过删除它来测试它。我不知道我建议在Liferay中升级轴的步骤。由于Liferay不包含最新版本,我认为更新并非易事,否则它可能已经完成。
将axis.jar部署到webapp的WEB-INF/lib
目录时是否有效?