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 36339 - AbstractLookup: CCE from XMLDataObject
Summary: AbstractLookup: CCE from XMLDataObject
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Lookup (show other bugs)
Version: 3.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Jaroslav Tulach
URL:
Keywords: RANDOM
: 36361 36430 37262 38054 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-09-29 18:44 UTC by Tomas Zezula
Modified: 2008-12-22 19:06 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Stack Trace (3.66 KB, text/plain)
2003-09-29 18:46 UTC, Tomas Zezula
Details
If there was a way to reproduce the problem, this would probably be the fix (5.63 KB, patch)
2003-10-03 18:29 UTC, Jaroslav Tulach
Details | Diff
Adds logging (5.03 KB, patch)
2003-11-24 18:29 UTC, Jaroslav Tulach
Details | Diff
stack trace from startup (1.88 KB, text/plain)
2003-11-28 22:58 UTC, _ tboudreau
Details
2Mb of AbstractLookup logging when the problem happened for your reading pleasure (29.56 KB, application/octet-stream)
2003-12-09 21:52 UTC, _ tboudreau
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Zezula 2003-09-29 18:44:30 UTC
XMLData object throws NPE and the exception is
rethrown always a key is tyed in the XML editor.
The XML module is unusable, user is not able to
write layer file <==> develop NB nodule.
Comment 1 Tomas Zezula 2003-09-29 18:46:28 UTC
Created attachment 11737 [details]
Stack Trace
Comment 2 _ pkuzel 2003-09-30 09:43:16 UTC
It's possible that there is some non Node.Cookie subclass registered
by loaders.XMLDataObject.Processor. Anyway it looks rather like some
AbstractLookup problem (casting to Object[]?).
Comment 3 David Konecny 2003-10-01 13:10:26 UTC
I talked with Tomas and it is OK for him to wait till Yarda is back on
Monday.
Comment 4 Jesse Glick 2003-10-01 17:51:32 UTC
*** Issue 36361 has been marked as a duplicate of this issue. ***
Comment 5 Jaroslav Tulach 2003-10-03 17:44:24 UTC
I have created XML file from template (XML/XML Document), switched to
editor and typed a key. No exception shown. As the bug says always it
seems to me that it works for me.
Comment 6 Jaroslav Tulach 2003-10-03 18:29:27 UTC
Created attachment 11788 [details]
If there was a way to reproduce the problem, this would probably be the fix
Comment 7 Tomas Zezula 2003-10-08 16:59:15 UTC
Sorry, I am able to reproduce the issue even with attached patch.
Comment 8 Jaroslav Tulach 2003-10-10 12:21:25 UTC
That is bad, but I need a way to reproduce that bug. I still have not
succeeded. The intermitent nature of the issue probably lowers its
priority.
Comment 9 Jaroslav Tulach 2003-10-17 13:49:03 UTC
No new info? I could add some logging code there, but I need the issue
to be reproducible.
Comment 10 Jaroslav Tulach 2003-11-07 12:22:37 UTC
No reliable steps to reproduce provided, closing.
Comment 11 David Konecny 2003-11-10 17:05:42 UTC
*** Issue 36430 has been marked as a duplicate of this issue. ***
Comment 12 David Konecny 2003-11-19 16:27:30 UTC
*** Issue 37262 has been marked as a duplicate of this issue. ***
Comment 13 _ tboudreau 2003-11-19 17:18:25 UTC
I found I can reproduce this at home by disabling *any* module.  I don't 
know if it makes a difference that I'm running a dual processor machine. 
 
I'll do a build tonight off of today's trunk and re-close if I can't reproduce it. 
Comment 14 Jaroslav Tulach 2003-11-24 18:29:16 UTC
Created attachment 12278 [details]
Adds logging
Comment 15 Jaroslav Tulach 2003-11-24 18:30:26 UTC
Tim, I have added a patch to enable logging of AbstractLookup
operations. If you can run the ide as

./netbeans/bin/runide.sh -userdir testuserdir
-J-Dorg.openide.util.lookup.AbstractLookup=true

reproduce the problem and send me the output I would be very thankful.
Comment 16 Jaroslav Tulach 2003-11-26 15:34:29 UTC
Still no way to reproduce. Lowering priority.
Comment 17 Jaroslav Tulach 2003-11-28 16:51:25 UTC
Still not reproducible.
Comment 18 _ tboudreau 2003-11-28 22:57:34 UTC
FYI, with the current build I just got a very similar stack trace on
*startup* (and the IDE never started).  Starting the next time worked
fine.

Reopening - perhaps it's unrelated, but it's close enough that I'm not
so sure.
Comment 19 _ tboudreau 2003-11-28 22:58:01 UTC
Created attachment 12360 [details]
stack trace from startup
Comment 20 Jaroslav Tulach 2003-11-29 09:27:31 UTC
Tim you are right, this is a related exception. As you are only one
who can reproduce the problem have you had a chance to try the patched
version with logging? It would be very valuable to reproduce that
problem and have additional information.
Comment 21 _ tboudreau 2003-11-29 09:55:54 UTC
Okay, which diff do I apply, the first, the second or both?
Comment 22 Jaroslav Tulach 2003-12-01 14:42:04 UTC
The one that adds logging. 
Comment 23 Jaroslav Tulach 2003-12-09 14:06:12 UTC
Petr, is not here somebody who could reproduce this problem on
multiprocessor machine? Otherwise I am affraid I am not going to have
a chance to fix it as it works for me.
Comment 24 _ tboudreau 2003-12-09 21:33:28 UTC
Just reproduced again on Netbeans startup using today's trunk, with a
popup dialog saying Xerces is already on the boot classpath (note the
entry at the end - "New modules:org.netbeans.libs.xerces/1 [1.3.1 2.4.0]"

-------------------------------------------------------------------------------
>Log Session: Tuesday, December 9, 2003 10:16:18 PM CET
>System Info:
  Product Version       = NetBeans IDE Dev (Build ${buildnumber})
  Operating System      = Windows XP version 5.1 running on x86
  Java; VM; Vendor      = 1.4.2-beta; Java HotSpot(TM) Client VM
1.4.2-beta-b19; Sun M
icrosystems Inc.
  Java Home             = C:\j2sdk1.4.2\jre
  System Locale; Encod. = en_US; Cp1252
  Home Dir; Current Dir = C:\Documents and Settings\Tim;
F:\space\nb_all\nbbuild\netbe
ans\bin
  IDE Install; User Dir = F:\space\nb_all\nbbuild\netbeans;
C:\Documents and Settings\
Tim\.netbeans\dev
  CLASSPATH             =
F:\space\nb_all\nbbuild\netbeans\lib\ext\boot.jar;C:\j2sdk1.
4.2\lib\dt.jar;C:\j2sdk1.4.2\lib\tools.jar
  Boot & ext classpath  =
C:\j2sdk1.4.2\jre\lib\rt.jar;C:\j2sdk1.4.2\jre\lib\i18n.jar;
C:\j2sdk1.4.2\jre\lib\sunrsasign.jar;C:\j2sdk1.4.2\jre\lib\jsse.jar;C:\j2sdk1.4.2\jre\
lib\jce.jar;C:\j2sdk1.4.2\jre\lib\charsets.jar;C:\j2sdk1.4.2\jre\classes;C:\j2sdk1.4.2
\jre\lib\ext\dnsns.jar;C:\j2sdk1.4.2\jre\lib\ext\ldapsec.jar;C:\j2sdk1.4.2\jre\lib\ext
\sunjce_provider.jar;C:\j2sdk1.4.2\jre\lib\ext\localedata.jar
  Dynamic classpath     =
F:\space\nb_all\nbbuild\netbeans\lib\core.jar;F:\space\nb_al
l\nbbuild\netbeans\lib\openfile-cli.jar;F:\space\nb_all\nbbuild\netbeans\lib\openide-l
oaders.jar;F:\space\nb_all\nbbuild\netbeans\lib\openide.jar
-------------------------------------------------------------------------------
[org.netbeans.core.modules] *********** Exception occurred
************ at Tue Dec 09
22:16:19 CET 2003
Annotation: Error encountered while reading
Modules/org-netbeans-libs-xerces.xml
java.lang.ClassCastException
        at
org.openide.util.lookup.AbstractLookup$R.getInstancesCache(AbstractLookup.j
ava:572)
        at
org.openide.util.lookup.AbstractLookup$R.allInstances(AbstractLookup.java:6
74)
        at
org.openide.util.lookup.ProxyLookup$R.computeResult(ProxyLookup.java:369)
        at
org.openide.util.lookup.ProxyLookup$R.allInstances(ProxyLookup.java:320)
        at
org.openide.modules.InstalledFileLocator$1.locate(InstalledFileLocator.java
:144)
        at
org.netbeans.core.modules.Util.findLocaleVariantsOf(Util.java:119)
        at
org.netbeans.core.modules.Module.findExtensionsAndVariants(Module.java:586)

        at org.netbeans.core.modules.Module.<init>(Module.java:140)
        at
org.netbeans.core.modules.ModuleManager.create(ModuleManager.java:460)
[catch] at org.netbeans.core.modules.ModuleList$1.run(ModuleList.java:379)
        at
org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:89)
        at
org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:415)
        at
org.netbeans.core.modules.ModuleList.readInitial(ModuleList.java:259)
        at
org.netbeans.core.modules.ModuleSystem.readList(ModuleSystem.java:262)
        at org.netbeans.core.NonGui.run(NonGui.java:340)
        at org.netbeans.core.Main.run(Main.java:271)
        at
org.netbeans.core.NbTopManager.getNbTopManager(NbTopManager.java:231)
        at org.netbeans.core.NbTopManager.get(NbTopManager.java:190)
        at org.netbeans.core.Main.start(Main.java:460)
        at org.netbeans.core.TopThreadGroup.run(TopThreadGroup.java:86)
        at java.lang.Thread.run(Thread.java:534)
[org.netbeans.core.modules #4] Warning - had to upgrade dependencies
for module org.ne
tbeans.modules.cvsclient: added = [module org.netbeans.libs.regexp >
1.2] removed = [p
ackage [org.apache.regexp.RE]]; details: [Regexp is now available only
as an autoload
module, not on classpath: http://libs.netbeans.org/#regexp]
[org.netbeans.core.modules #4] WARNING: Class-Path value
../../ant/lib/ant.jar from F:
\space\nb_all\nbbuild\netbeans\modules\eager\jsp-parser.jar is illegal
according to th
e Java Extension Mechanism: must be relative and not move up directories
New modules:
        org.netbeans.libs.xerces/1 [1.3.1 2.4.0]
Comment 25 _ tboudreau 2003-12-09 21:50:59 UTC
Well, cool, Jarda, I tried your logging patch and the problem appeared
on the very first run with it (maybe the logging affects the timing of
it?).

Good luck reading it, though - startup took over a minute of logging
streaming by.

Whatever AbstractLookup is doing, I hope we've optimized the heck out
of it.

Whoa, and lots more logging when I shut down.
Comment 26 _ tboudreau 2003-12-09 21:52:09 UTC
Created attachment 12490 [details]
2Mb of AbstractLookup logging when the problem happened for your reading pleasure
Comment 27 _ tboudreau 2003-12-09 21:53:35 UTC
Changing the priority, sorry, it doesn't seem like P5 to me if it's
producing strange error messages about duplicate libraries on startup.
Comment 28 _ tboudreau 2003-12-09 23:05:40 UTC
BTW, are you aware that simply holding down the CTRL key in the editor
generates hundreds of calls per second to the AbstractLookup code
that's logging?
Comment 29 Jaroslav Tulach 2003-12-12 07:40:10 UTC
Checking in src/org/openide/util/lookup/AbstractLookup.java;
/cvs/openide/src/org/openide/util/lookup/AbstractLookup.java,v  <-- 
AbstractLookup.java
new revision: 1.45; previous revision: 1.44
done
Processing log script arguments...
More commits to come...
Checking in test/unit/src/org/openide/util/lookup/AbstractLookupTest.java;
/cvs/openide/test/unit/src/org/openide/util/lookup/AbstractLookupTest.java,v
 <--  AbstractLookupTest.java
new revision: 1.25; previous revision: 1.24
Comment 30 Jaroslav Tulach 2003-12-15 09:57:14 UTC
*** Issue 38054 has been marked as a duplicate of this issue. ***
Comment 31 Marian Mirilovic 2004-02-27 13:44:45 UTC
verified duplicate