Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>EDIT (13.10.2014):</strong> I recommend using version 2.1.0 which fixed this issue with log4j classloader.</p> <hr> <p>Finally I've managed to resolve this. Combined several methods available on the internet.</p> <ol> <li>I've created <code>oak-ear</code> package</li> <li><p>In oak ear I've added <code>src/main/application/META-INF/jboss-deployment-structure.xml</code>:</p> <pre><code>&lt;?xml version='1.0' encoding='UTF-8'?&gt; &lt;jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1"&gt; &lt;deployment&gt; &lt;dependencies&gt; &lt;module name="org.mickula.mylog" /&gt; &lt;/dependencies&gt; &lt;exclusions&gt; &lt;module name="org.apache.log4j" /&gt; &lt;/exclusions&gt; &lt;/deployment&gt; &lt;sub-deployment name="oak-web.war"&gt; &lt;dependencies&gt; &lt;module name="org.mickula.mylog" /&gt; &lt;/dependencies&gt; &lt;exclusions&gt; &lt;module name="org.apache.log4j" /&gt; &lt;/exclusions&gt; &lt;/sub-deployment&gt; &lt;/jboss-deployment-structure&gt; </code></pre></li> <li><p>Next in <code>jboss</code> directory I've copied <code>org/apache/log4j/main/log4j.jar</code> to <code>org/mickula/mylog/main/</code> and created there <code>module.xml</code>:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;module xmlns="urn:jboss:module:1.0" name="org.mickula.mylog"&gt; &lt;resources&gt; &lt;resource-root path="log4j-1.2.16.jar"/&gt; &lt;/resources&gt; &lt;dependencies&gt; &lt;module name="javax.api"/&gt; &lt;/dependencies&gt; &lt;/module&gt; </code></pre> <p>This change allowed me to create own <code>log4j.properties</code> file. So did I in the <code>jboss/standalone/configuration/</code>.</p></li> <li><p>Finally I've pointed JBoss to the new <code>log4j.properties</code> file via the starting script: in <code>jboss/bin/standalone.conf</code> at the end of the file I've added:</p> <p><code>JAVA_OPTS="$JAVA_OPTS -Dlog4j.configuration=file://URL_TO_THE_JBOSS/jboss711/standalone/configuration/log4j.properties"</code></p></li> </ol> <p>Now running JBoss with ESAPI succeded. Thanks for your help.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload