You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by Marco Rossi <ma...@markreds.it> on 2020/01/14 09:51:56 UTC

MissingResourceException

Hi guys,
I’ve started to use Apache Netbeans 11.2 and I’m issuing an annoying strange behaviour that I can reproduce following these steps:
created a new project of type Netbeans Platform Application;
added a new module to my application;
added a new TopComponent window with a button on it;
localized the Bundle.properties to my language Bundle_it_IT.properties;
localized the button of my TopComponent. Build and Run and everything works well as expected…
… now added a new JPanel form, with a JLabel that I localized… try to build again but it fails with the error <java.util.MissingResourceException: Can't find resource for bundle org.openide.util.NbBundle$PBundle, key CTL_MyEditorTopComponent
at java.util.ResourceBundle.getObject(ResourceBundle.java:450)
at java.util.ResourceBundle.getString(ResourceBundle.java:407)
at org.openide.util.NbBundle.getMessage(NbBundle.java:617)…>

It seems to be an issue related to the @Message annotations and other keys in Bundle.properties file. Due to this I’m unable to put a TopComponent and a JPanel in the same package.
Anyone else has got this problem?

Marco Rossi <ma...@markreds.it>
Inviato dal suo MacBookPro






RE: MissingResourceException

Posted by Eirik Bakke <eb...@ultorg.com>.
> I also wonder if we can support it longer term - gets disabled without nb-javac?

Whoa--is there a chance Compile-on-Save will disappear? It's a very crucial feature. And how would "Apply Code Changes" in the debugger work without it?

-- Eirik

-----Original Message-----
From: Neil C Smith <ne...@apache.org> 
Sent: Wednesday, January 15, 2020 12:36 PM
To: Eirik Bakke <eb...@ultorg.com>
Cc: Marco Rossi <ma...@markreds.it>; List NetBeans Mailing <us...@netbeans.apache.org>; Oliver Rettig <Ol...@orat.de>
Subject: Re: MissingResourceException

On Wed, 15 Jan 2020 at 17:17, Eirik Bakke <eb...@ultorg.com> wrote:
> Though you're on ant, and I'm using Maven (and the bugzilla bug above refers to Maven). Maybe they are two different bugs.

Well, related.  My first thought on this was Compile on Save.  I don't think I've got that enabled in a single project right now for one reason or another.  I also wonder if we can support it longer term - gets disabled without nb-javac?

Best wishes,

Neil

Re: MissingResourceException

Posted by Marco Rossi <ma...@markreds.it>.
Where I can check if CoS is enabled or not? Shouldn't it be on Compiling tab? This is what I see in my module settings panel…



> Il giorno 15 gen 2020, alle ore 18:51, Emilian Bold <em...@gmail.com> ha scritto:
> 
>> There was an old bug about this on https://bz.apache.org/netbeans/show_bug.cgi?id=221781 . Maybe we should create a corresponding new JIRA issue.
> 
> [Note: How cool the old bugzilla was migrated to Apache!]
> 
>> Well, related.  My first thought on this was Compile on Save.  I don't
>> think I've got that enabled in a single project right now for one
>> reason or another.  I also wonder if we can support it longer term -
>> gets disabled without nb-javac?
> 
> I also disable CoS routinely and I wonder if we should leave it on by
> default. Maybe leave it off makes more sense and maybe even mark it as
> 'best effort' / experimental.
> 
> --emi
> 
> On Wed, Jan 15, 2020 at 7:36 PM Neil C Smith <ne...@apache.org> wrote:
>> 
>> On Wed, 15 Jan 2020 at 17:17, Eirik Bakke <eb...@ultorg.com> wrote:
>>> Though you're on ant, and I'm using Maven (and the bugzilla bug above refers to Maven). Maybe they are two different bugs.
>> 
>> Well, related.  My first thought on this was Compile on Save.  I don't
>> think I've got that enabled in a single project right now for one
>> reason or another.  I also wonder if we can support it longer term -
>> gets disabled without nb-javac?
>> 
>> Best wishes,
>> 
>> Neil
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
>> For additional commands, e-mail: users-help@netbeans.apache.org
>> 
>> For further information about the NetBeans mailing lists, visit:
>> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
> 
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> 


Re: MissingResourceException

Posted by Emilian Bold <em...@gmail.com>.
> There was an old bug about this on https://bz.apache.org/netbeans/show_bug.cgi?id=221781 . Maybe we should create a corresponding new JIRA issue.

[Note: How cool the old bugzilla was migrated to Apache!]

> Well, related.  My first thought on this was Compile on Save.  I don't
> think I've got that enabled in a single project right now for one
> reason or another.  I also wonder if we can support it longer term -
> gets disabled without nb-javac?

I also disable CoS routinely and I wonder if we should leave it on by
default. Maybe leave it off makes more sense and maybe even mark it as
'best effort' / experimental.

--emi

On Wed, Jan 15, 2020 at 7:36 PM Neil C Smith <ne...@apache.org> wrote:
>
> On Wed, 15 Jan 2020 at 17:17, Eirik Bakke <eb...@ultorg.com> wrote:
> > Though you're on ant, and I'm using Maven (and the bugzilla bug above refers to Maven). Maybe they are two different bugs.
>
> Well, related.  My first thought on this was Compile on Save.  I don't
> think I've got that enabled in a single project right now for one
> reason or another.  I also wonder if we can support it longer term -
> gets disabled without nb-javac?
>
> Best wishes,
>
> Neil
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: MissingResourceException

Posted by Neil C Smith <ne...@apache.org>.
On Wed, 15 Jan 2020 at 17:17, Eirik Bakke <eb...@ultorg.com> wrote:
> Though you're on ant, and I'm using Maven (and the bugzilla bug above refers to Maven). Maybe they are two different bugs.

Well, related.  My first thought on this was Compile on Save.  I don't
think I've got that enabled in a single project right now for one
reason or another.  I also wonder if we can support it longer term -
gets disabled without nb-javac?

Best wishes,

Neil

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


RE: MissingResourceException

Posted by Eirik Bakke <eb...@ultorg.com>.
There was an old bug about this on https://bz.apache.org/netbeans/show_bug.cgi?id=221781 . Maybe we should create a corresponding new JIRA issue.

Though you're on ant, and I'm using Maven (and the bugzilla bug above refers to Maven). Maybe they are two different bugs.

-- Eirik


From: Marco Rossi <ma...@markreds.it>
Sent: Wednesday, January 15, 2020 4:19 AM
To: List NetBeans Mailing <us...@netbeans.apache.org>
Cc: Oliver Rettig <Ol...@orat.de>; Eirik Bakke <eb...@ultorg.com>
Subject: Re: MissingResourceException

Yes, it is a new ant based project. I can confirm that a clean build fixes the problem, until any changes on the the panel form will be performed. And this is very annoying, especially at first when I have to design my forms.

In the meantime I could follow the Eirik suggestion and move away from @Message annotations but I agree with Oliver that the problem should be fixed at the origin. I’ve searched on Google and found something related to an old issue on the Processor that seems to be fixed in Netbeans 8.2. But I’m not sure if this is the same case.

I published my example here: https://github.com/markreds81/MyApp


Il giorno 15 gen 2020, alle ore 07:27, Oliver Rettig <Ol...@orat.de>> ha scritto:

Hi Marco,

sometimes I get also the "MissingResource" exceptions for @Message annotations in bigger ant based platform apps. I cauld resolve this by invocing clean-build by hand for single modules. The difficulty was to find out the sequence of modules I have to do this. This was difficult because the update of the tagged icon to show that an error was resolved is not working in all cases.

So it would be great if somebody can figure out the origin of this problem. Thanks for writing the sequence of steps to reproduce the problem. I think this is a good starting point.

Is there anybody who has an idea why this cauld happen.

best regards
Oliver

Is this an ant or maven-based project?

Does doing a clean build fix the problem?

(When working with NetBeans platform applications, I find that many annotation changes will require a complete clean build of the entire project. For this reason I will probably move away from @Message annotations, and just write my own Bundle files.)

-- Eirik

From: Marco Rossi <ma...@markreds.it>>
Sent: Tuesday, January 14, 2020 4:52 AM
To: List NetBeans Mailing <us...@netbeans.apache.org>>
Subject: MissingResourceException

Hi guys,
I’ve started to use Apache Netbeans 11.2 and I’m issuing an annoying strange behaviour that I can reproduce following these steps:
1.                created a new project of type Netbeans Platform Application;
2.                added a new module to my application;
3.                added a new TopComponent window with a button on it;
4.                localized the Bundle.properties to my language Bundle_it_IT.properties;
5.                localized the button of my TopComponent. Build and Run and everything works well as expected…
6.                … now added a new JPanel form, with a JLabel that I localized… try to build again but it fails with the error <java.util.MissingResourceException: Can't find resource for bundle org.openide.util.NbBundle$PBundle, key CTL_MyEditorTopComponent
at java.util.ResourceBundle.getObject(ResourceBundle.java:450)
at java.util.ResourceBundle.getString(ResourceBundle.java:407)
at org.openide.util.NbBundle.getMessage(NbBundle.java:617)…>

It seems to be an issue related to the @Message annotations and other keys in Bundle.properties file. Due to this I’m unable to put a TopComponent and a JPanel in the same package.
Anyone else has got this problem?

Marco Rossi <ma...@markreds.it>>
Inviato dal suo MacBookPro


Re: MissingResourceException

Posted by Marco Rossi <ma...@markreds.it>.
Yes, it is a new ant based project. I can confirm that a clean build fixes the problem, until any changes on the the panel form will be performed. And this is very annoying, especially at first when I have to design my forms.

In the meantime I could follow the Eirik suggestion and move away from @Message annotations but I agree with Oliver that the problem should be fixed at the origin. I’ve searched on Google and found something related to an old issue on the Processor that seems to be fixed in Netbeans 8.2. But I’m not sure if this is the same case.

I published my example here: https://github.com/markreds81/MyApp

> Il giorno 15 gen 2020, alle ore 07:27, Oliver Rettig <Ol...@orat.de> ha scritto:
> 
> Hi Marco,
>  
> sometimes I get also the "MissingResource" exceptions for @Message annotations in bigger ant based platform apps. I cauld resolve this by invocing clean-build by hand for single modules. The difficulty was to find out the sequence of modules I have to do this. This was difficult because the update of the tagged icon to show that an error was resolved is not working in all cases. 
>  
> So it would be great if somebody can figure out the origin of this problem. Thanks for writing the sequence of steps to reproduce the problem. I think this is a good starting point. 
>  
> Is there anybody who has an idea why this cauld happen.
>  
> best regards
> Oliver
> 
> Is this an ant or maven-based project?
> 
>  
> Does doing a clean build fix the problem?
> 
>  
> (When working with NetBeans platform applications, I find that many annotation changes will require a complete clean build of the entire project. For this reason I will probably move away from @Message annotations, and just write my own Bundle files.)
> 
>  
> -- Eirik
> 
>  
> From: Marco Rossi <marco@markreds.it <ma...@markreds.it>> 
> Sent: Tuesday, January 14, 2020 4:52 AM
> To: List NetBeans Mailing <users@netbeans.apache.org <ma...@netbeans.apache.org>>
> Subject: MissingResourceException
> 
>  
> Hi guys,
> 
> I’ve started to use Apache Netbeans 11.2 and I’m issuing an annoying strange behaviour that I can reproduce following these steps:
> 
> created a new project of type Netbeans Platform Application;
> added a new module to my application;
> added a new TopComponent window with a button on it;
> localized the Bundle.properties to my language Bundle_it_IT.properties;
> localized the button of my TopComponent. Build and Run and everything works well as expected…
> … now added a new JPanel form, with a JLabel that I localized… try to build again but it fails with the error <java.util.MissingResourceException: Can't find resource for bundle org.openide.util.NbBundle$PBundle, key CTL_MyEditorTopComponent
> at java.util.ResourceBundle.getObject(ResourceBundle.java:450)
> 
> at java.util.ResourceBundle.getString(ResourceBundle.java:407)
> 
> at org.openide.util.NbBundle.getMessage(NbBundle.java:617)…>
> 
>  
> It seems to be an issue related to the @Message annotations and other keys in Bundle.properties file. Due to this I’m unable to put a TopComponent and a JPanel in the same package.
> 
> Anyone else has got this problem?
> 
>  
> Marco Rossi <marco@markreds.it <ma...@markreds.it>>
> 
> Inviato dal suo MacBookPro
> 


Re: MissingResourceException

Posted by Oliver Rettig <Ol...@orat.de>.
Hi Marco,

sometimes I get also the "MissingResource" exceptions for @Message annotations in bigger 
ant based platform apps. I cauld resolve this by invocing clean-build by hand for single 
modules. The difficulty was to find out the sequence of modules I have to do this. This was 
difficult because the update of the tagged icon to show that an error was resolved is not 
working in all cases. 

So it would be great if somebody can figure out the origin of this problem. Thanks for writing 
the sequence of steps to reproduce the problem. I think this is a good starting point. 

Is there anybody who has an idea why this cauld happen.

best regards
Oliver


Is this an ant or maven-based project?
 
Does doing a clean build fix the problem?
 
(When working with NetBeans platform applications, I find that many annotation changes 
will require a complete clean build of the entire project. For this reason I will probably move 
away from @Message annotations, and just write my own Bundle files.)
 
-- Eirik
 
*From:* Marco Rossi <ma...@markreds.it> 

*Sent:* Tuesday, January 14, 2020 4:52 AM

*To:* List NetBeans Mailing <us...@netbeans.apache.org>

*Subject:* MissingResourceException
 
Hi guys,
I’ve started to use Apache Netbeans 11.2 and I’m issuing an annoying strange behaviour that 
I can reproduce following these steps:
     1. created a new project of type Netbeans Platform Application;
     2. added a new module to my application;
     3. added a new TopComponent window with a button on it;
     4. localized the Bundle.properties to my language Bundle_it_IT.properties;
     5. localized the button of my TopComponent. Build and Run and everything works well as 
expected…
     6. … now added a new JPanel form, with a JLabel that I localized… try to build again but it 
fails with the error <java.util.MissingResourceException: Can't find resource for bundle 
org.openide.util.NbBundle$PBundle, key CTL_MyEditorTopComponent
at java.util.ResourceBundle.getObject(ResourceBundle.java:450)
at java.util.ResourceBundle.getString(ResourceBundle.java:407)
at org.openide.util.NbBundle.getMessage(NbBundle.java:617)…>
 
It seems to be an issue related to the @Message annotations and other keys in 
Bundle.properties file. Due to this I’m unable to put a TopComponent and a JPanel in the 
same package.
Anyone else has got this problem?
 
Marco Rossi <marco@markreds.it[1]>
Inviato dal suo MacBookPro
 
 
 
  



--------
[1] mailto:marco@markreds.it

RE: MissingResourceException

Posted by Eirik Bakke <eb...@ultorg.com>.
Is this an ant or maven-based project?

Does doing a clean build fix the problem?

(When working with NetBeans platform applications, I find that many annotation changes will require a complete clean build of the entire project. For this reason I will probably move away from @Message annotations, and just write my own Bundle files.)

-- Eirik

From: Marco Rossi <ma...@markreds.it>
Sent: Tuesday, January 14, 2020 4:52 AM
To: List NetBeans Mailing <us...@netbeans.apache.org>
Subject: MissingResourceException

Hi guys,
I’ve started to use Apache Netbeans 11.2 and I’m issuing an annoying strange behaviour that I can reproduce following these steps:

  1.  created a new project of type Netbeans Platform Application;
  2.  added a new module to my application;
  3.  added a new TopComponent window with a button on it;
  4.  localized the Bundle.properties to my language Bundle_it_IT.properties;
  5.  localized the button of my TopComponent. Build and Run and everything works well as expected…
  6.  … now added a new JPanel form, with a JLabel that I localized… try to build again but it fails with the error <java.util.MissingResourceException: Can't find resource for bundle org.openide.util.NbBundle$PBundle, key CTL_MyEditorTopComponent
at java.util.ResourceBundle.getObject(ResourceBundle.java:450)
at java.util.ResourceBundle.getString(ResourceBundle.java:407)
at org.openide.util.NbBundle.getMessage(NbBundle.java:617)…>

It seems to be an issue related to the @Message annotations and other keys in Bundle.properties file. Due to this I’m unable to put a TopComponent and a JPanel in the same package.
Anyone else has got this problem?

Marco Rossi <ma...@markreds.it>>
Inviato dal suo MacBookPro