Axis 1.4 log4j-1.2.8.jar incompatible with XPages?

2019-03-04 03:27发布

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条回答
Luminary・发光体
2楼-- · 2019-03-04 04:06

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.

查看更多
登录 后发表回答