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 18793 - Errors in OpenIDE-Module-Specification-Version not reported well
Summary: Errors in OpenIDE-Module-Specification-Version not reported well
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Module System (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P4 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-12-18 19:56 UTC by Jeffrey Norton
Modified: 2008-12-23 08:34 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeffrey Norton 2001-12-18 19:56:33 UTC
The following stack trace:

Mon Dec 17 16:27:28 PST 2001: java.lang.NumberFormatException: Module file: 
C:\Programs\FFJ\011217\modules\PublishWebService.jar
Annotation: Module file: C:\Programs\FFJ\011217\modules\PublishWebService.jar
Nested annotation: Even number of pieces: 
org.netbeans.core.modules.InvalidException: java.lang.NumberFormatException: 
Even number of pieces: 
        at org.netbeans.core.modules.Module.parseManifest(Module.java:276)
        at org.netbeans.core.modules.Module.<init>(Module.java:113)
        at org.netbeans.core.modules.ModuleManager.create
(ModuleManager.java:273)
        at org.netbeans.core.modules.ModuleList.scanDir(ModuleList.java:176)
        at org.netbeans.core.modules.ModuleList.scan(ModuleList.java:156)
        at org.netbeans.core.modules.ModuleSystem.scanForNewAndRestore
(ModuleSystem.java:246)
        at org.netbeans.core.NonGui.run(NonGui.java:523)
        at org.netbeans.core.Main.run(Main.java:213)
        at org.openide.TopManager.initializeTopManager(TopManager.java:120)
        at org.openide.TopManager.getDefault(TopManager.java:81)
        at org.netbeans.core.Main.main(Main.java:346)
        at org.netbeans.core.TopThreadGroup.run(TopThreadGroup.java:87)
[catch] at java.lang.Thread.run(Thread.java:484)

turned out to be due to the manifest.mf file, and further the line:

    OpenIDE-Module-Specification-Version: 

I would have been helped by an error message something like:
   The value "" for OpenIDE-Module-Specification-Version in the file
   manifest.mf in the jar C:\Programs\FFJ\011217\modules\PublishWebService.jar
   was invalid, it should be in the format n.n

Also the following doesn't work although it seems like it should:

    OpenIDE-Module-Specification-Version: .9

(note: 0.9 will work however)
Comment 1 Jesse Glick 2001-12-19 01:56:37 UTC
I'll treat this as an enhancement. It *is* reporting the bad string,
as you can see:

"Even number of pieces: "  ...  "java.lang.NumberFormatException: "

Your case is strange in that you left the attribute completely blank,
and probably did not notice the spaces. If you had written:

OpenIDE-Module-Specification-Version: 1.3beta2

it would be more apparent what was wrong. Still the message could be
more verbose and it would be good to list what manifest attribute it
came from.

.9 is not a valid spec version (not a sequence of one or more natural
numbers separated by dots). 0.9 is.
Comment 2 Jesse Glick 2002-01-09 17:41:45 UTC
Have patch.
Comment 3 Jesse Glick 2002-01-10 11:24:45 UTC
committed   * Up-To-Date  1.14.2.1   
core/src/org/netbeans/core/modules/Module.java
committed   * Up-To-Date  1.3.18.1   
openide/src/org/openide/modules/SpecificationVersion.java
Comment 4 Jesse Glick 2002-01-10 11:25:05 UTC
This was for 3.3.1 actually.
Comment 5 Quality Engineering 2003-07-01 16:03:45 UTC
Resolved for 3.4.x or earlier, no new info since then -> verified.

Comment 6 Quality Engineering 2003-07-01 16:40:32 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.