viatra / EMF-IncQuery

This repository is only kept for historic reasons. All development happens on eclipse.org
http://eclipse.org/viatra
13 stars 4 forks source link

Eiqgen-related exception: seemingly missing language genmodel #275

Closed bergmanngabor closed 11 years ago

bergmanngabor commented 12 years ago

What is this? Should I worry about it? (I hasn't posed any problems so far.) How do I get rid of it?

Is a missing src-gen path segment the problem?

P.S. EMFPatternLanguage.genmodel is, of course, right where it should be.

!ENTRY org.eclipse.viatra2.patternlanguage.emf.ui 4 0 2012-08-22 15:42:23.003
!MESSAGE Error while retrieving genmodel of EPackage http://www.eclipse.org/viatra2/patternlanguage/EMFPatternLanguage from location: platform:/plugin/org.eclipse.viatra2.patternlanguage.emf/org/eclipse/viatra2/patternlanguage/EMFPatternLanguage.genmodel

!STACK 0
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: java.io.FileNotFoundException: /org/eclipse/viatra2/patternlanguage/EMFPatternLanguage.genmodel
    at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDemandLoadException(ResourceSetImpl.java:315)
    at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
    at org.eclipse.xtext.resource.XtextResourceSet.getResource(XtextResourceSet.java:159)
    at org.eclipse.viatra2.patternlanguage.EcoreGenmodelRegistry.loadGenPackage(EcoreGenmodelRegistry.java:83)
    at org.eclipse.viatra2.patternlanguage.EcoreGenmodelRegistry.findGenPackage(EcoreGenmodelRegistry.java:68)
    at org.eclipse.viatra2.emf.incquery.tooling.generator.genmodel.GenModelMetamodelProviderService.findGenPackage(GenModelMetamodelProviderService.java:275)
    at org.eclipse.viatra2.emf.incquery.tooling.generator.genmodel.GenModelMetamodelProviderService.findGenPackage(GenModelMetamodelProviderService.java:230)
    at org.eclipse.viatra2.emf.incquery.tooling.generator.genmodel.GenModelMetamodelProviderService.findGenPackage(GenModelMetamodelProviderService.java:224)
    at org.eclipse.viatra2.patternlanguage.ui.validation.GenmodelBasedEMFPatternLanguageJavaValidator.checkImportDependency(GenmodelBasedEMFPatternLanguageJavaValidator.java:49)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.xtext.validation.AbstractDeclarativeValidator$MethodWrapper.invoke(AbstractDeclarativeValidator.java:109)
    at org.eclipse.xtext.validation.AbstractDeclarativeValidator.internalValidate(AbstractDeclarativeValidator.java:291)
    at org.eclipse.xtext.validation.AbstractInjectableValidator.validate(AbstractInjectableValidator.java:62)
    at org.eclipse.xtext.validation.CompositeEValidator.validate(CompositeEValidator.java:126)
    at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:165)
    at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:143)
    at org.eclipse.xtext.validation.CancelableDiagnostician.validate(CancelableDiagnostician.java:36)
    at org.eclipse.emf.ecore.util.Diagnostician.doValidateContents(Diagnostician.java:184)
    at org.eclipse.xtext.validation.CancelableDiagnostician.doValidateContents(CancelableDiagnostician.java:48)
    at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:168)
    at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:143)
    at org.eclipse.xtext.validation.CancelableDiagnostician.validate(CancelableDiagnostician.java:36)
    at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:126)
    at org.eclipse.xtext.validation.ResourceValidatorImpl.validate(ResourceValidatorImpl.java:108)
    at org.eclipse.xtext.ui.validation.DefaultResourceUIValidatorExtension.addMarkers(DefaultResourceUIValidatorExtension.java:60)
    at org.eclipse.xtext.ui.validation.DefaultResourceUIValidatorExtension.updateValidationMarkers(DefaultResourceUIValidatorExtension.java:45)
    at org.eclipse.xtext.builder.builderState.MarkerUpdaterImpl.processDelta(MarkerUpdaterImpl.java:72)
    at org.eclipse.xtext.builder.builderState.MarkerUpdaterImpl.updateMarkers(MarkerUpdaterImpl.java:57)
    at org.eclipse.xtext.builder.builderState.AbstractBuilderState.updateMarkers(AbstractBuilderState.java:74)
    at org.eclipse.xtext.builder.clustering.ClusteringBuilderState.doUpdate(ClusteringBuilderState.java:249)
    at org.eclipse.xtext.builder.builderState.AbstractBuilderState.update(AbstractBuilderState.java:105)
    at org.eclipse.xtext.builder.impl.XtextBuilder.doBuild(XtextBuilder.java:159)
    at org.eclipse.xtext.builder.impl.XtextBuilder.fullBuild(XtextBuilder.java:188)
    at org.eclipse.xtext.builder.impl.XtextBuilder.build(XtextBuilder.java:85)
    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:321)
    at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:396)
    at org.eclipse.core.internal.resources.Project$1.run(Project.java:618)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
    at org.eclipse.core.internal.resources.Project.internalBuild(Project.java:597)
    at org.eclipse.core.internal.resources.Project.build(Project.java:124)
    at org.eclipse.xtext.builder.impl.BuildScheduler$BuildJob.run(BuildScheduler.java:163)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.io.FileNotFoundException: /org/eclipse/viatra2/patternlanguage/EMFPatternLanguage.genmodel
    at org.eclipse.osgi.framework.internal.protocol.bundleentry.Handler.findBundleEntry(Handler.java:44)
    at org.eclipse.osgi.framework.internal.core.BundleResourceHandler.openConnection(BundleResourceHandler.java:175)
    at java.net.URL.openConnection(Unknown Source)
    at org.eclipse.core.internal.boot.PlatformURLConnection.connect(PlatformURLConnection.java:110)
    at org.eclipse.core.internal.boot.PlatformURLConnection.connect(PlatformURLConnection.java:91)
    at org.eclipse.core.internal.boot.PlatformURLConnection.getInputStream(PlatformURLConnection.java:229)
    at org.eclipse.emf.ecore.resource.impl.URIHandlerImpl.createInputStream(URIHandlerImpl.java:178)
    at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.createInputStream(ExtensibleURIConverterImpl.java:350)
    at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1262)
    at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:255)
    at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:270)
    ... 46 more
ujhelyiz commented 12 years ago

Updated the genmodel definitions in plugin.xml files. Please, test if the issue is still current.

ujhelyiz commented 12 years ago

Simply changing the genmodel paths result in 56 test failures - solution needs to be reconsidered.

ujhelyiz commented 12 years ago

Ok, now I am officially screwed. I tried to reproduce the issue, but it did not happen in my computer. What is even more interesting, I don't know why does it work...

It seems, another Xtext magic is at work here that usually works but in case of @bergmanngabor for some weird reason it does not...

istvanrath commented 12 years ago

@ujhelyiz maybe you or @bergmanngabor should create a test project inside -examples so that others can try to reproduce the issue.

bergmanngabor commented 12 years ago

@ujhelyiz remember that you could reproduce the same issue on your machine. I have also personally observed it at @OszkarSemerath. So the issue is not restricted to my environment.

How to reproduce:

a. create a new incquery project b. create a new eiq file in its source folder c. add the following line to the empty .eiq file:

    import "http://www.eclipse.org/viatra2/patternlanguage/EMFPatternLanguage"
ujhelyiz commented 12 years ago

I could never reproduce the issue, only I thought I understood it. After some further research we found out, that

Alltogether, I propose to postpone this issue to the 0.7 timeframe, as it is a bug of little consequence and low chance of coming forth for other developers.

ujhelyiz commented 11 years ago

Closing the issue. If it comes back, a new issue can be filled in bugzilla.