Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » MissingResourceException for own messages in the validator
MissingResourceException for own messages in the validator [message #899543] Wed, 01 August 2012 11:16 Go to next message
John M. is currently offline John M.Friend
Messages: 198
Registered: July 2010
Senior Member
Hello,

I have added in my model the annotation Ecore with the details entry constraints. After the code generation I have overwritten the validate method.
I use own error messages, which I added to the plugin.properties of the model plugin, but I got always following exception:
java.util.MissingResourceException: The string resource 'key' could not be located

What can I do to fix it?
Re: MissingResourceException for own messages in the validator [message #899546 is a reply to message #899543] Wed, 01 August 2012 11:25 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30351
Registered: July 2009
Senior Member
Comments below.

On 01/08/2012 1:16 PM, Missing name Mising name wrote:
> Hello,
>
> I have added in my model the annotation Ecore with the details entry
> constraints. After the code generation I have overwritten the validate
> method.
> I use own error messages, which I added to the plugin.properties of
> the model plugin, but I got always following exception:
> java.util.MissingResourceException: The string resource 'key' could
> not be located
You defined a property called key? You've specified a Model Plugin
Class for the GenModel to generate the bundle activator? You've deleted
the MANIFEST.MF and plugin.xml so they're regenerated such that the
MANIFEST.MF registers the bundle activator?


>
> What can I do to fix it?
Re: MissingResourceException for own messages in the validator [message #899561 is a reply to message #899546] Wed, 01 August 2012 12:51 Go to previous messageGo to next message
John M. is currently offline John M.Friend
Messages: 198
Registered: July 2010
Senior Member
> You defined a property called key?
No I just replaced the key, because it was very long.

> You've specified a Model Plugin Class for the GenModel to generate the bundle activator?
That was the missing thing, thanks!
Re: MissingResourceException for own messages in the validator [message #1473935 is a reply to message #899561] Sat, 15 November 2014 02:12 Go to previous messageGo to next message
Paulo Santos is currently offline Paulo SantosFriend
Messages: 2
Registered: November 2014
Junior Member
I know that this topic is relatively old, but can anyone tell me how can I specify a Model Plugin Class for the GenModel as Ed Merks suggested?
Re: MissingResourceException for own messages in the validator [message #1474565 is a reply to message #1473935] Sat, 15 November 2014 14:31 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30351
Registered: July 2009
Senior Member
Paulos,

Open the *.genmodel, select the root object (the GenModel), and in the
properties view (you can open that by double clicking) look in the Model
section for the Model Plug-in Class property. Set that to the fully
qualified class name you want to have generated.

On 15/11/2014 2:21 PM, Paulo Santos wrote:
> I know that this topic is relatively old, but can anyone tell me how
> can I specify a Model Plugin Class for the GenModel as Ed Merks
> suggested?
Re: MissingResourceException for own messages in the validator [message #1474597 is a reply to message #1474565] Sat, 15 November 2014 15:09 Go to previous message
Paulo Santos is currently offline Paulo SantosFriend
Messages: 2
Registered: November 2014
Junior Member
Thanks for your time Ed.

The absence of the Model Plug-in Class was my problem as well to locate the resource file for validation messages.

Thanks again for the tip.
Previous Topic:[Oomph] migrating target definition file (.target) into targlets
Next Topic:Load EMF model instance from XMI file
Goto Forum:
  


Current Time: Sun Aug 18 23:13:38 GMT 2019

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

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

Back to the top