Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » problems with AbstractContentAssistProcessorTest
problems with AbstractContentAssistProcessorTest [message #876501] Thu, 24 May 2012 18:25 Go to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1812
Registered: July 2009
Location: Firenze, Italy
Senior Member
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


Re: problems with AbstractContentAssistProcessorTest [message #876504 is a reply to message #876501] Thu, 24 May 2012 18:30 Go to previous messageGo to next message
Dennis Huebner is currently offline Dennis HuebnerFriend
Messages: 257
Registered: July 2009
Senior Member

The full stack trace and used *.launch configuration file would help to investigate ... Rolling Eyes
What happen if you run the test in your IDE?



+Dennis Huebner

Get professional support from the Xtext committers at www.typefox.io
Re: problems with AbstractContentAssistProcessorTest [message #876507 is a reply to message #876504] Thu, 24 May 2012 18:35 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
shouldnt that be org.eclipse.xtext.junit4

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: problems with AbstractContentAssistProcessorTest [message #876543 is a reply to message #876501] Thu, 24 May 2012 20:19 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
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 #876759 is a reply to message #876507] Fri, 25 May 2012 08:45 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1812
Registered: July 2009
Location: Firenze, Italy
Senior Member
On 05/24/2012 08:35 PM, Christian Dietrich wrote:
> shouldnt that be org.eclipse.xtext.junit4
>
> ~Christian

I have org.eclipse.xtext.junit4 in the dependencies... or do you mean
something else?

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


Re: problems with AbstractContentAssistProcessorTest [message #876761 is a reply to message #876759] Fri, 25 May 2012 08:47 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
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


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: problems with AbstractContentAssistProcessorTest [message #876784 is a reply to message #876761] Fri, 25 May 2012 09:20 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1812
Registered: July 2009
Location: Firenze, Italy
Senior Member
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


Re: problems with AbstractContentAssistProcessorTest [message #876789 is a reply to message #876784] Fri, 25 May 2012 09:28 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

why dont you take org.eclipse.xtext.junit4.ui.AbstractContentAssistProcessorTest
from org.eclipse.xtext.junit4

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: problems with AbstractContentAssistProcessorTest [message #876797 is a reply to message #876543] Fri, 25 May 2012 09:41 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1812
Registered: July 2009
Location: Firenze, Italy
Senior Member
On 05/24/2012 10:19 PM, Sebastian Zarnekow wrote:
> Hi Lorenzo,
>
> please use this one:
> org.eclipse.xtext.junit4.ui.AbstractContentAssistProcessorTest
>
> Regards,
> Sebastian

The problem is that I don't see that plugin:

find . -name "*junit*"| grep xtext
../plugins/org.eclipse.xtext.junit_2.3.0.v201205081025.jar
../plugins/org.eclipse.xtext.junit4_2.3.0.v201205220958.jar
../plugins/org.eclipse.xtext.ui.junit_2.3.0.v201205220958.jar
../plugins/org.eclipse.xtext.junit4_2.3.0.v201205081025.jar
../plugins/org.eclipse.xtext.xbase.junit_2.3.0.v201205220958.jar
../plugins/org.eclipse.xtext.junit4.source_2.3.0.v201205220958.jar
../plugins/org.eclipse.xtext.xbase.junit.source_2.3.0.v201205220958.jar
../plugins/org.eclipse.xtext.junit.source_2.3.0.v201205220958.jar
../plugins/org.eclipse.xtext.junit_2.3.0.v201205220958.jar
../plugins/org.eclipse.xtext.xbase.junit_2.3.0.v201205081025.jar
../plugins/org.eclipse.xtext.ui.junit_2.3.0.v201205081025.jar
../plugins/org.eclipse.xtext.ui.junit.source_2.3.0.v201205220958.jar

--
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


Re: problems with AbstractContentAssistProcessorTest [message #876975 is a reply to message #876797] Fri, 25 May 2012 16:04 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Lorenzo,

the class is in org.eclipse.xtext.junit4 in the package
org.eclipse.xtext.junit4.ui

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 25.05.12 11:41, schrieb Lorenzo Bettini:
> On 05/24/2012 10:19 PM, Sebastian Zarnekow wrote:
>> Hi Lorenzo,
>>
>> please use this one:
>> org.eclipse.xtext.junit4.ui.AbstractContentAssistProcessorTest
>>
>> Regards,
>> Sebastian
>
> The problem is that I don't see that plugin:
>
> find . -name "*junit*"| grep xtext
> ../plugins/org.eclipse.xtext.junit_2.3.0.v201205081025.jar
> ../plugins/org.eclipse.xtext.junit4_2.3.0.v201205220958.jar
> ../plugins/org.eclipse.xtext.ui.junit_2.3.0.v201205220958.jar
> ../plugins/org.eclipse.xtext.junit4_2.3.0.v201205081025.jar
> ../plugins/org.eclipse.xtext.xbase.junit_2.3.0.v201205220958.jar
> ../plugins/org.eclipse.xtext.junit4.source_2.3.0.v201205220958.jar
> ../plugins/org.eclipse.xtext.xbase.junit.source_2.3.0.v201205220958.jar
> ../plugins/org.eclipse.xtext.junit.source_2.3.0.v201205220958.jar
> ../plugins/org.eclipse.xtext.junit_2.3.0.v201205220958.jar
> ../plugins/org.eclipse.xtext.xbase.junit_2.3.0.v201205081025.jar
> ../plugins/org.eclipse.xtext.ui.junit_2.3.0.v201205081025.jar
> ../plugins/org.eclipse.xtext.ui.junit.source_2.3.0.v201205220958.jar
>
Re: problems with AbstractContentAssistProcessorTest [message #877076 is a reply to message #876975] Fri, 25 May 2012 20:58 Go to previous message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1812
Registered: July 2009
Location: Firenze, Italy
Senior Member
On 05/25/2012 06:04 PM, Sebastian Zarnekow wrote:
> Lorenzo,
>
> the class is in org.eclipse.xtext.junit4 in the package
> org.eclipse.xtext.junit4.ui
>
> Regards,
> Sebastian

Oh I see! the plugins for xtext.junit and xtext.junit.ui have been
unified that's why I couldn't find that class :)

by the way, I get discouraged access warnings on
AbstractContentAssistProcessorTest ... that did not happen with the
junit3 version...

thanks again
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


Previous Topic:Case sensitivity control
Next Topic:how to enable backtracking
Goto Forum:
  


Current Time: Thu Apr 18 18:17:28 GMT 2024

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

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

Back to the top