Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » java.lang.NoClassDefFoundError: junit/framework/TestListener
java.lang.NoClassDefFoundError: junit/framework/TestListener [message #549321] Mon, 26 July 2010 13:13 Go to next message
Marou is currently offline MarouFriend
Messages: 11
Registered: July 2010
Junior Member
Hi,

I start working with Swtbot and all my tests work on eclipse.
When i want to run my testsuite in command line
/prj/spg_sand/haddadm/local/vsctd/bin/vsocstudio -data /prj/spg_sand/haddadm/local/vsctd/bin/result formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,/prj/spg_sand/haddadm/local/vsctd/bin/plugins/com.st.testcosimcockpit.alltests.TestNewFlow.xml formatter=org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter -application org.eclipse.swtbot.eclipse.junit4.headless.swtbottestapplication -Dtest.eclipse.dir=`/prj/spg_sand/haddadm/local/vsctd/bin/vsocstudio` -testPluginName com.st.testcosimcockpit -className com.st.testcosimcockpit.alltests.TestNewFlow -debug -consolelog


i get this error

Start VM: /sw/st_division/spg/ext_tools/jdk/Linux-i686/jdk1.6.0_17/bin/java
-Xms256m
-Xmx512m
-XX:MaxPermSize=512m
-Dsun.java2d.pmoffscreen=false
-Dorg.osgi.framework.bootdelegation=*
-Dosgi.configuration.cascaded=true
-Dosgi.sharedConfiguration.area=/prj/spg_sand/haddadm/local/vsctd/configuration
-Dosgi.configuration.area=@user.home/.vsocstudio/dp_201007231230
-jar /sw/st_division/spg/st_tools/STWorkbench/4.1.1/Linux-i686/plugins/org.eclipse.equinox.launcher_1.0.102.1.jar
-os linux
-ws gtk
-arch x86
-showsplash
-launcher /sw/st_division/spg/st_tools/STWorkbench/4.1.1/Linux-i686/stworkbench
-name Stworkbench
--launcher.library /sw/st_division/spg/st_tools/STWorkbench/4.1.1/Linux-i686/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.101.R34x_v20080805/eclipse_1115.so
-startup /sw/st_division/spg/st_tools/STWorkbench/4.1.1/Linux-i686/plugins/org.eclipse.equinox.launcher_1.0.102.1.jar
-exitdata 668005
-data /prj/spg_sand/haddadm/local/vsctd/bin/result formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,/prj/spg_sand/haddadm/local/vsctd/bin/plugins/com.st.testcosimcockpit.alltests.TestNewFlow.xml formatter=org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter
-application org.eclipse.swtbot.eclipse.junit4.headless.swtbottestapplication
-Dtest.eclipse.dir=
-testPluginName com.st.testcosimcockpit
-className com.st.testcosimcockpit.alltests.TestNewFlow
-debug
-consolelog
-vm /sw/st_division/spg/ext_tools/jdk/Linux-i686/jdk1.6.0_17/bin/java
-vmargs
-Xms256m
-Xmx512m
-XX:MaxPermSize=512m
-Dsun.java2d.pmoffscreen=false
-Dorg.osgi.framework.bootdelegation=*
-Dosgi.configuration.cascaded=true
-Dosgi.sharedConfiguration.area=/prj/spg_sand/haddadm/local/vsctd/configuration
-Dosgi.configuration.area=@user.home/.vsocstudio/dp_201007231230
-jar /sw/st_division/spg/st_tools/STWorkbench/4.1.1/Linux-i686/plugins/org.eclipse.equinox.launcher_1.0.102.1.jar 
Configuration location:
    file:/home/haddadm/.vsocstudio/dp_201007231230/
Configuration file:
    file:/home/haddadm/.vsocstudio/dp_201007231230/config.ini loaded
Configuration file:
    file:/prj/spg_sand/haddadm/local/vsctd/configuration/config.ini loaded
Shared configuration location:
    file:/prj/spg_sand/haddadm/local/vsctd/configuration/
Install location:
    file:/sw/st_division/spg/st_tools/STWorkbench/4.1.1/Linux-i686/
Framework located:
    file:/sw/st_division/spg/st_tools/STWorkbench/4.1.1/Linux-i686/plugins/org.eclipse.osgi_3.4.3.R34x_v20081215-1030.jar
Framework classpath:
    file:/sw/st_division/spg/st_tools/STWorkbench/4.1.1/Linux-i686/plugins/org.eclipse.osgi_3.4.3.R34x_v20081215-1030.jar
Splash location:
    /sw/st_division/spg/st_tools/STWorkbench/4.1.1/Linux-i686/plugins/com.st.platform_4.1.1.0/splash.bmp
Debug options:
    file:/prj/spg_sand/haddadm/.options not found
Time to load bundles: 11
Starting application: 1336
!SESSION 2010-07-26 15:07:54.250 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_17
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
Framework arguments:  formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,/prj/spg_sand/haddadm/local/vsctd/bin/plugins/com.st.testcosimcockpit.alltests.TestNewFlow.xml formatter=org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter -application org.eclipse.swtbot.eclipse.junit4.headless.swtbottestapplication -Dtest.eclipse.dir= -testPluginName com.st.testcosimcockpit -className com.st.testcosimcockpit.alltests.TestNewFlow
Command-line arguments:  -os linux -ws gtk -arch x86 -data /prj/spg_sand/haddadm/local/vsctd/bin/result formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,/prj/spg_sand/haddadm/local/vsctd/bin/plugins/com.st.testcosimcockpit.alltests.TestNewFlow.xml formatter=org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter -application org.eclipse.swtbot.eclipse.junit4.headless.swtbottestapplication -Dtest.eclipse.dir= -testPluginName com.st.testcosimcockpit -className com.st.testcosimcockpit.alltests.TestNewFlow -debug -consolelog

!ENTRY org.eclipse.ui.workbench 2 0 2010-07-26 15:08:00.103
!MESSAGE A handler conflict occurred.  This may disable some commands.
!SUBENTRY 1 org.eclipse.ui.workbench 2 0 2010-07-26 15:08:00.103
!MESSAGE Conflict for 'AUTOGEN:::org.eclipse.cdt.debug.ui.FunctionBreakpointActions/org.eclipse.cdt.debug.internal.ui.actions.ManageFunctionBreakpointActionDelegate':
HandlerActivation(commandId=AUTOGEN:::org.eclipse.cdt.debug.ui.FunctionBreakpointActions/org.eclipse.cdt.debug.internal.ui.actions.ManageFunctionBreakpointActionDelegate,
        handler=ActionDelegateHandlerProxy(null,org.eclipse.cdt.debug.internal.ui.actions.ManageFunctionBreakpointActionDelegate),
        expression=WorkbenchWindowExpression(org.eclipse.ui.internal.WorkbenchWindow@1041876),sourcePriority=16384)
HandlerActivation(commandId=AUTOGEN:::org.eclipse.cdt.debug.ui.FunctionBreakpointActions/org.eclipse.cdt.debug.internal.ui.actions.ManageFunctionBreakpointActionDelegate,
        handler=ActionDelegateHandlerProxy(null,org.eclipse.cdt.debug.internal.ui.actions.ManageFunctionBreakpointActionDelegate),
        expression=WorkbenchWindowExpression(org.eclipse.ui.internal.WorkbenchWindow@1041876),sourcePriority=16384)
!SUBENTRY 1 org.eclipse.ui.workbench 2 0 2010-07-26 15:08:00.103
!MESSAGE Conflict for 'AUTOGEN:::com.st.cosimcockpit.contribution1/com.st.cosimcockpit.newAction':
HandlerActivation(commandId=AUTOGEN:::com.st.cosimcockpit.contribution1/com.st.cosimcockpit.newAction,
        handler=ActionDelegateHandlerProxy(null,com.st.cosimcockpit.popup.actions.Netlist),
        expression=WorkbenchWindowExpression(org.eclipse.ui.internal.WorkbenchWindow@1041876),sourcePriority=16384)
HandlerActivation(commandId=AUTOGEN:::com.st.cosimcockpit.contribution1/com.st.cosimcockpit.newAction,
        handler=ActionDelegateHandlerProxy(null,com.st.cosimcockpit.popup.actions.SpiritCheck),
        expression=WorkbenchWindowExpression(org.eclipse.ui.internal.WorkbenchWindow@1041876),sourcePriority=16384)
Application Started: 5973
Exception in thread "WorkbenchTestable" java.lang.NoClassDefFoundError: junit/framework/TestListener
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
        at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:165)
        at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:554)
        at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:524)
        at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:455)
        at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:443)
        at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:423)
        at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:193)
        at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:370)
        at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:446)
        at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:399)
        at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:387)
        at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:87)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
        at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:165)
        at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:554)
        at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:524)
        at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:455)
        at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:443)
        at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:423)
        at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:193)
        at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:370)
        at org.eclipse.osgi.framework.internal.core.SingleSourcePackage.loadClass(SingleSourcePackage.java:33)
        at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:434)
        at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:399)
        at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:387)
        at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:87)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        at org.eclipse.swtbot.eclipse.junit4.headless.EclipseTestRunner.createFormatter(EclipseTestRunner.java:455)
        at org.eclipse.swtbot.eclipse.junit4.headless.EclipseTestRunner.createAndStoreFormatter(EclipseTestRunner.java:437)
        at org.eclipse.swtbot.eclipse.junit4.headless.EclipseTestRunner.run(EclipseTestRunner.java:179)
        at org.eclipse.swtbot.eclipse.junit4.headless.UITestApplication.runTests(UITestApplication.java:115)
        at org.eclipse.ui.internal.testing.WorkbenchTestable$1.run(Unknown Source)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassNotFoundException: junit.framework.TestListener
        at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:483)
        at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:399)
        at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:387)
        at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:87)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
        ... 38 more



I think that the problem comes from
formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,/prj/spg_sand/haddadm/local/vsctd/bin/plugins/com.st.testcosimcockpit.alltests.TestNewFlow.xml formatter=org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter

because when i run the command without formatter every thing is ok but i dont find the result of tests

I work whith eclipse Version: 3.4.2 and Junit 4

Thank You in advance
Re: java.lang.NoClassDefFoundError: junit/framework/TestListener [message #549396 is a reply to message #549321] Mon, 26 July 2010 14:49 Go to previous messageGo to next message
Ketan Padegaonkar is currently offline Ketan PadegaonkarFriend
Messages: 873
Registered: July 2009
Senior Member
Hi,

It appears that some dependencies are not met. Can you verify that you
have all the following dependencies required to run SWTBot in headless
mode as described here:

http://wiki.eclipse.org/SWTBot/Ant#Pre-requisites

Also this error is at times caused because you have
org.eclipse.ant.optional fragment in your plugins directory. Make sure
that you do not have org.eclipse.swtbot.ant.optional.junit3 or
org.eclipse.swtbot.eclipse.junit3.headless in your plugins dir.

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

On 7/26/10 6:14 AM, Marou wrote:
> Hi,
>
> I start working with Swtbot and all my tests work on eclipse.
> When i want to run my testsuite in command line
> /prj/spg_sand/haddadm/local/vsctd/bin/vsocstudio -data
> /prj/spg_sand/haddadm/local/vsctd/bin/result
> formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJU nitResultFormatter,/prj/spg_sand/haddadm/local/vsctd/bin/plu gins/com.st.testcosimcockpit.alltests.TestNewFlow.xml
> formatter=org.apache.tools.ant.taskdefs.optional.junit.Plain JUnitResultFormatter
> -application
> org.eclipse.swtbot.eclipse.junit4.headless.swtbottestapplica tion
> -Dtest.eclipse.dir=`/prj/spg_sand/haddadm/local/vsctd/bin/vs ocstudio`
> -testPluginName com.st.testcosimcockpit -className
> com.st.testcosimcockpit.alltests.TestNewFlow -debug -consolelog
>
> i get this error
>
> Start VM: /sw/st_division/spg/ext_tools/jdk/Linux-i686/jdk1.6.0_17/bin /java
> -Xms256m
> -Xmx512m
> -XX:MaxPermSize=512m
> -Dsun.java2d.pmoffscreen=false
> -Dorg.osgi.framework.bootdelegation=*
> -Dosgi.configuration.cascaded=true
> -Dosgi.sharedConfiguration.area=/prj/spg_sand/haddadm/local/ vsctd/configuration
>
> -Dosgi.configuration.area=@user.home/.vsocstudio/dp_20100723 1230
> -jar
> /sw/st_division/spg/st_tools/STWorkbench/4.1.1/Linux-i686/pl ugins/org.eclipse.equinox.launcher_1.0.102.1.jar
>
> -os linux
> -ws gtk
> -arch x86
> -showsplash
> -launcher
> /sw/st_division/spg/st_tools/STWorkbench/4.1.1/Linux-i686/st workbench
> -name Stworkbench
> --launcher.library
> /sw/st_division/spg/st_tools/STWorkbench/4.1.1/Linux-i686/pl ugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.101.R34 x_v20080805/eclipse_1115.so
>
> -startup
> /sw/st_division/spg/st_tools/STWorkbench/4.1.1/Linux-i686/pl ugins/org.eclipse.equinox.launcher_1.0.102.1.jar
>
> -exitdata 668005
> -data /prj/spg_sand/haddadm/local/vsctd/bin/result
> formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJU nitResultFormatter,/prj/spg_sand/haddadm/local/vsctd/bin/plu gins/com.st.testcosimcockpit.alltests.TestNewFlow.xml
> formatter=org.apache.tools.ant.taskdefs.optional.junit.Plain JUnitResultFormatter
>
> -application
> org.eclipse.swtbot.eclipse.junit4.headless.swtbottestapplica tion
> -Dtest.eclipse.dir=
> -testPluginName com.st.testcosimcockpit
> -className com.st.testcosimcockpit.alltests.TestNewFlow
> -debug
> -consolelog
> -vm /sw/st_division/spg/ext_tools/jdk/Linux-i686/jdk1.6.0_17/bin /java
> -vmargs
> -Xms256m
> -Xmx512m
> -XX:MaxPermSize=512m
> -Dsun.java2d.pmoffscreen=false
> -Dorg.osgi.framework.bootdelegation=*
> -Dosgi.configuration.cascaded=true
> -Dosgi.sharedConfiguration.area=/prj/spg_sand/haddadm/local/ vsctd/configuration
>
> -Dosgi.configuration.area=@user.home/.vsocstudio/dp_20100723 1230
> -jar
> /sw/st_division/spg/st_tools/STWorkbench/4.1.1/Linux-i686/pl ugins/org.eclipse.equinox.launcher_1.0.102.1.jar
> Configuration location:
> file:/home/haddadm/.vsocstudio/dp_201007231230/
> Configuration file:
> file:/home/haddadm/.vsocstudio/dp_201007231230/config.ini loaded
> Configuration file:
> file:/prj/spg_sand/haddadm/local/vsctd/configuration/config. ini loaded
> Shared configuration location:
> file:/prj/spg_sand/haddadm/local/vsctd/configuration/
> Install location:
> file:/sw/st_division/spg/st_tools/STWorkbench/4.1.1/Linux-i6 86/
> Framework located:
> file:/sw/st_division/spg/st_tools/STWorkbench/4.1.1/Linux-i6 86/plugins/org.eclipse.osgi_3.4.3.R34x_v20081215-1030.jar
>
> Framework classpath:
> file:/sw/st_division/spg/st_tools/STWorkbench/4.1.1/Linux-i6 86/plugins/org.eclipse.osgi_3.4.3.R34x_v20081215-1030.jar
>
> Splash location:
> /sw/st_division/spg/st_tools/STWorkbench/4.1.1/Linux-i686/pl ugins/com.st.platform_4.1.1.0/splash.bmp
>
> Debug options:
> file:/prj/spg_sand/haddadm/.options not found
> Time to load bundles: 11
> Starting application: 1336
> !SESSION 2010-07-26 15:07:54.250
> -----------------------------------------------
> eclipse.buildId=unknown
> java.version=1.6.0_17
> java.vendor=Sun Microsystems Inc.
> BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
> Framework arguments:
> formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJU nitResultFormatter,/prj/spg_sand/haddadm/local/vsctd/bin/plu gins/com.st.testcosimcockpit.alltests.TestNewFlow.xml
> formatter=org.apache.tools.ant.taskdefs.optional.junit.Plain JUnitResultFormatter
> -application
> org.eclipse.swtbot.eclipse.junit4.headless.swtbottestapplica tion
> -Dtest.eclipse.dir= -testPluginName com.st.testcosimcockpit -className
> com.st.testcosimcockpit.alltests.TestNewFlow
> Command-line arguments: -os linux -ws gtk -arch x86 -data
> /prj/spg_sand/haddadm/local/vsctd/bin/result
> formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJU nitResultFormatter,/prj/spg_sand/haddadm/local/vsctd/bin/plu gins/com.st.testcosimcockpit.alltests.TestNewFlow.xml
> formatter=org.apache.tools.ant.taskdefs.optional.junit.Plain JUnitResultFormatter
> -application
> org.eclipse.swtbot.eclipse.junit4.headless.swtbottestapplica tion
> -Dtest.eclipse.dir= -testPluginName com.st.testcosimcockpit -className
> com.st.testcosimcockpit.alltests.TestNewFlow -debug -consolelog
>
> !ENTRY org.eclipse.ui.workbench 2 0 2010-07-26 15:08:00.103
> !MESSAGE A handler conflict occurred. This may disable some commands.
> !SUBENTRY 1 org.eclipse.ui.workbench 2 0 2010-07-26 15:08:00.103
> !MESSAGE Conflict for
> 'AUTOGEN:::org.eclipse.cdt.debug.ui.FunctionBreakpointAction s/org.eclipse.cdt.debug.internal.ui.actions.ManageFunctionBr eakpointActionDelegate':
>
> HandlerActivation(commandId=AUTOGEN:::org.eclipse.cdt.debug. ui.FunctionBreakpointActions/org.eclipse.cdt.debug.internal. ui.actions.ManageFunctionBreakpointActionDelegate,
>
> handler=ActionDelegateHandlerProxy(null,org.eclipse.cdt.debu g.internal.ui.actions.ManageFunctionBreakpointActionDelegate ),
>
> expression=WorkbenchWindowExpression(org.eclipse.ui.internal.WorkbenchWindow@1041876),sourcePriority=16384)
>
> HandlerActivation(commandId=AUTOGEN:::org.eclipse.cdt.debug. ui.FunctionBreakpointActions/org.eclipse.cdt.debug.internal. ui.actions.ManageFunctionBreakpointActionDelegate,
>
> handler=ActionDelegateHandlerProxy(null,org.eclipse.cdt.debu g.internal.ui.actions.ManageFunctionBreakpointActionDelegate ),
>
> expression=WorkbenchWindowExpression(org.eclipse.ui.internal.WorkbenchWindow@1041876),sourcePriority=16384)
>
> !SUBENTRY 1 org.eclipse.ui.workbench 2 0 2010-07-26 15:08:00.103
> !MESSAGE Conflict for
> 'AUTOGEN:::com.st.cosimcockpit.contribution1/com.st.cosimcoc kpit.newAction':
>
> HandlerActivation(commandId=AUTOGEN:::com.st.cosimcockpit.co ntribution1/com.st.cosimcockpit.newAction,
>
> handler=ActionDelegateHandlerProxy(null,com.st.cosimcockpit. popup.actions.Netlist),
>
> expression=WorkbenchWindowExpression(org.eclipse.ui.internal.WorkbenchWindow@1041876),sourcePriority=16384)
>
> HandlerActivation(commandId=AUTOGEN:::com.st.cosimcockpit.co ntribution1/com.st.cosimcockpit.newAction,
>
> handler=ActionDelegateHandlerProxy(null,com.st.cosimcockpit. popup.actions.SpiritCheck),
>
> expression=WorkbenchWindowExpression(org.eclipse.ui.internal.WorkbenchWindow@1041876),sourcePriority=16384)
>
> Application Started: 5973
> Exception in thread "WorkbenchTestable" java.lang.NoClassDefFoundError:
> junit/framework/TestListener
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.def ineClass(DefaultClassLoader.java:165)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineC lass(ClasspathManager.java:554)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findCla ssImpl(ClasspathManager.java:524)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClassImpl(ClasspathManager.java:455)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass_LockClassLoader(ClasspathManager.java:443)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:423)
>
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:193)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:370)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:446)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:399)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:387)
>
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:87)
>
> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316 )
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.def ineClass(DefaultClassLoader.java:165)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineC lass(ClasspathManager.java:554)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findCla ssImpl(ClasspathManager.java:524)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClassImpl(ClasspathManager.java:455)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass_LockClassLoader(ClasspathManager.java:443)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:423)
>
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:193)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:370)
>
> at
> org.eclipse.osgi.framework.internal.core.SingleSourcePackage .loadClass(SingleSourcePackage.java:33)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:434)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:399)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:387)
>
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:87)
>
> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
> at
> org.eclipse.swtbot.eclipse.junit4.headless.EclipseTestRunner .createFormatter(EclipseTestRunner.java:455)
>
> at
> org.eclipse.swtbot.eclipse.junit4.headless.EclipseTestRunner .createAndStoreFormatter(EclipseTestRunner.java:437)
>
> at
> org.eclipse.swtbot.eclipse.junit4.headless.EclipseTestRunner .run(EclipseTestRunner.java:179)
>
> at
> org.eclipse.swtbot.eclipse.junit4.headless.UITestApplication .runTests(UITestApplication.java:115)
>
> at org.eclipse.ui.internal.testing.WorkbenchTestable$1.run(Unkn own Source)
> at java.lang.Thread.run(Thread.java:619)
> Caused by: java.lang.ClassNotFoundException: junit.framework.TestListener
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:483)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:399)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:387)
>
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:87)
>
> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316 )
> ... 38 more
>
>
>
> I think that the problem comes from
> formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJU nitResultFormatter,/prj/spg_sand/haddadm/local/vsctd/bin/plu gins/com.st.testcosimcockpit.alltests.TestNewFlow.xml
> formatter=org.apache.tools.ant.taskdefs.optional.junit.Plain JUnitResultFormatter
>
> because when i run the command without formatter every thing is ok but i
> dont find the result of tests
>
> I work whith eclipse Version: 3.4.2 and Junit 4
>
> Thank You in advance
Re: java.lang.NoClassDefFoundError: junit/framework/TestListener [message #549498 is a reply to message #549321] Mon, 26 July 2010 21:08 Go to previous messageGo to next message
Marou is currently offline MarouFriend
Messages: 11
Registered: July 2010
Junior Member
Hi Ketan ,

Thank you for the answer,

Every thing is like http://wiki.eclipse.org/SWTBot/Ant#Pre-requisites
but i still have this Exception

when i run without formatter, the execution of swt classes is fine but without generating result of junit_test
 formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJU nitResultFormatter,/prj/spg_sand/haddadm/local/vsctd/bin/plu gins/com.st.testcosimcockpit.alltests.TestNewFlow.xml
 formatter=org.apache.tools.ant.taskdefs.optional.junit.Plain JUnitResultFormatter




Any other ideas?

[Updated on: Mon, 26 July 2010 21:09]

Report message to a moderator

Re: java.lang.NoClassDefFoundError: junit/framework/TestListener [message #549842 is a reply to message #549321] Wed, 28 July 2010 08:21 Go to previous messageGo to next message
Marou is currently offline MarouFriend
Messages: 11
Registered: July 2010
Junior Member
The problem comes from my environment and configuration of eclipse and SWTBot and my extension location.

Every thing is OK.

Thank you.
Re: java.lang.NoClassDefFoundError: junit/framework/TestListener [message #633303 is a reply to message #549842] Sat, 16 October 2010 06:59 Go to previous message
Ravi  is currently offline Ravi Friend
Messages: 7
Registered: October 2010
Junior Member
Hi

I am also facing the same problem. What configurations, settings etc you have changed to overcome this problem?

Thanks in Advance
Ravi
Previous Topic:Failed to start test application with "Application Error" message
Next Topic:formatter option does not allow test cases to run
Goto Forum:
  


Current Time: Mon Dec 22 06:22:58 GMT 2014

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

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