[Engine-devel] Problem with log4j

Juan Hernandez jhernand at redhat.com
Tue Feb 28 17:23:55 UTC 2012


Hello,

A patch related to log4j that I created was recently merged (commit
8ee5c9bb46bbff7a624a84a07ee6b2f9fa4ec9d4) and apparently is causing a
problem during the deployment of the engine for some developers (Moti
Asayag pointed that to me).

If you find this when deploying the engine:

Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Level

Them I am to be blamed and the short term solution is to undo part of my
patch in the root pom.xml file:

--- a/pom.xml
+++ b/pom.xml
@@ -244,7 +244,6 @@
         <groupId>log4j</groupId>
         <artifactId>log4j</artifactId>
         <version>${log4j.version}</version>
-        <scope>provided</scope>
       </dependency>
     </dependencies>
   </dependencyManagement>

I can't reproduce this myself, so please let me know if you find it. If
this is common I think that the long term solution would be to add log4j
to the list of dependencies of the affected EJB:

--- a/backend/manager/modules/beans/scheduler/pom.xml
+++ b/backend/manager/modules/beans/scheduler/pom.xml
@@ -51,7 +51,7 @@
               <addClasspath>false</addClasspath>
             </manifest>
             <manifestEntries>
-
<Dependencies>org.slf4j,deployment.engine.ear.engine-vdsbroker.jar</Dependencies>
+
<Dependencies>org.slf4j,org.apache.log4j,deployment.engine.ear.engine-vdsbroker.jar</Dependencies>
             </manifestEntries>
           </archive>
         </configuration>

Regards,
Juan Hernandez
-- 
Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta
3ºD, 28016 Madrid, Spain
Inscrita en el Reg. Mercantil de Madrid – C.I.F. B82657941 - Red Hat S.L.



More information about the Devel mailing list