<style>
/* Changing the layout to use less space for mobiles */
@media screen and (max-device-width: 480px), screen and (-webkit-min-device-pixel-ratio: 2) {
#email-body { min-width: 30em !important; }
#email-page { padding: 8px !important; }
#email-banner { padding: 8px 8px 0 8px !important; }
#email-avatar { margin: 1px 8px 8px 0 !important; padding: 0 !important; }
#email-fields { padding: 0 8px 8px 8px !important; }
#email-gutter { width: 0 !important; }
}
</style>
<div id="email-body">
<table id="email-wrap" align="center" border="0" cellpadding="0" cellspacing="0" style="background-color:#f0f0f0;color:#000000;width:100%;">
<tr valign="top">
<td id="email-page" style="padding:16px !important;">
<table align="center" border="0" cellpadding="0" cellspacing="0" style="background-color:#ffffff;border:1px solid #bbbbbb;color:#000000;width:100%;">
<tr valign="top">
<td bgcolor="#003366" style="background-color:#003366;color:#ffffff;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;line-height:1;"><img src="http://jira.qos.ch/s/en_USzcg4h8-418945332/850/25/_/jira-logo-scaled.png" alt="" style="vertical-align:top;" /></td>
</tr><tr valign="top">
<td id="email-banner" style="padding:32px 32px 0 32px;">
<table align="left" border="0" cellpadding="0" cellspacing="0" width="100%" style="width:100%;">
<tr valign="top">
<td style="color:#505050;font-family:Arial,FreeSans,Helvetica,sans-serif;padding:0;">
<img id="email-avatar" src="http://jira.qos.ch/secure/useravatar?avatarId=10122" alt="" height="48" width="48" border="0" align="left" style="padding:0;margin: 0 16px 16px 0;" />
<div id="email-action" style="padding: 0 0 8px 0;font-size:12px;line-height:18px;">
<a class="user-hover" rel="josh@assuredlabor.com" id="email_josh@assuredlabor.com" href="http://jira.qos.ch/secure/ViewProfile.jspa?name=josh%40assuredlabor.com" style="color:#326ca6;">Joshua Chaitin-Pollak</a>
created <img src="http://jira.qos.ch/images/icons/issuetypes/bug.png" height="16" width="16" border="0" align="absmiddle" alt="Bug"> <a style='color:#326ca6;text-decoration:none;' href='http://jira.qos.ch/browse/CAL-38'>CAL-38</a>
</div>
<div id="email-summary" style="font-size:16px;line-height:20px;padding:2px 0 16px 0;">
<a style='color:#326ca6;text-decoration:none;' href='http://jira.qos.ch/browse/CAL-38'><strong>logback conditional configuration fails when loaded within axis2</strong></a>
</div>
</td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td id="email-fields" style="padding:0 32px 32px 32px;">
<table border="0" cellpadding="0" cellspacing="0" style="padding:0;text-align:left;width:100%;" width="100%">
<tr valign="top">
<td id="email-gutter" style="width:64px;white-space:nowrap;"></td>
<td>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td style="color:#000000;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;padding:0 10px 10px 0;white-space:nowrap;">
<strong style="font-weight:normal;color:#505050;">Issue Type:</strong>
</td>
<td style="color:#000000;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;padding:0 0 10px 0;width:100%;">
<img src="http://jira.qos.ch/images/icons/issuetypes/bug.png" height="16" width="16" border="0" align="absmiddle" alt="Bug"> Bug
</td>
</tr> <tr valign="top">
<td style="color:#000000;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;padding:0 10px 10px 0;white-space:nowrap;">
<strong style="font-weight:normal;color:#505050;">Assignee:</strong>
</td>
<td style="color:#000000;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;padding:0 0 10px 0;width:100%;">
<a class="user-hover" rel="noreply.ceki@qos.ch" id="email_noreply.ceki@qos.ch" href="http://jira.qos.ch/secure/ViewProfile.jspa?name=noreply.ceki%40qos.ch" style="color:#326ca6;">Ceki Gulcu</a>
</td>
</tr> <tr valign="top">
<td style="color:#000000;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;padding:0 10px 10px 0;white-space:nowrap;">
<strong style="font-weight:normal;color:#505050;">Created:</strong>
</td>
<td style="color:#000000;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;padding:0 0 10px 0;width:100%;">
10/Apr/13 2:39 AM
</td>
</tr> <tr valign="top">
<td style="color:#000000;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;padding:0 10px 10px 0;white-space:nowrap;">
<strong style="font-weight:normal;color:#505050;">Description:</strong>
</td>
<td style="color:#000000;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;padding:0 0 10px 0;width:100%;">
Hello, I have a logback configuration like this:
<br/>
<br/>
{code}
<br/>
<if condition='property("CONTEXT_NAME").equalsIgnoreCase("my.propject.name")'>
<br/>
<then>
<br/>
<property name="logentries.token" value="my-token" />
<br/>
<property name="appender" value="logentries" />
<br/>
</then>
<br/>
</if>
<br/>
{code}
<br/>
<br/>
This works fine when loaded via Tomcat or run through a test, but when run through an axis2 aar, I get this exception:
<br/>
<br/>
{quote}
<br/>
00:31:58,704 |-ERROR in ch.qos.logback.core.joran.conditional.IfAction - Failed to parse condition [property("CONTEXT_NAME").equalsIgnoreCase("inovacel.server")] org.codehaus.janino.JaninoRuntimeException: Cannot load class "ch.qos.logback.core.spi.PropertyContainer" through the given ClassLoader
<br/>
at org.codehaus.janino.JaninoRuntimeException: Cannot load class "ch.qos.logback.core.spi.PropertyContainer" through the given ClassLoader
<br/>
at at org.codehaus.janino.ReflectionIClass.classToIClass(ReflectionIClass.java:310)
<br/>
at at org.codehaus.janino.ReflectionIClass.classesToIClasses(ReflectionIClass.java:320)
<br/>
at at org.codehaus.janino.ReflectionIClass.access$200(ReflectionIClass.java:38)
<br/>
at at org.codehaus.janino.ReflectionIClass$ReflectionIMethod.getParameterTypes(ReflectionIClass.java:226)
<br/>
at at org.codehaus.janino.IClass$IMethod.getDescriptor(IClass.java:807)
<br/>
at at org.codehaus.janino.IClass.getIMethods(IClass.java:180)
<br/>
at at org.codehaus.janino.IClass.getIMethods(IClass.java:195)
<br/>
at at org.codehaus.janino.IClass.getIMethods(IClass.java:170)
<br/>
at at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:372)
<br/>
at at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:357)
<br/>
at at org.codehaus.janino.UnitCompiler$3.visitPackageMemberClassDeclaration(UnitCompiler.java:312)
<br/>
at at org.codehaus.janino.Java$PackageMemberClassDeclaration.accept(Java.java:770)
<br/>
at at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:319)
<br/>
at at org.codehaus.janino.UnitCompiler.compileUnit(UnitCompiler.java:288)
<br/>
at at org.codehaus.janino.SimpleCompiler.compileToClassLoader(SimpleCompiler.java:393)
<br/>
at at org.codehaus.janino.ClassBodyEvaluator.compileToClass(ClassBodyEvaluator.java:311)
<br/>
at at org.codehaus.janino.ClassBodyEvaluator.cook(ClassBodyEvaluator.java:224)
<br/>
at at org.codehaus.janino.SimpleCompiler.cook(SimpleCompiler.java:194)
<br/>
at at org.codehaus.commons.compiler.Cookable.cook(Cookable.java:80)
<br/>
at at org.codehaus.commons.compiler.Cookable.cook(Cookable.java:72)
<br/>
at at ch.qos.logback.core.joran.conditional.PropertyEvalScriptBuilder.build(PropertyEvalScriptBuilder.java:50)
<br/>
at at ch.qos.logback.core.joran.conditional.IfAction.begin(IfAction.java:67)
<br/>
at at ch.qos.logback.core.joran.spi.Interpreter.callBeginAction(Interpreter.java:276)
<br/>
at at ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:148)
<br/>
at at ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:130)
<br/>
at at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:50)
<br/>
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:157)
<br/>
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:143)
<br/>
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:106)
<br/>
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:56)
<br/>
at at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:75)
<br/>
at at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:148)
<br/>
at at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:85)
<br/>
at at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
<br/>
at at org.slf4j.LoggerFactory.bind(LoggerFactory.java:128)
<br/>
at at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:107)
<br/>
at at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:295)
<br/>
at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:269)
<br/>
at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:281)
<br/>
at at com.assuredlabor.inovacel.server.SpringInit.<clinit>(SpringInit.java)
<br/>
at at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
<br/>
at at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
<br/>
at at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
<br/>
at at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
<br/>
at at java.lang.Class.newInstance0(Class.java:355)
<br/>
at at java.lang.Class.newInstance(Class.java:308)
<br/>
at at org.apache.axis2.deployment.ServiceBuilder.loadServiceLifeCycleClass(ServiceBuilder.java:518)
<br/>
at at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:213)
<br/>
at at org.apache.axis2.deployment.ServiceGroupBuilder.populateServiceGroup(ServiceGroupBuilder.java:101)
<br/>
at at org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:109)
<br/>
at at org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:143)
<br/>
at at org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.java:82)
<br/>
at at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
<br/>
at at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:813)
<br/>
at at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144)
<br/>
at at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:377)
<br/>
at at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:254)
<br/>
at at org.apache.axis2.deployment.DeploymentEngine.loadServices(DeploymentEngine.java:142)
<br/>
at at org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices(WarBasedAxisConfigurator.java:283)
<br/>
at at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:95)
<br/>
at at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:584)
<br/>
at at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:454)
<br/>
at at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
<br/>
at at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
<br/>
at at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)
<br/>
at at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5033)
<br/>
at at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5317)
<br/>
at at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
<br/>
at at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
<br/>
at at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
<br/>
at at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
<br/>
at at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:977)
<br/>
at at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1655)
<br/>
at at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
<br/>
at at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
<br/>
at at java.util.concurrent.FutureTask.run(FutureTask.java:138)
<br/>
at at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
<br/>
at at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
<br/>
at at java.lang.Thread.run(Thread.java:662)
<br/>
{quote}
<br/>
<br/>
I realize this is probably an esoteric problem, but I wanted to report it. Please let me know if you know of any work around. I tried moving all the logback, slf4j, and janino, etc jars into tomcat, and the error went away, but logging did not seem to work for my axis2 aar file. (Other webapps were logging fine in that situation.)
</td>
</tr>
<tr valign="top">
<td style="color:#000000;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;padding:0 10px 10px 0;white-space:nowrap;">
<strong style="font-weight:normal;color:#505050;">Project:</strong>
</td>
<td style="color:#000000;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;padding:0 0 10px 0;width:100%;">
<a style="color:#326ca6;" href="http://jira.qos.ch/browse/CAL">CAL10N</a>
</td>
</tr> <tr valign="top">
<td style="color:#000000;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;padding:0 10px 10px 0;white-space:nowrap;">
<strong style="font-weight:normal;color:#505050;">Priority:</strong>
</td>
<td style="color:#000000;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;padding:0 0 10px 0;width:100%;">
<img src="http://jira.qos.ch/images/icons/priorities/major.png" height="16" width="16" border="0" align="absmiddle" alt="Major"> Major
</td>
</tr>
<tr valign="top">
<td style="color:#000000;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;padding:0 10px 10px 0;white-space:nowrap;">
<strong style="font-weight:normal;color:#505050;">Reporter:</strong>
</td>
<td style="color:#000000;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;padding:0 0 10px 0;width:100%;">
<a class="user-hover" rel="josh@assuredlabor.com" id="email_josh@assuredlabor.com" href="http://jira.qos.ch/secure/ViewProfile.jspa?name=josh%40assuredlabor.com" style="color:#326ca6;">Joshua Chaitin-Pollak</a>
</td>
</tr> </table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td><!-- End #email-page -->
</tr>
<tr valign="top">
<td style="color:#505050;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:10px;line-height:14px;padding: 0 16px 16px 16px;text-align:center;">
This message is automatically generated by JIRA.<br />
If you think it was sent incorrectly, please contact your JIRA administrators<br />
For more information on JIRA, see: <a style='color:#326ca6;' href='http://www.atlassian.com/software/jira'>http://www.atlassian.com/software/jira</a>
</td>
</tr>
</table><!-- End #email-wrap -->
</div><!-- End #email-body -->