Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » [Resolved] Problem of import in xtext file after changing of workspace
[Resolved] Problem of import in xtext file after changing of workspace [message #559645] Fri, 17 September 2010 13:44 Go to next message
jeremie is currently offline jeremieFriend
Messages: 233
Registered: April 2010
Senior Member
Hello everybody.

Few days ago I have copy my xtext project in an other workspace and something strange appends.
Not I can't launch the workflow on the ".xtext" file.
The problem is because of the uri of my imports.
This is the start of my xtext file :
// automatically generated by Xtext
grammar fr.irisa.cairn.graphAdapter.Language with org.eclipse.xtext.common.Terminals 

import "platform:/resource/fr.irisa.cairn.graphAdapter.model/model/AdapterBase.ecore" as adapt
import "platform:/resource/fr.irisa.cairn.graphAdapter.model/model/AdapterBase.ecore#//expression" as expr

import "http://www.eclipse.org/emf/2002/Ecore" as ecore


There are no mistake tin this files, xtext find all EObjects og my ecore models. And if I click on this uri, eclipse open in the editor the ecore file.

but when I launch the workflow, I have this exception :
0    [main] INFO  lipse.emf.mwe.utils.StandaloneSetup  - Registering platform uri '/Users/jguidoux/workspace_adapter'
28   [main] INFO  lipse.emf.mwe.utils.StandaloneSetup  - Adding generated EPackage 'fr.irisa.cairn.graphAdapter.model.adapter.AdapterPackage'
28   [main] INFO  lipse.emf.mwe.utils.StandaloneSetup  - Adding generated EPackage 'fr.irisa.cairn.graphAdapter.model.adapter.expression.ExpressionPackage'
773  [main] ERROR mf.mwe2.launch.runtime.Mwe2Launcher  - Problems instantiating module fr.irisa.cairn.graphAdapter.Language: java.lang.reflect.InvocationTargetException
java.lang.RuntimeException: Problems instantiating module fr.irisa.cairn.graphAdapter.Language: java.lang.reflect.InvocationTargetException
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:73)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:52)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:74)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:35)
Caused by: org.eclipse.emf.common.util.WrappedException: java.lang.reflect.InvocationTargetException
	at org.eclipse.emf.mwe2.language.factory.SettingProviderImpl$1$1.setValue(SettingProviderImpl.java:56)
	at org.eclipse.emf.mwe2.language.factory.Mwe2ExecutionEngine.internalApplyAssignments(Mwe2ExecutionEngine.java:127)
	at org.eclipse.emf.mwe2.language.factory.Mwe2ExecutionEngine.inCase(Mwe2ExecutionEngine.java:102)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.xtext.util.PolymorphicDispatcher.invoke(PolymorphicDispatcher.java:259)
	at org.eclipse.emf.mwe2.language.factory.Mwe2ExecutionEngine.internalSwitch(Mwe2ExecutionEngine.java:56)
	at org.eclipse.emf.mwe2.language.factory.Mwe2ExecutionEngine.internalApplyAssignments(Mwe2ExecutionEngine.java:126)
	at org.eclipse.emf.mwe2.language.factory.Mwe2ExecutionEngine.inCase(Mwe2ExecutionEngine.java:102)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.xtext.util.PolymorphicDispatcher.invoke(PolymorphicDispatcher.java:259)
	at org.eclipse.emf.mwe2.language.factory.Mwe2ExecutionEngine.internalSwitch(Mwe2ExecutionEngine.java:56)
	at org.eclipse.emf.mwe2.language.factory.Mwe2ExecutionEngine.internalApplyAssignments(Mwe2ExecutionEngine.java:126)
	at org.eclipse.emf.mwe2.language.factory.Mwe2ExecutionEngine.inCase(Mwe2ExecutionEngine.java:102)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.xtext.util.PolymorphicDispatcher.invoke(PolymorphicDispatcher.java:259)
	at org.eclipse.emf.mwe2.language.factory.Mwe2ExecutionEngine.internalSwitch(Mwe2ExecutionEngine.java:56)
	at org.eclipse.emf.mwe2.language.factory.Mwe2ExecutionEngine.inCase(Mwe2ExecutionEngine.java:69)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.xtext.util.PolymorphicDispatcher.invoke(PolymorphicDispatcher.java:259)
	at org.eclipse.emf.mwe2.language.factory.Mwe2ExecutionEngine.internalSwitch(Mwe2ExecutionEngine.java:56)
	at org.eclipse.emf.mwe2.language.factory.Mwe2ExecutionEngine.create(Mwe2ExecutionEngine.java:52)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:71)
	... 3 more
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.emf.mwe2.language.factory.SettingProviderImpl$1$1.setValue(SettingProviderImpl.java:54)
	... 36 more
Caused by: java.lang.IllegalStateException: Problem parsing 'classpath:/fr/irisa/cairn/graphAdapter/Language.xtext':[XtextLinkingDiagnostic: null:4 Couldn't resolve reference to EPackage 'platform:/resource/fr.irisa.cairn.graphAdapter.model/model/AdapterBase.ecore'., XtextLinkingDiagnostic: null:5 Couldn't resolve reference to EPackage 'platform:/resource/fr.irisa.cairn.graphAdapter.model/model/AdapterBase.ecore#//expression'., XtextLinkingDiagnostic: null:10 Couldn't resolve reference to EClassifier 'CompilationUnit'., XtextLinkingDiagnostic: null:28 Couldn't resolve reference to EClassifier 'ImportDeclaration'., XtextLinkingDiagnostic: null:32 Couldn't resolve reference to EClassifier 'GraphAdapter'., XtextLinkingDiagnostic: null:46 Couldn't resolve reference to EClassifier 'NodeAdapter'., XtextLinkingDiagnostic: null:61 Couldn't resolve reference to EClassifier 'SuperNodeAdapter'., XtextLinkingDiagnostic: null:76 Couldn't resolve reference to EClassifier 'PortAdapter'., XtextLinkingDiagnostic: null:90 Couldn't resolve reference to EClassifier 'EdgeAdapter'., XtextLinkingDiagnostic: null:117 Couldn't resolve reference to EClassifier 'ParameterDeclaration'., XtextLinkingDiagnostic: null:121 Couldn't resolve reference to EClassifier 'FieldDeclaration'., XtextLinkingDiagnostic: null:127 Couldn't resolve reference to EClassifier 'OperationDeclaration'., XtextLinkingDiagnostic: null:134 Couldn't resolve reference to EClassifier 'ArgumentType'., XtextLinkingDiagnostic: null:138 Couldn't resolve reference to EClassifier 'Affectation'., XtextLinkingDiagnostic: null:139 Couldn't resolve reference to EClassifier 'ClassVariable'., XtextLinkingDiagnostic: null:142 Couldn't resolve reference to EClassifier 'InitializeStatement'., XtextLinkingDiagnostic: null:149 Couldn't resolve reference to EClassifier 'ChainedExpression'., XtextLinkingDiagnostic: null:155 Couldn't resolve reference to EClassifier 'Expression'., XtextLinkingDiagnostic: null:159 Couldn't resolve reference to EClassifier 'Expression'., XtextLinkingDiagnostic: null:161 Couldn't resolve reference to EClassifier 'CallExpression'., XtextLinkingDiagnostic: null:165 Couldn't resolve reference to EClassifier 'CalledElement'., XtextLinkingDiagnostic: null:170 Couldn't resolve reference to EClassifier 'AdaptedAcces'., XtextLinkingDiagnostic: null:175 Couldn't resolve reference to EClassifier 'Expression'., XtextLinkingDiagnostic: null:189 Couldn't resolve reference to EClassifier 'FeatureCall'., XtextLinkingDiagnostic: null:190 Couldn't resolve reference to EClassifier 'TypedElement'., XtextLinkingDiagnostic: null:194 Couldn't resolve reference to EClassifier 'EFeatureCall'., XtextLinkingDiagnostic: null:200 Couldn't resolve reference to EClassifier 'Contructor'., XtextLinkingDiagnostic: null:205 Couldn't resolve reference to EClassifier 'ConstructorCall'., XtextLinkingDiagnostic: null:211 Couldn't resolve reference to EClassifier 'CollectionAccess'., XtextLinkingDiagnostic: null:215 Couldn't resolve reference to EClassifier 'CollectionMethodName'., XtextLinkingDiagnostic: null:220 Couldn't resolve reference to EClassifier 'LocalVariable'., XtextLinkingDiagnostic: null:226 Couldn't resolve reference to EClassifier 'Expression'., XtextLinkingDiagnostic: null:230 Couldn't resolve reference to EClassifier 'OneOrMany'., TransformationDiagnostic: null:10 Cannot create type without declared package. (ErrorCode: UnknownMetaModelAlias), TransformationDiagnostic: null:28 Cannot create type without declared package. (ErrorCode: UnknownMetaModelAlias), TransformationDiagnostic: null:32 Cannot create type without declared package. (ErrorCode: UnknownMetaModelAlias), TransformationDiagnostic: null:46 Cannot create type without declared package. (ErrorCode: UnknownMetaModelAlias), TransformationDiagnostic: null:61 Cannot create type without declared package. (ErrorCode: UnknownMetaModelAlias), TransformationDiagnostic: null:76 Cannot create type without declared package. (ErrorCode: UnknownMetaModelAlias), TransformationDiagnostic: null:90 Cannot create type without declared package. (ErrorCode: UnknownMetaModelAlias), TransformationDiagnostic: null:117 Cannot create type without declared package. (ErrorCode: UnknownMetaModelAlias), TransformationDiagnostic: null:121 Cannot create type without declared package. (ErrorCode: UnknownMetaModelAlias), TransformationDiagnostic: null:127 Cannot create type without declared package. (ErrorCode: UnknownMetaModelAlias), TransformationDiagnostic: null:134 Cannot create type without declared package. (ErrorCode: UnknownMetaModelAlias), TransformationDiagnostic: null:138 Cannot create type without declared package. (ErrorCode: UnknownMetaModelAlias), TransformationDiagnostic: null:142 Cannot create type without declared package. (ErrorCode: UnknownMetaModelAlias), TransformationDiagnostic: null:149 Cannot create type without declared package. (ErrorCode: UnknownMetaModelAlias), TransformationDiagnostic: null:155 Cannot create type without declared package. (ErrorCode: UnknownMetaModelAlias), TransformationDiagnostic: null:159 Cannot create type without declared package. (ErrorCode: UnknownMetaModelAlias), TransformationDiagnostic: null:165 Cannot create type without declared package. (ErrorCode: UnknownMetaModelAlias), TransformationDiagnostic: null:170 Cannot create type without declared package. (ErrorCode: UnknownMetaModelAlias), TransformationDiagnostic: null:175 Cannot create type without declared package. (ErrorCode: UnknownMetaModelAlias), TransformationDiagnostic: null:189 Cannot create type without declared package. (ErrorCode: UnknownMetaModelAlias), TransformationDiagnostic: null:194 Cannot create type without declared package. (ErrorCode: UnknownMetaModelAlias), TransformationDiagnostic: null:200 Cannot create type without declared package. (ErrorCode: UnknownMetaModelAlias), TransformationDiagnostic: null:205 Cannot create type without declared package. (ErrorCode: UnknownMetaModelAlias), TransformationDiagnostic: null:211 Cannot create type without declared package. (ErrorCode: UnknownMetaModelAlias), TransformationDiagnostic: null:215 Cannot create type without declared package. (ErrorCode: UnknownMetaModelAlias), TransformationDiagnostic: null:220 Cannot create type without declared package. (ErrorCode: UnknownMetaModelAlias), TransformationDiagnostic: null:226 Cannot create type without declared package. (ErrorCode: UnknownMetaModelAlias), TransformationDiagnostic: null:230 Cannot create type without declared package. (ErrorCode: UnknownMetaModelAlias)]
	at org.eclipse.xtext.generator.LanguageConfig.setUri(LanguageConfig.java:112)
	... 41 more



I have the impression that the workflow has the the valid location for the "platform:/resource/" path.

Thanks,

Jérémie

[Updated on: Tue, 21 September 2010 09:51]

Report message to a moderator

Re: problem of import in xtext file after changind of workspace [message #559648 is a reply to message #559645] Fri, 17 September 2010 14:01 Go to previous messageGo to next message
Meinte Boersma is currently offline Meinte BoersmaFriend
Messages: 434
Registered: July 2009
Location: Leiden, Netherlands
Senior Member
Please see this post: http://www.eclipse.org/forums/index.php?t=msg&goto=55431 8

Changing the nsUri for the import statements from platform URIs to the actual namespace URIs should do the trick.


Re: problem of import in xtext file after changind of workspace [message #559657 is a reply to message #559648] Fri, 17 September 2010 14:17 Go to previous message
jeremie is currently offline jeremieFriend
Messages: 233
Registered: April 2010
Senior Member
Yeah that was the problem.
I copied the my xtext plugins, but I have just imported my model project. So it was not in the same folder.

thanks for your fast answer Smile.

Jérémie
Previous Topic:[Resolved] Generation for only one file
Next Topic:wrong post
Goto Forum:
  


Current Time: Fri Apr 26 23:03:08 GMT 2024

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

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

Back to the top