Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » XtextResourceSetProvider problems in junit(XtextResourceSetProvider problems in junit)
icon5.gif  XtextResourceSetProvider problems in junit [message #1265748] Thu, 06 March 2014 14:00 Go to next message
Arshad Adavani is currently offline Arshad AdavaniFriend
Messages: 163
Registered: July 2013
Location: Bangalore
Senior Member
Hi all,
I have injected XtextResourceSetProvider in my project.

Something like:
@Inject
	private XtextResourceSetProvider provider;


I am using this to get the resourceset. When I run my application it gives me the right result.

But when I call a method in this class in my junit it gives me an exception,
something like:

com.google.inject.ConfigurationException: Guice configuration errors:

1) No implementation for org.eclipse.xtext.ui.resource.IStorage2UriMapperJdtExtensions was bound.
  while locating org.eclipse.xtext.ui.resource.IStorage2UriMapperJdtExtensions
    for field at org.eclipse.xtext.ui.resource.XtextResourceSetProvider.storage2UriMapper(Unknown Source)
  while locating org.eclipse.xtext.ui.resource.XtextResourceSetProvider
    for field at com.bosch.tt.dsl.signal.ui.actions.AbstractImportAction.provider(Unknown Source)
  while locating com.bosch.tt.dsl.signal.ui.actions.SRSImportAction

1 error
	at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:1004)
	at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:961)
	at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1013)
	at com.bosch.tt.dsl.signal.ui.actions.SRSImportActionTest.test(SRSImportActionTest.java:48)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at com.bosch.tt.signal.tool.commons.test.XtextRunner3$1.evaluate(XtextRunner3.java:72)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
	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)


Any suggestions?


Arshad
Re: XtextResourceSetProvider problems in junit [message #1265886 is a reply to message #1265748] Thu, 06 March 2014 17:45 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13640
Registered: July 2009
Senior Member
Hi,

which injector provider do you use? the normal or the ui one?


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Null-Pointer-Exception in EMFGeneratorFragment
Next Topic:How to dynamically create instance without "dangling reference"?
Goto Forum:
  


Current Time: Mon Oct 26 20:05:36 GMT 2020

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

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

Back to the top