Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtext auto builder problem(Random error after xtext update to 2.4.3)
Xtext auto builder problem [message #1132651] Fri, 11 October 2013 09:44 Go to next message
Jürgen Mutschall is currently offline Jürgen MutschallFriend
Messages: 6
Registered: October 2013
Junior Member
Hello,

after updating to kepler-sr1 and xtext 2.4.3 there is a random but reproducable error during the auto build of the xtext builder.

java.lang.IllegalStateException: Passed org.eclipse.xtext.builder.clustering.CurrentDescriptions is not based on a resource set
at org.eclipse.xtext.resource.containers.ResourceSetBasedAllContainersStateProvider.getResourceSet(ResourceSetBasedAllContainersStateProvider.java:43)
at org.eclipse.xtext.resource.containers.ResourceSetBasedAllContainersStateProvider.get(ResourceSetBasedAllContainersStateProvider.java:25)
at org.eclipse.xtext.resource.containers.StateBasedContainerManager.getState(StateBasedContainerManager.java:70)
at org.eclipse.xtext.resource.containers.StateBasedContainerManager.internalGetContainerHandle(StateBasedContainerManager.java:95)
at org.eclipse.xtext.resource.containers.StateBasedContainerManager.getVisibleContainers(StateBasedContainerManager.java:48)
at org.eclipse.xtext.resource.impl.DefaultResourceDescriptionManager.isAffected(DefaultResourceDescriptionManager.java:133)
at org.eclipse.xtext.builder.clustering.ClusteringBuilderState.queueAffectedResources(ClusteringBuilderState.java:466)
at org.eclipse.xtext.builder.clustering.ClusteringBuilderState.doUpdate(ClusteringBuilderState.java:280)
at org.eclipse.xtext.builder.builderState.AbstractBuilderState.update(AbstractBuilderState.java:111)
at org.eclipse.xtext.builder.impl.XtextBuilder.doBuild(XtextBuilder.java:184)
at org.eclipse.xtext.builder.impl.XtextBuilder.incrementalBuild(XtextBuilder.java:162)
at org.eclipse.xtext.builder.impl.XtextBuilder.build(XtextBuilder.java:95)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:733)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:299)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:302)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:358)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:381)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)


source code of the method, that throws the error:



/**
 * @since 2.4
 */
protected ResourceSet getResourceSet(IResourceDescriptions context) {
	if (context instanceof ResourceSetBasedResourceDescriptions) 
			return ((ResourceSetBasedResourceDescriptions) context).getResourceSet();
        else if (context instanceof EagerResourceSetBasedResourceDescriptions) 
			return ((EagerResourceSetBasedResourceDescriptions) context).getResourceSet();
		String contextType = context == null ? "null" : context.getClass().getName();
		throw new IllegalStateException("Passed " + contextType + " is not based on a resource set");
	}


IMHO the method should never be called with an instance of the internal class org.eclipse.xtext.builder.clustering.CurrentDescriptions or there has to be a third alternative in the if-statement to handle CurrentDescriptions.


Is this a known problem?

Before updating I have never seen the problem.

Thanks in advance.

Juergen



Re: Xtext auto builder problem [message #1149529 is a reply to message #1132651] Tue, 22 October 2013 06:21 Go to previous messageGo to next message
Sven Efftinge is currently offline Sven EfftingeFriend
Messages: 1823
Registered: July 2009
Senior Member
There should also no ResourceSetBasedAllContainerStateProvider being
bound in the UI context. You have to check your modules and find out why
such an instance is used in the IDE. That's definitely wrong.

Sven

Am 10/11/13 1:04 PM, schrieb Jürgen Mutschall:
> Hello,
>
> after updating to kepler-sr1 and xtext 2.4.3 there is a random but
> reproducable error during the auto build of the xtext builder.
>
> java.lang.IllegalStateException: Passed
> org.eclipse.xtext.builder.clustering.CurrentDescriptions is not based on
> a resource set
> at
> org.eclipse.xtext.resource.containers.ResourceSetBasedAllContainersStateProvider.getResourceSet(ResourceSetBasedAllContainersStateProvider.java:43)
>
> at
> org.eclipse.xtext.resource.containers.ResourceSetBasedAllContainersStateProvider.get(ResourceSetBasedAllContainersStateProvider.java:25)
>
> at
> org.eclipse.xtext.resource.containers.StateBasedContainerManager.getState(StateBasedContainerManager.java:70)
>
> at
> org.eclipse.xtext.resource.containers.StateBasedContainerManager.internalGetContainerHandle(StateBasedContainerManager.java:95)
>
> at
> org.eclipse.xtext.resource.containers.StateBasedContainerManager.getVisibleContainers(StateBasedContainerManager.java:48)
>
> at
> org.eclipse.xtext.resource.impl.DefaultResourceDescriptionManager.isAffected(DefaultResourceDescriptionManager.java:133)
>
> at
> org.eclipse.xtext.builder.clustering.ClusteringBuilderState.queueAffectedResources(ClusteringBuilderState.java:466)
>
> at
> org.eclipse.xtext.builder.clustering.ClusteringBuilderState.doUpdate(ClusteringBuilderState.java:280)
>
> at
> org.eclipse.xtext.builder.builderState.AbstractBuilderState.update(AbstractBuilderState.java:111)
>
> at
> org.eclipse.xtext.builder.impl.XtextBuilder.doBuild(XtextBuilder.java:184)
> at
> org.eclipse.xtext.builder.impl.XtextBuilder.incrementalBuild(XtextBuilder.java:162)
>
> at
> org.eclipse.xtext.builder.impl.XtextBuilder.build(XtextBuilder.java:95)
> at
> org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:733)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
> at
> org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
>
> at
> org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
>
> at
> org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:299)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
> at
> org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:302)
>
> at
> org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:358)
>
> at
> org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:381)
> at
> org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
>
> at
> org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
>
>
> source code of the method, that throws the error:
>
>
>
>
> /**
> * @since 2.4
> */
> protected ResourceSet getResourceSet(IResourceDescriptions context) {
> if (context instanceof ResourceSetBasedResourceDescriptions)
> return ((ResourceSetBasedResourceDescriptions)
> context).getResourceSet();
> else if (context instanceof
> EagerResourceSetBasedResourceDescriptions) return
> ((EagerResourceSetBasedResourceDescriptions) context).getResourceSet();
> String contextType = context == null ? "null" :
> context.getClass().getName();
> throw new IllegalStateException("Passed " + contextType + " is
> not based on a resource set");
> }
>
>
> IMHO the method should never be called with an instance of the internal
> class org.eclipse.xtext.builder.clustering.CurrentDescriptions or there
> has to be a third alternative in the if-statement to handle
> CurrentDescriptions.
>
>
> Is this a known problem?
>
> Before updating I have never seen the problem.
>
> Thanks in advance.
>
> Juergen
>
>
>
>


--
Need professional support for Xtext or other Eclipse Modeling technologies?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : http://blog.efftinge.de
Re: Xtext auto builder problem [message #1165715 is a reply to message #1149529] Fri, 01 November 2013 13:43 Go to previous messageGo to next message
Jürgen Mutschall is currently offline Jürgen MutschallFriend
Messages: 6
Registered: October 2013
Junior Member
The only bindings are in the generated functions in src-gen by the MWE BuilderIntegrationFragment. It is in the generated AbstractXYZRuntimeModule.java

I have a xtext builder participant which does not work without this.



	// contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
	public Class<? extends org.eclipse.xtext.resource.IContainer.Manager> bindIContainer$Manager() {
		return org.eclipse.xtext.resource.containers.StateBasedContainerManager.class;
	}

	// contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
	public Class<? extends org.eclipse.xtext.resource.containers.IAllContainersState.Provider> bindIAllContainersState$Provider() {
		return org.eclipse.xtext.resource.containers.ResourceSetBasedAllContainersStateProvider.class;
	}

	// contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
	public void configureIResourceDescriptions(com.google.inject.Binder binder) {
		binder.bind(org.eclipse.xtext.resource.IResourceDescriptions.class).to(org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions.class);
Re: Xtext auto builder problem [message #1165769 is a reply to message #1165715] Fri, 01 November 2013 14:29 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14075
Registered: July 2009
Senior Member
Hi,

the interesting part are the bindings in the ui module.


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
Re: Xtext auto builder problem [message #1171424 is a reply to message #1165769] Tue, 05 November 2013 08:11 Go to previous messageGo to next message
Jürgen Mutschall is currently offline Jürgen MutschallFriend
Messages: 6
Registered: October 2013
Junior Member
There are no bindings for

org.eclipse.xtext.resource.containers.IAllContainersState.Provider

in the ui module.


Neither the ui modules in the examples nor the IDE of Xtend bind the Provider explicitly to another provider.



Re: Xtext auto builder problem [message #1699937 is a reply to message #1171424] Mon, 29 June 2015 12:24 Go to previous messageGo to next message
Udo Walker is currently offline Udo WalkerFriend
Messages: 48
Registered: January 2013
Member
I have the same problem with an Xbase based language. Xtext version is 2.8.3
In the UI module I only added a label provider and an extension to the adapter factory. The rest is generated from Xtext.
Re: Xtext auto builder problem [message #1699938 is a reply to message #1699937] Mon, 29 June 2015 12:28 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14075
Registered: July 2009
Senior Member
after an upgrade? or in a new project? any customizations to workflow?

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
Re: Xtext auto builder problem [message #1699939 is a reply to message #1699937] Mon, 29 June 2015 12:28 Go to previous messageGo to next message
Udo Walker is currently offline Udo WalkerFriend
Messages: 48
Registered: January 2013
Member
My stack trace is:

22953 [Worker-8] ERROR org.eclipse.xtext.builder.impl.XtextBuilder - Passed org.eclipse.xtext.builder.clustering.CurrentDescriptions is not based on a resource set
java.lang.IllegalStateException: Passed org.eclipse.xtext.builder.clustering.CurrentDescriptions is not based on a resource set
at org.eclipse.xtext.resource.containers.ResourceSetBasedAllContainersStateProvider.getResourceSet(ResourceSetBasedAllContainersStateProvider.java:44)
at org.eclipse.xtext.resource.containers.ResourceSetBasedAllContainersStateProvider.get(ResourceSetBasedAllContainersStateProvider.java:26)
at org.eclipse.xtext.resource.containers.StateBasedContainerManager.getState(StateBasedContainerManager.java:72)
at org.eclipse.xtext.resource.containers.StateBasedContainerManager.internalGetContainerHandle(StateBasedContainerManager.java:97)
at org.eclipse.xtext.resource.containers.StateBasedContainerManager.getVisibleContainers(StateBasedContainerManager.java:50)
at org.eclipse.xtext.resource.impl.DefaultResourceDescriptionManager.isAffected(DefaultResourceDescriptionManager.java:138)
at org.eclipse.xtext.builder.clustering.ClusteringBuilderState.queueAffectedResources(ClusteringBuilderState.java:529)
at org.eclipse.xtext.builder.clustering.ClusteringBuilderState.doUpdate(ClusteringBuilderState.java:304)
at org.eclipse.xtext.builder.builderState.AbstractBuilderState.update(AbstractBuilderState.java:115)
at org.eclipse.xtext.builder.impl.XtextBuilder.doBuild(XtextBuilder.java:248)
at org.eclipse.xtext.builder.impl.XtextBuilder.incrementalBuild(XtextBuilder.java:228)
at org.eclipse.xtext.builder.impl.XtextBuilder.build(XtextBuilder.java:123)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:734)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:205)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:245)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:300)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:303)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:359)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:382)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:144)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:235)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Re: Xtext auto builder problem [message #1699942 is a reply to message #1699939] Mon, 29 June 2015 12:36 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14075
Registered: July 2009
Senior Member
Still the question: a new project or a upgraded 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:can I embed other editor in xtext editor?
Next Topic:Xtext parser/scoping understanding issue
Goto Forum:
  


Current Time: Wed Oct 20 21:21:04 GMT 2021

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

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

Back to the top