Home » Modeling » TMF (Xtext) » problems with AbstractContentAssistProcessorTest
problems with AbstractContentAssistProcessorTest [message #876501] |
Thu, 24 May 2012 18:25 |
|
Hi
I'm using the RC1 of Xtext 2.3.0.
I have a problem with a UI test which uses
AbstractContentAssistProcessorTest: when run (actually from Buckminster)
the test brutally terminates with a
Exception in thread "WorkbenchTestable" org.eclipse.swt.SWTException:
Failed to execute runnable (java.lang.NoClassDefFoundError:
junit/framework/TestCase)
at org.eclipse.swt.SWT.error(SWT.java:4282)
at org.eclipse.swt.SWT.error(SWT.java:4197)
at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:196)
at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
at org.eclipse.swt.widgets.Display.syncExec(Display.java:4330)
at
org.eclipse.ui.internal.testing.WorkbenchTestable.runTest(WorkbenchTestable.java:112)
at
org.eclipse.pde.internal.junit.runtime.PlatformUITestHarness.runTests(PlatformUITestHarness.java:69)
at
org.eclipse.ui.internal.testing.WorkbenchTestable$1.run(WorkbenchTestable.java:71)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NoClassDefFoundError: junit/framework/TestCase
though in my MANIFEST.MF I have
Require-Bundle: it.xsemantics.dsl,
it.xsemantics.dsl.ui,
org.eclipse.core.runtime,
org.eclipse.xtext;bundle-version="2.3.0",
org.eclipse.xtext.junit4;bundle-version="2.3.0",
org.eclipse.xtext.ui.junit;bundle-version="2.3.0",
org.junit4,
org.eclipse.ui.workbench;resolution:=optional,
it.xsemantics.example.fj;bundle-version="1.0.0",
org.eclipse.xtext.xbase.junit;bundle-version="2.2.0",
org.eclipse.jdt.core;bundle-version="3.7.1",
it.xsemantics.example.expressions.tests;bundle-version="1.0.0",
it.xsemantics.example.lambda.tests;bundle-version="1.0.0"
Import-Package: org.apache.commons.logging,
org.apache.log4j,
org.hamcrest.core,
org.junit;version="4.5.0",
org.junit.runner;version="4.5.0",
org.junit.runner.manipulation;version="4.5.0",
org.junit.runner.notification;version="4.5.0",
org.junit.runners;version="4.5.0",
org.junit.runners.model;version="4.5.0"
can there be some problems with org.junit packages?
I see that org.eclipse.xtext.ui.junit (where
AbstractContentAssistProcessorTest is from) depends on
org.eclipse.xtext.junit which depends on
org.junit;bundle-version="[3.0.0,4.0.0)"
while
org.junit4
depends on
org.junit;bundle-version="4.8.1";visibility:=reexport
can this raises a conflict which prevents from loading
junit.framework.TestCase?
thanks in advance
Lore
--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net
HOME: http://www.lorenzobettini.it
TDD Book: https://leanpub.com/tdd-buildautomation-ci
Xtext Book: https://www.packtpub.com/application-development/implementing-domain-specific-languages-xtext-and-xtend-second-edition
|
|
| | |
Re: problems with AbstractContentAssistProcessorTest [message #876543 is a reply to message #876501] |
Thu, 24 May 2012 20:19 |
Sebastian Zarnekow Messages: 3118 Registered: July 2009 |
Senior Member |
|
|
Hi Lorenzo,
please use this one:
org.eclipse.xtext.junit4.ui.AbstractContentAssistProcessorTest
Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Am 24.05.12 20:25, schrieb Lorenzo Bettini:
> Hi
>
> I'm using the RC1 of Xtext 2.3.0.
>
> I have a problem with a UI test which uses
> AbstractContentAssistProcessorTest: when run (actually from Buckminster)
> the test brutally terminates with a
>
> Exception in thread "WorkbenchTestable" org.eclipse.swt.SWTException:
> Failed to execute runnable (java.lang.NoClassDefFoundError:
> junit/framework/TestCase)
> at org.eclipse.swt.SWT.error(SWT.java:4282)
> at org.eclipse.swt.SWT.error(SWT.java:4197)
> at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:196)
> at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
> at org.eclipse.swt.widgets.Display.syncExec(Display.java:4330)
> at
> org.eclipse.ui.internal.testing.WorkbenchTestable.runTest(WorkbenchTestable.java:112)
>
> at
> org.eclipse.pde.internal.junit.runtime.PlatformUITestHarness.runTests(PlatformUITestHarness.java:69)
>
> at
> org.eclipse.ui.internal.testing.WorkbenchTestable$1.run(WorkbenchTestable.java:71)
>
> at java.lang.Thread.run(Thread.java:662)
> Caused by: java.lang.NoClassDefFoundError: junit/framework/TestCase
>
> though in my MANIFEST.MF I have
>
> Require-Bundle: it.xsemantics.dsl,
> it.xsemantics.dsl.ui,
> org.eclipse.core.runtime,
> org.eclipse.xtext;bundle-version="2.3.0",
> org.eclipse.xtext.junit4;bundle-version="2.3.0",
> org.eclipse.xtext.ui.junit;bundle-version="2.3.0",
> org.junit4,
> org.eclipse.ui.workbench;resolution:=optional,
> it.xsemantics.example.fj;bundle-version="1.0.0",
> org.eclipse.xtext.xbase.junit;bundle-version="2.2.0",
> org.eclipse.jdt.core;bundle-version="3.7.1",
> it.xsemantics.example.expressions.tests;bundle-version="1.0.0",
> it.xsemantics.example.lambda.tests;bundle-version="1.0.0"
> Import-Package: org.apache.commons.logging,
> org.apache.log4j,
> org.hamcrest.core,
> org.junit;version="4.5.0",
> org.junit.runner;version="4.5.0",
> org.junit.runner.manipulation;version="4.5.0",
> org.junit.runner.notification;version="4.5.0",
> org.junit.runners;version="4.5.0",
> org.junit.runners.model;version="4.5.0"
>
> can there be some problems with org.junit packages?
>
> I see that org.eclipse.xtext.ui.junit (where
> AbstractContentAssistProcessorTest is from) depends on
> org.eclipse.xtext.junit which depends on
>
> org.junit;bundle-version="[3.0.0,4.0.0)"
>
> while
>
> org.junit4
>
> depends on
>
> org.junit;bundle-version="4.8.1";visibility:=reexport
>
> can this raises a conflict which prevents from loading
> junit.framework.TestCase?
>
> thanks in advance
> Lore
>
|
|
| | |
Re: problems with AbstractContentAssistProcessorTest [message #876784 is a reply to message #876761] |
Fri, 25 May 2012 09:20 |
|
On 05/25/2012 10:47 AM, Christian Dietrich wrote:
> Hi,
>
> you said "org.eclipse.xtext.junit which depends on junit 3" and this is
> correct since org.eclipse.xtext.junit4 is the bundle for junit 4
> => you should not use org.eclipse.xtext.junit at all if you want to use
> junit 4.
>
> ~Christian
Well I said something slightly different ;)
Yes, I use org.eclipse.xtext.junit4, but I also need (note the UI)
org.eclipse.xtext.ui.junit (where AbstractContentAssistProcessorTest is
from) which depends on org.eclipse.xtext.junit which depends on
org.junit;bundle-version="[3.0.0,4.0.0)"
while org.eclipse.xtext.junit4 depends on
org.junit4
which depends on
org.junit;bundle-version="4.8.1";visibility:=reexport
can this raises a conflict which prevents from loading
junit.framework.TestCase?
so if I use org.eclipse.xtext.junit4 I cannot use
org.eclipse.xtext.ui.junit at all?
cheers
Lorenzo
--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net
HOME: http://www.lorenzobettini.it
TDD Book: https://leanpub.com/tdd-buildautomation-ci
Xtext Book: https://www.packtpub.com/application-development/implementing-domain-specific-languages-xtext-and-xtend-second-edition
|
|
| | | | |
Goto Forum:
Current Time: Wed Sep 25 01:20:42 GMT 2024
Powered by FUDForum. Page generated in 0.06294 seconds
|