Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Can't find CompilationTestHelper
Can't find CompilationTestHelper [message #997231] Fri, 04 January 2013 14:31 Go to next message
Tommaso De Sica is currently offline Tommaso De SicaFriend
Messages: 131
Registered: March 2012
Location: Italy
Senior Member

I can't find definition of CompilationTestHelper; I thought it was in the package org.eclipse.xtext.xbase.compiler, but it was wrong.
Re: Can't find CompilationTestHelper [message #997241 is a reply to message #997231] Fri, 04 January 2013 15:50 Go to previous messageGo to next message
Tommaso De Sica is currently offline Tommaso De SicaFriend
Messages: 131
Registered: March 2012
Location: Italy
Senior Member

Solved with bundle org.eclipse.xtext.xbase.junit

Thanks to Lorenzo Bettini Wink
Re: Can't find CompilationTestHelper [message #997244 is a reply to message #997241] Fri, 04 January 2013 16:31 Go to previous messageGo to next message
Tommaso De Sica is currently offline Tommaso De SicaFriend
Messages: 131
Registered: March 2012
Location: Italy
Senior Member

On the same argument:
why when I try to inject @Inject extension CompilationTestHelper I receive:
com.google.inject.internal.util.$ComputationException: com.google.inject.internal.util.$ComputationException: com.google.inject.internal.util.$ComputationException: java.lang.NoClassDefFoundError: org/eclipse/jdt/internal/compiler/batch/Main
	at com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:553)
	at com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:419)
	at com.google.inject.internal.util.$CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
	at com.google.inject.internal.FailableCache.get(FailableCache.java:50)
	at com.google.inject.internal.MembersInjectorStore.get(MembersInjectorStore.java:65)
	at com.google.inject.internal.InjectorImpl.getMembersInjector(InjectorImpl.java:950)
	at com.google.inject.internal.InjectorImpl.getMembersInjector(InjectorImpl.java:957)
	at com.google.inject.internal.InjectorImpl.injectMembers(InjectorImpl.java:943)
	at org.eclipse.xtext.junit4.XtextRunner.createTest(XtextRunner.java:39)
	at org.junit.runners.BlockJUnit4ClassRunner$1.runReflectiveCall(BlockJUnit4ClassRunner.java:236)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.java:233)
	at org.eclipse.xtext.junit4.XtextRunner.methodBlock(XtextRunner.java:50)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: com.google.inject.internal.util.$ComputationException: com.google.inject.internal.util.$ComputationException: java.lang.NoClassDefFoundError: org/eclipse/jdt/internal/compiler/batch/Main
	at com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:553)
	at com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:419)
	at com.google.inject.internal.util.$CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
	at com.google.inject.internal.FailableCache.get(FailableCache.java:50)
	at com.google.inject.internal.ConstructorInjectorStore.get(ConstructorInjectorStore.java:49)
	at com.google.inject.internal.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:125)
	at com.google.inject.internal.InjectorImpl.initializeJitBinding(InjectorImpl.java:521)
	at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:847)
	at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:772)
	at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:256)
	at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:205)
	at com.google.inject.internal.InjectorImpl.getInternalFactory(InjectorImpl.java:853)
	at com.google.inject.internal.SingleFieldInjector.<init>(SingleFieldInjector.java:41)
	at com.google.inject.internal.MembersInjectorStore.getInjectors(MembersInjectorStore.java:125)
	at com.google.inject.internal.MembersInjectorStore.createWithListeners(MembersInjectorStore.java:95)
	at com.google.inject.internal.MembersInjectorStore.access$000(MembersInjectorStore.java:34)
	at com.google.inject.internal.MembersInjectorStore$1.create(MembersInjectorStore.java:42)
	at com.google.inject.internal.MembersInjectorStore$1.create(MembersInjectorStore.java:39)
	at com.google.inject.internal.FailableCache$1.apply(FailableCache.java:39)
	at com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:549)
	... 26 more
Caused by: com.google.inject.internal.util.$ComputationException: java.lang.NoClassDefFoundError: org/eclipse/jdt/internal/compiler/batch/Main
	at com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:553)
	at com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:419)
	at com.google.inject.internal.util.$CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
	at com.google.inject.internal.FailableCache.get(FailableCache.java:50)
	at com.google.inject.internal.MembersInjectorStore.get(MembersInjectorStore.java:65)
	at com.google.inject.internal.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:73)
	at com.google.inject.internal.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:28)
	at com.google.inject.internal.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:36)
	at com.google.inject.internal.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:32)
	at com.google.inject.internal.FailableCache$1.apply(FailableCache.java:39)
	at com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:549)
	... 45 more
Caused by: java.lang.NoClassDefFoundError: org/eclipse/jdt/internal/compiler/batch/Main
	at java.lang.Class.getDeclaredConstructors0(Native Method)
	at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
	at java.lang.Class.getDeclaredConstructors(Unknown Source)
	at com.google.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.java:243)
	at com.google.inject.internal.ConstructorBindingImpl.create(ConstructorBindingImpl.java:96)
	at com.google.inject.internal.InjectorImpl.createUninitializedBinding(InjectorImpl.java:629)
	at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:845)
	at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:772)
	at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:256)
	at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:205)
	at com.google.inject.internal.InjectorImpl.getInternalFactory(InjectorImpl.java:853)
	at com.google.inject.internal.SingleFieldInjector.<init>(SingleFieldInjector.java:41)
	at com.google.inject.internal.MembersInjectorStore.getInjectors(MembersInjectorStore.java:125)
	at com.google.inject.internal.MembersInjectorStore.createWithListeners(MembersInjectorStore.java:95)
	at com.google.inject.internal.MembersInjectorStore.access$000(MembersInjectorStore.java:34)
	at com.google.inject.internal.MembersInjectorStore$1.create(MembersInjectorStore.java:42)
	at com.google.inject.internal.MembersInjectorStore$1.create(MembersInjectorStore.java:39)
	at com.google.inject.internal.FailableCache$1.apply(FailableCache.java:39)
	at com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:549)
	... 55 more
Caused by: java.lang.ClassNotFoundException: org.eclipse.jdt.internal.compiler.batch.Main
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	... 74 more

Re: Can't find CompilationTestHelper [message #997271 is a reply to message #997244] Fri, 04 January 2013 21:06 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Looks like you are missing some jdt deps

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Can't find CompilationTestHelper [message #997611 is a reply to message #997231] Fri, 04 January 2013 14:59 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 01/04/2013 03:31 PM, Tommaso De Sica wrote:
> I can't find definition of CompilationTestHelper; I thought it was in
> the package org.eclipse.xtext.xbase.compiler, but it was wrong.

the package is correct, but it is in the bundle

org.eclipse.xtext.xbase.junit

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: Can't find CompilationTestHelper [message #1229245 is a reply to message #997271] Thu, 09 January 2014 02:12 Go to previous messageGo to next message
Mark Elston is currently offline Mark ElstonFriend
Messages: 6
Registered: January 2014
Junior Member
I know this was a while ago, but where do we get the org.eclipse.xtext.xbase.junit bundle? I have been trying to get the examples from Lorenzo's book to work and I can't get the compile tests to compile because I also see this problem.

Mark
Re: Can't find CompilationTestHelper [message #1229473 is a reply to message #1229245] Thu, 09 January 2014 14:13 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

it should be still part of the xtext update site isnt it?


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Can't find CompilationTestHelper [message #1229592 is a reply to message #1229473] Thu, 09 January 2014 19:39 Go to previous messageGo to next message
Mark Elston is currently offline Mark ElstonFriend
Messages: 6
Registered: January 2014
Junior Member
Quote:
Hi,

it should be still part of the xtext update site isnt it?


If it is I can't find it. I tried importing org.eclipse.xtext.xbase.compiler.CompilationTestHelper and get compilation errors. I tried adding a reference via the Build Path configuration dialog and can't find it. I tried the Kepler update site and the Xtext All In One - Releases update site and can't find it listed separately and I already have all of Xtend-2.5.0, Xtext-2.5.0, EMF Xcore, and EMFT MWE-2.5.0 installed.

What else do I need to install to get the org.eclipse.xtext.xbase.junit bundle installed?

Mark
Re: Can't find CompilationTestHelper [message #1229594 is a reply to message #1229592] Thu, 09 January 2014 19:42 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Strange,

are you sure you added the bundle to the required bundles in the manifest.mf???
can you please try the xtext distro.


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Can't find CompilationTestHelper [message #1229620 is a reply to message #1229594] Thu, 09 January 2014 20:59 Go to previous messageGo to next message
Mark Elston is currently offline Mark ElstonFriend
Messages: 6
Registered: January 2014
Junior Member
Quote:
Strange,

are you sure you added the bundle to the required bundles in the manifest.mf???
can you please try the xtext distro.


Ah, that was it. I was trying to add it to the build path instead of modifying the manifest. I have found that working with Eclipse can often involve arcane manipulations that I still don't completely understand. This was one of them. I haven't developed plugins before so I don't really fully grasp the contents of the manifest yet (most of my Eclipse experience is with Android development). I guess I still have a *lot* of reading to do...

Thanks for the help.

Mark
Re: Can't find CompilationTestHelper [message #1229662 is a reply to message #1229245] Thu, 09 January 2014 23:49 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 09/01/2014 15:05, Mark Elston wrote:
> I know this was a while ago, but where do we get the
> org.eclipse.xtext.xbase.junit bundle? I have been trying to get the
> examples from Lorenzo's book to work and I can't get the compile tests
> to compile because I also see this problem.
>
> Mark

Hi Mark

please have a look at the sources of the examples, for instance,
https://github.com/LorenzoBettini/packtpub-xtext-book-examples/blob/master/org.example.expressions.tests/META-INF/MANIFEST.MF


you need to add the dependency org.eclipse.xtext.xbase.junit as a
required bundle in the MANIFEST.MF

hope this helps
cheers
Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book


Re: Can't find CompilationTestHelper [message #1694029 is a reply to message #1229662] Thu, 30 April 2015 07:51 Go to previous messageGo to next message
Rodolfo AP is currently offline Rodolfo APFriend
Messages: 7
Registered: April 2015
Junior Member
Just adding org.eclipse.jdt.core (and of course org.eclipse.xtext.xbase.junit) solved me the same very trouble...
Re: Can't find CompilationTestHelper [message #1715076 is a reply to message #1229662] Thu, 19 November 2015 01:25 Go to previous message
Larry LeBron is currently offline Larry LeBronFriend
Messages: 124
Registered: October 2015
Senior Member
Thanks, this was exactly what I was looking for!

Though, I should ask. The manifest line from the xtext book example code is:

org.eclipse.xtext.xbase.junit;bundle-version="2.3.1",

Is this still the best version to use?

How can I check this value to confirm that I'm using the most up-to-date bundles?

[Updated on: Thu, 19 November 2015 03:20]

Report message to a moderator

Previous Topic:Can't upgrade to 2.9 rc1 or rc2
Next Topic:Synthetic line numbers for ValidationTestHelper errors
Goto Forum:
  


Current Time: Sat Apr 20 01:10:05 GMT 2024

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

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

Back to the top