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 134121 - ArrayIndexOutOfBoundsException at DatabaseServerManager: Lookup not finding db.mysql layer file when starting with fresh userdir
Summary: ArrayIndexOutOfBoundsException at DatabaseServerManager: Lookup not finding d...
Status: RESOLVED DUPLICATE of bug 134577
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: David Vancouvering
URL:
Keywords:
: 134135 134189 134245 134387 134397 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-04-29 06:34 UTC by David Vancouvering
Modified: 2008-09-02 19:46 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Message log file (35.07 KB, text/plain)
2008-04-29 06:38 UTC, David Vancouvering
Details
stacktrace (386 bytes, text/plain)
2008-04-30 06:43 UTC, qingyue
Details
stacktrace (386 bytes, text/plain)
2008-04-30 07:06 UTC, gugrim
Details
stacktrace (386 bytes, text/plain)
2008-04-30 07:24 UTC, gugrim
Details
stacktrace (386 bytes, text/plain)
2008-05-01 00:11 UTC, gnewton
Details
stacktrace (386 bytes, text/plain)
2008-05-02 10:37 UTC, caoticud
Details
stacktrace (7.10 KB, text/plain)
2008-05-04 11:29 UTC, Roman Mostyka
Details
stacktrace (386 bytes, text/plain)
2008-05-04 16:32 UTC, csc
Details
stacktrace (7.10 KB, text/plain)
2008-05-07 12:28 UTC, Petr Chytil
Details
stacktrace (7.10 KB, text/plain)
2008-05-07 12:53 UTC, Radim Roska
Details
stacktrace (7.10 KB, text/plain)
2008-05-07 15:31 UTC, rdelaplante
Details
stacktrace (7.10 KB, text/plain)
2008-05-12 08:43 UTC, Jan Lahoda
Details
stacktrace (7.10 KB, text/plain)
2008-05-12 10:09 UTC, Dan Kolar
Details
stacktrace (386 bytes, text/plain)
2008-05-12 15:52 UTC, xtecuan
Details
stacktrace (7.10 KB, text/plain)
2008-05-12 22:09 UTC, Lukas Jungmann
Details
stacktrace (386 bytes, text/plain)
2008-05-13 00:10 UTC, gnewton
Details
stacktrace (7.10 KB, text/plain)
2008-05-13 07:59 UTC, Peter Pis
Details
stacktrace (386 bytes, text/plain)
2008-05-13 15:29 UTC, sapanparikh18
Details
stacktrace (7.10 KB, text/plain)
2008-05-13 18:30 UTC, tonybeckham
Details
stacktrace (7.10 KB, text/plain)
2008-05-14 11:07 UTC, Roman Mostyka
Details
stacktrace (386 bytes, text/plain)
2008-05-15 10:06 UTC, caoticud
Details
stacktrace (386 bytes, text/plain)
2008-06-02 23:54 UTC, josiahhaswell
Details
stacktrace (386 bytes, text/plain)
2008-07-25 13:36 UTC, aregan
Details
stacktrace (386 bytes, text/plain)
2008-08-02 17:43 UTC, aregan
Details
stacktrace (386 bytes, text/plain)
2008-08-24 13:40 UTC, arthurbuliva
Details
stacktrace (386 bytes, text/plain)
2008-09-02 19:46 UTC, kcundick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Vancouvering 2008-04-29 06:34:24 UTC
When I start NB with a fresh userdir, I get an ArrayIndexOutOfBoundsException:

SEVERE [org.openide.util.RequestProcessor]
java.lang.ArrayIndexOutOfBoundsException: 0
	at org.netbeans.modules.db.mysql.DatabaseServerManager.lookupDatabaseServer(DatabaseServerManager.java:64)

See attachment for full stack trace. 

Just before this I get

WARNING [org.openide.loaders.FolderList]: cannot compute data objects for MultiFileObject@afb167[Databases/NodeProviders]

If I run again with the same userdir, the error goes away.

The offending code is indexing into the list of implementations of DatabaseServer returned by lookup.  If you look in
the layer file for db.mysql, there is a registered implementation of DatabaseServer. For some reason it is not found the
first time you run in a clean userdir.  I'm thinking caching...
Comment 1 David Vancouvering 2008-04-29 06:38:48 UTC
Created attachment 60782 [details]
Message log file
Comment 2 David Vancouvering 2008-04-29 06:40:34 UTC
I made this a P2, since you can restart to fix it, but it leaves a nasty first impression, so it would be very good to
fix.  

Here's my system information:Product Version: NetBeans IDE Dev (Build 080428)
Java: 1.5.0_13; Java HotSpot(TM) Client VM 1.5.0_13-119
System: Mac OS X version 10.5.2 running on i386; MacRoman; en_US (nb)
Comment 3 David Vancouvering 2008-04-29 06:47:27 UTC
FYI, I just tried to reproduce on Windows XP (in a VMWare Fusion VM) and I couldn't reproduce:

Product Version: NetBeans IDE Dev (Build 080428)
Java: 1.5.0_13; Java HotSpot(TM) Client VM 1.5.0_13-119
System: Mac OS X version 10.5.2 running on i386; MacRoman; en_US (nb)
Userdir: /Users/David/.netbeans/dev-db-trunk
Comment 4 David Vancouvering 2008-04-29 06:48:02 UTC
Sorry, wrong system information that last comment, copy-paste error

Product Version: NetBeans IDE Dev (Build 080428)
Java: 1.5.0_13; Java HotSpot(TM) Client VM 1.5.0_13-119
System: Mac OS X version 10.5.2 running on i386; MacRoman; en_US (nb)
Userdir: /Users/David/.netbeans/dev-db-trunk
Comment 5 Lukas Hasik 2008-04-29 08:52:58 UTC
reassigning to db

java.lang.ArrayIndexOutOfBoundsException: 0
	at org.netbeans.modules.db.mysql.DatabaseServerManager.lookupDatabaseServer(DatabaseServerManager.java:64)
	at org.netbeans.modules.db.mysql.DatabaseServerManager.<clinit>(DatabaseServerManager.java:51)
Caused: java.lang.ExceptionInInitializerError
	at org.netbeans.modules.db.mysql.impl.ServerNodeProvider.<init>(ServerNodeProvider.java:73)
Comment 6 David Vancouvering 2008-04-29 16:59:03 UTC
*** Issue 134135 has been marked as a duplicate of this issue. ***
Comment 7 David Vancouvering 2008-04-29 20:18:17 UTC
*** Issue 134189 has been marked as a duplicate of this issue. ***
Comment 8 qingyue 2008-04-30 06:43:14 UTC
Build: NetBeans IDE 6.1 (Build 200804211638)
VM: Java HotSpot(TM) Client VM, 11.0-b11, Java(TM) SE Runtime Environment, 1.6.0_10-beta-b14
OS: Windows XP, 5.1, x86

User Comments: 
Comment 9 qingyue 2008-04-30 06:43:17 UTC
Created attachment 60843 [details]
stacktrace
Comment 10 gugrim 2008-04-30 07:06:24 UTC
Build: NetBeans IDE 6.1 (Build 200804211638)
VM: Java HotSpot(TM) Client VM, 10.0-b19, Java(TM) SE Runtime Environment, 1.6.0_05-b13
OS: Linux, 2.6.11.4-21.17-default, i386

User Comments: 
Starting NB 6.1 first time after install. 
Comment 11 gugrim 2008-04-30 07:06:33 UTC
Created attachment 60845 [details]
stacktrace
Comment 12 gugrim 2008-04-30 07:24:42 UTC
Build: NetBeans IDE 6.1 (Build 200804211638)
VM: Java HotSpot(TM) Client VM, 10.0-b19, Java(TM) SE Runtime Environment, 1.6.0_05-b13
OS: Linux, 2.6.11.4-21.17-default, i386

User Comments: 
Expanding node Databases in the Services view.
Comment 13 gugrim 2008-04-30 07:24:45 UTC
Created attachment 60846 [details]
stacktrace
Comment 14 David Vancouvering 2008-04-30 19:04:53 UTC
*** Issue 134245 has been marked as a duplicate of this issue. ***
Comment 15 gnewton 2008-05-01 00:11:32 UTC
Build: NetBeans IDE 6.1 (Build 200804211638)
VM: Java HotSpot(TM) Client VM, 1.6.0_02-b06, Java(TM) SE Runtime Environment, 1.6.0_02-b06
OS: Windows Vista, 6.0, x86

User Comments: 
connecting to Database
Comment 16 gnewton 2008-05-01 00:11:40 UTC
Created attachment 60904 [details]
stacktrace
Comment 17 caoticud 2008-05-02 10:37:06 UTC
Build: NetBeans IDE 6.1 (Build 200804211638)
VM: Java HotSpot(TM) Client VM, 1.6.0_02-b06, Java(TM) SE Runtime Environment, 1.6.0_02-b06
OS: Windows XP, 5.1, x86

User Comments: 
while trying to run MySql administration tool
Comment 18 caoticud 2008-05-02 10:37:09 UTC
Created attachment 60961 [details]
stacktrace
Comment 19 David Vancouvering 2008-05-02 17:17:08 UTC
*** Issue 134387 has been marked as a duplicate of this issue. ***
Comment 20 David Vancouvering 2008-05-02 17:19:23 UTC
*** Issue 134397 has been marked as a duplicate of this issue. ***
Comment 21 Exceptions Reporter 2008-05-03 14:55:24 UTC
This issue has already 20 duplicates 
Comment 22 Exceptions Reporter 2008-05-03 15:58:42 UTC
This issue has already 5 duplicates 
Comment 23 Roman Mostyka 2008-05-04 11:29:37 UTC
Build: NetBeans IDE Dev (Build 080501)
VM: Java HotSpot(TM) Client VM, 10.0-b19, Java(TM) SE Runtime Environment, 1.6.0_05-b13
OS: Windows XP, 5.1, x86

User Comments: 
1. Clone trunk.
2. Do 'cd main' and then 'ant'.
3. Start IDE.

Result: ExceptionInInitializerError arises.
Comment 24 Roman Mostyka 2008-05-04 11:29:40 UTC
Created attachment 61016 [details]
stacktrace
Comment 25 csc 2008-05-04 16:32:48 UTC
Build: NetBeans IDE 6.1 (Build 200804211638)
VM: Java HotSpot(TM) Client VM, 1.6.0-b105, Java(TM) SE Runtime Environment, 1.6.0-b105
OS: Windows XP, 5.1, x86

User Comments: 
first start of a fresh netbeans 6.1 installation
Comment 26 csc 2008-05-04 16:32:52 UTC
Created attachment 61025 [details]
stacktrace
Comment 27 Exceptions Reporter 2008-05-06 01:06:23 UTC
This issue has already 10 duplicates 
Comment 28 David Vancouvering 2008-05-06 05:32:13 UTC
http://hg.netbeans.org/main?cmd=changeset;node=7611258ac0fc

Note this was fixed a couple of days ago: this changeset was done on April 30. 

I noticed one report was from the 5/1 build.  Has *anyone* since this since May 1st?

David
Comment 29 Tomas Danek 2008-05-06 13:35:50 UTC
probably i do,

java.lang.NullPointerException
	at org.netbeans.modules.db.mysql.nodes.ServerNode$ChildFactory.<init>(ServerNode.java:177)
	at org.netbeans.modules.db.mysql.nodes.ServerNode.create(ServerNode.java:86)
	at org.netbeans.modules.db.mysql.impl.ServerNodeProvider.<init>(ServerNodeProvider.java:73)
	at org.netbeans.modules.db.mysql.impl.ServerNodeProvider.<clinit>(ServerNodeProvider.java:60)
Caused: java.lang.ExceptionInInitializerError
	at java.lang.Class.forName0(Native Method)
..
,,etc

from 
Product Version: NetBeans IDE Dev (Build 200805051203)
Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19
System: Linux version 2.6.24-16-generic running on i386; UTF-8; en_US (nb)
Userdir: /tmp/ud
Comment 30 Petr Chytil 2008-05-07 12:28:53 UTC
Build: NetBeans IDE Dev (Build 200805070003)
VM: Java HotSpot(TM) Client VM, 10.0-b19, Java(TM) SE Runtime Environment, 1.6.0_05-b13
OS: Linux, 2.6.24-17-generic, i386

User Comments: 
Just after IDE startup with clean userdir.
Comment 31 Petr Chytil 2008-05-07 12:28:56 UTC
Created attachment 61115 [details]
stacktrace
Comment 32 Radim Roska 2008-05-07 12:53:34 UTC
Build: NetBeans IDE Dev (Build 200805070003)
VM: Java HotSpot(TM) Client VM, 1.6.0_10-ea-b07, Java(TM) SE Runtime Environment, 1.6.0_10-ea-b07
OS: Linux, 2.6.24-16-generic, i386

User Comments: 
occured right after starting ide
Comment 33 Radim Roska 2008-05-07 12:53:37 UTC
Created attachment 61121 [details]
stacktrace
Comment 34 rdelaplante 2008-05-07 15:31:06 UTC
Build: NetBeans IDE Dev (Build 200805070003)
VM: Java HotSpot(TM) Client VM, 10.0-b19, Java(TM) SE Runtime Environment, 1.6.0_04-b12
OS: Windows Vista, 6.0, x86

User Comments: 
Installed 200805070003 nightly build on Windows Vista, started it up for the first time and go this exception. 	
Comment 35 rdelaplante 2008-05-07 15:31:09 UTC
Created attachment 61136 [details]
stacktrace
Comment 36 Exceptions Reporter 2008-05-09 12:21:58 UTC
This issue has already 20 duplicates 
Comment 37 Jan Lahoda 2008-05-12 08:43:45 UTC
Build: NetBeans IDE Dev (Build 080505)
VM: Java HotSpot(TM) Client VM, 11.0-b11, Java(TM) SE Runtime Environment, 1.6.0_10-beta-b14
OS: Linux, 2.6.24-16-generic, i386

User Comments: 
Comment 38 Jan Lahoda 2008-05-12 08:43:48 UTC
Created attachment 61234 [details]
stacktrace
Comment 39 Dan Kolar 2008-05-12 10:09:44 UTC
Build: NetBeans IDE Dev (Build 20080510193218)
VM: Java HotSpot(TM) Client VM, 11.0-b11, Java(TM) SE Runtime Environment, 1.6.0_10-beta-b21
OS: Windows XP, 5.1, x86

User Comments: 
Started IDE with new userdir
Comment 40 Dan Kolar 2008-05-12 10:09:53 UTC
Created attachment 61245 [details]
stacktrace
Comment 41 xtecuan 2008-05-12 15:52:37 UTC
Build: NetBeans IDE 6.1 (Build 200804211638)
VM: Java HotSpot(TM) Client VM, 10.0-b19, Java(TM) SE Runtime Environment, 1.6.0_05-b13
OS: Linux, 2.6.22-3-686, i386

User Comments: 
Comment 42 xtecuan 2008-05-12 15:52:40 UTC
Created attachment 61264 [details]
stacktrace
Comment 43 Lukas Jungmann 2008-05-12 22:09:34 UTC
Build: NetBeans IDE Dev (Build 20080512182955)
VM: Java HotSpot(TM) Client VM, 10.0-b22, Java(TM) SE Runtime Environment, 1.6.0_06-b02
OS: Windows Vista, 6.0, x86

User Comments: 
start IDE with fresh userdir on win vista
Comment 44 Lukas Jungmann 2008-05-12 22:09:42 UTC
Created attachment 61286 [details]
stacktrace
Comment 45 gnewton 2008-05-13 00:10:38 UTC
Build: NetBeans IDE 6.1 (Build 200804211638)
VM: Java HotSpot(TM) Client VM, 1.6.0_02-b06, Java(TM) SE Runtime Environment, 1.6.0_02-b06
OS: Windows Vista, 6.0, x86

User Comments: 
Connecting to mySQL 3 database
Comment 46 gnewton 2008-05-13 00:10:49 UTC
Created attachment 61294 [details]
stacktrace
Comment 47 Peter Pis 2008-05-13 07:59:04 UTC
Build: NetBeans IDE Dev (Build 200805130003)
VM: Java HotSpot(TM) Client VM, 11.0-b11, Java(TM) SE Runtime Environment, 1.6.0_10-beta-b13
OS: Windows XP, 5.1, x86

User Comments: 
starting NB throes exception
Comment 48 Peter Pis 2008-05-13 07:59:08 UTC
Created attachment 61308 [details]
stacktrace
Comment 49 David Vancouvering 2008-05-13 08:24:17 UTC
I am pretty sure these are related.  I was doing a lookup in a getDefault() method, which itself does a lookup.  This is
causing race conditions.  Please track 134577 -- I am planning to commit a fix tomorrow morning PST.  

If the fix to 134577 does not solve this, please re-open.  I myself am not able to reproduce.

*** This issue has been marked as a duplicate of 134577 ***
Comment 50 sapanparikh18 2008-05-13 15:29:20 UTC
Created attachment 61336 [details]
stacktrace
Comment 51 tonybeckham 2008-05-13 18:30:26 UTC
Created attachment 61344 [details]
stacktrace
Comment 52 Roman Mostyka 2008-05-14 11:07:43 UTC
Created attachment 61371 [details]
stacktrace
Comment 53 Exceptions Reporter 2008-05-14 12:28:18 UTC
This issue has already -1 duplicates 
Comment 54 caoticud 2008-05-15 10:06:27 UTC
Created attachment 61423 [details]
stacktrace
Comment 55 Exceptions Reporter 2008-05-19 13:48:18 UTC
This issue has already 50 duplicates 
Comment 56 josiahhaswell 2008-06-02 23:54:47 UTC
Created attachment 62290 [details]
stacktrace
Comment 57 Exceptions Reporter 2008-07-17 20:23:42 UTC
This issue has already 50 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=37333
Comment 58 aregan 2008-07-25 13:36:43 UTC
Build: NetBeans IDE 6.1 (Build 200804211638)
VM: Java HotSpot(TM) Client VM, 1.5.0_13-119, Java(TM) 2 Runtime Environment, Standard Edition, 1.5.0_13-b05-237
OS: Mac OS X, 10.5.4, i386

User Comments: 


Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.modules.db.mysql.ServerInstance.refreshDatabaseList(ServerInstance.java:453)
        at org.netbeans.modules.db.mysql.ServerInstance$1.run(ServerInstance.java:170)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
        at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)
Comment 59 aregan 2008-07-25 13:36:47 UTC
Created attachment 65637 [details]
stacktrace
Comment 60 aregan 2008-08-02 17:43:15 UTC
Build: NetBeans IDE 6.1 (Build 200804211638)
VM: Java HotSpot(TM) Client VM, 1.5.0_13-119, Java(TM) 2 Runtime Environment, Standard Edition, 1.5.0_13-b05-237
OS: Mac OS X, 10.5.4, i386

User Comments: 


Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.modules.db.mysql.ServerInstance.refreshDatabaseList(ServerInstance.java:453)
        at org.netbeans.modules.db.mysql.ServerInstance$1.run(ServerInstance.java:170)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
        at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)
Comment 61 aregan 2008-08-02 17:43:18 UTC
Created attachment 66392 [details]
stacktrace
Comment 62 arthurbuliva 2008-08-24 13:40:38 UTC
Build: NetBeans IDE 6.1 (Build 200804211638)
VM: Java HotSpot(TM) Client VM, 1.6.0_03-b05, Java(TM) SE Runtime Environment, 1.6.0_03-b05
OS: Linux, 2.6.23.17-88.fc7, i386

User Comments: 
Create new connection

Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.modules.db.mysql.ServerInstance.refreshDatabaseList(ServerInstance.java:453)
        at org.netbeans.modules.db.mysql.ServerInstance$1.run(ServerInstance.java:170)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
        at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)
Comment 63 arthurbuliva 2008-08-24 13:40:44 UTC
Created attachment 68189 [details]
stacktrace
Comment 64 kcundick 2008-09-02 19:46:47 UTC
Build: NetBeans IDE 6.1 (Build 200804211638)
VM: Java HotSpot(TM) Client VM, 1.6.0_03-b05, Java(TM) SE Runtime Environment, 1.6.0_03-b05
OS: Windows XP, 5.1, x86

User Comments: 
Attempting to download DB schema from a datasource in order to create an EntityBean for Persistence.

Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.modules.db.mysql.ServerInstance.refreshDatabaseList(ServerInstance.java:453)
        at org.netbeans.modules.db.mysql.ServerInstance$1.run(ServerInstance.java:170)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
        at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)
Comment 65 kcundick 2008-09-02 19:46:59 UTC
Created attachment 68899 [details]
stacktrace