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 33883 - "Find in files"->"Restore Saved"->"Search"->Exception
Summary: "Find in files"->"Restore Saved"->"Search"->Exception
Status: RESOLVED FIXED
Alias: None
Product: utilities
Classification: Unclassified
Component: Search (show other bugs)
Version: 3.x
Hardware: All All
: P3 blocker (vote)
Assignee: Marian Petras
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-05-24 17:39 UTC by oneway
Modified: 2003-12-11 14:27 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 oneway 2003-05-24 17:39:11 UTC
NB 3.5 RC2
"Find in files"->"Restore Saved"->"Search" results
in Exception (see below). Used to work fine in 3.4.1

-----------------------------------------------
java.lang.ClassNotFoundException:
org.netbeans.modules.vcscore.search.VcsSearchType
	at
org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:145)
	at
java.lang.ClassLoader.loadClass(ClassLoader.java:255)
	at
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:217)
	at
java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:558)
	at
java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1513)
	at
java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435)
	at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1626)
	at
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
	at
java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
	at
org.netbeans.modules.search.SearchTypePanel.restoreCriterion(SearchTypePanel.java:466)
	at
org.netbeans.modules.search.SearchTypePanel.restoreCriterion(SearchTypePanel.java:455)
	at
org.netbeans.modules.search.SearchTypePanel.restoreButtonActionPerformed(SearchTypePanel.java:230)
	at
org.netbeans.modules.search.SearchTypePanel.access$200(SearchTypePanel.java:63)
	at
org.netbeans.modules.search.SearchTypePanel$3.actionPerformed(SearchTypePanel.java:216)
	at
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1764)
	at
javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1817)
	at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:419)
	at
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:257)
	at
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
	at
java.awt.Component.processMouseEvent(Component.java:5134)
	at
java.awt.Component.processEvent(Component.java:4931)
	at
java.awt.Container.processEvent(Container.java:1566)
	at
java.awt.Component.dispatchEventImpl(Component.java:3639)
	at
java.awt.Container.dispatchEventImpl(Container.java:1623)
	at
java.awt.Component.dispatchEvent(Component.java:3480)
	at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450)
	at
java.awt.LightweightDispatcher.processMouseEvent(Container.java:3165)
	at
java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
	at
java.awt.Container.dispatchEventImpl(Container.java:1609)
	at
java.awt.Window.dispatchEventImpl(Window.java:1590)
	at
java.awt.Component.dispatchEvent(Component.java:3480)
[catch] at
java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
	at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:140)
	at java.awt.Dialog.show(Dialog.java:538)
	at
org.netbeans.core.NbPresenter.superShow(NbPresenter.java:690)
	at
org.netbeans.core.NbPresenter.doShow(NbPresenter.java:733)
	at
org.netbeans.core.NbPresenter.run(NbPresenter.java:721)
	at org.openide.util.Mutex$1.run(Mutex.java:952)
	at
java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:171)
	at
java.awt.EventQueue.dispatchEvent(EventQueue.java:448)
	at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
	at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
	at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
	at
java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
Comment 1 Martin Entlicher 2003-05-26 10:08:01 UTC
A problem in search.
Comment 2 Marian Petras 2003-05-26 11:20:26 UTC
One Way, do you have all modules installed or you have uninstalled
some modules since you last saved criteria?
Comment 3 oneway 2003-05-26 13:08:49 UTC
The criteria was defined in 3.4.1 where it was working fine. After
upgrading to 3.5 RC2, I'm getting the above exception. Defining and
saving the criteria again does not help.

Furthermore, I seem to be not able to get rid of the saved criterias.
Deleting them from Tools->Options->Search Types does not appear to
remove them from the "Find in Files" window.
Comment 4 oneway 2003-05-26 13:16:08 UTC
I did not disable any modules in 3.5 RC2.

All of them are enabled with exception of 
"Xerces Integration" module v2.0.2.1 that somehow is disabled. NB does
not allow me to enable it.

Comment 5 Marian Petras 2003-06-13 11:38:05 UTC
The problem is that the Utilities module tries to load another
modules's criteria (saved in an instance of another module's class).

The fix will be to use a system (global) classloader for reading criteria.
Comment 6 Marian Petras 2003-08-05 15:46:27 UTC
Fixed in the trunk.
Comment 7 Marian Petras 2003-08-05 15:55:13 UTC
Final solution:
The problem was that the default classloader for the Utilities module
wasn't able of loading third-party search types (which is needed
during deserialization of saved criteria).

Since a default instance of each Search Type is available (via
Lookup),  it is also possible to use these instances for obtaining the
corresponding classes. I made a custom ObjectInputStream with a
customized method resolveClass(...). If the default
ObjectInputStream's resolveClass(...) fails, the customized method
tries to pick the class from the set of known classes representing
search types and returns one if it is found.
Comment 8 Marian Petras 2003-08-07 08:36:25 UTC
The "final solution" is not good. Although it works for all search
types present in the current NetBeans IDE distribution, it may not
work for some others (e.g. third-party search types).

The problem is that the mechanism for resolution of classes works only
for classes loadable by the Utilities module's classloader and for
class representing the registered search types. But it won't work for
other classes required by third-party search types which are not
loadable by the Utilities module's classloader.
Comment 9 Marian Petras 2003-08-07 08:40:12 UTC
Fixed.

The new mechanism uses the registered search types for obtaining their
classloaders.