Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Standalone error when validating
Standalone error when validating [message #1058823] Wed, 15 May 2013 09:26 Go to next message
Mårten Carlzon is currently offline Mårten CarlzonFriend
Messages: 60
Registered: March 2013
Location: Sweden
Member

Hello all,

I was wondering if you could help me with an error I have when I generate a standalone generator for my XText project.

I am working on a XText Eugenia project that in the end turns my dsl code into xml code, so I wanted a runnable jar that only did the xml part but when I run that jar I get the following error:

------------------------ERROR MESSAGE---------------------------------------------
1 [main] ERROR xt.validation.ResourceValidatorImpl - The string resource '_UI_DiagnosticRoot_diagnostic' could n
ot be located
java.util.MissingResourceException: The string resource '_UI_DiagnosticRoot_diagnostic' could not be located
at org.eclipse.emf.common.util.DelegatingResourceLocator.delegatedGetString(DelegatingResourceLocator.java:4
80)
at org.eclipse.emf.common.util.DelegatingResourceLocator.getString(DelegatingResourceLocator.java:385)
at org.eclipse.emf.common.util.DelegatingResourceLocator.getString(DelegatingResourceLocator.java:499)
at org.eclipse.emf.common.util.DelegatingResourceLocator.getString(DelegatingResourceLocator.java:491)
at org.eclipse.emf.ecore.util.Diagnostician.createDefaultDiagnostic(Diagnostician.java:88)
at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:117)
at org.eclipse.xtext.validation.ResourceValidatorImpl.validate(ResourceValidatorImpl.java:140)
at org.eclipse.xtext.validation.ResourceValidatorImpl.validate(ResourceValidatorImpl.java:118)
at org.eclipse.xtext.validation.ResourceValidatorImpl.validate(ResourceValidatorImpl.java:98)
at idainfront.iipax.dsl.main.Generator.runGenerator(Generator.java:42)
at idainfront.iipax.dsl.main.Main.main(Main.java:32)
Code generation finished.

------------------------ERROR MESSAGE---------------------------------------------

The thing is my XML is generated correctly and the validation notices if something is wrong its just that the error message can be annoying to watch. So I was wondering if there is something I can do in my project to solve this? I have seen some solutions meddling with the jar after it is generated but I am supposed to hand over the project I am working on to others and I wanted to make it as self-going (and clean Smile) as possible.

Thanks for any help

Write you later / Mårten


Re: Standalone error when validating [message #1058824 is a reply to message #1058823] Wed, 15 May 2013 09:31 Go to previous messageGo to next message
Dennis Huebner is currently offline Dennis HuebnerFriend
Messages: 257
Registered: July 2009
Senior Member

You need a plugin.properties file on you class path/your jar root
<echo file="${binJarTemp}/plugin.properties">_UI_DiagnosticRoot_diagnostic=_UI_DiagnosticRoot_diagnostic</echo>



+Dennis Huebner

Get professional support from the Xtext committers at www.typefox.io
Re: Standalone error when validating [message #1058826 is a reply to message #1058824] Wed, 15 May 2013 09:51 Go to previous messageGo to next message
Mårten Carlzon is currently offline Mårten CarlzonFriend
Messages: 60
Registered: March 2013
Location: Sweden
Member

Hmm... just asking... but how do I do that? Smile

I tried a few things but the closes I think I did was I added a file "plugin.properties" with the line you posted in the project, right-clicked the main file and took Run As -> Run Configurations, went to class path, user entries and added the file.

Did I miss something or do I just don't know what I am doing? Smile

Don't know if it is important but when I got many warnings when generating the jar file and one of them where "duplicate entry: plugin.properties".

Write you later / Mårten
Re: Standalone error when validating [message #1058828 is a reply to message #1058826] Wed, 15 May 2013 10:03 Go to previous messageGo to next message
Dennis Huebner is currently offline Dennis HuebnerFriend
Messages: 257
Registered: July 2009
Senior Member

How is your "runnable jar" created?
However, the story is the following:
emf.common needs a plugin.properties file which contains a following entry:
_UI_DiagnosticRoot_diagnostic=_UI_DiagnosticRoot_diagnostic

> Don't know if it is important but when I got many warnings when generating the jar file and one of them where "duplicate entry: plugin.properties".
if you start mix contents of some bundles you overwrite same named files like e.g. plugin.properties or plugin.xml



+Dennis Huebner

Get professional support from the Xtext committers at www.typefox.io
Re: Standalone error when validating [message #1058830 is a reply to message #1058828] Wed, 15 May 2013 10:09 Go to previous messageGo to next message
Mårten Carlzon is currently offline Mårten CarlzonFriend
Messages: 60
Registered: March 2013
Location: Sweden
Member

I create it with the export function in eclipse with the "Extract required libraries into generated JAR" option selected and I get tons of duplicate entries warnings.
Entire list

I have placed the main file in a different project which is dependent on my XText dsl project, maybe that is the cause for the duplication issues and I should just throw it right into the same project?

Hmm, feels strange to have a library that requires a file with only one line that seems to me to say that blue=blue Smile

[Updated on: Wed, 15 May 2013 10:11]

Report message to a moderator

Re: Standalone error when validating [message #1058832 is a reply to message #1058830] Wed, 15 May 2013 10:20 Go to previous messageGo to next message
Dennis Huebner is currently offline Dennis HuebnerFriend
Messages: 257
Registered: July 2009
Senior Member

> I create it with the export function in eclipse with the "Extract required libraries into generated JAR" option selected and I get tons of duplicate entries warnings.
You will probably need something more flexible e.g. ant?

> Hmm, feels strange to have a library that requires a file with only one line that seems to me to say that blue=blue
It's just a dummy entry.

Take a look at org.eclipse.xtend.standalone.jar it contains most of the stuff you need. An ant script which creates this jar maybe also interesting:
http://git.eclipse.org/c/tmf/org.eclipse.xtext.git/tree/plugins/org.eclipse.xtend.standalone.maven/create-uberjar.ant



+Dennis Huebner

Get professional support from the Xtext committers at www.typefox.io
Re: Standalone error when validating [message #1058836 is a reply to message #1058832] Wed, 15 May 2013 10:55 Go to previous messageGo to next message
Mårten Carlzon is currently offline Mårten CarlzonFriend
Messages: 60
Registered: March 2013
Location: Sweden
Member

>You will probably need something more flexible e.g. ant?
Ok, I havent used ant before, been meddling a bit with maven which I think do similar things Smile

But I will look around and see if I can learn how this script works.
As long as I don't run the worflow file I am happy since it will remove my Eugenia code which made me try to step away from the maven script I had found Smile.

But thanks for all the feedback, now to learn and understand it.

Have a nice day.

Write you later / Mårten
Re: Standalone error when validating [message #1827287 is a reply to message #1058832] Tue, 12 May 2020 09:24 Go to previous messageGo to next message
alice chen is currently offline alice chenFriend
Messages: 1
Registered: May 2020
Junior Member
Hi, below link is invalid now, could you please help to provide a new sample.
I also occurred the same issue when I export my project as runnable jar file.
the main function works well when run as Eclipse application.
Thanks in advance.

Dennis Huebner wrote on Wed, 15 May 2013 10:20
> I create it with the export function in eclipse with the "Extract required libraries into generated JAR" option selected and I get tons of duplicate entries warnings.
You will probably need something more flexible e.g. ant?

> Hmm, feels strange to have a library that requires a file with only one line that seems to me to say that blue=blue
It's just a dummy entry.

Take a look at org.eclipse.xtend.standalone.jar it contains most of the stuff you need. An ant script which creates this jar maybe also interesting:
http://git.eclipse.org/c/tmf/org.eclipse.xtext.git/tree/plugins/org.eclipse.xtend.standalone.maven/create-uberjar.ant

Re: Standalone error when validating [message #1827301 is a reply to message #1827287] Tue, 12 May 2020 16:21 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
have a look what the wizard offers when you select language server full jars

the old ant file can be found here: https://github.com/eclipse/xtext/blob/v2.4.3/plugins/org.eclipse.xtend.standalone.maven/create-uberjar.ant


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Tue, 12 May 2020 16:23]

Report message to a moderator

Previous Topic:Xtext grammar to Java Code
Next Topic:Accessing resources in standalone mode
Goto Forum:
  


Current Time: Fri Apr 19 05:26:03 GMT 2024

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

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

Back to the top