11 Replies Latest reply: May 1, 2014 9:52 AM by 1658135 RSS

    User Defined Reports not being saved after reopening SQL Developer

    1658135

      Hi,

       

      I use the feature 'User Defined Reports' a lot, but in my current version 4.0.0.x and 4.0.1.x, After adding my reports under the 'All Reports --> User Defined Reports', I can view the reports as long as I am using the SQL Developer tool. Once I close and open the SQL Developer, all my reports under the 'User Defined Reports' are missing. This feature saves lot of time.

       

      I checked the reports file "C:\Users\<user_name>\AppData\Roaming\SQL Developer\UserReports.xml" file which always shows 0 bytes.

       

      Tried Uninstalling and Installing it back again, no luck

      Tried installing latest version, no luck.

       

      Any thoughts / help would be appreciated.

       

      Thank You,

      User1658135

        • 1. Re: User Defined Reports not being saved after reopening SQL Developer
          rp0428

          Works fine for me with Sql Dev 4.0.1.14.48 on Win XP XP3.

           

          The UserReports.xml file is in folder 'C:\Documents and Settings\Administrator\Application Data\SQL Developer'.

           

          If you are using Windows 7 or 8 you likely don't have write privileges on that folder or are not running sql dev as an administrator.

           

          Try using 'Run as Administrator'.


          • 2. Re: User Defined Reports not being saved after reopening SQL Developer
            1658135

            Hi rp0428,

             

            Thank you for the response.

             

            I have totally uninstalled SQLDeveloper and even removed the registry entries. Opening as Administrator, still could not save a report.

             

            I even tried the option of changing the "SQLDEVELOPER_USER_DIR" to something on the "D" drive, but still no luck. Also the User Defined Extensions option in SQLDeveloper for reports, no luck yet.

             

            I am spending sometime daily on this issue to try different ways to get it working. Any other thoughts?

             

            Thanks,

            User1658135

            • 3. Re: User Defined Reports not being saved after reopening SQL Developer
              Jeff Smith Sqldev Pm-Oracle

              Installing or uninstalling won't do anything. Neither will messing with Registry entires or 'SQLDEVELOPER_USER_DIR' - not even sure what that is?

               

              Can you confirm that you can write/edit a file in your 'C:\Documents and Settings\Administrator\Application Data\SQL Developer' directory? Although on my machine it's under Roaming Profiles...

               

              Also, if you want to change the directory where SQL Developer writes your user session information, do this

               

              edit sqldeveloper/bin/sqldeveloper.con

                 - add the path to the desired location

                  AddVMOption -Duser.home=/Users/username/Dropbox/sqldev


              Save the file, and startup SQL Developer. Your sql history, filters, user defined reports, snippets, etc will all be saved here.

              • 4. Re: User Defined Reports not being saved after reopening SQL Developer
                1658135

                Hi Jeff,

                 

                Thank you for the response.

                 

                I found the article about  'SQLDEVELOPER_USER_DIR' @ at the following location Installing Oracle SQL Developer

                 

                Tried couple of things

                 

                I have tried the option which you have mentioned, however from the Help file in SQLDeveloper I found that the above environment variable is now changed to 'IDE_USER_DIR'. After changing this the directory has changed to my new directory (in my case it's D:\Projects\SQLDeveloper).

                 

                Even after this, when I add a new report from SQL developer, I can see the newly created reports as long as the SQLDeveloper is open, When I check the UserReports.xml file, the file size is 0 bytes, but I can execute the report query.

                 

                I close and open, the report is gone.

                 

                I tried editing the UserReports.xml file and copy the xml content from my previous export of the xml and saved the UserReports.xml and re-opened the SQL developer, I can view the Reports under the 'User Defined Reports' section in SQL developer. I am running as Administrator though.

                 

                Now I am looking into any file permissions, etc., I changed the file permissions to 'Full Control', still no luck.

                 

                Thanks,

                Pranay

                • 5. Re: User Defined Reports not being saved after reopening SQL Developer
                  Jeff Smith Sqldev Pm-Oracle

                  >>, I can view the Reports under the 'User Defined Reports' section in SQL developer. I am running as Administrator though.

                  Yes, but what about as 'You?'


                  Maybe you don't have access to the AppData folder?


                  If not, you might want to open a ticket with your local IT support folks.

                  • 6. Re: User Defined Reports not being saved after reopening SQL Developer
                    1658135

                    Sorry, I should have mentioned that I have tried as both "myself" and as the "Administrator".

                     

                    • When I changed the User IDE home Directory to my location on D drive or previously when in AppData, I do not see any difference in the behavior of SQLDeveloper saving the reports.
                    • Before starting this thread, I have approached my IT support to see if they can help, but the response was that I belong to the 'Administrators' group and I have all the privileges. and they do not have that much of experience with this tool in specific.

                     

                    I know this error is strange, I tried in my personal laptop with the same version (on Windows Vista) , there it works fine without issues. I am able to save my reports there. It's just annoying that I am not being able to trace the issue. Not sure if SQLDeveloper events are logged in any log file.

                     

                    Next I will try creating a VM and run from there, just to see if it works (instead of spending too much time in resolving this) and I will use that for time being.

                     

                    Really appreciate your time, help and thoughts on this issue.

                     

                    Thanks,

                    Pranay

                    • 7. Re: User Defined Reports not being saved after reopening SQL Developer
                      Jeff Smith Sqldev Pm-Oracle

                      you can run in debug mode and see if there's an issue on startup when the user defined reports file is created...or you could open an SR with MOS

                      • 8. Re: User Defined Reports not being saved after reopening SQL Developer
                        1658135

                        Not sure if this error message helps. But On creating new report in Debug Level, this is the error I am getting

                         

                        Error during handleEvent on action 'New Report...' (id=224).

                        None of the attached controllers handled the action.

                        - oracle.ide.controller.IdeAction$ControllerDelegatingController@26d88bf[oracle.dbtools.raptor.report.navigatorV2.ReportNavigatorContextMenu@26d88bf].

                        • 9. Re: User Defined Reports not being saved after reopening SQL Developer
                          1658135

                          Complete Log file. Could not find a way to attach. The error says java.lang.NoClassDefFoundError: Could not initialize class oracle.ide.print.misc.Config

                           

                          ---------------------------

                          D:\DevTools\SQLDeveloper\sqldeveloper\sqldeveloper\bin>sqldeveloper

                          Java asserts are enabled!

                           

                           

                           

                           

                          LOAD TIME : 372Exception while performing action New Report...

                          java.lang.ExceptionInInitializerError

                                  at oracle.ide.print.misc.Util.getConfig(Util.java:12)

                                  at oracle.ide.print.core.Manager.getPageFormat(Manager.java:26)

                                  at oracle.ideimpl.print.ide.Manager.getPageFormat(Manager.java:50)

                                  at oracle.dbtools.raptor.format.ReportFormatOptions.getOrientation(ReportFormatOptions.java:540)

                                  at oracle.dbtools.raptor.export.pdf.PDFXMLUtil.formatPageSetup(PDFXMLUtil.java:234)

                                  at oracle.dbtools.raptor.export.pdf.PDFXMLUtil.toXML(PDFXMLUtil.java:49)

                                  at oracle.dbtools.raptor.controls.display.DisplayModel.toXML(DisplayModel.java:746)

                                  at oracle.dbtools.raptor.controls.display.DisplayModel.toXML(DisplayModel.java:700)

                                  at oracle.dbtools.raptor.report.navigatorV2.ReportNavigatorContextMenu.exportNodes(ReportNavigatorContextMenu.java:622)

                                  at oracle.dbtools.raptor.report.navigatorV2.ReportNavigatorContextMenu.saveUserDefined(ReportNavigatorContextMenu.java:589)

                                  at oracle.dbtools.raptor.report.navigatorV2.ReportNavigatorContextMenu.handleEvent(ReportNavigatorContextMenu.java:350)

                                  at oracle.ide.controller.IdeAction$ControllerDelegatingController.handleEvent(IdeAction.java:1482)

                                  at oracle.ide.controller.IdeAction.performAction(IdeAction.java:663)

                                  at oracle.ide.controller.IdeAction.actionPerformedImpl(IdeAction.java:1153)

                                  at oracle.ide.controller.IdeAction.actionPerformed(IdeAction.java:618)

                                  at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)

                                  at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)

                                  at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)

                                  at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)

                                  at javax.swing.AbstractButton.doClick(AbstractButton.java:376)

                                  at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)

                                  at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877)

                                  at java.awt.Component.processMouseEvent(Component.java:6505)

                                  at javax.swing.JComponent.processMouseEvent(JComponent.java:3320)

                                  at java.awt.Component.processEvent(Component.java:6270)

                                  at java.awt.Container.processEvent(Container.java:2229)

                                  at java.awt.Component.dispatchEventImpl(Component.java:4861)

                                  at java.awt.Container.dispatchEventImpl(Container.java:2287)

                                  at java.awt.Component.dispatchEvent(Component.java:4687)

                                  at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)

                                  at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)

                                  at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)

                                  at java.awt.Container.dispatchEventImpl(Container.java:2273)

                                  at java.awt.Window.dispatchEventImpl(Window.java:2719)

                                  at java.awt.Component.dispatchEvent(Component.java:4687)

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

                                  at java.awt.EventQueue.access$200(EventQueue.java:103)

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

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

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

                                  at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)

                                  at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)

                                  at java.awt.EventQueue$4.run(EventQueue.java:708)

                                  at java.awt.EventQueue$4.run(EventQueue.java:706)

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

                                  at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)

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

                                  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:242)

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

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

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

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

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

                          Caused by: java.lang.IllegalArgumentException: 0 or negative value argument

                                  at javax.print.attribute.standard.MediaPrintableArea.<init>(MediaPrintableArea.java:117)

                                  at oracle.ide.print.misc.Area.<init>(Area.java:57)

                                  at oracle.ide.print.misc.Config.<init>(Config.java:27)

                                  at oracle.ide.print.misc.Config.<clinit>(Config.java:425)

                                  ... 55 more

                          Exception while performing action New Report...

                          java.lang.NoClassDefFoundError: Could not initialize class oracle.ide.print.misc.Config

                                  at oracle.ide.print.misc.Util.getConfig(Util.java:12)

                                  at oracle.ide.print.core.Manager.getPageFormat(Manager.java:26)

                                  at oracle.ideimpl.print.ide.Manager.getPageFormat(Manager.java:50)

                                  at oracle.dbtools.raptor.format.ReportFormatOptions.getOrientation(ReportFormatOptions.java:540)

                                  at oracle.dbtools.raptor.export.pdf.PDFXMLUtil.formatPageSetup(PDFXMLUtil.java:234)

                                  at oracle.dbtools.raptor.export.pdf.PDFXMLUtil.toXML(PDFXMLUtil.java:49)

                          • 10. Re: User Defined Reports not being saved after reopening SQL Developer
                            Gary Graham-Oracle

                            I entirely agree with your comment:

                            I know this error is strange

                            You have tried all the usual things:  reinstall the product, remove / change location of user setting directory.  At first glance the stack trace seems to indicate there may be a jar file missing, but in fact the error originates with an IllegalArgumentException, possibly caused the 0 byte UserReports.xml for all I know.  Apparently your OS must be at least a Windows Vista and you never state the specific JDK version/update used.

                             

                            If you wish, you can try editing the 0 byte UserReports.xml and "seed it" with the following simple query on the SCOTT schema EMP table.

                            <?xml version="1.0" encoding="UTF-8" ?>

                            <displays>

                            <display id="d415b73b-0134-1000-8002-0a0a0a0a0b9b" type="" style="Table" enable="true">

                                <name><![CDATA[ScottEmps]]></name>

                                <description><![CDATA[Employees in the Scott schema]]></description>

                                <tooltip><![CDATA[]]></tooltip>

                                <drillclass><![CDATA[]]></drillclass>

                                <CustomValues>

                                    <TYPE>horizontal</TYPE>

                                </CustomValues>

                                <query>

                                    <sql><![CDATA[select * from emp]]></sql>

                                </query>

                                    <pdf version="VERSION_1_7" compression="CONTENT">

                                        <docproperty title="null" author="null" subject="null" keywords="null" />

                                        <cell toppadding="2" bottompadding="2" leftpadding="2" rightpadding="2" horizontalalign="LEFT" verticalalign="TOP" wrap="true" />

                                        <column>

                                            <heading font="null" size="10" style="NORMAL" color="-16777216" rowshading="-1" labeling="FIRST_PAGE" />

                                            <footing font="null" size="10" style="NORMAL" color="-16777216" rowshading="-1" labeling="NONE" />

                                            <blob blob="NONE" zip="false" />

                                        </column>

                                        <table font="null" size="10" style="NORMAL" color="-16777216" userowshading="false" oddrowshading="-1" evenrowshading="-1" showborders="true" spacingbefore="12" spacingafter="12" horizontalalign="LEFT" />

                                        <header enable="false" generatedate="false">

                                            <data>

                                           

                                            null                                </data>

                                        </header>

                                        <footer enable="false" generatedate="false">

                                            <data value="null" />

                                        </footer>

                                        <security enable="false" useopenpassword="false" openpassword="null" encryption="EXCLUDE_METADATA">

                                            <permission enable="false" permissionpassword="null" allowcopying="true" allowprinting="true" allowupdating="false" allowaccessdevices="false" />

                                        </security>

                                        <pagesetup papersize="LETTER" orientation="1" measurement="in" margintop="1.0" marginbottom="1.0" marginleft="1.0" marginright="1.0" />

                                    </pdf>

                            </display>

                            </displays>

                            Let's hope that either works or, at least, provides some variation in any debug information that gets generated.

                             

                            Regards,

                            Gary

                            SQL Developer Team

                            • 11. Re: User Defined Reports not being saved after reopening SQL Developer
                              1658135

                              Hi Jeff & Gary,

                               

                              Finally I was able to resolve this issue. Now I am able to save the reports.

                               

                              Issue is strange, but still this resulted it.

                               

                              Details : I have Zebra Enterprise Printers setup in my machine as I was testing UPC barcode label printing functionality and that was my Default Printer. 'Zebra QL 200+' printer.

                               

                              When I create a new report, in the debug mode, this error was thrown

                              Caused by: java.lang.IllegalArgumentException: 0 or negative value argument

                                      at javax.print.attribute.standard.MediaPrintableArea.<init>(MediaPrintableArea.java:117)

                               

                              I added the jars explicitly in the classpath, but still no luck. Then I just tried to see if Printing is working through  SQLDeveloper. "File --> PageSetup". The same error was thrown.

                               

                              The constructor of MediaPrintableArea throws IllegalArgumentException, when the printable x,y or the width and height are less than 0. Looks like that's the setting in my default printer which is a Zebra Printer.

                               

                              I went to 'Devices and Printers' on windows, removed the Zebra Printer Devices and then tried the Page Setup, it worked. Later tried creating a new report. It worked.

                               

                              Not sure how the default margin setup of the printer is linked to the Reports creation, but its fixed now.

                               

                              Thanks again for all your support.

                               

                              Regards,

                              Pranay