Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » ClassNotFoundException (org.eclipse.swt.widgets.Composite) when running the Testing Framework
ClassNotFoundException (org.eclipse.swt.widgets.Composite) when running the Testing Framework [message #331524] Thu, 11 September 2008 12:13 Go to next message
Matt Sither is currently offline Matt SitherFriend
Messages: 33
Registered: July 2009
Member
Hi,

I'm trying to use the Eclipse Testing Framework to perform nightly automated
tests on a plug-in. I've had several issues, but after tweaking here and
there, I seem to be close now. I finally got the test to recognize my
plug-in, but now the SWT plug-in can't be found (so it seems).

Here's what my build file is doing:
1 - Unzip eclipse SDK to a temporary working directory (call it <eclipse>).
2 - Unziip the testing framework into <eclipse>/dropins.
3 - Copy my plug-in to <eclipse>/dropins.
4 - Run the core-test target in library.xml, passing in <eclipse> as
eclipse-home, my plug-in's ID (com.etm.core) as plugin-name, and my test
suite as the classname.

I get errors saying it can't find org.eclipse.swt.widgets.Composite, but the
SWT jar is in <eclipse>/plugins. I don't get it.

Here's my output:

!SESSION 2008-09-11
07:44:10.972 -----------------------------------------------
eclipse.buildId=I20080617-2000
java.version=1.6.0_05
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=${os}, ARCH=${arch}, WS=${ws}, NL=en_US
Framework arguments: -application org.eclipse.test.coretestapplication
formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJU nitResultFormatter,C:\Users\sither\workspace\com.etm.test/wo rking/eclipse/com.etm.EtmTestSuite.xml
-testPluginName com.etm.core -className com.etm.EtmTestSuite
Command-line arguments: -application
org.eclipse.test.coretestapplication -data
C:\Users\sither\workspace\com.etm.test/working
formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJU nitResultFormatter,C:\Users\sither\workspace\com.etm.test/wo rking/eclipse/com.etm.EtmTestSuite.xml
-testPluginName com.etm.core -className com.etm.EtmTestSuite -os ${os} -ws
${ws} -arch ${arch} -consolelog

!ENTRY org.eclipse.osgi 2 0 2008-09-11 07:44:50.720
!MESSAGE Exception in com.etm.EtmPlugin.start() of bundle com.etm.core.
!STACK 0
org.osgi.framework.BundleException: Exception in com.etm.EtmPlugin.start()
of bundle com.etm.core.
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:1028)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:984)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:346)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:265)
at
org.eclipse.osgi.framework.util.SecureAction.start(SecureAct ion.java:400)
at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:234)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.load Class(AbstractBundle.java:1274)
at
org.eclipse.test.EclipseTestRunner.loadSuiteClass(EclipseTes tRunner.java:324)
at org.eclipse.test.EclipseTestRunner.getTest(EclipseTestRunner .java:237)
at org.eclipse.test.EclipseTestRunner.<init>(EclipseTestRunner.java:220)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.jav a:204)
at
org.eclipse.test.CoreTestApplication.runTests(CoreTestApplic ation.java:35)
at org.eclipse.test.CoreTestApplication.run(CoreTestApplication .java:31)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.eclipse.equinox.internal.app.EclipseAppContainer.callMet hodWithException(EclipseAppContainer.java:574)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:195)
at
org.eclipse.equinox.internal.app.MainApplicationLauncher.run (MainApplicationLauncher.java:32)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:382)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
at org.eclipse.core.launcher.Main.main(Main.java:30)
Caused by: java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Composite
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:23 89)
at java.lang.Class.getConstructor0(Class.java:2699)
at java.lang.Class.getDeclaredConstructor(Class.java:1985)
at
com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator.h asDefaultConstructor(ReflectionNavigator.java:428)
at
com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator.h asDefaultConstructor(ReflectionNavigator.java:22)
at
com.sun.xml.internal.bind.v2.model.impl.ClassInfoImpl.<init >(ClassInfoImpl.java:155)
at
com.sun.xml.internal.bind.v2.model.impl.RuntimeClassInfoImpl . <init>(RuntimeClassInfoImpl.java:60)
at
com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder. createClassInfo(RuntimeModelBuilder.java:70)
at
com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder. createClassInfo(RuntimeModelBuilder.java:42)
at
com.sun.xml.internal.bind.v2.model.impl.ModelBuilder.getClas sInfo(ModelBuilder.java:186)
at
com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder. getClassInfo(RuntimeModelBuilder.java:60)
at
com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder. getClassInfo(RuntimeModelBuilder.java:42)
at
com.sun.xml.internal.bind.v2.model.impl.ModelBuilder.getClas sInfo(ModelBuilder.java:156)
at
com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder. getClassInfo(RuntimeModelBuilder.java:55)
at
com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder. getClassInfo(RuntimeModelBuilder.java:42)
at
com.sun.xml.internal.bind.v2.model.impl.ModelBuilder.getType Info(ModelBuilder.java:262)
at
com.sun.xml.internal.bind.v2.model.impl.ModelBuilder.getType Info(ModelBuilder.java:277)
at
com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.getType InfoSet(JAXBContextImpl.java:416)
at
com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:270)
at
com.sun.xml.internal.bind.v2.ContextFactory.createContext(Co ntextFactory.java:103)
at
com.sun.xml.internal.bind.v2.ContextFactory.createContext(Co ntextFactory.java:81)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java: 211)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:385)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:522)
at com.etm.util.XmlUtils.registerType(Unknown Source)
at com.etm.util.XmlUtils.<clinit>(Unknown Source)
at com.etm.EtmPlugin.registerXmlTypes(Unknown Source)
at com.etm.EtmPlugin.start(Unknown Source)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$2 .run(BundleContextImpl.java:1009)
at java.security.AccessController.doPrivileged(Native Method)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:1003)
... 32 more
Caused by: java.lang.ClassNotFoundException:
org.eclipse.swt.widgets.Composite
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:481)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:397)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:385)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:87)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319 )
... 69 more
Root exception:
java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Composite
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:23 89)
at java.lang.Class.getConstructor0(Class.java:2699)
at java.lang.Class.getDeclaredConstructor(Class.java:1985)
at
com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator.h asDefaultConstructor(ReflectionNavigator.java:428)
at
com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator.h asDefaultConstructor(ReflectionNavigator.java:22)
at
com.sun.xml.internal.bind.v2.model.impl.ClassInfoImpl.<init >(ClassInfoImpl.java:155)
at
com.sun.xml.internal.bind.v2.model.impl.RuntimeClassInfoImpl . <init>(RuntimeClassInfoImpl.java:60)
at
com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder. createClassInfo(RuntimeModelBuilder.java:70)
at
com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder. createClassInfo(RuntimeModelBuilder.java:42)
at
com.sun.xml.internal.bind.v2.model.impl.ModelBuilder.getClas sInfo(ModelBuilder.java:186)
at
com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder. getClassInfo(RuntimeModelBuilder.java:60)
at
com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder. getClassInfo(RuntimeModelBuilder.java:42)
at
com.sun.xml.internal.bind.v2.model.impl.ModelBuilder.getClas sInfo(ModelBuilder.java:156)
at
com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder. getClassInfo(RuntimeModelBuilder.java:55)
at
com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder. getClassInfo(RuntimeModelBuilder.java:42)
at
com.sun.xml.internal.bind.v2.model.impl.ModelBuilder.getType Info(ModelBuilder.java:262)
at
com.sun.xml.internal.bind.v2.model.impl.ModelBuilder.getType Info(ModelBuilder.java:277)
at
com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.getType InfoSet(JAXBContextImpl.java:416)
at
com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:270)
at
com.sun.xml.internal.bind.v2.ContextFactory.createContext(Co ntextFactory.java:103)
at
com.sun.xml.internal.bind.v2.ContextFactory.createContext(Co ntextFactory.java:81)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java: 211)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:385)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:522)
at com.etm.util.XmlUtils.registerType(Unknown Source)
at com.etm.util.XmlUtils.<clinit>(Unknown Source)
at com.etm.EtmPlugin.registerXmlTypes(Unknown Source)
at com.etm.EtmPlugin.start(Unknown Source)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$2 .run(BundleContextImpl.java:1009)
at java.security.AccessController.doPrivileged(Native Method)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:1003)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:984)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:346)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:265)
at
org.eclipse.osgi.framework.util.SecureAction.start(SecureAct ion.java:400)
at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:234)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.load Class(AbstractBundle.java:1274)
at
org.eclipse.test.EclipseTestRunner.loadSuiteClass(EclipseTes tRunner.java:324)
at org.eclipse.test.EclipseTestRunner.getTest(EclipseTestRunner .java:237)
at org.eclipse.test.EclipseTestRunner.<init>(EclipseTestRunner.java:220)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.jav a:204)
at
org.eclipse.test.CoreTestApplication.runTests(CoreTestApplic ation.java:35)
at org.eclipse.test.CoreTestApplication.run(CoreTestApplication .java:31)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.eclipse.equinox.internal.app.EclipseAppContainer.callMet hodWithException(EclipseAppContainer.java:574)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:195)
at
org.eclipse.equinox.internal.app.MainApplicationLauncher.run (MainApplicationLauncher.java:32)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:382)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
at org.eclipse.core.launcher.Main.main(Main.java:30)
Caused by: java.lang.ClassNotFoundException:
org.eclipse.swt.widgets.Composite
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:481)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:397)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:385)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:87)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319 )
... 69 more

Thanks!
Re: ClassNotFoundException (org.eclipse.swt.widgets.Composite) when running the Testing Framework [message #331578 is a reply to message #331524] Fri, 12 September 2008 04:09 Go to previous messageGo to next message
Ketan Padegaonkar is currently offline Ketan PadegaonkarFriend
Messages: 873
Registered: July 2009
Senior Member
Sither wrote:

> Command-line arguments: -application
> org.eclipse.test.coretestapplication -data

Could it be because you're running as coretestapplication, instead of a
uitestapplication ?

I've had a lot of tese CNFE when running some of these tests in headless
mode.

-- Ketan
Re: ClassNotFoundException (org.eclipse.swt.widgets.Composite) when running the Testing Framework [message #331593 is a reply to message #331578] Fri, 12 September 2008 11:59 Go to previous messageGo to next message
Matt Sither is currently offline Matt SitherFriend
Messages: 33
Registered: July 2009
Member
Thanks for the reply, but I just got it to work. I don't know what I
changed. I'm not surprised though; my build/test script is a hodge-podge of
material I found in different tutorials. Is there any official
documentation on this stuff?

-Matt


"Ketan Padegaonkar" <ketanpadegaonkar@gmail.com> wrote in message
news:48C9EB76.1000804@gmail.com...
> Sither wrote:
>
>> Command-line arguments: -application
>> org.eclipse.test.coretestapplication -data
>
> Could it be because you're running as coretestapplication, instead of a
> uitestapplication ?
>
> I've had a lot of tese CNFE when running some of these tests in headless
> mode.
>
> -- Ketan
Re: ClassNotFoundException (org.eclipse.swt.widgets.Composite) when running the Testing Framework [message #331654 is a reply to message #331593] Mon, 15 September 2008 18:10 Go to previous message
Ketan Padegaonkar is currently offline Ketan PadegaonkarFriend
Messages: 873
Registered: July 2009
Senior Member
Sither wrote:
> Thanks for the reply, but I just got it to work. I don't know what I
> changed. I'm not surprised though; my build/test script is a
> hodge-podge of material I found in different tutorials. Is there any
> official documentation on this stuff?

Not really, most documentation covers bits and pieces of pde build.
There's nothing that I know that is complete.

I started with some of the build scripts picked up from here and there,
and tweaked my way through, over time, as I learnt more of pde build.

-- Ketan

> -Matt
>
>
> "Ketan Padegaonkar" <ketanpadegaonkar@gmail.com> wrote in message
> news:48C9EB76.1000804@gmail.com...
>> Sither wrote:
>>
>>> Command-line arguments: -application
>>> org.eclipse.test.coretestapplication -data
>>
>> Could it be because you're running as coretestapplication, instead of
>> a uitestapplication ?
>>
>> I've had a lot of tese CNFE when running some of these tests in
>> headless mode.
>>
>> -- Ketan
>
Previous Topic:org.eclipse.core.contenttype.contentTypes vs. org.eclipse.core.runtime.contentTypes
Next Topic:Configuration APIs
Goto Forum:
  


Current Time: Wed Jul 17 15:32:33 GMT 2024

Powered by FUDForum. Page generated in 0.06190 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top