From cb775d2bd339acf48b78019df09141b936fa8dbc Mon Sep 17 00:00:00 2001
From: Piotr Gawron <piotr.gawron@uni.lu>
Date: Fri, 16 Feb 2018 17:25:53 +0100
Subject: [PATCH] log4j2 library is excluded from jsbml dependency - so our
 log4j 1.17 lib is working properly

---
 converter-sbml/pom.xml              | 17 ++++++++++++++++-
 web/src/main/webapp/WEB-INF/web.xml | 14 +++++++-------
 2 files changed, 23 insertions(+), 8 deletions(-)

diff --git a/converter-sbml/pom.xml b/converter-sbml/pom.xml
index 278f035aad..d7cdf3e981 100644
--- a/converter-sbml/pom.xml
+++ b/converter-sbml/pom.xml
@@ -76,9 +76,24 @@
 			<groupId>org.sbml.jsbml</groupId>
 			<artifactId>jsbml</artifactId>
 			<version>1.2</version>
+			<!-- for now we use lower version of log4j and this one introduce some
+				problem with tomcat loggin -->
+			<exclusions>
+				<exclusion>
+					<groupId>org.apache.logging.log4j</groupId>
+					<artifactId>log4j-core</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>org.apache.logging.log4j</groupId>
+					<artifactId>log4j-api</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>org.apache.logging.log4j</groupId>
+					<artifactId>log4j-1.2-api</artifactId>
+				</exclusion>
+			</exclusions>
 		</dependency>
 
-
 		<dependency>
 			<groupId>lcsb.mapviewer</groupId>
 			<artifactId>converter-graphics</artifactId>
diff --git a/web/src/main/webapp/WEB-INF/web.xml b/web/src/main/webapp/WEB-INF/web.xml
index 9b6aa5e3e0..8bc3a2044e 100644
--- a/web/src/main/webapp/WEB-INF/web.xml
+++ b/web/src/main/webapp/WEB-INF/web.xml
@@ -49,6 +49,13 @@
     <param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name>
     <param-value>true</param-value>
   </context-param>
+  <context-param>
+    <param-name>log4jConfigLocation</param-name>
+    <param-value>/WEB-INF/resources/log4j.properties</param-value>
+  </context-param>
+  <listener>
+    <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
+  </listener>
   <listener>
     <listener-class>
 			org.springframework.web.context.ContextLoaderListener
@@ -59,13 +66,6 @@
 			org.springframework.security.web.session.HttpSessionEventPublisher
 		</listener-class>
   </listener>
-  <context-param>
-    <param-name>log4jConfigLocation</param-name>
-    <param-value>/WEB-INF/resources/log4j.properties</param-value>
-  </context-param>
-  <listener>
-    <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
-  </listener>
   <welcome-file-list>
     <welcome-file>index.xhtml</welcome-file>
   </welcome-file-list>
-- 
GitLab