How can I solve out of memory error on excell file in PL/SQL

Hi,
I'm new on PL/SQL. One of the PL/SQL code which is created excell report got out of Memory error. The first reason of this error, excell file not supported more than 65536 data. So I change the excell file separeted sheets. So that the single sheet size cannot exceed 65536 data.
All the data are held on system cach and if many user want to take the report the they would get an out of memory error.
So I want to change the code like that; when out of memory exception raises,
the old excell file save to disk and new excell file is created,
and go on to write the new file without exiting the program.
At the end of the data all the excell file append and show only one file to the user.
I do know how to save the file and create a new file. But I don't know how can PL/SQL program to turn back to loop again when the exception occurs.
Is anyone help me on this issue?
Here is my code
Thank you
dworkbook:=hssfworkbook.new;
dCurrentItem := Get_Block_Property(pCurrentBlock, FIRST_ITEM);     
while not (name_in('system.last_record')='TRUE') loop
/* The data would be written to the excell file column order. */
if (dRow=0) then
          /* Create a new sheet */
elsif (dRow <= dMaxWorksheetNum) then
     /* Data of the report are written here. The data are written in column order */
if (dRow > dMaxWorksheetNum) then
     /* give dRow and dColumn intial value */
/* increase worksheet number */
end if; /* End of if (dRow=1) */
if (isWritten) and not name_in('system.last_record')='TRUE'then
     /* if not at the end of the record and the previously read record is written to the file
     , then go to next record */
     next_record;
end if;
/* save excell report */
workbookwriter.save(dworkbook,global.gethome||dFileName);
web.show_document('/users/'||dFileName,'_BLANK');
/* when exceptions occurs */
EXCEPTION
WHEN ORA_JAVA.EXCEPTION_THROWN THEN
begin
     javaException := ORA_JAVA.LAST_EXCEPTION;
     -- Print out the Exception by using the toString()
     -- Method of the exception Object
     javaException2 := Exception_.new(javaException);
     mess(27002,Exception_.getMessage(javaException2));
     -- and clean up
     ORA_JAVA.CLEAR_EXCEPTION;
exception
     WHEN ORA_JAVA.JAVA_ERROR THEN
-- In this case, the error would be
-- Argument 1 can not be null
mess(27002,ORA_JAVA.LAST_ERROR);
--Clean up
ORA_JAVA.CLEAR_ERROR;
end;
WHEN ORA_JAVA.JAVA_ERROR THEN
-- In this case, the error would be
-- Argument 1 can not be null
message(ORA_JAVA.LAST_ERROR);
--Clean up
ORA_JAVA.CLEAR_ERROR;

No need to double-post... most questions are answered pretty quickly...

Similar Messages

  • How can I trap Out- of-Memory data with no crash after Crop Tool fails to finish?

    The Photoshop 6 beta program froze while using the crop tool on an image size of 8052x5368. I tried to save a file in another program while waiting for the crop to finish (usually about 1 second) and got an out-of-memory error. I checked the D: driv where the file in the other program was saved. I have a flash C: drive and is not selected in the scratch disk preference. Two scratch disks, E: and G:, are selected with a total of about 800GB free space. After closing PS6Beta, the D: drive recovered about 164GB. The D: drive is not selected in the Scratch Disk list. I work with larger files and anticipate this problem again.How can I trap information for Adobe next time?
    Adobe Photoshop Version: 13.0 (13.0 20120305.m.415 2012/03/05:21:00:00) x32
    Operating System: Windows 7 64-bit
    Version: 6.1 Service Pack 1
    System architecture: Intel CPU Family:6, Model:14, Stepping:5 with MMX, SSE Integer, SSE FP, SSE2, SSE3, SSE4.1, SSE4.2, HyperThreading
    Physical processor count: 4
    Logical processor count: 8
    Processor speed: 2664 MHz
    Built-in memory: 16375 MB
    Free memory: 13523 MB
    Memory available to Photoshop: 3255 MB
    Memory used by Photoshop: 60 %
    Image tile size: 128K

    The problem remains for how the c: and d: drives were not selected in the scratch disk list. I tried again with only E: and G: drives and the file completed after 20 minutes with a 27.7G file. It would have been an ovious problem if the "info" diaglog box included the projected file size and/or dimensional units (px or in) because I use the dialog for verifying the size of the image. I wanted to make a 300 x400px image rather than a 300x400inch image( 90000x120000px).
    Thanks for your quick help.

  • Out of memory error with 80Kb file?

    Hi, my pc has 2Gb of Ram, a page file that is setup correctly
    and the physical ram is almost non-used (500Mb)
    When I start DW and load a php file of 80Kb approx., it just
    hangs/locks up. When I wait for it, it gives me an "out of memory"
    error, and when you look in windows task manager, it just keeps
    hogging up ram.
    My laptop is a "simple", 1Gb Hp pavillion, and when I open
    the file there, it just works like it's supposed to, using about
    70Mb of ram, instead of the gigabyte(s) it does on my developer
    machine....
    Adjusting virtual memory has absolutely no effect.. It seems,
    after some reading, that people using 2gb of ram, have the most
    problems in this area?
    Adobe, please help here !
    EDIT: i just tested another file, 136Kb large, that loads
    normal!, so it has to do with the files in specific... If you want
    to test the files, just download "Simplemachines Forum" and load
    the "load.php" or the "post.php" files from the source directory,
    to trigger the lockup...

    mmm... just tried using a "workaround" if you still can call
    it that
    Installed a virtual machine (xp) with less than 2gigs, and it
    works... I really hope someone else has got these kind of errors
    yet.... 2500$ + software, wich I can't use for now... Using
    notepad2 for time being...

  • How to cope with Out of Memory Errors

    Hi, I am distributing a desktop application to the general public written in Java 1.4.2. How much memory is required is approximately propertional to how many files they load so Ive tried to pre-emtp OutOfMemoryErrors by checking when memory usage is 95% and preventing the loading of additional files above this level with the following code:
    protected static void checkMemory()
            throws LowMemoryException
            if (Runtime.getRuntime().freeMemory() < Runtime.getRuntime().maxMemory() * 0.05)
                Runtime.getRuntime().gc();
                if (Runtime.getRuntime().freeMemory() < Runtime.getRuntime().maxMemory() * 0.05)
                    MainWindow.logger.severe("Memory low:" + Runtime.getRuntime().freeMemory() / 1024 / 1024 + "MB");
                    throw new LowMemoryException("Running out of memory");
        }but this code is not robust, sometimes users reports LowMemoryException when the user has only loaded a few files.
    I tried removing this code, but then user can get an OutOfMemory error whcih can cause problems with whatever code was running at the time and leave the application in an inconsistent state, if I just exit the application immediately it would be very annoying for users that are int he middle of something.
    I also have adjusted the -Xms and -Xmx settings but cannot decide on a suitable default.
    What I would ideally like the application to do is to extend its heap space as required upto the limits of the users machine, and if it reaches memory limits handle the lack of memory in a releiable manner allowing the user to continue using the application in a safe way

    Unfortunately the metadata is stored displayed within a JTable, so even if If I had in in a Database I think it would all have to be loaded into memory for display within the JTbale in a timely fashion.
    Anyway I think Ive found the problem with the original code, it was reporting memory low when almost all the allocated memory was being used but had'nt accounted for the fact that maxMemory limit had not been reached so more memory could be allocated.
    I think the correct code is:
    protected static void checkMemory()
            throws LowMemoryException
            if (Runtime.getRuntime().totalMemory()  -  Runtime.getRuntime().freeMemory() > Runtime.getRuntime().maxMemory() * 0.95)
                Runtime.getRuntime().gc();
                if (Runtime.getRuntime().totalMemory()  -  Runtime.getRuntime().freeMemory() >  Runtime.getRuntime().maxMemory() * 0.95)
                    MainWindow.logger.severe("Memory low:" + (Runtime.getRuntime().maxMemory()  - (Runtime.getRuntime().totalMemory()  - Runtime.getRuntime().freeMemory() ))/ 1024 / 1024 + "MB");
                    throw new LowMemoryException("Running out of memory");
        }

  • How can I zero out the memory on my macbook air?

    I have an 11 inch mid 2011 macbook air and cannot figure out how to erase the memory so that none of the data is recoverable. I booted from the recovery HD but when I went to the erase section of the menu, the security options button and the zero out empty space option were both greyed out. How can I clean off my Mac?

    You can't, and don't need to, zero an SSD in Disk Utility. Once you've erased it the data is unrecoverable.

  • How can I solve my 'run time error' accessing MySpace?

    For the last 4 days, everytime I try to log in to my MySpace account I get the same 'runtime error' message as follows....
    'Runtime Error
    Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
    Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
    <!-- Web.Config Configuration File -->
    <configuration>
    <system.web>
    <customErrors mode="Off"/>
    </system.web>
    </configuration>
    Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.
    <!-- Web.Config Configuration File -->
    <configuration>
    <system.web>
    <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
    </system.web>'
    Other people who have tried to log into different MySpace accounts on my page get the same message. however, all other websites are working fine.
    Help! I am totally computer illiterate so any help would be much appretiated!
    BEX83
    MacBook   Mac OS X (10.4.6)  

    Hi tranzrock69,
    Welcome to Apple discussions:)
    I don't think it had anything to do with an MS dnld.
    Glad resetting Safari worked for you thanks for letting us know.
    I didn't recommend resetting Safari, unless it proved necessary,
    Resetting does all of the below, & some folks rather not lose one or the other
    of the items listed, for me it would be my saved names & passwords.
    "Resetting Safari clears the history, empties the cache, clears the Downloads window, and removes all cookies. It also removes any saved user names and passwords or other AutoFill data and clears Google search entries." "
    If your mac is acting oddly & are concerned about the ms dnld, you may want to post in one of the apple fdiscussions forums. OS Tiger forum for instance.
    Enjoy both, your mac & my space!
    Eme'~[)

  • How can I save 3 of 1D arrays into excel file neatly? VI file is attached. Thanks...

    I have 3 of the 1D arrays. When I combine them, I get 1 very long column in excel. Instead I want to have three columns of shorter arrays. I attached the vi. Besides, is there any way I can write on the 1st row of the same excel file.
    Attachments:
    Ali_PID_Control_Loop_10_formula_frontpanel.vi ‏132 KB

    There's more than one way to "combine" arrays.
    Look at the BUILD ARRAY function.
    If you wire three arrays to three inputs, you have a choice of outputs:
    You can CONCATENATE the inputs, in which case the output is a longer 1-D array.
    If you DON'T concatenate them, the output is a 2-D array, which sounds like what you want.
    You will probably want to TRANSPOSE the 2-D ARRAY, as this will give you three columns of N rows. Without transposing, you get three rows of N columns.
    If the original arrays are not equal length, they will be padded with zeroes.
    Steve Bird
    Culverson Software - Elegant software that is a pleasure to use.
    Culverson.com
    Blog for (mostly LabVIEW) programmers: Tips And Tricks

  • Datasheet pasting - how can I figure out where the errors are?

    For example, I am trying to paste a fairly large chunk of data into the Datashet view to use in a list.  (about 30 columns by 9000 rows, so 270,000 cells.) When I try to page, it tells me that about 800 could not be pasted, but does not tell me WHICH
    cells, or even which COLUMNS.   I am sure that if I could just figure out which cells were not being pasted, I could easily figure out WHY there is an error.  Can anybody give me any useful tips to help me pinpoint which columns/cells are having
    the problem? Thanks!

    Hi,
    According to your post, my understanding is that to paste 270,000 cells data into the Datashet view to use in a list.
    Please make sure the view have sufficient columns, otherwise the paste operation will fail.
    A paste operation will also fail in the following situations:
    Some or all of the destination cells are read-only
    Pasting the contents into the selected cells will make them fail the validation rules
    Attempting to paste data that does not match the data type of the destination cells
    Attempting to paste data into a calculated column
    More information:
    Bulk copy and paste into a SharePoint List:
    http://clintoncherry.wordpress.com/2008/02/27/bulk-copy-and-paste-into-a-sharepoint-list/
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • How can I solve an "Unknown server error"?

    I've been trying since YESTERDAY to download the Photoshop trial and it keeps saying that an "unknown server error" occurred with the message: "Sign in is currently unabailable. We are unable to access your account. Please try again later."
    - Always when it happens I AM logged in on the website. It can't be a login issue
    - I have already uninstalled and installed again the Creative Cloud app
    - I have already restarted the computer
    - I have already signed out and in again on the website
    - I have already closed and opened the Creative Cloud window a thousand times
    - And I have already tried later
    I don't know what else to do, and this thing is delaying my work.

    Hi Prii,
    Please refer the KB : http://helpx.adobe.com/creative-cloud/kb/unknown-server-error-launching-cc.html

  • How can I create multiple QR Codes from an Excel File?

    Hi there,
    I am currently trying to set up business cards with a QR Code on the back of each card. Therefore I have an excel spreadsheet, which contains all the data necessary for the business card like name, function, e-mail adress,... the data is then filled in automatically by using the standard function with tags for each column (e.g. table column name is filled in as <<name>> in the specific location on the business card and once executed it is matched with the data from the excel file).
    Is there anything which could help me to automate the personalization of the QR Codes?
    All the best

    For free? Not at the moment. CC does have the ability to create QR codes but only one at a time. In CS6 (perhaps earlier versions?), regular poster/advanced scripter Jongware devised a script to prepare a QR code but again, could only do one at a time.
    However, someone did build on Jongware's QR code to do this from an InDesign file that had the necessary information in tagged text boxes and would prepare QR codes accordingly. However, it would leave them in the InDesign file (e.g. not separate EPS/PDFs).
    So, a long workaround would be:
    install the script and read the thread on the adobe forums (jongware's QR code plus the additional improvement): http://forums.adobe.com/message/4787823#4787823
    data merge the current data into the indesign file using the similar structure as the fourth poster in that post had written
    once all the QR codes are written, create a PDF of the file and then use one of various methods to break up the PDF into single page files: http://colecandoo.wordpress.com/2013/07/13/breaking-up-is-hard-to-do-indesign-files-into-i ndividual-pdfs-that-is/
    It's a lot of work to generate multiple QR codes. A paid solution offered by either Meadows DPS or Woodwing (two companies I have no affiliation with whatsoever) or any other plug-in provider for that matter: http://www.adobe.com/products/indesign/indepth.displayTab3.html may be an alternative that is worth pursuing.

  • HT1414 i was restore my iphone 5 but last time itune show error (-1) so how can i solve this problem?

    i was restore my iphone 5 but last time itune show error (-1) so how can i solve this problem?

    Error -1 indicates a serious hardware failure.
    Try restoring the device again, try on a different computer.  If the issue continues, take the device to Apple for evaluation and possible replacement.

  • I'm a Mac user, at the start of Adobe Lightroom I receive an error of changing modules. How can I solve the problem?

    I'm a Mac user, at the start of Adobe Lightroom I receive an error of changing modules. How can I solve the problem?

    Error changing modules | Lightroom
    Mylenium

  • HT3743 I got an error no 1015 ! what does it mean ? and How Can I solve this issue?

    I got an error no 1015 ! what does it mean ? and How Can I solve this issue?

    Error 1015: This error is typically caused by attempts to downgrade the iPhone, iPad, or iPod touch's software. This can occur when you attempt to restore using an older .ipsw file. Downgrading to a previous version is not supported. To resolve this issue, attempt to restore with the latest iPhone, iPad, or iPod touch software available from Apple. This error can also occur when an unauthorized modification of the iOS has occurred and you are now trying to restore to an authorized, default state.
    Busted...

  • Will 64-bit office fix out of memory error?

    I've been troubleshooting an out of memory error in Excel 2010 for some time. I've read quite a few articles on forums and on MS sites (including here.) I find many hits but none seems to offer a solution that works. One idea that seems to show
    up often is that 64-bit Office versions will have a LOT MORE memory to work with than 32-bit versions. I'm running a 64-bit version of Windows 7, so I'm considering giving Office 2010 64-bit a try. However, I also find a lot of caveats in those articles that
    concern me. On the other hand most of those articles are 2 to 3 years old, so I'm wondering if most of those issues have been dealt with. For example, VBA issues; third-party add-ins that do not (did not) support 64-bit; ActiveX and COM issues.
    Sorry to be overly verbose. My questions pretty much come down to this:
    1. Is 64-bit likely to solve my out of memory problem?
    2. What issues are still unresolved in 64-bit Excel with Windows 7?
    TIA,
    Phil

    If you are an Excel power user working with huge amounts of data, then you would benefit from 64-bit Office being able to utilize more memory.
    MS is recommending 32-bit Office as the default installation on both 32-bit and 64-bit Windows mainly due to compatibility with existing 32-bit controls, add-ins, and VBA.
    This is really not an issue that can be resolved on Office side, it depends on whether you are using any 32-bits controls, add-ins and VBA. The question is those existing 32-bit controls, add-ins and vba need an update to adapter to the 64bit of Office.
    If all your controls, add-ins and VBA is 64 bits, or designed to work with 64 bits of Office, then you are good.
    Bhasker Timilsina (ManTechs Inc)

  • Thread Count and Out Of Memory Error

    Hi,
    I was wondering if setting the ThreadPoolSize to a value which is too low can
    cause an out of memory error. My thought is that when it is time for Weblogic
    to begin garbage collection, if it does not get a thread fast enough it is possible
    that memory would be used up before the garbage collection takes place.
    I am asking this because I am trying to track down the cause of an out-of-memory
    occurrence, while at the same time I believe I need to raise the ThreadPoolSize.
    Thanks,
    Mark

    Oops ...
    I was wondering if setting the ThreadPoolSize to a value which is too
    low can cause an out of memory error.No, but the opposite can be true.
    My thought is that when it is time for Weblogic
    to begin garbage collection, if it does not get a thread fast enough it is
    possible that memory would be used up before the garbage collection
    takes place.Weblogic doesn't do GC ... that's the JVM and if it needs a thread it will
    not be using one of Weblogic's execute threads.
    > I am asking this because I am trying to track down the cause of an
    out-of-memory occurrenceIt could be configuration (new vs. old heap for example), but it is probably
    just data that you are holding on to or native stuff (e.g. type 2 JDBC
    driver objects) that you aren't cleaning up correctly.
    while at the same time I believe I need to raise the ThreadPoolSize.Wait until you fix the memory issue.
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    Clustering Weblogic? You're either using Coherence, or you should be!
    Download a Tangosol Coherence eval today at http://www.tangosol.com/
    "Mark Glatzer" <[email protected]> wrote in message
    news:[email protected]..

Maybe you are looking for

  • Report on Unconfirmed sales orders

    Dear Friends, I have a requirement in which I need to have a report showing all the unconfirmed sales orders and sales order with (Fix delivery date & Quantity) indicator not set. Is there any standard report to solve the above. Please advise. Regard

  • SWF file is not working in Portal PROD System

    Hi All,           We have written custom mxml script in Adobe Flex 3 which displays the list of applications stored in the DB. Then we have posted that .swf file into our Portal KM and then we have created one URL iView with the location from KM. The

  • How to install Adobe Exchange Panel

    All attempts to download the Adobe Exchange Panel end up with a Zip file with no executable file in it. Creative Suite 6 Production Premium Extension Manager CS6 6.0.8.28 Illustrator CS6 16.0.3  64 Bit   Photoshop CS6 13.0.1 64 Bit The download for "

  • HT5539 how do i pair my wireless keyboard and mouse to a new mac mini

    how do i pair my wireless keyboard and mouse to a new mac mini

  • Script without assigning to the output type

    hi i have some doubts in scripts ple tell me how can we execute the script without assigning the form & print program to output type in nace?