Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [swtbot-dev] egit swtbot tests hit NoClassDefFoundError: org/slf4j/impl/StaticMarkerBinder

SWTBot merely imports classes in the org.apache.log4j namespace.

Slf4j provides adapters[1] for log4j, commons logging, jdk logging to redirect to slf4j (and vice versa). It seems your log4j impl is switched from apache to slf4j[2] (which needs additional deps).

Something else in your setup is causing this to happen, check if you've got any org.slf4j classes in your dependency tree.

I'd blame maven for downloading the internet and adding something to the build path which did not exist before, but that's just me :P

– Ketan
http://ketan.padegaonkar.name | http://eclipse.org/swtbot

[1] - http://www.slf4j.org/faq.html#when
[2] - http://www.slf4j.org/legacy.html#log4j-over-slf4j

On 5/10/10 2:11 AM, Matthias Sohn wrote:
When trying to run the egit UI tests from Maven/Tycho against Helios
since today I get the exception [1].
Have any new dependencies been added to the list of bundles needed to
run SWTBot based tests ?

The manifest of our test bundle is here
<http://egit.eclipse.org/w/?p=egit.git;a=blob;f=org.eclipse.egit.ui.test/META-INF/MANIFEST.MF;h=2efeae3e5e043e03cf0a8a37f15ec341406a642c;hb=HEAD>
For Helios we build against :
http://download.eclipse.org/technology/swtbot/helios/dev-build/update-site
http://download.eclipse.org/releases/helios

--
Matthias

[1]:
Running org.eclipse.egit.ui.wizards.clone.GitCloneWizardTest
Exception in thread "WorkbenchTestable" java.lang.NoClassDefFoundError:
org/slf4j/impl/StaticMarkerBinder
         at org.slf4j.MarkerFactory.<clinit>(MarkerFactory.java:51)
         at org.apache.log4j.Category.<clinit>(Category.java:50)
         at
org.eclipse.swtbot.swt.finder.junit.ScreenshotCaptureListener.<clinit>(ScreenshotCaptureListener.java:3
         at
org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner.run(SWTBotJunit4ClassRunner.java:50)
         at
org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
         at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.ja
)
         at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
         at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
         at
org.codehaus.tycho.surefire.osgibooter.OsgiSurefireBooter.run(OsgiSurefireBooter.java:75)
         at
org.codehaus.tycho.surefire.osgibooter.AbstractUITestApplication.runTests(AbstractUITestApplication.jav
         at
org.eclipse.ui.internal.testing.WorkbenchTestable$1.run(WorkbenchTestable.java:71)
         at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassNotFoundException:
org.slf4j.impl.StaticMarkerBinder
         at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:506)
         at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
         at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
         at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
         ... 12 more




_______________________________________________
swtbot-dev mailing list
swtbot-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/swtbot-dev



Back to the top