This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 153265 - JNLP Application Failing with Stack Overflow
Summary: JNLP Application Failing with Stack Overflow
Status: RESOLVED WORKSFORME
Alias: None
Product: apisupport
Classification: Unclassified
Component: Harness (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: rmichalsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-15 22:50 UTC by willfarnaby
Modified: 2008-12-05 03:31 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description willfarnaby 2008-11-15 22:50:47 UTC
NetBeans 6.5 RC2

I've built a JNLP NetBeans Platform application that works fine if it's packaged as a ZIP file and run on its own, or
run from NetBeans IDE. But if it's built and packaged as a JNLP application (by the NetBeans IDE menu-item, producing a
WAR file) it dies miserably when Java Web Started (either remotely or locally).

I'm running Windows XP, SP3, lot's of memory and HDD, dual core CPU.

Here is a log excerpt: the first anomaly is a warning about a "duplicate module" ?! Does anyone know what this may involve?

WARNING [org.netbeans.core.startup.ModuleSystem]
org.netbeans.DuplicateException: org.netbeans.modules.xml is a duplicate of org.netbeans.modules.xml
        at org.netbeans.ModuleManager.subCreate(ModuleManager.java:603)
        at org.netbeans.ModuleManager.createFixed(ModuleManager.java:521)
        at org.netbeans.ModuleManager.createFixed(ModuleManager.java:507)
[catch] at org.netbeans.core.startup.ModuleSystem.loadBootModules(ModuleSystem.java:229)
        at org.netbeans.core.startup.Main.getModuleSystem(Main.java:163)
        at org.netbeans.core.startup.Main.start(Main.java:312)
        at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:110)
        at java.lang.Thread.run(Thread.java:619)
SEVERE [global]

Next, their follows an innumerable number of errors (each producing a JOptionPane dialog box) leading to DEATH of the
web-starting application:

msg
Caused: java.lang.IllegalArgumentException: openide-module-module-dependency-message_MyAppName_en_US
        at java.util.jar.Attributes$Name.<init>(Attributes.java:447)
[catch] at org.openide.util.NbBundle$AttributesMap.get(NbBundle.java:770)
        at org.openide.util.NbBundle$AttributesMap.get(NbBundle.java:753)
        at org.openide.util.NbBundle.getLocalizedValue(NbBundle.java:292)
        at org.openide.util.NbBundle.getLocalizedValue(NbBundle.java:319)
        at org.openide.util.NbBundle.getLocalizedValue(NbBundle.java:342)
        at org.netbeans.FixedModule.getLocalizedAttribute(FixedModule.java:145)
        at org.netbeans.core.startup.NbProblemDisplayer.messageForProblem(NbProblemDisplayer.java:97)
        at org.netbeans.core.startup.NbProblemDisplayer.problemMessagesForModules(NbProblemDisplayer.java:228)
        at org.netbeans.core.startup.NbEvents.logged(NbEvents.java:165)
        at org.netbeans.Events.log(Events.java:163)
        at org.netbeans.core.startup.ModuleList.installNew(ModuleList.java:424)
        at org.netbeans.core.startup.ModuleList.trigger(ModuleList.java:364)
        at org.netbeans.core.startup.ModuleSystem.restore(ModuleSystem.java:276)
        at org.netbeans.core.startup.Main.getModuleSystem(Main.java:165)
        at org.netbeans.core.startup.Main.start(Main.java:312)
        at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:110)
        at java.lang.Thread.run(Thread.java:619)
An attempt was made to look up a localized manifest attribute named:
openide-module-module-dependency-message_MyAppName_en_US
This name is in an invalid format. If you are running the Macintosh MRJ on MacOS X,
make sure that your locale settings are valid. Currently: en_USSEVERE [global]
Comment 1 Peter Pis 2008-11-17 18:51:18 UTC
Reassigning to apisupport. Could you please evaluate?
Comment 2 Jesse Glick 2008-11-17 19:27:19 UTC
I responded on dev@openide pointing to

http://wiki.netbeans.org/DevFaqFileBug

which discusses how to provide information to reproduce a problem from scratch. Without such information, NB developers
can hardly do anything. I have not heard of either of these problems occurring for anyone else running a NB Platform app
in JNLP mode, so either

1. There is some bug in NB which we do not know about and which affects certain configurations only.

2. You have done something unusual to your suite (e.g. overridden build targets) which breaks JNLP mode.

3. Your machine environment is unusual - e.g. an unsupported version of Java, or extra stuff in your app server's classpath.

(In some cases falling under #2 or #3, NB could do a better job of reporting the root problem in a way that leads you to
the fix.)
Comment 3 willfarnaby 2008-11-18 02:15:57 UTC
Yes, thanks. This may be a NetBeans bug (the app does work fine except when packaged and invoked for Java Web Start); in
any case I must investigate this problem. I was hoping that someone on the NetBeans team (or elsewhere) had seen this
situation before.
Comment 4 willfarnaby 2008-11-19 04:57:10 UTC
The "localized manifest attribute" I was using was 72 characters long (the "MyAppName" is in fact a longer string that I
didn't care to supply with the issue text (replacement string should have had the length of the original, in retrospect)).

I'm still curious as to why there's only a problem when app built for, and execution attempted by, JNLP. I'd assume
because the problematic processing is only done for the JNLP use case. This may be part and parcel of (another) unusual,
albeit non-showstopping, issue I'm observing: a "Welcome Page" TopComponent c/w Action and Menu modifications in a
layer.xml AND my own JavaHelp only show up in the JNLP use case. When the app is run from the IDE, or from a ZIP
distribution build, I do not see my "Welcome Page" Window menu item, or my own Java Help (even though everything appears
proper in the layer.xml, etc.).
Comment 5 willfarnaby 2008-11-19 05:00:19 UTC
RE:

The "localized manifest attribute" I was using was 72 characters long (the "MyAppName" is in fact a longer string that I
didn't care to supply with the issue text (replacement string should have had the length of the original, in retrospect)).

AFAIK:

There's a (magic number) limit of 70 characters for a "localized manifest attribute". So my 72 characters caused havoc.
Comment 6 Jesse Glick 2008-11-20 20:48:48 UTC
Yes, manifests limit attr length to 70 characters. I don't know if there is any way we could work around that. Anyway
that should just be a harmless stack trace (which I can try to suppress for NB 7.0).

Can you still reproduce the DuplicateException after making your branding name shorter?
Comment 7 Quality Engineering 2008-11-22 04:45:24 UTC
Integrated into 'main-golden', will be available in build *200811220201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/f6d629f7416e
User: Jesse Glick <jglick@netbeans.org>
Log: #153265 implies that IAE can be thrown making an Attributes.Name just because your branding token is too long.
(FixedModule in fact makes an A.N before calling NbBundle, but the attribute is probably short then - it is the addition of a branding token which makes it arbitrarily long.)
Comment 8 willfarnaby 2008-12-05 03:26:17 UTC
Well, it caused havoc... for example, there was endless rapid-fire model message boxes piling up on top of each other;
as a veteran developer, I'm sure you know exactly what I mean. Process Explorer / Kill was the only solution.

"Yes, manifests limit attr length to 70 characters. I don't know if there is any way we could work around that. Anyway
that should just be a harmless stack trace (which I can try to suppress for NB 7.0).

------------------
Can you still reproduce the DuplicateException after making your branding name shorter?"

I got that to go away. That problem, I believe, was an example of how the agglomerated data from a collection of
layer.xml files can become somewhat pathological (in my experience). I still have a problem of this sort (cf. my posts
on nabble.com) whereby a TopComponent ("Welcome Window") and a few menu items do not apear / shouldn't appear but do in
my application if it's started from the IDE or from a ZIP distribution, but things are apparently OK when the
application is run via JNLP.
Comment 9 willfarnaby 2008-12-05 03:31:13 UTC
(1) "model" message boxes -> "modal" message boxes

(2) To clarify, the DuplicateException problem was likely due to me leaving a couple of spurious things around in the
build, and due to NetBeans not properly (completely) automatically editing project.properties et al. when I changed
something apropos from the NetBeans GUI. The issue I currently have is described accurately.