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 05:26 Go to next message
Mårten Carlzon is currently offline Mårten Carlzon
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 05:31 Go to previous messageGo to next message
Dennis Huebner is currently offline Dennis Huebner
Messages: 198
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 Hübner

--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Re: Standalone error when validating [message #1058826 is a reply to message #1058824] Wed, 15 May 2013 05:51 Go to previous messageGo to next message
Mårten Carlzon is currently offline Mårten Carlzon
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 06:03 Go to previous messageGo to next message
Dennis Huebner is currently offline Dennis Huebner
Messages: 198
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 Hübner

--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Re: Standalone error when validating [message #1058830 is a reply to message #1058828] Wed, 15 May 2013 06:09 Go to previous messageGo to next message
Mårten Carlzon is currently offline Mårten Carlzon
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 06:11]

Report message to a moderator

Re: Standalone error when validating [message #1058832 is a reply to message #1058830] Wed, 15 May 2013 06:20 Go to previous messageGo to next message
Dennis Huebner is currently offline Dennis Huebner
Messages: 198
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 Hübner

--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Re: Standalone error when validating [message #1058836 is a reply to message #1058832] Wed, 15 May 2013 06:55 Go to previous message
Mårten Carlzon is currently offline Mårten Carlzon
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
Previous Topic:Single quotation marks consumed incorrectly
Next Topic:Remove gaps from the blanked name
Goto Forum:
  


Current Time: Thu Jul 24 16:09:24 EDT 2014

Powered by FUDForum. Page generated in 0.04996 seconds