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.
[ BUILD # : 20051201 ] [ JDK VERSION : 1.4.2_xx ] The following exception is thrown when opening the Databases node for the first time: java.io.CharConversionException: null at org.openide.xml.XMLUtil.toAttributeValue(XMLUtil.java:449) at org.netbeans.modules.db.explorer.DatabaseConnectionConvertor$AtomicWriter.write(DatabaseConnectionConvertor.java:311) at org.netbeans.modules.db.explorer.DatabaseConnectionConvertor$AtomicWriter.run(DatabaseConnectionConvertor.java:284) at org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:96) at org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:450) at org.netbeans.modules.db.explorer.DatabaseConnectionConvertor.create(DatabaseConnectionConvertor.java:183) at org.netbeans.modules.db.explorer.DatabaseConnectionConvertor.importOldConnections(DatabaseConnectionConvertor.java:199) at org.netbeans.modules.db.explorer.ConnectionList.getDefault(ConnectionList.java:54) at org.netbeans.modules.db.explorer.infos.RootNodeInfo.initChildren(RootNodeInfo.java:40) at org.netbeans.modules.db.explorer.infos.DatabaseNodeInfo.getChildren(DatabaseNodeInfo.java:639) at org.netbeans.modules.db.explorer.DatabaseNodeChildren$3.run(DatabaseNodeChildren.java:86) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:493) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:926)
Sorry, I can't reproduce. It seems you have a connection with a null database URL, which is weird. Are you able to connect that connection in 4.1? Can you to reproduce from a clean userdir? Try to track down the connection which causes the exception and recreate it from scratch in a clean userdir. If you still get the error while importing it in 5.0, please attach the file config/Services/org-netbeans-modules-db-explorer-DatabaseOption.settings to the issue. Note that this file doesn't contain the password to the database, only the database URL.
The driver jar does not exist anymore. It has been moved. So, connecting using NB 4.1 does not work.
Still can't reproduce. Here's what I did: in 4 1 I added two drivers (Oracle and MySQL) and two connections, each one using one of the drivers. Then I deleted the jar file of the MySQL driver from the disk, exited 4.1, started 5.0 and imported the old userdir. When clicking on the Databases node both drivers and both connections were imported correctly, the MySQL driver being marked as invalid (since its jar file was missing). Please provide steps to reproduce or a DatabaseOptions.settings file which triggers the exception.
Created attachment 27967 [details] Requested settings file
File has been attached. Hope it helps.
Sorry, but there was no connection in the attached settings file. Maybe you attached the file from the 5.0 userdir (which you imported from 4.1) instead of the 4.1 one? Please attach the DatabaseOption.settings from the 4.1 userdir. Before attaching, make sure you can reproduce the issue by importing that 4.1 userdir into 5.0. Thanks!
Yes, I attached the one for 5.0. I will attach the one for 4.1 soon.
Created attachment 27982 [details] Settings for 4.1
Thanks, I can reproduce now. One more thing: your build is not 20051201 (as mentioned in the issue description), I suppose it's rather 20051211, right?
It's the 20051201 q-build.
Then maybe you updated the IDE from the Update Center. I can't reproduce the bug in the 20051201 q-build, and moreover, the bug seems to be in some code I integrated on Dec 8 or so. That's what I'm going to fix.
The bug is in 4.1, it somehow sets the connection's driver name to null. I don't know why this happens, but it definitely shouldn't. Newly created connections in 4.1 do contain the driver name. (You can try by deleting the existing connection and registering the driver and connection from scratch. You should then be able to import them to 5.0.) The 4.1 bug is exposed by importing the connections to the new XML registration format in 5.0. The XML format doesn't expect the driver name to be missing (null), nor should it. This isn't likely to occur often, so downgrading to P3.
*** Issue 72210 has been marked as a duplicate of this issue. ***
This issue is not valid for NetBeans 5.5. It can only occur in 5.0 when importing the connections in from the old serialization format in NetBeans 4.1.