1 Reply Latest reply on Dec 17, 2014 7:45 AM by Jay SenSharma

    Issue with Log4J

    valsaraj viswanathan Master

      One of the jars added in my custom module is using Log4J and I am getting following error when I start JBoss 7. I guess this is because of using separate version of log4j in my jar file. Should I update code to use the log4j bundled with JBoss or I have to bundle the log4j that I am using? If so, how can I specify the log4j to load while executing the code in my jar file? Which entry inside jar file can configure class loading as we are doing for ear and war?

       

      2014-12-17 13:42:07,368 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 46) JBAS014612: Operation ("add") failed - address: ([

          ("subsystem" => "security"),

          ("security-domain" => "AppSecurityDomain")

      ]): java.lang.RuntimeException: JBAS013303: Runtime Exception:

        at org.jboss.as.security.SecurityDomainAdd.processKeyStore(SecurityDomainAdd.java:596)

        at org.jboss.as.security.SecurityDomainAdd.createJSSESecurityDomain(SecurityDomainAdd.java:482)

        at org.jboss.as.security.SecurityDomainAdd.launchServices(SecurityDomainAdd.java:172)

        at org.jboss.as.security.SecurityDomainAdd$1.execute(SecurityDomainAdd.java:160)

        at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:397)

        at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:284)

        at org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:211)

        at org.jboss.as.server.AbstractDeploymentChainStep.execute(AbstractDeploymentChainStep.java:51)

        at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:397)

        at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:284)

        at org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:211)

        at org.jboss.as.server.AbstractDeploymentChainStep.execute(AbstractDeploymentChainStep.java:51)

        at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:397)

        at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:284)

        at org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:211)

        at org.jboss.as.controller.ParallelBootOperationStepHandler$ParallelBootTask.run(ParallelBootOperationStepHandler.java:311)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

        at java.lang.Thread.run(Thread.java:722)

        at org.jboss.threads.JBossThread.run(JBossThread.java:122)

      Caused by: java.lang.reflect.InvocationTargetException

        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)

        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

        at java.lang.reflect.Constructor.newInstance(Constructor.java:525)

        at org.jboss.security.Util.invokePasswordClass(Util.java:141)

        at org.jboss.security.Util.loadPassword(Util.java:92)

        at org.jboss.security.JBossJSSESecurityDomain.setKeyStorePassword(JBossJSSESecurityDomain.java:286)

        at org.jboss.as.security.SecurityDomainAdd$5.setKeyStorePassword(SecurityDomainAdd.java:484)

        at org.jboss.as.security.SecurityDomainAdd.processKeyStore(SecurityDomainAdd.java:594)

        ... 19 more

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

        at org.App.security.auth.PasswordStoreEntry.<init>(PasswordStoreEntry.java:42)

        ... 28 more

      Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Logger from [Module "com.app.configuration:main" from local module loader @4fee5bed (roots: D:\jboss-as-7.1.2.Final\modules)]

        at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)

        at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)

        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)

        at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)

        at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)

        ... 29 more