-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 10.3
-
Component/s: Distribution / Installers
-
Tags:
-
Sprint:nxcore 10.3.7
-
Story Points:1
Since NXP-23863, we have issue on wizard tests.
Tomcat stopped when running the packed war:
2018-09-28 09:50:23.970 SEVERE [main] org.apache.catalina.core.StandardContext.loadOnStartup Servlet [nuxeo-wizard] in web application [/nuxeo] threw load() exception
java.lang.NoClassDefFoundError: Could not initialize class org.apache.logging.log4j.status.StatusLogger
at org.apache.logging.log4j.core.AbstractLifeCycle.<clinit>(AbstractLifeCycle.java:38)
at org.nuxeo.launcher.config.ConfigurationGenerator.<init>(ConfigurationGenerator.java:434)
at org.nuxeo.launcher.config.ConfigurationGenerator.<init>(ConfigurationGenerator.java:344)
at org.nuxeo.wizard.nav.SimpleNavigationHandler.<init>(SimpleNavigationHandler.java:87)
at org.nuxeo.wizard.nav.SimpleNavigationHandler.instance(SimpleNavigationHandler.java:58)
at org.nuxeo.wizard.RouterServlet.<init>(RouterServlet.java:95)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
This is because log4j-api has scope compile on nuxeo-ecm, so it will be packed as library during war build.
This is problematic because this artifact hides the one present in TOMCAT_HOME/lib.
log4j-core needs log4j-api, but it won't find api classes when it will try to load them because log4j-api is present in application classpath and not in the tomcat one.
Solution is to change scope of log4j-api to provided.
- is related to
-
NXP-23863 Switch logger backend to Log4j 2
- Resolved