You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by "William L. Thomson Jr." <wl...@o-sinc.com> on 2017/11/27 18:24:11 UTC

Gentoo packaging: Can't find resource for bundle

The other thread is a bit big. Going to start new ones on individual
remaining issues. Seems people run into these with the build system and
projects using the platform. It would be good for all I think.

I am getting lots of these errors

java.util.MissingResourceException: Can't find resource for bundle
org.openide.util.NbBundle$PBundle, key MSG_start_load_boot_modules

Regarding that specific variable. I see it in this file.
https://github.com/apache/incubator-netbeans/blob/master/core.startup/src/org/netbeans/core/startup/NbEvents.java#L73

Looks like unprocessed annotations. I am assuming I need to process it.
Netbeans 8.2 has it in a Bundle.properties. Which seems I need as well.
The NbBundleProcessor does not seem to be picking this stuff up. Likely
some other processor I am missing and need to use.

Thanks!

-- 
William L. Thomson Jr.

Re: [Gentoo packaging] SOLVED Can't find resource for bundle

Posted by "William L. Thomson Jr." <wl...@o-sinc.com>.
These two files are being generated now when they were not before.
Seems the Bundle.properties file existing causes several issues.

META-INF/namedservices/URLStreamHandler/nbresloc/java.net.URLStreamHandler
META-INF/namedservices/URLStreamHandler/nbres/java.net.URLStreamHandler

Though others I still had to create, not sure why.
META-INF/namedservices.index
META-INF/namedservices/java.net.URLStreamHandlerFactory

Some what moot for now, Past those issues. Just interesting the files
that were not being generated before are now. Killed 2 birds!

-- 
William L. Thomson Jr.

Re: [Gentoo packaging] SOLVED Can't find resource for bundle

Posted by "William L. Thomson Jr." <wl...@o-sinc.com>.
What I ended up doing was copying the default Bundle.properties in
src to  a resources directory I created. Then I delete all
Bundle.properties files in the sources. That causes annotation
processors to re-create the Bundle.properties files.

Then I just cat the generated Bundle.Properties to the original one in
resources. Delete the generated one, and jar it all up :)
https://github.com/Obsidian-StudiosInc/os-xtoo/commit/5bb0077f4c03c2ce9e18a6da60351bac56696e0a

Why NbBundleProcessor does not append is beyond me. I think ant must be
doing something along the lines as to what I am doing. Otherwise I
cannot see what I am doing wrong to get annotation processors to not
combine generated stuff with static that existed in Bundle.properties
from the start.

Either way finally resolved my biggest issue and annoyance :)

That was super annoying! Caused tons of pop-ups. I could not read
important information like modules that could not load. Need to rebuild
jars once again to fix others. Hopefully for the last time. I have
rebuild the 130+ packages I have now several times. To pick up stuff
missed with annotation processors etc.

-- 
William L. Thomson Jr.

Re: [Gentoo packaging] HALF SOLVED Can't find resource for bundle

Posted by "William L. Thomson Jr." <wl...@o-sinc.com>.
It turns out if I delete Bundle.properties. It generates one with the
missing stuff. However it lacks stuff the one I deleted had. Thus now I
need to come up with some way to combine the two....

At least some progress though. Not sure why it only writes that stuff
when properties does not exist vs appending. Maybe a bug?

I can come up with my own means to combine, etc. Is there something I
am missing there that would do that for me?

Thanks, and at least finally have a clue whats going on and how to hack
around :)

-- 
William L. Thomson Jr.

Re: [Gentoo packaging] Can't find resource for bundle

Posted by "William L. Thomson Jr." <wl...@o-sinc.com>.
On Mon, 27 Nov 2017 13:24:11 -0500
"William L. Thomson Jr." <wl...@o-sinc.com> wrote:
>
> I am getting lots of these errors
> 
> java.util.MissingResourceException: Can't find resource for bundle
> org.openide.util.NbBundle$PBundle, key MSG_start_load_boot_modules
> 
> Regarding that specific variable. I see it in this file.
> https://github.com/apache/incubator-netbeans/blob/master/core.startup/src/org/netbeans/core/startup/NbEvents.java#L73
> 
> Looks like unprocessed annotations. I am assuming I need to process
> it. Netbeans 8.2 has it in a Bundle.properties. Which seems I need as
> well. The NbBundleProcessor does not seem to be picking this stuff
> up. Likely some other processor I am missing and need to use.

Still working on this. Resolution is my present goal and task. I have
built core.startup via ant with verbose compiler output. Next may do
verbose ant as well but ant was making tremendous noise.

I see it generating the missing stuff in Bundle.properties. I cannot
yet explain what I am doing wrong or what it is doing differently.

I am seeing the exact same annotation processor output. Though it seems
ant has 3 rounds. 1st process annotations, 2nd not sure, 3rd compile,
no annotations. Without hacking into and interrupting that 3 round
compile process. I am trying to replicate doing annotation processing
first -proc:only. Then going back and doing compile no annotation
processing, -proc:none.

Without copying the Bundle.java that was generated. It failed to build
because it cannot find things that come from annotation messages.

src/org/netbeans/core/startup/NbEvents.java:50: error: cannot find
symbol import static org.netbeans.core.startup.Bundle.*;
                                       ^
  symbol:   class Bundle
  location: package org.netbeans.core.startup
src/org/netbeans/core/startup/NbEvents.java:116: error: cannot find
symbol MSG_start_load_boot_modules());

That was the same issues I face early on missing Bundle.class. Till I
used NbBundleProcessor. Which is definitely doing its thing. However
that exact error, MSG_start_load_boot_modules. its key/value is never
written to Bundle.properties.

Again current exception is

java.util.MissingResourceException: Can't find resource for bundle
org.openide.util.NbBundle$PBundle, key MSG_start_load_boot_modules

So you can see it literally is the same stuff. Why that key and value
is not written to Bundle.properties. I have yet to figure out.

-- 
William L. Thomson Jr.

Re: [Gentoo packaging] Can't find resource for bundle

Posted by "William L. Thomson Jr." <wl...@o-sinc.com>.
On Mon, 27 Nov 2017 13:24:11 -0500
"William L. Thomson Jr." <wl...@o-sinc.com> wrote:
>
> I am getting lots of these errors
> 
> java.util.MissingResourceException: Can't find resource for bundle
> org.openide.util.NbBundle$PBundle, key MSG_start_load_boot_modules
> 
> Regarding that specific variable. I see it in this file.
> https://github.com/apache/incubator-netbeans/blob/master/core.startup/src/org/netbeans/core/startup/NbEvents.java#L73

It really seems like NbBundleProcessor is just writing things that are
used to Bundles.properties and not other stuff. Or not processing all
things for some reason. Not sure.

This is the one issue I am still stuck on.

-- 
William L. Thomson Jr.

Re: [Gentoo packaging] Can't find resource for bundle

Posted by "William L. Thomson Jr." <wl...@o-sinc.com>.
On Thu, 30 Nov 2017 04:07:00 +0100
Jaroslav Tulach <ja...@gmail.com> wrote:

> Having a Linux package for NetBeans would be great. Thanks for doing
> the work.

I am packaging Netbeans for Gentoo based systems, or things using the
portage tree. 

> If you can separate your problem to set of steps I can run on my
> Ubuntu, I can try to investigate. All I know that

Not that easy I am packaging it from source bit by bit, very abnormal
build. All the netbeans-* directories
https://github.com/Obsidian-StudiosInc/os-xtoo/tree/master/dev-java

With this for various functionality like Annotation processing
https://github.com/Obsidian-StudiosInc/os-xtoo/blob/master/eclass/java-netbeans.eclass

Wrapper package that pulls in 100+ others.
https://github.com/Obsidian-StudiosInc/os-xtoo/blob/master/dev-util/netbeans/netbeans-9999.ebuild

> succeeds fine. Thus the error must be in your special steps.

Yes it is definitely unique to what I am doing.

> Btw. this is the processor that handles @NbBundle.Messages annotation:
> https://github.com/apache/incubator-netbeans/blob/master/openide.util/src/org/netbeans/modules/openide/util/NbBundleProcessor.java

I am aware of you see below. I am using that. It was the first one I
came across. I had to have it or many things would not compile without
the needed Bundle.java/.class Which is generated.

The problem I am having is not all annotations get processed. Many are
missing from the properties file, and I can see them in the sources as
below.



> 2017-11-30 0:47 GMT+01:00 William L. Thomson Jr. <wl...@o-sinc.com>:
> 
> > Pulling my hair and teeth out over this last issue. I have overcome
> > many and making great progress in packaging Netbeans.
> >
> > http://www.enlightenment.org/ss/e-5a1f3d3deff120.32127301.jpg
> >
> > Its fun to see the various things populate as I package pieces. Like
> > the menus etc. Just wish I could get past this one issue. It keeps
> > generating annoying pop-ups :P
> >
> > Working on building core.startup via ant. So I can see what I am not
> > doing correct. Why NbBundleProcessor is not processing all
> > annotations. Looking at code. It seems it is the one that handles
> > @Messages annotations.
> >
> > java.util.MissingResourceException: Can't find resource for bundle
> > org.openide.util.NbBundle$PBundle, key MSG_start_load_boot_modules
> >
> > NbBundle.Messages messages =
> > e.getAnnotation(NbBundle.Messages.class);
> > https://github.com/apache/incubator-netbeans/blob/
> > master/openide.util/src/org/netbeans/modules/openide/util/
> > NbBundleProcessor.java#L73
> >
> > Which is the annotation I am having issues with in this class.
> > https://github.com/apache/incubator-netbeans/blob/
> > master/core.startup/src/org/netbeans/core/startup/NbEvents.java#L73
> >
> > Looking at that code and trying to figure out what I am doing wrong
> > and why its not processing all annotation. Seems to strip out those
> > it thinks are not used or something. It processes some but not all.
> > Unless something is clobbering the Bundle.properties with another
> > one in the same directory. But I think it appends all to that vs
> > multiple for different classes.
> >
> > On Mon, 27 Nov 2017 13:24:11 -0500
> > "William L. Thomson Jr." <wl...@o-sinc.com> wrote:  
> > >
> > > I am getting lots of these errors
> > >
> > > java.util.MissingResourceException: Can't find resource for bundle
> > > org.openide.util.NbBundle$PBundle, key MSG_start_load_boot_modules
> > >
> > > Regarding that specific variable. I see it in this file.
> > > https://github.com/apache/incubator-netbeans/blob/  
> > master/core.startup/src/org/netbeans/core/startup/NbEvents.java#L73  
> > >
> > > Looks like unprocessed annotations. I am assuming I need to
> > > process it. Netbeans 8.2 has it in a Bundle.properties. Which
> > > seems I need as well. The NbBundleProcessor does not seem to be
> > > picking this stuff up. Likely some other processor I am missing
> > > and need to use.
> > >
> > > Thanks!
> > >  
> >
> >
> >
> >
> > --
> > William L. Thomson Jr.
> >  



-- 
William L. Thomson Jr.

Re: [Gentoo packaging] Can't find resource for bundle

Posted by Jaroslav Tulach <ja...@gmail.com>.
Having a Linux package for NetBeans would be great. Thanks for doing the
work.

If you can separate your problem to set of steps I can run on my Ubuntu, I
can try to investigate. All I know that

$ wget https://builds.apache.org/view/Incubator%20Projects/job/
incubator-netbeans-release/lastSuccessfulBuild/artifact/
dist/incubating-netbeans-java--source.zip
$ unzip incub*netbeans*source.zip
$ ant build
$ ant tryme

succeeds fine. Thus the error must be in your special steps.
-jt

Btw. this is the processor that handles @NbBundle.Messages annotation:
https://github.com/apache/incubator-netbeans/blob/master/openide.util/src/org/netbeans/modules/openide/util/NbBundleProcessor.java

2017-11-30 0:47 GMT+01:00 William L. Thomson Jr. <wl...@o-sinc.com>:

> Pulling my hair and teeth out over this last issue. I have overcome
> many and making great progress in packaging Netbeans.
>
> http://www.enlightenment.org/ss/e-5a1f3d3deff120.32127301.jpg
>
> Its fun to see the various things populate as I package pieces. Like
> the menus etc. Just wish I could get past this one issue. It keeps
> generating annoying pop-ups :P
>
> Working on building core.startup via ant. So I can see what I am not
> doing correct. Why NbBundleProcessor is not processing all annotations.
> Looking at code. It seems it is the one that handles @Messages
> annotations.
>
> java.util.MissingResourceException: Can't find resource for bundle
> org.openide.util.NbBundle$PBundle, key MSG_start_load_boot_modules
>
> NbBundle.Messages messages = e.getAnnotation(NbBundle.Messages.class);
> https://github.com/apache/incubator-netbeans/blob/
> master/openide.util/src/org/netbeans/modules/openide/util/
> NbBundleProcessor.java#L73
>
> Which is the annotation I am having issues with in this class.
> https://github.com/apache/incubator-netbeans/blob/
> master/core.startup/src/org/netbeans/core/startup/NbEvents.java#L73
>
> Looking at that code and trying to figure out what I am doing wrong and
> why its not processing all annotation. Seems to strip out those it
> thinks are not used or something. It processes some but not all. Unless
> something is clobbering the Bundle.properties with another one in the
> same directory. But I think it appends all to that vs multiple for
> different classes.
>
> On Mon, 27 Nov 2017 13:24:11 -0500
> "William L. Thomson Jr." <wl...@o-sinc.com> wrote:
> >
> > I am getting lots of these errors
> >
> > java.util.MissingResourceException: Can't find resource for bundle
> > org.openide.util.NbBundle$PBundle, key MSG_start_load_boot_modules
> >
> > Regarding that specific variable. I see it in this file.
> > https://github.com/apache/incubator-netbeans/blob/
> master/core.startup/src/org/netbeans/core/startup/NbEvents.java#L73
> >
> > Looks like unprocessed annotations. I am assuming I need to process
> > it. Netbeans 8.2 has it in a Bundle.properties. Which seems I need as
> > well. The NbBundleProcessor does not seem to be picking this stuff
> > up. Likely some other processor I am missing and need to use.
> >
> > Thanks!
> >
>
>
>
>
> --
> William L. Thomson Jr.
>

Re: [Gentoo packaging] Can't find resource for bundle

Posted by "William L. Thomson Jr." <wl...@o-sinc.com>.
Pulling my hair and teeth out over this last issue. I have overcome
many and making great progress in packaging Netbeans.

http://www.enlightenment.org/ss/e-5a1f3d3deff120.32127301.jpg

Its fun to see the various things populate as I package pieces. Like
the menus etc. Just wish I could get past this one issue. It keeps
generating annoying pop-ups :P

Working on building core.startup via ant. So I can see what I am not
doing correct. Why NbBundleProcessor is not processing all annotations.
Looking at code. It seems it is the one that handles @Messages
annotations.

java.util.MissingResourceException: Can't find resource for bundle
org.openide.util.NbBundle$PBundle, key MSG_start_load_boot_modules

NbBundle.Messages messages = e.getAnnotation(NbBundle.Messages.class);
https://github.com/apache/incubator-netbeans/blob/master/openide.util/src/org/netbeans/modules/openide/util/NbBundleProcessor.java#L73

Which is the annotation I am having issues with in this class.
https://github.com/apache/incubator-netbeans/blob/master/core.startup/src/org/netbeans/core/startup/NbEvents.java#L73

Looking at that code and trying to figure out what I am doing wrong and
why its not processing all annotation. Seems to strip out those it
thinks are not used or something. It processes some but not all. Unless
something is clobbering the Bundle.properties with another one in the
same directory. But I think it appends all to that vs multiple for
different classes.

On Mon, 27 Nov 2017 13:24:11 -0500
"William L. Thomson Jr." <wl...@o-sinc.com> wrote:
>
> I am getting lots of these errors
> 
> java.util.MissingResourceException: Can't find resource for bundle
> org.openide.util.NbBundle$PBundle, key MSG_start_load_boot_modules
> 
> Regarding that specific variable. I see it in this file.
> https://github.com/apache/incubator-netbeans/blob/master/core.startup/src/org/netbeans/core/startup/NbEvents.java#L73
> 
> Looks like unprocessed annotations. I am assuming I need to process
> it. Netbeans 8.2 has it in a Bundle.properties. Which seems I need as
> well. The NbBundleProcessor does not seem to be picking this stuff
> up. Likely some other processor I am missing and need to use.
> 
> Thanks!
> 




-- 
William L. Thomson Jr.

Re: [Gentoo packaging] Can't find resource for bundle

Posted by "William L. Thomson Jr." <wl...@o-sinc.com>.
On Mon, 27 Nov 2017 14:25:00 -0500
Emilian Bold <em...@protonmail.ch> wrote:

> Yes, a [gentoo] tag would be nice.

Ok changed ^. I can remove packaging as well if needed :)

> I believe NbBundleProcessor would be the one to generate that
> Bundle.properties file.

Yes it does, but its not grabbing that other stuff. I think I need
another processor I am not using.
 
> Note how the processor is writing to StandardLocation.CLASS_OUTPUT. I
> assume you have a separate output folder and package that. Note how
> it also creates a Bundle.java source file which will need to be
> compiled too.

Yes for sure that was the first major issue I ran into. Some stuff
would not build because it was looking for Bundle.class. Thus I had to
dig and found the NbBundleProcessor. I thought I would need to make a
CLI wrapper. Till I learned about Processors and how to use them, and
it was very simple. Just --processor org.path.MyProcessor.

Though not sure if you can pass arguments to them if that is even
needed. If not, then I am missing some other annotation processor to
get stuff from classes to the Bundle.properties before compile or
something.

Either way NbBundleProcessor is not adding messages like the following
to Bundle.properties. Where NbBundle wants to load them from.
https://github.com/apache/incubator-netbeans/blob/master/core.startup/src/org/netbeans/core/startup/NbEvents.java#L73

They are totally stripped from the resulting binary. Grepping it does
not show them even in the sources. Same with 8.2. They end up in
Bundle.properties. Such as

org/netbeans/core/startup/Bundle.properties
http://dpaste.com/2XHMJXA#line-63
(temp link)

So this is looking in that file
java.util.MissingResourceException: Can't find resource for bundle
org.openide.util.NbBundle$PBundle, key MSG_start_load_boot_modules

Mine does not have those messages, and is generated from
NbBundleProcessor

-- 
William L. Thomson Jr.

Re: Gentoo packaging: Can't find resource for bundle

Posted by Emilian Bold <em...@protonmail.ch>.
Yes, a [gentoo] tag would be nice.

I believe NbBundleProcessor would be the one to generate that Bundle.properties file.

Note how the processor is writing to StandardLocation.CLASS_OUTPUT. I assume you have a separate output folder and package that. Note how it also creates a Bundle.java source file which will need to be compiled too.

--emi


>-------- Original Message --------
>Subject: Re: Gentoo packaging: Can't find resource for bundle
>Local Time: November 27, 2017 9:11 PM
>UTC Time: November 27, 2017 7:11 PM
>From: antonio@vieiro.net
>To: dev@netbeans.incubator.apache.org
>
>Thanks William,
>
> Having just one thread is better to concentrate on the problem. If you
> feel it's getting too deep then open a new one without worries. Adding
> [gentoo] or something similar to the subject might also help us.
>
> Kind regards,
> Antonio
>
> P.S.: You're completely right: FreeBSD rocks ;-)
>
> El 27/11/17 a las 20:02, William L. Thomson Jr. escribió:
>>On Mon, 27 Nov 2017 19:55:29 +0100
>> Antonio antonio@vieiro.net wrote:
>>>El 27/11/17 a las 19:24, William L. Thomson Jr. escribió:
>>>>The other thread is a bit big. Going to start new ones on individual
>>>> remaining issues. Seems people run into these with the build system
>>>> and projects using the platform. It would be good for all I think.
>>>>Hi William,
>>>My email compiler breaks with multiple Gentoo threads.
>>>I would appreciate you concentrating them in a single thread.
>>>Ok sure I can keep on the original. It was just getting big and did not
>> want to bury issues. Some seem more general when searching for
>> resolutions I have come across many facing the same issues/exceptions.
>>Thus I was thinking to break out some issues with better
>> subjects/titles. So search engines could index the stuff better and
>> bring people to resolutions ideally :)
>>Moot to me either way. 1 massive thread or many small either way :)
>

Re: Gentoo packaging: Can't find resource for bundle

Posted by "William L. Thomson Jr." <wl...@o-sinc.com>.
On Mon, 27 Nov 2017 20:11:52 +0100
Antonio <an...@vieiro.net> wrote:

> Thanks William,
> 
> Having just one thread is better to concentrate on the problem. If
> you feel it's getting too deep then open a new one without worries.
> Adding [gentoo] or something similar to the subject might also help
> us.

I did using Gentoo packaging: ^ .Maybe wasn't not noticeable enough.
I did not want to mislead with mailing list style formatting [gentoo]
like cross posting. But I can add that no problem :)
 
> P.S.: You're completely right: FreeBSD rocks ;-)

I liked FreeBSD when Gentoo had a booth across from them at LWE. When I
was a Gentoo dev manning the booth. Also when I was a Gentoo Foundation
Trustee I really liked what was going on with the FreeBSD Foundation. I
wanted to see about doing some stuff along those lines for Gentoo. I
bailed ~2008 due to others annoying me who most have moved on, though
one remains who caused the initial problems for me in 2008. People got
in the way of progress. Sadly I let them and went away vs digging in
and fighting for what is right. I blame myself for not doing more.

I recently posted on gentoo-dev, a comparison of where Gentoo and
FreeBSD were at in 2008. Where they are now. It is an obvious fail on
behalf of the Gentoo community. But they are far from realizing that.
Still in denial stage....
https://archives.gentoo.org/gentoo-dev/message/94c4c0213e202528e26ee89cebf514c2

You can see the difference a welcoming community and strong foundation
makes comparing Gentoo to FreeBSD. Very hard lesson some still have not
learned sadly...

-- 
William L. Thomson Jr.

Re: Gentoo packaging: Can't find resource for bundle

Posted by Antonio <an...@vieiro.net>.
Thanks William,

Having just one thread is better to concentrate on the problem. If you 
feel it's getting too deep then open a new one without worries. Adding 
[gentoo] or something similar to the subject might also help us.

Kind regards,
Antonio

P.S.: You're completely right: FreeBSD rocks ;-)

El 27/11/17 a las 20:02, William L. Thomson Jr. escribió:
> On Mon, 27 Nov 2017 19:55:29 +0100
> Antonio <an...@vieiro.net> wrote:
> 
>> El 27/11/17 a las 19:24, William L. Thomson Jr. escribió:
>>> The other thread is a bit big. Going to start new ones on individual
>>> remaining issues. Seems people run into these with the build system
>>> and projects using the platform. It would be good for all I think.
>>
>> Hi William,
>>
>> My email compiler breaks with multiple Gentoo threads.
>>
>> I would appreciate you concentrating them in a single thread.
> 
> Ok sure I can keep on the original. It was just getting big and did not
> want to bury issues. Some seem more general when searching for
> resolutions I have come across many facing the same issues/exceptions.
> 
> Thus I was thinking to break out some issues with better
> subjects/titles. So search engines could index the stuff better and
> bring people to resolutions ideally :)
> 
> Moot to me either way. 1 massive thread or many small either way :)
> 

Re: Gentoo packaging: Can't find resource for bundle

Posted by "William L. Thomson Jr." <wl...@o-sinc.com>.
On Mon, 27 Nov 2017 19:55:29 +0100
Antonio <an...@vieiro.net> wrote:

> El 27/11/17 a las 19:24, William L. Thomson Jr. escribió:
> > The other thread is a bit big. Going to start new ones on individual
> > remaining issues. Seems people run into these with the build system
> > and projects using the platform. It would be good for all I think.  
> 
> Hi William,
> 
> My email compiler breaks with multiple Gentoo threads.
> 
> I would appreciate you concentrating them in a single thread.

Ok sure I can keep on the original. It was just getting big and did not
want to bury issues. Some seem more general when searching for
resolutions I have come across many facing the same issues/exceptions.

Thus I was thinking to break out some issues with better
subjects/titles. So search engines could index the stuff better and
bring people to resolutions ideally :)

Moot to me either way. 1 massive thread or many small either way :)

-- 
William L. Thomson Jr.

Re: Gentoo packaging: Can't find resource for bundle

Posted by Antonio <an...@vieiro.net>.

El 27/11/17 a las 19:24, William L. Thomson Jr. escribió:
> The other thread is a bit big. Going to start new ones on individual
> remaining issues. Seems people run into these with the build system and
> projects using the platform. It would be good for all I think.

Hi William,

My email compiler breaks with multiple Gentoo threads.

I would appreciate you concentrating them in a single thread.

Thanks,
Antonio