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 164573 - NoClassDefFoundError: org/apache/lucene/util/cache/SimpleLRUCache
Summary: NoClassDefFoundError: org/apache/lucene/util/cache/SimpleLRUCache
Status: RESOLVED FIXED
Alias: None
Product: installer
Classification: Unclassified
Component: Debian (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Yulia Novozhilova
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-06 11:37 UTC by switchfire
Modified: 2009-06-16 17:38 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 147593


Attachments
stacktrace (3.98 KB, text/plain)
2009-05-06 11:37 UTC, switchfire
Details

Note You need to log in before you can comment on or make changes to this bug.
Description switchfire 2009-05-06 11:37:50 UTC
Build: NetBeans IDE 6.5 (Build 090407)
VM: Java HotSpot(TM) Client VM, 11.3-b02, Java(TM) SE Runtime Environment, 1.6.0_13-b03
OS: Linux, 2.6.28-11-generic, i386

User Comments:
GUEST: Clean&Build (either via toolbar or right-click project in tree and select "clean&build").

Doing Clean and then Build (seperatly) works fine.

bugg: Its pretty much sporadic now

switchfire: Trying to bring up the method description window by hovering the mouse over a method in the Navigator. 

Please note that I've also had problems with the Navigator window, in that for some days now, the window has only displayed the 'please wait...' message, never bringing up the members view. This I seem to have fixed, (by closing a particularly large class file), and this is when I discovered the bug now being reported.

GUEST: Started NetBeans



Stacktrace: 
java.lang.NoClassDefFoundError: org/apache/lucene/util/cache/SimpleLRUCache
        at org.apache.lucene.index.TermInfosReader.getThreadResources(TermInfosReader.java:161)
        at org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:228)
        at org.apache.lucene.index.TermInfosReader.terms(TermInfosReader.java:332)
        at org.apache.lucene.index.SegmentReader.terms(SegmentReader.java:713)
        at org.apache.lucene.index.FilterIndexReader.terms(FilterIndexReader.java:188)
        at org.apache.lucene.search.WildcardTermEnum.<init>(WildcardTermEnum.java:69)
Comment 1 switchfire 2009-05-06 11:37:57 UTC
Created attachment 81627 [details]
stacktrace
Comment 2 Rastislav Komara 2009-05-06 12:03:49 UTC
@dbalek: Please, evaluate this. It looks like broken installation.
Comment 3 Dusan Balek 2009-05-06 14:42:12 UTC
That's strange. NetBeans uses Lucene Java 2.3.2 by default. However, SimpleLRUCache has been introduced by Lucene Java
2.4. Could you please check what is your Lucene version, and whether your lucene-core-***.jar contains SimpleLRUCache class.
Comment 4 Dusan Balek 2009-05-12 11:55:35 UTC
Could you please try to delete content of the /var/cache folder located in your NB userdir? Thanks.
Comment 5 Dusan Balek 2009-05-13 09:01:17 UTC
Copied from user's email:
-----------------------------------------------------------------------
The problems started after I did an upgrade to my Ubuntu OS (8.10 to
9.04). Before that point I was using both 6.1 and 6.5 netbeans. I used
the 6.1 version when I needed to edit classes that had been created with
the older IDE as I've found v 6.5 cannot handle these due to changes in
the gui editor. 

Unfortunately, the upgrade to Ubuntu also updated my Netbeans from 6.1
to 6.5, which may have confused things. I can only find one netbeans
folder in my home directory (which of course, is 6.5). So I'm not sure
what the upgrade actually did!
-----------------------------------------------------------------------

It seems that upgrade to Ubuntu also updated the Lucene index (from 2.3.2 required by NetBeans to 2.4.0). However,
content of the old Lucene index jar remains in the NB cache (var/cache/all-resources.dat), so the IDE uses mix of the
2.3.2 and 2.4.0 classes now. Cleaning the var/cache content helps - copied from the user's email:
------------------------------------------------------------------------
I deleted the /var/cache folder contents as you suggest, and the member
view is now working again in Navigator. Additionally, the method javadoc
information box opens up correctly when the mouse hovers over a method
name in the Navigator's member view, which previously, had always caused
the exception.
------------------------------------------------------------------------
Comment 6 Jaroslav Tulach 2009-05-13 09:48:04 UTC
We need to improve the deb and rpm packages a bit. The system has been designed with upgrades in mind, yet only 
upgrades of netbeans-* own packages. After a (cluster) package is installed, it shall touch the 
$cluster_dir/.lastModified file to invalidate any user all-resources cache.

However this does not work for libraries that are symlinked from individual clusters. We need to touch the 
$cluster_dir/.lastModified file as well. Imho this will need a %trigger for each of the packages that a cluster links 
to. Such trigger shall touch the $cluster_dir/.lastModified file to invalidate the all-resources cache.
Comment 7 Yulia Novozhilova 2009-06-15 15:11:38 UTC
Original bug with lucene-core is fixed in Karmic and Jaunty.
https://bugs.launchpad.net/ubuntu/+source/netbeans/+bug/353080

I've filed a separate issue concerning .lastModified information.
http://www.netbeans.org/issues/show_bug.cgi?id=167111