Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 900939 (JBPAPP6-1125)

Summary: Unable to build EAP on IBM JDk due to slf4j conflict
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Madhumita Sadhukhan <msadhukh>
Component: BuildAssignee: Paul Gier <pgier>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 6.0.0CC: msadhukh, myarboro, pgier, pjelinek, pslavice
Target Milestone: ---Keywords: Reopened
Target Release: EAP 6.0.1   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/JBPAPP6-1125
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-28 21:32:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 900463    
Attachments:
Description Flags
ibm-jdk-slf4j.patch none

Description Madhumita Sadhukhan 2012-09-26 13:38:28 UTC
project_key: JBPAPP6

We were able to build EAP 6 on IBMJDk6.

However EAP 6.0.1.ER2 has introduced regression such that we cannot build EAP on IBM anymore due to stacktrace shown below.It is however possible to build Eap on Oracle JDk.

The reason seems like usage of multiple bindings of slf4j.

Please check details here:

http://www.slf4j.org/codes.html

"Note The warning emitted by SLF4J is just that, a warning. Even when multiple bindings are present, SLF4J will pick one logging framework/implementation and bind with it. The way SLF4J picks a binding is determined by the JVM and for all practical purposes should be considered random. "

Hudson job:

https://jenkins.mw.lab.eng.bos.redhat.com/hudson/view/EAP6/view/EAP6-AS-Testsuite/job/eap-60-as-testsuite-RHEL6-buildIBMJDK6_testrunIBMJDK16/84/consoleText


StackTrace:
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.6-redhat-1:run (build-dist) on project jboss-as-build: An Ant BuildException has occured: The following error occurred while executing this line:
/qa/hudson_workspace/workspace/eap-60-as-testsuite-RHEL6-buildIBMJDK6_testrunIBMJDK16/jboss-eap/build/build.xml:140: The following error occurred while executing this line:
/qa/hudson_workspace/workspace/eap-60-as-testsuite-RHEL6-buildIBMJDK6_testrunIBMJDK16/jboss-eap/build/lib.xml:44: java.lang.NoClassDefFoundError: org.slf4j.impl.StaticLoggerBinder
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
	at java.lang.reflect.Method.invoke(Method.java:611)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: An Ant BuildException has occured: The following error occurred while executing this line:
/qa/hudson_workspace/workspace/eap-60-as-testsuite-RHEL6-buildIBMJDK6_testrunIBMJDK16/jboss-eap/build/build.xml:140: The following error occurred while executing this line:
/qa/hudson_workspace/workspace/eap-60-as-testsuite-RHEL6-buildIBMJDK6_testrunIBMJDK16/jboss-eap/build/lib.xml:44: java.lang.NoClassDefFoundError: org.slf4j.impl.StaticLoggerBinder
	at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:283)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
	... 19 more
Caused by: /qa/hudson_workspace/workspace/eap-60-as-testsuite-RHEL6-buildIBMJDK6_testrunIBMJDK16/jboss-eap/build/target/antrun/build-main.xml:4: The following error occurred while executing this line:
/qa/hudson_workspace/workspace/eap-60-as-testsuite-RHEL6-buildIBMJDK6_testrunIBMJDK16/jboss-eap/build/build.xml:140: The following error occurred while executing this line:
/qa/hudson_workspace/workspace/eap-60-as-testsuite-RHEL6-buildIBMJDK6_testrunIBMJDK16/jboss-eap/build/lib.xml:44: java.lang.NoClassDefFoundError: org.slf4j.impl.StaticLoggerBinder
	at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:497)
	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:444)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
	at sun.reflect.GeneratedMethodAccessor121.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
	at java.lang.reflect.Method.invoke(Method.java:611)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:390)
	at org.apache.tools.ant.Target.performTasks(Target.java:411)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
	at org.apache.tools.ant.Project.executeTarget(Project.java:1366)
	at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:270)
	... 21 more
Caused by: /qa/hudson_workspace/workspace/eap-60-as-testsuite-RHEL6-buildIBMJDK6_testrunIBMJDK16/jboss-eap/build/build.xml:140: The following error occurred while executing this line:
/qa/hudson_workspace/workspace/eap-60-as-testsuite-RHEL6-buildIBMJDK6_testrunIBMJDK16/jboss-eap/build/lib.xml:44: java.lang.NoClassDefFoundError: org.slf4j.impl.StaticLoggerBinder
	at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:497)
	at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:401)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
	at sun.reflect.GeneratedMethodAccessor121.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
	at java.lang.reflect.Method.invoke(Method.java:611)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:390)
	at org.apache.tools.ant.Target.performTasks(Target.java:411)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
	at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1249)
	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
	... 32 more
Caused by: /qa/hudson_workspace/workspace/eap-60-as-testsuite-RHEL6-buildIBMJDK6_testrunIBMJDK16/jboss-eap/build/lib.xml:44: java.lang.NoClassDefFoundError: org.slf4j.impl.StaticLoggerBinder
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:116)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
	at sun.reflect.GeneratedMethodAccessor121.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
	at java.lang.reflect.Method.invoke(Method.java:611)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:398)
	... 44 more
Caused by: java.lang.NoClassDefFoundError: org.slf4j.impl.StaticLoggerBinder
	at org.slf4j.LoggerFactory.bind(LoggerFactory.java:121)
	at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:111)
	at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:268)
	at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:241)
	at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:156)
	at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:289)
	at org.apache.bsf.BSFManager.<init>(BSFManager.java:102)
	at org.apache.tools.ant.util.optional.ScriptRunner.createManager(ScriptRunner.java:170)
	at org.apache.tools.ant.util.optional.ScriptRunner.executeScript(ScriptRunner.java:96)
	at org.apache.tools.ant.taskdefs.optional.script.ScriptDef.executeScript(ScriptDef.java:350)
	at org.apache.tools.ant.taskdefs.optional.script.ScriptDefBase.execute(ScriptDefBase.java:50)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
	at sun.reflect.GeneratedMethodAccessor121.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
	at java.lang.reflect.Method.invoke(Method.java:611)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	... 53 more
Caused by: java.lang.ClassNotFoundException: org.slf4j.impl.StaticLoggerBinder
	at java.lang.Throwable.<init>(Throwable.java:80)
	at java.lang.ClassNotFoundException.<init>(ClassNotFoundException.java:76)
	at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:38)
	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
	... 69 more
[ERROR]

Comment 1 Paul Gier 2012-09-27 14:29:51 UTC
Attaching a patch which seems to resolve the issue.  I'd like to get some feedback from someone who understands slf4j better before applying to eap.

Comment 2 Paul Gier 2012-09-27 14:29:51 UTC
Attachment: Added: ibm-jdk-slf4j.patch


Comment 3 Paul Gier 2012-09-27 19:00:08 UTC
Adding a dependency on sfl4j-simple to the antrun plugin fixes the issue for ibm jdk and doesn't seem to break anything with sun jdk.  I'm not sure why this issue doesn't affect upstream, we may need to research further in the future.

For now, I think this work-around is enough.
[7eb6d6fe|http://git.app.eng.bos.redhat.com/?p=jbossas/jboss-as.git;a=commitdiff;h=7eb6d6fe6b97a024095efe93b71ba81778c1a934}

Comment 4 Madhumita Sadhukhan 2012-10-01 09:05:37 UTC
Link: Added: This issue is a dependency of JBPAPP-9057


Comment 6 Misty Stanley-Jones 2012-11-05 06:12:35 UTC
Release Notes Docs Status: Added: Not Required
Writer: Added: mistysj


Comment 7 Anne-Louise Tangring 2012-11-13 20:35:27 UTC
Release Notes Docs Status: Removed: Not Required 
Writer: Removed: mistysj 
Docs QE Status: Removed: NEW 


Comment 8 Pavel Jelinek 2013-03-25 14:06:12 UTC
Problem persists in EAP 6.1.0.ER3

Comment 9 Paul Gier 2013-03-28 21:32:34 UTC
Please open a new issue for this.  In general if the fix has already been verified and released it shouldn't be re-opened.  Instead, just create a new issue and link back to this one for background information.

Comment 10 Paul Gier 2013-03-29 14:52:12 UTC
Created a new issue to track this for EAP 6.1
https://bugzilla.redhat.com/show_bug.cgi?id=929225