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

FileNotFoundException for PatternLanguage.genmodel #215

Closed bergmanngabor closed 12 years ago

bergmanngabor commented 12 years ago

Caught and logged. Seems harmless. Also occurs with EMFPatternLanguage.genmodel.

How to reproduce: no clue, but happens often.

!ENTRY org.apache.log4j 4 0 2012-07-05 11:44:50.215
!MESSAGE org.eclipse.xtext.validation.CompositeEValidator  - Error executing EValidator

!STACK 0
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: java.io.FileNotFoundException: /org/eclipse/viatra2/patternlanguage/core/PatternLanguage.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:65)
    at org.eclipse.viatra2.patternlanguage.EcoreGenmodelRegistry.findGenPackage(EcoreGenmodelRegistry.java:51)
    at org.eclipse.viatra2.patternlanguage.scoping.MetamodelProviderService.isGeneratedCodeAvailable(MetamodelProviderService.java:97)
    at org.eclipse.viatra2.emf.incquery.tooling.generator.genmodel.GenModelMetamodelProviderService.isGeneratedCodeAvailable(GenModelMetamodelProviderService.java:96)
    at org.eclipse.viatra2.patternlanguage.validation.EMFPatternLanguageJavaValidator.checkPackageImportGeneratedCode(EMFPatternLanguageJavaValidator.java:95)
    at sun.reflect.GeneratedMethodAccessor99.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: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)
Caused by: java.io.FileNotFoundException: /org/eclipse/viatra2/patternlanguage/core/PatternLanguage.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)
    ... 45 more
ujhelyiz commented 12 years ago

The source of the exception is the registered genmodel in the plugin.xml of the org.eclipse.viatra2.patternlanguage.core project stating:

  <extension point="org.eclipse.emf.ecore.generated_package">
    <package 
       uri = "http://www.eclipse.org/viatra2/patternlanguage/core/PatternLanguage" 
       class = "org.eclipse.viatra2.patternlanguage.core.patternLanguage.PatternLanguagePackage"
       genModel = "org/eclipse/viatra2/patternlanguage/core/PatternLanguage.genmodel" /> 

  </extension>

In other words, the issue shows that the non-absolute URI values described in the extensions are handled incorrectly.