java.lang.NullPointerException when connecting to DB
Running what I think is the latest version of Oracle SQL Developer, 184.108.40.206.73 on JDK 1.6.0_17, Windows XP. Every 2nd or 3rd time I run SQL Dev, I get the following when I go to connect: Error Connecting, with the below in the "Details" java.lang.NullPointerException at oracle.dbtools.raptor.utils.TNSHelper$2.compare(TNSHelper.java:349) at java.util.Arrays.mergeSort(Arrays.java:1270) at java.util.Arrays.sort(Arrays.java:1210) at java.util.Collections.sort(Collections.java:159) at oracle.dbtools.raptor.utils.TNSHelper.getTNSEntries(TNSHelper.java:355) at oracle.dbtools.raptor.utils.TNSHelper.getEntry(TNSHelper.java:216) at oracle.dbtools.raptor.utils.Connections.populateConnectionInfo(Connections.java:645) at oracle.dbtools.raptor.standalone.connection.RaptorConnectionCreator.getConnection(RaptorConnectionCreator.java:62) at oracle.dbtools.raptor.dialogs.conn.ConnectionPrompt.promptForPassword(ConnectionPrompt.java:67) at oracle.jdeveloper.db.adapter.DatabaseProvider.getConnection(DatabaseProvider.java:321) at oracle.jdeveloper.db.adapter.DatabaseProvider.getConnection(DatabaseProvider.java:254) at oracle.jdevimpl.db.adapter.CADatabaseFactory.createConnectionImpl(CADatabaseFactory.java:60) at oracle.javatools.db.DatabaseFactory.createConnection(DatabaseFactory.java:534) at oracle.javatools.db.DatabaseFactory.createDatabase(DatabaseFactory.java:208) at oracle.jdeveloper.db.DatabaseConnections.getDatabase(DatabaseConnections.java:607) at oracle.jdeveloper.db.DatabaseConnections.getDatabase(DatabaseConnections.java:562) at oracle.dbtools.raptor.utils.Connections$ConnectionInfo.getDatabase(Connections.java:145) at oracle.dbtools.raptor.utils.Connections.getConnection(Connections.java:874) at oracle.dbtools.raptor.utils.Connections.getConnection(Connections.java:855) at oracle.dbtools.raptor.navigator.DatabaseConnection.openConnectionImpl(DatabaseConnection.java:117) at oracle.dbtools.raptor.navigator.AbstractConnectionNode.getConnection(AbstractConnectionNode.java:30) at oracle.dbtools.raptor.navigator.ConnectionFilter.getFactory(ConnectionFilter.java:92) at oracle.dbtools.raptor.navigator.ConnectionFilter$1.doWork(ConnectionFilter.java:117) at oracle.dbtools.raptor.navigator.ConnectionFilter$1.doWork(ConnectionFilter.java:102) at oracle.dbtools.raptor.backgroundTask.RaptorTask.call(RaptorTask.java:193) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at oracle.dbtools.raptor.backgroundTask.RaptorTaskManager$RaptorFutureTask.run(RaptorTaskManager.java:492) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Other times, it works fine. Anything I might have done wrong in installing this guy? Any thoughts? Thanks, Michael
Michael, I tried the same in couple of my machines and there are no issues. Can you please post the exact steps you did? Thanks, Ganesh
I get exactly the same error. Running SQL developer on Windows 7.
I just installed the latest SQL Develoepr 2.1 from Oracle's website today on a QA persons PC - Corporate Win XP with latest updates. Getting this same exact error. This poerson is running Oracle client 10.2.0.1.
If you guys are using the TNS connection type, as workaround try setting up Basic connections. Hope that helps, K.
true, but we could also upgrade the client to 11g which is whats supported for 2.1.
Did upgrading to the 11g client solve the issue, I have a report from one of our developers on this same bug.
Sorry, what do you mean with Basic connection ? Could you explain me the steps ? Because, I used and use ver 1.5.5 without problem … the new ver 2.1 doesn't want to work !!! . when I touch on db connection list button, exception java.lang.NullPointerException raised . when I choose file/new/connection, shows hourglass but nothing else ... . also, if I open tool/preferences, all functions work, except "Database" ... when I choose this, the tread hangs. Keep in mind that I'm working on xp with sp3 and I installed ver sqldeveloper 2.1 with sdk ... Thanks in advance for any suggestion. Edited by: user5905008 on 11-feb-2010 7.07
Basic connection type is the default for a new connection inside the properties dialog, but you don't even get there. You did install 2.1 in a new, clean directory, didn't you? If you overwrite a previous version, you'll get unexpected behaviour. Regards, K.
I'm agree ... His behavior is very strange. At the first time, I decompressed zip file into a new dir and at the first run I agreed to import setup from previous version. From the beginning the v2.1 worked wrong. After that, I removed all, new and previous versions. I deleted sqldeveloper folder and also service folder (under \Documents and Settings\...\Application data\...) Also I searched into registry ... Nothing to do ... also new installation hangs ... So, perhaps I have to wait new release ... (perhaps the exceptions or the environment conflict will be fixed). Thanks again. Regards. PS: Please, if you have other suggestions, let me know. Many Thanks.
Barry (sqldev team member) suggested installing an 11g client, so you can try that. Hope that helps, K.
Sorry for delay in my answer and thanks again for reply ... What does Barry mean regarding 11g client ? Because, let me explain, I have 4 orahome set on my machine ... 6 (which is the default), 9, 10 and last 11g !!! I konw ... quite complicate !!! 11g was installed because I needed new ODBC ver. So, perhaps, does Sqldeveloper 2.1 need 11g like default home ? or perhaps, does 11g installation no completed ? I remember that, as usual, universal installer copied all common file during odbc 11g setup ... Thanks.
Mind you need a full or instant client, not ODBC driver... K.
Yes, you are right … it works now. I supposed wrong … 11g common files were not enough … full install needed … Thanks a lot for your support. Ragards. Gio.
viewing date fields
EA1: Is SQL Dev 2.1 able to talk to a DB with no listener? 1.5.5 could.
how to connect sql developer OE schema and Hr schema,
Cant Start Oracle SQL Developer 2.1
connections to Sybase and DB2
Configure SQL Developer for use with SSL
Wrong column being updated
Exporting data with insert statements (with foreign key relationships)
Problem Recognizing syntax in Update Join Query
64bit 2008 R2 keeps asking for Java path
220.127.116.11: Bug editing text columns in multiple rows using editor-window
how to migrate only packages
Data Flow Diagram - Associating Entity or Table with Information Store
2.1 EA1 Various Problems - Case Change/Auto Complete - line paste - & :
2.1 EA1 Export results