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 70496 - [50cat] Opening Databases node fails and old connections are not imported
Summary: [50cat] Opening Databases node fails and old connections are not imported
Status: RESOLVED WONTFIX
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: PC All
: P3 blocker (vote)
Assignee: Andrei Badea
URL:
Keywords:
: 72210 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-12-16 10:45 UTC by misterm
Modified: 2006-07-10 16:37 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Requested settings file (1.99 KB, text/xml)
2005-12-20 10:15 UTC, misterm
Details
Settings for 4.1 (3.34 KB, text/xml)
2005-12-20 16:10 UTC, misterm
Details

Note You need to log in before you can comment on or make changes to this bug.
Description misterm 2005-12-16 10:45:58 UTC
[ 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)
Comment 1 Andrei Badea 2005-12-16 11:29:01 UTC
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.

Comment 2 misterm 2005-12-16 13:53:29 UTC
The driver jar does not exist anymore. It has been moved. So, connecting using 
NB 4.1 does not work.
Comment 3 Andrei Badea 2005-12-19 10:09:03 UTC
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.
Comment 4 misterm 2005-12-20 10:15:43 UTC
Created attachment 27967 [details]
Requested settings file
Comment 5 misterm 2005-12-20 10:16:40 UTC
File has been attached. Hope it helps.
Comment 6 Andrei Badea 2005-12-20 15:45:46 UTC
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!
Comment 7 misterm 2005-12-20 16:08:26 UTC
Yes, I attached the one for 5.0. I will attach the one for 4.1 soon.
Comment 8 misterm 2005-12-20 16:10:58 UTC
Created attachment 27982 [details]
Settings for 4.1
Comment 9 Andrei Badea 2005-12-20 16:50:49 UTC
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?
Comment 10 misterm 2005-12-20 18:22:36 UTC
It's the 20051201 q-build.
Comment 11 Andrei Badea 2005-12-21 11:43:09 UTC
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.
Comment 12 Andrei Badea 2005-12-21 14:14:12 UTC
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.
Comment 13 Andrei Badea 2006-02-03 13:48:10 UTC
*** Issue 72210 has been marked as a duplicate of this issue. ***
Comment 14 Andrei Badea 2006-07-10 16:37:12 UTC
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.