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 52530 - Exception when browsing src/conf in dist dir after build
Summary: Exception when browsing src/conf in dist dir after build
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Infrastructure (show other bugs)
Version: 4.x
Hardware: Sun Solaris
: P3 blocker (vote)
Assignee: Sherold Dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-16 01:28 UTC by Rochelle Raccah
Modified: 2005-10-16 04:10 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
stack trace (3.21 KB, text/plain)
2004-12-16 01:29 UTC, Rochelle Raccah
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rochelle Raccah 2004-12-16 01:28:19 UTC
After building my ejb module project, then
switching to the files view and exploring the jar
under dist in the explorer, I got the exception in
the attachment.
Comment 1 Rochelle Raccah 2004-12-16 01:29:12 UTC
Created attachment 19325 [details]
stack trace
Comment 2 Nam Nguyen 2004-12-16 02:00:54 UTC
Close as dup of 17014 per this warning in the stack:

java.io.IOException: java.lang.UnsupportedOperationException: Error in
data system. Please reopen the bug #17014 with the following message:

  DataLoader:org.netbeans.modules.j2ee.deployment.config.ConfigDataLoader



DataObject:org.netbeans.modules.j2ee.deployment.config.SecondaryConfigDataObject@909918[MasterFileObject@167264e[file:/opt/J2EE/projects/NewRoster/src/conf/sun-cmp-mappings.xml]]

  PrimaryEntry:org.openide.loaders.FileEntry@167264e



PrimaryFile:MasterFileObject@167264e[file:/opt/J2EE/projects/NewRoster/src/conf/sun-cmp-mappings.xml]



SecondaryFile:AbstractFileObject@19b35e1[jar:file:/opt/J2EE/projects/NewRoster/dist/NewRoster.jar!/META-INF/sun-cmp-mappings.xml]



*** This issue has been marked as a duplicate of 17014 ***
Comment 3 Jaroslav Tulach 2005-02-07 12:39:48 UTC
I know that the issue 17014 gives clear instructions, but it probably
does not count with usecase like the one used in j2eeserver. I do not
know how the ConfigDataLoader, ConfigDataObject and
SecondaryConfigDataObject should work together, but it seems like the
findPrimaryFile is pretty obscure. Please help me write a test case
and then we can reopen again the issue 17014, but without your help
with the testcase, I am hopeless and please continue to track this bug
yourself.
Comment 4 _ ludo 2005-02-25 02:07:47 UTC
cannor reproduce anymore...
Comment 5 Rochelle Raccah 2005-02-25 03:14:08 UTC
I just reproduced it.  Browse to META-INF under dist.
Comment 6 Sherold Dev 2005-03-17 15:06:36 UTC
Setting the TM to 4.1. 
Comment 7 _ pcw 2005-10-16 04:03:34 UTC
See also comments in 17014 by me about this.  Here's the relevant summary.

I found code in ConfigDataLoader.findPrimaryFile() that could sometimes return a
non-null FileObject that was not the FileObject passed in which I suspect breaks
this method's implementation contract as a UniFileLoader.

This situation would occur only with files named "sun-cmp-mappings.xml" and only
when the FileObject passed in was not in the EJB Module's configuration
directory.  This is exactly the situation described here (where the "primary" is
the real primary and the secondary is a file of the same name from the
distribution jar.)

Closing as fixed.

Diffs:
http://serverplugins.netbeans.org/source/browse/serverplugins/sun/sunddui/src/org/netbeans/modules/j2ee/sun/share/config/ConfigDataLoader.java?r1=1.2&r2=1.3
Comment 8 _ pcw 2005-10-16 04:10:22 UTC
Also, I confirmed that ConfigDataLoader.java used by j2eeserver module in NB 4.1
has the same bug (that's how the SJSAS plugin inherited it) so the diffs above,
when applied in an appropriate context would also fix that version.