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 118840 - LayerIndex cannot find the layer file included in another jar
Summary: LayerIndex cannot find the layer file included in another jar
Status: RESOLVED WONTFIX
Alias: None
Product: www
Classification: Unclassified
Component: Builds & Repositories (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks: 118841
  Show dependency tree
 
Reported: 2007-10-14 21:33 UTC by Dongmei Cao
Modified: 2007-10-15 22:05 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Console output from Build 3944 on Hudson (39.47 KB, text/plain)
2007-10-14 21:35 UTC, Dongmei Cao
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dongmei Cao 2007-10-14 21:33:58 UTC
LayIndex can find the layer file included in another jar

After I modified the wrapper module visualweb/woodstock/components to point to a layer from the jar (webui-jsf-dt.jar)
it's wrapping, the LayerIndex task failed on find the layer file with NPE. See the attached file for the full console
out of build #3944.
Comment 1 Dongmei Cao 2007-10-14 21:35:44 UTC
Created attachment 50925 [details]
Console output from Build 3944 on Hudson
Comment 2 Dongmei Cao 2007-10-14 21:38:24 UTC
Currently, layer entry has been removed from the wrapper module visualweb/woodstock/components in order to pass the
build. But this breaks the palette in Visual Web project - there is no woodstock components shown in the palette.
Comment 3 rbalada 2007-10-15 10:24:25 UTC
Updating Summary field and re-assigning to Jesse.

Maybe Summary field value "LayerIndex cannot find layer file referenced from another jar" may sound more appropriate.
I would say (without seeing any stack trace) it is failing on line 122. If this issue would be accepted as a defect, the
solution may require change of single pass through nested for-loops on lines 101-130 into two passes mode (just my $0.02).
Comment 4 Jesse Glick 2007-10-15 17:45:59 UTC
The layer should be kept in the same JAR as the manifest entry referring to it. Please fix your module build accordingly.
Comment 5 Jayashri Visvanathan 2007-10-15 19:00:48 UTC
Can you explain why please ? We have a use case for it because woodstock components are binary integrated into visual
web. It makes sense for the layer file and palette resources to live as part of woodstock repository. Also its seems to
be supported in the IDE and everything works fine at design time and run time. This problem manifests only on hudson. 

any other ideas to fix this issue are welcome.

Thanks
Comment 6 _ sandipchitale 2007-10-15 20:03:00 UTC
This could be easily fixed in:

nbbuild/antsrc/org/netbeans/nbbuild/LayerIndex.java

by looking for the layer files in the jars referred to in the module jar's Manifest file's

Class-Path

attribute.
Comment 7 Jesse Glick 2007-10-15 21:46:40 UTC
I would rather maintain the existing requirement that all layers are in the module JARs. There may be other things
broken otherwise.

As Tor suggested already: if you receive a binary JAR with a layer included, your module's build script should remove
the layer from that JAR and include it in your module's JAR. This is quite straightforward with Ant.
Comment 8 Jesse Glick 2007-10-15 22:05:18 UTC
BTW: if you have a long list of palette entries coming from some external source, maintaining a layer.xml by hand is
probably not the best idea anyway. Consider using the API introduced in issue #26338 to load such entries dynamically
from some more easily maintained index.