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 - IllegalArgumentException: String length must be a multiple of four.
Summary: IllegalArgumentException: String length must be a multiple of four.
Status: RESOLVED WORKSFORME
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: David Vancouvering
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-23 21:41 UTC by 2001430
Modified: 2008-08-14 00:05 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 76234


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.