Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » MWE: Couldn't load resource under platform:/resource
MWE: Couldn't load resource under platform:/resource [message #816001] Thu, 08 March 2012 04:51 Go to previous message
Daniel Engelhardt is currently offline Daniel Engelhardt
Messages: 11
Registered: November 2010
Junior Member
Hello,

I am trying to write some M2T code using Xpand and the MWE setup. Unfortunately, I have big problems loading the input model, but I do not understand why.

First, my workflow file:
<?xml version="1.0"?>

<workflow>
  <property name="model" value="test/models/My.test"/>
  <property name="src-gen" value="src-gen/benchmarking" />

  <bean class="org.eclipse.emf.mwe.utils.StandaloneSetup" >
    <platformUri value=".." />
	<registerGeneratedEPackage  value="org.test.test2.TestPackage" />
<!--	<registerEcoreFile value="platform:/resource/test/test.ecore" /> -->
 </bean>
  
  <component class="org.eclipse.emf.mwe.utils.Reader">
    <uri value="platform:/resource/${model}" />
    <modelSlot value="model" />
  </component>
  
  <component class="org.eclipse.emf.mwe.utils.DirectoryCleaner">
    <directory value="platform:/resource/${src-gen}" />
  </component>
  
  <!-- Now start the generator component -->
  <component class="org.eclipse.xpand2.Generator">
    <fileEncoding value="ISO-8859-1"/>
    <metaModel id="mm_emf" class="org.eclipse.xtend.typesystem.emf.EmfRegistryMetaModel" />
 	<expand value="program::main FOR model"/>
  	<outlet path="${src-gen}" />
  	<outlet name="TO_SOURCE_DIRECTORY" path="${src-gen}/src" />
  	<outlet name="TO_INCLUDE_DIRECTORY" path="${src-gen}/inc" />
  </component>
</workflow>


When trying to run it, I get:
0    INFO  WorkflowEngine     - --------------------------------------------------------------------------------------
0    INFO  WorkflowEngine     - EMF Modeling Workflow Engine 1.1.1, Build v201108020506
0    INFO  WorkflowEngine     - (c) 2005-2009 openarchitectureware.org and contributors
0    INFO  WorkflowEngine     - --------------------------------------------------------------------------------------
0    INFO  WorkflowEngine     - running workflow: D:/runtime-Eclipse/test/generate.mwe
0    INFO  WorkflowEngine     - 
329  INFO  StandaloneSetup    - Registering platform uri 'D:\runtime-Eclipse'
861  INFO  StandaloneSetup    - Adding generated EPackage 'org.genivi.most.MostPackage'
955  INFO  CompositeComponent - Reader: Loading model from platform:/resource/test/models/My.test
955  ERROR WorkflowEngine     - Workflow interrupted. Reason: Couldn't load resource under platform:/resource/test/models/My.test : org.eclipse.emf.ecore.xmi.ClassNotFoundException: Class 'Function' is not found or is abstract. (platform:/resource/test/models/My.test, 2, 145)

(Function is the root element of My.test)

Okay, obviously there is something wrong with the Meta Model, but what exactly?

If I validate the Model My.test (right click, validate) all is fine. If I double click on it, the correct editor opens.

I created the MetaModel and the editors etc. in the first Eclipse instance and run the MWE script in a new Eclipse environment derived from the first one.

What do i have to do? I tried to reference the ecore form My.test directly using schemaLocation="D:\workspace1\testenv\test.ecore" and also used the correct xmlns="http:SLASHSLASHwww.testDOTorg/test" line, which correspods to the line from the meta model editor.

I run the MWE directly using the "Run as" function and use Eclipse Indigo (SDK: 3.7.1).

What am I doing wrong and how can I correct it? Where should I look first?

Best regards,
Daniel

[Updated on: Thu, 08 March 2012 06:48]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic:[ACCELEO] Using OCL Invocation and Setting delegates
Next Topic:MWE: delay issue with mwe invoked from Eclipse' action
Goto Forum:
  


Current Time: Thu May 23 01:09:08 EDT 2013

Powered by FUDForum. Page generated in 0.02704 seconds