9 Replies Latest reply on Mar 18, 2019 5:07 PM by Glen Conway

    unable to export query results in sql developer

    Jaguars

      Hello All,

       

      I am unable to export the query results in sql developer.PFA attachment of error screenshot.

      Please advice.

       

      Version : 18.3.0.277

        • 1. Re: unable to export query results in sql developer
          Glen Conway

          Happy New Year!  Exporting the query results of "select * from dba_optstat_operations" works fine for me on 18.3.  It works using JDK 1.8.0_192 as well as JDK 9.0.4, and with the Database -> Advanced preference set to use the default JDBC thin driver or the 18.3 instant client with OCI/Thick turned on.

           

          Which Java and Advanced preferences are you using?

          • 2. Re: unable to export query results in sql developer
            Jaguars

            Below is info i see in Database -> Advanced preference

             

             

            java.lang.IllegalArgumentException: URI has an authority component

            at java.io.File.<init>(File.java:423)

            at oracle.dbtools.raptor.ui.URLFileChooser.toFile(URLFileChooser.java:402)

            at oracle.dbtools.raptor.ui.URLFileChooser.setToFirstContextPathDirectory(URLFileChooser.java:1567)

            at oracle.dbtools.raptor.ui.URLFileChooser.setCurrentDirectoryFromPathContext(URLFileChooser.java:1541)

            at oracle.dbtools.raptor.ui.URLFileChooser.setDefaultPathContext(URLFileChooser.java:1612)

            at oracle.dbtools.raptor.ui.URLFileChooser.<init>(URLFileChooser.java:130)

            at oracle.dbtools.raptor.ui.URLFileChooser.<init>(URLFileChooser.java:114)

            at oracle.dbtools.raptor.ui.URLFileChooser.<init>(URLFileChooser.java:110)

            at oracle.dbtools.raptor.ui.URLFileChooser.<init>(URLFileChooser.java:106)

            at oracle.dbtools.raptor.ui.URLFileChooser$URLFileChooserPanel.<init>(URLFileChooser.java:862)

            at oracle.dbtools.raptor.ui.URLFileChooser$URLFileChooserPanel.<init>(URLFileChooser.java:935)

            at oracle.dbtools.raptor.ui.URLFileChooser$URLFileChooserPanel.<init>(URLFileChooser.java:922)

            at oracle.dbtools.raptor.ui.URLFileChooser$URLFileChooserPanel.<init>(URLFileChooser.java:910)

            at oracle.dbtools.raptor.ui.URLFileChooser$URLFileChooserPanel.<init>(URLFileChooser.java:901)

            at oracle.dbtools.raptor.ui.URLFileChooser.createURLFileChooserPanel(URLFileChooser.java:776)

            at oracle.dbtools.raptor.config.TnsnamesDirChooser.<init>(TnsnamesDirChooser.java:37)

            at oracle.dbtools.raptor.config.AdvancedInfo.<init>(AdvancedInfo.java:55)

            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

            at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

            at java.lang.reflect.Constructor.newInstance(Constructor.java:423)

            at java.lang.Class.newInstance(Class.java:442)

            at javax.ide.util.MetaClass.newInstance(MetaClass.java:154)

            at oracle.ide.javaxide.Util.createInstance(Util.java:62)

            at oracle.ide.javaxide.Util.createInstance(Util.java:42)

            at oracle.ide.extension.LazyClassAdapter.createInstance(LazyClassAdapter.java:65)

            at oracle.ide.config.ExtensionSettingsPage.newTraversable(ExtensionSettingsPage.java:106)

            at oracle.ide.config.ExtensionNavigable.newTraversable(ExtensionNavigable.java:87)

            at oracle.ide.panels.MetaTraversable.newTraversable(MetaTraversable.java:219)

            at oracle.ide.panels.MDDPanel.getTraversable(MDDPanel.java:1390)

            at oracle.ide.panels.MDDPanel.access$800(MDDPanel.java:129)

            at oracle.ide.panels.MDDPanel$Tsl.updateSelectedNavigable(MDDPanel.java:1653)

            at oracle.ide.panels.MDDPanel$Tsl.updateSelection(MDDPanel.java:1561)

            at oracle.ide.panels.MDDPanel$Tsl.actionPerformed(MDDPanel.java:1555)

            at javax.swing.Timer.fireActionPerformed(Timer.java:313)

            at javax.swing.Timer$DoPostEvent.run(Timer.java:245)

            at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)

            at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)

            at java.awt.EventQueue.access$500(EventQueue.java:97)

            at java.awt.EventQueue$3.run(EventQueue.java:709)

            at java.awt.EventQueue$3.run(EventQueue.java:703)

            at java.security.AccessController.doPrivileged(Native Method)

            at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)

            at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)

            at oracle.javatools.internal.ui.EventQueueWrapper._dispatchEvent(EventQueueWrapper.java:169)

            at oracle.javatools.internal.ui.EventQueueWrapper.dispatchEvent(EventQueueWrapper.java:151)

            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)

            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)

            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)

            at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:190)

            at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:235)

            at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:233)

            at java.security.AccessController.doPrivileged(Native Method)

            at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:233)

            at java.awt.Dialog.show(Dialog.java:1084)

            at java.awt.Component.show(Component.java:1671)

            at java.awt.Component.setVisible(Component.java:1623)

            at java.awt.Window.setVisible(Window.java:1014)

            at java.awt.Dialog.setVisible(Dialog.java:1005)

            at oracle.bali.ewt.dialog.JEWTDialog.runDialog(JEWTDialog.java:399)

            at oracle.bali.ewt.dialog.JEWTDialog.runDialog(JEWTDialog.java:360)

            at oracle.ide.dialogs.WizardLauncher.runDialog(WizardLauncher.java:55)

            at oracle.ide.panels.TDialogLauncher.showDialog(TDialogLauncher.java:225)

            at oracle.ide.config.IdeSettings.showDialog(IdeSettings.java:875)

            at oracle.ide.config.IdeSettings.showDialog(IdeSettings.java:612)

            at oracle.dbtools.raptor.standalone.IndexedPreferencesCommand$IndexPreferencesTask.invokeLater(IndexedPreferencesCommand.java:219)

            at oracle.dbtools.raptor.standalone.IndexedPreferencesCommand$IndexPreferencesTask$WaitOver$1.run(IndexedPreferencesCommand.java:231)

            at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)

            at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)

            at java.awt.EventQueue.access$500(EventQueue.java:97)

            at java.awt.EventQueue$3.run(EventQueue.java:709)

            at java.awt.EventQueue$3.run(EventQueue.java:703)

            at java.security.AccessController.doPrivileged(Native Method)

            at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)

            at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)

            at oracle.javatools.internal.ui.EventQueueWrapper._dispatchEvent(EventQueueWrapper.java:169)

            at oracle.javatools.internal.ui.EventQueueWrapper.dispatchEvent(EventQueueWrapper.java:151)

            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)

            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)

            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)

            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)

            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)

            at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

            • 3. Re: unable to export query results in sql developer
              Glen Conway

              The message "java.lang.IllegalArgumentException: URI has an authority component" suggests that, relative to the computer you are running SQL Developer on, the SQL Developer user settings are remote (over a "\\" UNC path).

               

              Apparently when you try to open the file or files containing the "Database -> Advanced" settings, SQL Developer is expecting those user settings to be on a local or mapped drive, and so does not expect an authority component, as shown below:

               

              From https://stackoverflow.com/questions/2366270/what-does-uri-has-an-authority-component-mean , we see

               

              Capture.JPG

              So it does not seem advisable to configure SQL Developer in that way.  Try local or mapped drivers instead for your installation files and user settings.

               

              Cheers

              1 person found this helpful
              • 4. Re: unable to export query results in sql developer
                Jaguars

                Hi Glen,

                i have moved the sql developer directory along with all contents from a mapped drive to C drive.Still getting same error.

                Can you please let me know exactly what needs to be changed here.

                • 5. Re: unable to export query results in sql developer
                  Jaguars

                  nevermind...Added below to SQL Developer installation's sqldeveloper.conf file:

                  AddVMOption -Dide.user.dir=C:/SQLDev/.sqldeveloper

                   

                   

                  Works fine now.

                   

                  https://www.databaseadm.com/article/14124622/Encountering+error+%22URI+has+an+authority+component%22+on+certain+SQLDev+o…

                  • 6. Re: unable to export query results in sql developer
                    Glen Conway

                    Yes, sorry, my answer to you was incomplete.  Setting the "ide.user.dir" parameter in the conf file is the tried and true method for controlling where your user settings go.  The expected default on Windows is C:\Users\<your_userid>\AppData\Roaming.

                     

                    So the possibilities here are:

                    1) Your company admins point to a mapped drive by default, causing SQL Developer problems, and you must override them.

                    2) You knew about "ide.user.dir" already and pointed to mapped drive on your own, causing a self-inflicted wound.

                     

                    We must always be grateful we live in the era of Internet search!

                    1 person found this helpful
                    • 7. Re: unable to export query results in sql developer
                      Jaguars

                      Well i dint know abt point 2 earlier..but do know now after some research : ).

                      • 8. Re: unable to export query results in sql developer
                        3251642

                        Is it same solution for  below error ?    can not export data to EXCEL

                         

                        java.lang.NullPointerException

                        at java.io.File.<init>(File.java:277)

                        at oracle.dbtools.raptor.export.ExportGenerationOutputStream.closeCurrentStream(ExportGenerationOutputStream.java:537)

                        at oracle.dbtools.raptor.export.ExportGenerationOutputStream.finished(ExportGenerationOutputStream.java:464)

                        at oracle.dbtools.raptor.export.ExportAPI$1.doWork(ExportAPI.java:1490)

                        at oracle.dbtools.raptor.export.ExportAPI$1.doWork(ExportAPI.java:1453)

                        at oracle.dbtools.raptor.backgroundTask.RaptorTask.call(RaptorTask.java:199)

                        at java.util.concurrent.FutureTask.run(FutureTask.java:266)

                        at oracle.dbtools.raptor.backgroundTask.RaptorTaskManager$RaptorFutureTask.run(RaptorTaskManager.java:702)

                        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

                        at java.util.concurrent.FutureTask.run(FutureTask.java:266)

                        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

                        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

                        at java.lang.Thread.run(Thread.java:748)

                        • 9. Re: unable to export query results in sql developer
                          Glen Conway

                          I think that would be a very good bet, since both your error and the OP's occur during "java.io.File.<init>, even though on different line numbers within the File class.