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 8049 - DefaultAttributes should indicate which attrs file it had problems reading
Summary: DefaultAttributes should indicate which attrs file it had problems reading
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: PC Linux
: P4 normal (vote)
Assignee: rmatous
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2000-10-27 13:48 UTC by Jesse Glick
Modified: 2008-12-23 10:30 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 Jesse Glick 2000-10-27 13:48:16 UTC
If you have some filesystem.attributes (or I guess .nbattrs) which has some bad
serialized attributes in it--for example, an attribute whose value is an
instance of some class that no longer exists--an IOException is thrown while
deserializing and the user is notified. Fine.

The problem is that the exception does not tell you which file had the problem!
This happened to me--it said that such-and-such class does not exist to
deserialize, but I did not have any idea where the bad filesystem.attributes. I
patched DefaultAttributes to tell me the resource path to the attributes file,
so that the message was e.g. "Could not read somepkg/filesystem.attributes:
IOException: no class ...", which made it easy to find & fix the problem.

Could you please add this information to the exception? I suggest using
ErrorManager.annotate(Throwable,String) to add the information. Also make sure
that FileUtil.extractJarImpl gives DefaultAttributes the filename it is uÿsing,
too.
Comment 1 rmatous 2000-11-02 09:19:59 UTC
Bug fixed in main trunk. Method loadTable has aditional parametr: String
fileObjectName. Now it is possible to notify user with information about name
of FileObject. Then I changed invocation of this method in extractJarImpl of
FileUtil.
Comment 2 pzajac 2003-02-12 12:58:23 UTC
correctly annotated correctly annotated :

INFORMATIONAL *********** Exception occurred ************ at Wed Feb
12 13:52:20 CET 2003
Annotation: fileName = Pokus.java
Annotation: attrName = testTestik
Annotation: value =
aced000573720018746572746574652e46696c6541747472732454657374696b1bf8c5fd1549bc4f02000149000576616c7565787000000000
java.io.IOException
        at
org.openide.filesystems.XMLMapAttr$Attr.decodeValue(XMLMapAttr.java:586)
        at
org.openide.filesystems.XMLMapAttr$Attr.getObject(XMLMapAttr.java:651)
        at
org.openide.filesystems.XMLMapAttr$Attr.get(XMLMapAttr.java:469)
        at
org.openide.filesystems.XMLMapAttr$Attr.access$000(XMLMapAttr.java:296)
Comment 3 Quality Engineering 2003-07-01 16:16:40 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.