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 141421

Summary: IllegalArgumentException: String length must be a multiple of four.
Product: db Reporter: 2001430 <2001430>
Component: CodeAssignee: David Vancouvering <davidvc>
Status: RESOLVED WORKSFORME    
Severity: blocker CC: romanmostyka
Priority: P2    
Version: 6.x   
Hardware: PC   
OS: Linux   
URL: http://statistics.netbeans.org/exceptions/detail.do?id=76234
Issue Type: DEFECT Exception Reporter: 76234

Description 2001430 2008-07-23 21:41:46 UTC
Build: NetBeans IDE 6.1 (Build 200805300101)
VM: Java HotSpot(TM) Client VM, 10.0-b22, Java(TM) SE Runtime Environment, 1.6.0_06-b02
OS: Windows XP, 5.1, x86
User comments: 
STACKTRACE: (first 10 lines)
java.lang.IllegalArgumentException: String length must be a multiple of four.
        at org.netbeans.modules.db.mysql.Base64.base64ToByteArray(Base64.java:155)
        at org.netbeans.modules.db.mysql.Base64.base64ToByteArray(Base64.java:135)
        at org.netbeans.modules.db.mysql.MySQLOptions.getAdminPassword(MySQLOptions.java:214)
        at org.netbeans.modules.db.mysql.ServerInstance.getPassword(ServerInstance.java:298)
        at org.netbeans.modules.db.mysql.ui.BasePropertiesPanel.<init>(BasePropertiesPanel.java:108)
        at org.netbeans.modules.db.mysql.ui.PropertiesDialog.<init>(PropertiesDialog.java:73)
        at org.netbeans.modules.db.mysql.StartAction.performAction(StartAction.java:93)
        at org.openide.util.actions.NodeAction$DelegateAction$1.run(NodeAction.java:581)
        at org.netbeans.modules.openide.util.ActionsBridge.doPerformAction(ActionsBridge.java:77)
        at org.openide.util.actions.NodeAction$DelegateAction.actionPerformed(NodeAction.java:577)
Comment 1 Exceptions Reporter 2008-07-26 12:05:28 UTC
This issue has already 10 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=76234
Comment 2 Exceptions Reporter 2008-08-06 12:31:18 UTC
This issue has already 20 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=76234
Comment 3 David Vancouvering 2008-08-13 23:47:50 UTC
Can anyone give me instructions on how to reliably reproduce this?  What's happening apparently is that certain
passwords specified in the MySQL properties dialog, when saved, can not be retrieved because you get the error "String
length must be a multiple of four."

It's as if the Base64 hashing works one way but breaks the other way.  

I can't make this happen, but lots of you obviously can.  If anyone can tell me how to make this happen, I would be most
appreciative.
Comment 4 David Vancouvering 2008-08-14 00:05:28 UTC
I just checked, and we don't even use Base64 encoding right now for the MySQL password.  Please re-open if you can
reproduce in the nightly or NB 6.5 beta builds.