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 27600 - Module XML file for autoload modules not written correctly
Summary: Module XML file for autoload modules not written correctly
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Autoupdate (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P1 blocker (vote)
Assignee: akemr
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-09-26 06:46 UTC by _ briansmith
Modified: 2003-08-05 10:57 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
patch to fix reported problems (1.82 KB, patch)
2002-09-26 06:52 UTC, _ briansmith
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description _ briansmith 2002-09-26 06:46:59 UTC
When an autoload module is installed via
AutoUpdate, the module's XML file will be written
like this:

... prolog ...
<module name="org.brianlsmith.smn.mdr">
    <param name="autoload">true</param>
    <param name="eager">false</param>
    <param name="jar">oad/smnmdr.jar</param>
    <param name="origin">user/autoload</param>
    <param name="release">1</param>
    <param name="reloadable">false</param>
    <param name="specversion">1.0</param>
</module>

Notice that the "jar" parameter has an "oad/"
prefix. The problem is that the code is doing this:
   if (jarName.startsWith("autoload")) {
       autoload = true;
       jarName = jarName.substring("eager");  // <<--
    }

To me, this problem causes my autoload module to
be impossible to install, AFAICT. And, it seems
that this code has been in NetBeans since 3.4
release, from looking at the CVS tags.

Another problem is that if your module is an eager
module, then the XML document will look like:
    ...
    <param name="eager">false</param>
    <param name="jar">/smnmdr.jar</param>
    <param name="origin">user/eager</param>
    ...
where the "jar" parameter has an extra slash.

Another problem is that if your module's jarfile
is prefixed with "eager" or "autoload" without a
slash ("eagertoplease.jar", "autoloadtest.jar"),
they will be incorrectly configured: in the first
case, it will be treated as an eager module file
named "toplease.jar" and in the latter case it
will be treated as an autoload module file named
"test.jar". To fix this you need to include the
slash in the test (e.g. jarFile.startsWith("eager/"))

I gave this Priority=P1 because it seems I cannot
release my tool in NBM form until this is fixed.
But, I am anxious to see any workaround that is
available, particularly one that will work on
NetBeans 3.4 release. And, also if this problem
_does_ occur in NetBeans 3.4 then I would like to
have it nominated for NetBeans 3.4.1
Comment 1 _ briansmith 2002-09-26 06:52:25 UTC
Created attachment 7522 [details]
patch to fix reported problems
Comment 2 akemr 2002-09-26 08:05:49 UTC
Fixed in trunk.

Brian, thanks for your patch! I'm very sorry about such trivial bug :-(

The bug appears only for new autoload or eager module (not presented
in updated IDE configuration) which has explicitely set
needsrestart=false in nbm's info.xml.

Workaround: Set needsrestart=true or omit needsrestart flag in
info.xml at all (default is true)

Appears also in 3.4, marked as 3.4.1_CANDIDATE
Comment 3 Jesse Glick 2002-11-30 20:30:17 UTC
Correcting milestone.
Comment 4 Jaroslav Tulach 2002-12-03 09:55:27 UTC
Hi. This issue is marked as 3.4.1_CANDIDATE. It means that it should be
integrated into release341 one branch. The plan at
http://www.netbeans.org/devhome/docs/releases/34/index.html expected beta1 to be
produced on Dec01. That did not happen due to a lot of outstanding not
integrated candidates like this one. 

Would it be possible to spend few minutes by backporting this fix? Thank you in
advance.
Comment 5 akemr 2002-12-03 10:11:13 UTC
OK, reassign to Maxym to add patch and integrate into release 341 branch
Comment 6 _ mihmax 2002-12-03 11:00:22 UTC
Ales, is the Brian's bugfix OK?
Please, provide a link to your commit

Max
Comment 8 Jesse Glick 2002-12-03 21:57:54 UTC
Not sure what "NEW FIXED" means!
Comment 9 _ mihmax 2002-12-06 14:30:53 UTC
Me too, but IssueZilla marks issue as NEW every time it's reassigned,
and me and Ales were pinging it ;-)

Jesse, have you reviewed the issue? Can you or Ales commit this into
release341 branch? Otherwise reassign to me, I'll commit it myself.

Sincere Max
Comment 10 _ mihmax 2002-12-12 11:43:41 UTC
Please, consider some time for integrating these issues to release341 branch
today (12 Dec 2002), OK?
Comment 11 akemr 2002-12-12 11:49:59 UTC
OK, I'll do it :-)
Comment 12 akemr 2002-12-12 12:06:51 UTC
Integrated into release341 branch
Comment 13 _ mihmax 2002-12-12 12:41:35 UTC
and, hm, CVS log?
Ales, you promised ;-)
Comment 15 Lukas Hasik 2003-08-05 10:57:41 UTC
verified...