Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Missing xmi file. What is it? Where should it come from?
Missing xmi file. What is it? Where should it come from? [message #1092094] Thu, 22 August 2013 10:22 Go to next message
Thomas Goossens is currently offline Thomas GoossensFriend
Messages: 32
Registered: August 2013
Member
Based on the following topic (I want to avoid reviving an old thread)
http://www.eclipse.org/forums/index.php/t/488360/


Hi,

I got exactly the same error. I checked all my xtext projects and none have an *.xmi .
How come that in eclipse everything runs fine but my standalone project fails in this manner?


Re: Missing xmi file. What is it? Where should it come from? [message #1092102 is a reply to message #1092094] Thu, 22 August 2013 10:26 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi are the xmis in the class path? How do you create the jar? Are
there any warnings on your project?

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Missing xmi file. What is it? Where should it come from? [message #1092110 is a reply to message #1092102] Thu, 22 August 2013 10:37 Go to previous messageGo to next message
Thomas Goossens is currently offline Thomas GoossensFriend
Messages: 32
Registered: August 2013
Member
Hi. Thanks again for quick reply! (And sorry for my incompleteness)

Quote:
are the xmis in the class path?

Caused by: org.eclipse.emf.common.util.WrappedException: org.eclipse.xtext.resource.ClasspathUriResolutionException: org.eclipse.xtext.resource.FileNotFoundOnClasspathException: Couldn't find resource on classpath. URI was 'classpath:/ast/AstLang.xmi'


Quote:
How do you create the jar?

I use a gradle script (based on this: https://github.com/jasonparekh/gradle-xtend-example/blob/master/build.gradle)

- first I compile the xtend sources
- then I compile the java sources
- then I use the maven plugin to create a jar (and the corresponding poms) which i publish on my repo
- then I created a new java project (not in eclipse) with a gradle script expressing the dependency on my jar (the one I just published to my repo)
- then I build that new java project (using gradle) it downloads all (transitive) dependencies succesfully
- then I run the main class of the project (using gradle) which spits out the the stacktrace above










Re: Missing xmi file. What is it? Where should it come from? [message #1092120 is a reply to message #1092110] Thu, 22 August 2013 11:00 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

did you open the jat file? is the xmi there or is it not?

- do you do any cleans?
- how do you run the workflow? (if at all)
- make sur you package xmis/ecores/genmodels from src-gen/** too



Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Missing xmi file. What is it? Where should it come from? [message #1092185 is a reply to message #1092120] Thu, 22 August 2013 12:32 Go to previous messageGo to next message
Thomas Goossens is currently offline Thomas GoossensFriend
Messages: 32
Registered: August 2013
Member
" make sur you package xmis/ecores/genmodels from src-gen/** too"

A major thing I missed. Everything works now. There are still no xmi's though?
Re: Missing xmi file. What is it? Where should it come from? [message #1092189 is a reply to message #1092185] Thu, 22 August 2013 12:39 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
no idea ...

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Missing xmi file. What is it? Where should it come from? [message #1092190 is a reply to message #1092189] Thu, 22 August 2013 12:39 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
P:S: newer versions of Xtext have a binary version of the xmi (*.xtextbin if i remember correct)

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Missing xmi file. What is it? Where should it come from? [message #1092239 is a reply to message #1092190] Thu, 22 August 2013 13:59 Go to previous messageGo to next message
Thomas Goossens is currently offline Thomas GoossensFriend
Messages: 32
Registered: August 2013
Member
That explains everything. Thanks a lot!
Re: Missing xmi file. What is it? Where should it come from? [message #1436980 is a reply to message #1092239] Fri, 03 October 2014 18:14 Go to previous messageGo to next message
Todd Jonker is currently offline Todd JonkerFriend
Messages: 2
Registered: July 2009
Junior Member
This is just the most recent issue that's hit me with the same root cause: Xtext's generated dependency information doesn't properly constrain the minimum-required plugin versions.

I need to support users running Eclipse back to 4.2, but could really use newer Xtext features. I've had no end of hard-to-debug compatibility problems due to such dependency mismatches, and its stretching my faith that I'm going to be able to keep my plugin running over time as Xtext continues to evolve.

In my situation I hit this XMI problem by generating a DSL using Eclipse 4.3 and Xtext 2.4.3, then attempting to load the resulting feature into stock Eclipse 4.2, which only has Xtext 2.3 when apparently 2.4 is necessary to successfully load the plugins.

Why doesn't Xtext generate constrained dependency declarations so that the installation process detects this and forbids installation (unless Xtext is updated)?
Re: Missing xmi file. What is it? Where should it come from? [message #1437030 is a reply to message #1436980] Fri, 03 October 2014 20:03 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
if you consider this as missing feature feel free to file an enhancement request into bugzilla

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Missing xmi file. What is it? Where should it come from? [message #1437071 is a reply to message #1436980] Fri, 03 October 2014 21:26 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Am 03.10.14 20:14, schrieb Todd Jonker:
> Why doesn't Xtext generate constrained dependency declarations so that
> the installation process detects this and forbids installation (unless
> Xtext is updated)?

Hi Todd,

these constraints cannot be inferred during code generation. If Xtext
would generate a constraint to only allow the current version, you'd
have to make a new release of your DSL if a new Xtext version is
released even though your lang may work perfectly well with the newer
Xtext. You'd have to add the constraints manually to your manifest.mf
files or feature.xmls. Usually they can be created automatically by your
build tool if you want to go with strict constraints. But that is
definitely your decision and nothing the framework can do for you and
all other clients in a proper way.

Regards,
Sebastian
--
Looking for professional support for Xtext, Xtend or Eclipse Modeling?
Go visit: http://xtext.itemis.com
Re: Missing xmi file. What is it? Where should it come from? [message #1437273 is a reply to message #1436980] Sat, 04 October 2014 05:06 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

If you want to go back that far (2.3 rather than 2.3.1) you need to
handle the xmi/xtextbin evolution.

For Eclipse OCL, I use xtextbin for the grammar and so need to backport
BinaryGrammarResourceFactoryImpl. See

org.eclipse.ocl.examples.xtext.base.services.CompatibilityGrammarProvider

and its uses.

Regards

Ed Willink


On 03/10/2014 20:14, Todd Jonker wrote:
> This is just the most recent issue that's hit me with the same root
> cause: Xtext's generated dependency information doesn't properly
> constrain the minimum-required plugin versions.
>
> I need to support users running Eclipse back to 4.2, but could really
> use newer Xtext features. I've had no end of hard-to-debug compatibility
> problems due to such dependency mismatches, and its stretching my faith
> that I'm going to be able to keep my plugin running over time as Xtext
> continues to evolve.
>
> In my situation I hit this XMI problem by generating a DSL using Eclipse
> 4.3 and Xtext 2.4.3, then attempting to load the resulting feature into
> stock Eclipse 4.2, which only has Xtext 2.3 when apparently 2.4 is
> necessary to successfully load the plugins.
>
> Why doesn't Xtext generate constrained dependency declarations so that
> the installation process detects this and forbids installation (unless
> Xtext is updated)?
Re: Missing xmi file. What is it? Where should it come from? [message #1437280 is a reply to message #1437030] Sat, 04 October 2014 05:24 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
On 03/10/2014 22:03, Christian Dietrich wrote:
> if you consider this as missing feature feel free to file an enhancement
> request into bugzilla

Since the missing *.xmi/*.xtextbin support is an Xtext backporting issue
independent of other Eclipse plugins, it might make sense for the
BinaryGrammarResourceFactoryImpl support to be in the auto-generated
code rather than the run-time. It would then just work.

Regards

Ed Willink
Re: Missing xmi file. What is it? Where should it come from? [message #1727945 is a reply to message #1437280] Tue, 29 March 2016 16:24 Go to previous message
David Pace is currently offline David PaceFriend
Messages: 19
Registered: March 2013
Junior Member
I had this problem in conjunction with a Maven environment. The *.xtextbin file was not packaged into the JAR. The solution is to add this to the POM:

<resources>
  <resource>
    <directory>src/generated/path/to/package</directory>
      <includes>
         <include>myDSL.xtextbin</include>
      </includes>
      <targetPath>target/package</targetPath>
  </resource>
</resources>
Previous Topic:[SOLVED] Reference genmodel of another DSL relative to the platform
Next Topic:Adding validation errors (and handling exceptions) in JvmModelInferrer
Goto Forum:
  


Current Time: Thu Apr 18 11:32:13 GMT 2024

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

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

Back to the top