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 197369 - [70cat] IllegalArgumentException: Original Node from map {position=101, iconResource=org/netbeans/modules/db/resources/database.gif, name=Databases, original=null, displayName=Databases, instanceCreate=org.op
Summary: [70cat] IllegalArgumentException: Original Node from map {position=101, iconR...
Status: RESOLVED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal (vote)
Assignee: Jiri Rechtacek
URL:
Keywords:
: 197367 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-04-03 20:48 UTC by terje7601
Modified: 2011-04-07 14:07 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 178130


Attachments
stacktrace (665 bytes, text/plain)
2011-04-03 20:48 UTC, terje7601
Details
NetBeans messages.log (59.36 KB, text/plain)
2011-04-03 21:16 UTC, terje7601
Details

Note You need to log in before you can comment on or make changes to this bug.
Description terje7601 2011-04-03 20:48:50 UTC
This bug was originally marked as duplicate of bug 185666, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE 7.0 RC1 (Build 201103280000)
VM: Java HotSpot(TM) Client VM, 21.0-b06, Java(TM) SE Runtime Environment, 1.7.0-ea-b136
OS: Windows Vista

User Comments:
terje7601: Cannot expand the Databases node after a fresh startup of NetBeans

hmichel: Expanding Databases node at Services view.

GUEST: Open databases service...

GUEST: trying to view database




Stacktrace: 
java.lang.IllegalArgumentException: Original Node from map {position=101, iconResource=org/netbeans/modules/db/resources/database.gif, name=Databases, original=null, displayName=Databases, instanceCreate=org.openide.nodes.LazyNode[name=null][Name=Databases, displayName=Databases]} is null
   at org.openide.nodes.LazyNode.switchToOriginal(LazyNode.java:85)
   at org.openide.nodes.LazyNode$SwitchChildren.getNodesCount(LazyNode.java:119)
   at org.openide.explorer.view.TreeView$6.run(TreeView.java:1005)
   at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1424)
   at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1968)
Comment 1 terje7601 2011-04-03 20:48:54 UTC
Created attachment 107448 [details]
stacktrace
Comment 2 terje7601 2011-04-03 21:08:19 UTC
Not sure if I did something wrong, but apparently 2 bugs got created: bug 197367 is a duplicate of this one.

Anyway, to reproduce, simply do the following (on a Windows Vista system):

1) download & unzip the OS-independent NetBeans 7.0 RC1 zip file
2) start NetBeans, accept the license agreement, cancel JUnit installation & close the Start Page
3) go to the Services window & click the + to expand the Databases node
** the exception occurs **

That 's all there is to it. Please make this a showstopper for 7.0 final. This is way too easy to reproduce.
Comment 3 terje7601 2011-04-03 21:16:46 UTC
Created attachment 107449 [details]
NetBeans messages.log

This is the messages.log after having done what I described in the comments below (+ closing NetBeans). Please note that there 's another exception before the IllegalArgumentException described in this bug occurs. Namely:

java.lang.ClassCastException: org.netbeans.modules.db.explorer.node.DriverListNode cannot be cast to java.lang.Comparable

So possibly this ClassCastException is the real problem.
Comment 4 terje7601 2011-04-04 11:04:33 UTC
This problem is caused by the use of JDK7.

If i set "netbeans_jdkhome" in netbeans.conf:

to JDK6u24: no problem
to JDK7b136: the exception occurs

tested with NetBeans 6.9.1 & 7.0 RC1
Comment 5 _ gtzabari 2011-04-06 20:11:51 UTC
I am seeing the same issue. This is definitely JDK7-specific but the exception seems to imply Netbeans is the one doing something wrong.
Comment 6 Jaroslav Tulach 2011-04-07 06:19:39 UTC
*** Bug 197367 has been marked as a duplicate of this bug. ***
Comment 7 Jaroslav Tulach 2011-04-07 06:21:42 UTC
Creation of DB root node should be bullet proof, not prevented by access to keystores:

INFO [org.netbeans.core.startup.layers.BinaryFS]: value = org.netbeans.modules.db.explorer.node.RootNode.instance from UI/Runtime/org-netbeans-modules-db-explorer-node-RootNode-instance.instance
org.netbeans.modules.keyring.kde.KWalletProvider$KwalletException: error while trying to access KWallet, during save
	at org.netbeans.modules.keyring.kde.KWalletProvider.save(KWalletProvider.java:96)
	at org.netbeans.api.keyring.Keyring.save(Keyring.java:110)
	at org.netbeans.modules.db.explorer.DatabaseConnectionConvertor$Handler.startElement(DatabaseConnectionConvertor.java:493)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)
	at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:179)
	at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.emptyElement(XMLDTDValidator.java:788)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1343)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2755)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
	at org.netbeans.modules.db.explorer.DatabaseConnectionConvertor.instanceCreate(DatabaseConnectionConvertor.java:208)
	at org.openide.loaders.FolderLookup$ICItem.getInstance(FolderLookup.java:587)
	at org.openide.util.lookup.AbstractLookup$R.allInstances(AbstractLookup.java:1006)
	at org.openide.util.lookup.ProxyLookup$R.computeResult(ProxyLookup.java:551)
	at org.openide.util.lookup.ProxyLookup$R.allInstances(ProxyLookup.java:491)
	at org.openide.util.lookup.ProxyLookup$R.computeResult(ProxyLookup.java:551)
	at org.openide.util.lookup.ProxyLookup$R.allInstances(ProxyLookup.java:491)
	at org.netbeans.modules.db.explorer.ConnectionList.<init>(ConnectionList.java:98)
	at org.netbeans.modules.db.explorer.ConnectionList.getDefault(ConnectionList.java:89)
	at org.netbeans.modules.db.explorer.node.RootNode.instance(RootNode.java:84)
Comment 8 Jiri Rechtacek 2011-04-07 14:07:31 UTC
core-main/rev/4762e7ec74bf