Axis 1.4 log4j-1.2.8.jar incompatible with XPages?

两盒软妹~` 提交于 2019-12-02 18:13:31

问题


I'm trying to add some of the JARs from Apache Axis 1.4 into the WebContent/WEB-INF/lib directory. One of the JARs is log4j-1.2.8.jar.

As soon as this JAR is added to the lib directory, all XPages in the NSF stop working. I just get an error 500 with the following message:

"HTTP Web Server: Command Not Handled Exception".

The following message is written to the error log:

java.lang.RuntimeException: com.ibm.xsp.FacesExceptionEx: org.apache.commons.logging.LogConfigurationException: java.lang.reflect.InvocationTargetException
.    
.    
.    
.    
Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Logger
at org.apache.commons.logging.impl.Log4JLogger.<init>(Log4JLogger.java:102)

Link to full stack trace

Does anyone have any ideas?


回答1:


edited

The AXIS jars are included in Domino install because Domino Web Services use them. That's why there is a conflict if you include them also.

I would recommend using JAX-WS which is newer than Axis. Here is how to use it for Web Service client. No need to add any JARs. You could also use JAX-WS wsdl2java instead of Apache one.

These two permissions need to be granted in java.policy file for this to work:

permission java.lang.RuntimePermission "setContextClassLoader";
permission java.lang.reflect.ReflectPermission "suppressAccessChecks";

Note that any kind of server update (f.e. fixpack install) will reset the java.policy file to default.



来源:https://stackoverflow.com/questions/14606364/axis-1-4-log4j-1-2-8-jar-incompatible-with-xpages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!