Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Error resolving cross references on resource
Error resolving cross references on resource [message #1060272] Thu, 23 May 2013 18:57 Go to next message
Phil H is currently offline Phil HFriend
Messages: 267
Registered: November 2012
Senior Member
Hello,

I integrated an Xtext in a GMF editor and unfortunately get the following error when I save my diagram:

1397 [Worker-0] ERROR org.eclipse.xtext.builder.clustering.ClusteringBuilderState  - Error resolving cross references on resource 'platform:/resource/hg/default.pld'
java.lang.NullPointerException
	at org.eclipse.xtext.builder.builderState.BuilderStateUtil.create(BuilderStateUtil.java:33)
	at org.eclipse.xtext.builder.clustering.ClusteringBuilderState.doUpdate(ClusteringBuilderState.java:212)
	at org.eclipse.xtext.builder.builderState.AbstractBuilderState.update(AbstractBuilderState.java:104)
	at org.eclipse.xtext.builder.impl.XtextBuilder.doBuild(XtextBuilder.java:168)
	at org.eclipse.xtext.builder.impl.XtextBuilder.incrementalBuild(XtextBuilder.java:146)
	at org.eclipse.xtext.builder.impl.XtextBuilder.build(XtextBuilder.java:95)
	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
	at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
	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:54)


What is causing this?
Re: Error resolving cross references on resource [message #1061981 is a reply to message #1060272] Wed, 05 June 2013 08:53 Go to previous messageGo to next message
Phil H is currently offline Phil HFriend
Messages: 267
Registered: November 2012
Senior Member
Or is there a way that this message isn't shown anymore?
Re: Error resolving cross references on resource [message #1065965 is a reply to message #1060272] Fri, 28 June 2013 13:53 Go to previous message
Phil H is currently offline Phil HFriend
Messages: 267
Registered: November 2012
Senior Member
I found this (http://git.eclipse.org/c/tmf/org.eclipse.xtext.git/plain/plugins/org.eclipse.xtext.builder/src/org/eclipse/xtext/builder/clustering/ClusteringBuilderState.java), but I'm not sure what it mean or where the exception happens:

if (manager != null) {
                            // Resolve links here!
                        	try {
	                            EcoreUtil2.resolveLazyCrossReferences(resource, cancelMonitor);
	                            final IResourceDescription description = manager.getResourceDescription(resource);
	                            final IResourceDescription copiedDescription = BuilderStateUtil.create(description);
	                            newDelta = manager.createDelta(this.getResourceDescription(actualResourceURI), copiedDescription);
                        	} catch (OperationCanceledException e) {
                        		loadOperation.cancel();
                        		throw e;
                        	} catch (WrappedException e) {
                        		throw e;
                        	} catch (RuntimeException e) {
                        		LOGGER.error("Error resolving cross references on resource '"+actualResourceURI+"'", e);
                        		throw new LoadOperationException(actualResourceURI, e);
                        	}
                        }


Does it mean that there is a problem with my ResourceDescriptionManager class?

public class PldResourceDescriptionManager extends
		DefaultResourceDescriptionManager {

	@Inject
	private Injector injector;

	public IResourceDescription getResourceDescription(Resource resource) {
		PldResourceDescription resourceDescription = new PldResourceDescription(
				resource);
		injector.injectMembers(resourceDescription);
		return resourceDescription;
	}

}

[Updated on: Fri, 28 June 2013 14:28]

Report message to a moderator

Previous Topic:Error - listening to document change/editor change
Next Topic:Resource 'xxx' does not exist
Goto Forum:
  


Current Time: Thu Dec 18 13:35:35 GMT 2014

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

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