I am getting an Out of memory error?
when i try to convert excel file into database if file is too larg! in shows me exception out of memory How to remove that. my memory in 500MB
Edited by: mnpw on Sep 25, 2008 7:28 AM
tsith wrote:
I'm sorry, I didn't realize you were asking for more specific assistance.
Move your mouse over the text in my post that says "XMx and -XMs options" (anywhere on that text will do)
click your left mouse button
Read the discussion there
apply that to your problem.
If you still require assistance, feel free to post back with a more specific question (adding details such as how you execute your code would be helpful as well)
Good Luck
LeeSir,
I am having problem with part in bolding
Plase to be responding with teh codez for moving of mouse.
Thank u
Similar Messages
-
I am getting an out of memory error when I try to open a PDF in Acrobat XI Pro
How do I clear the memory and get rid of this message. Thanks
Hi George
I have just started to get it today. I can open documents previous documents but not new ones.
Debbie -
Report with more than 600 kb image - BO Server getting Out Of memory Error
Hi,
We have a report which displays images and size is above 600 KB.We are getting an "Out Of memory" Error while previewing this report in Business Object Server.
In another situation we tried by giving a dynamic path to the OLE object, but the report is not showing error. We are not able to view the image whose size is more than 600KB
Notes: 1. Image is stored as a BLOB in Oracle Database
2. Connection used inside the report is OLEDB
3. UNIX Environment
Regards,
SathishPlease re-post if this is still an issue to the Business Objects Forum or if you have a valid support contract create a case on line.
-
Spooling to Text File - 30 million records - Getting Out of Memory Error
Hi All,
I have an extremely large oracle table that I need to spool to a .txt file. The table has approximately 30 million records. I'm using Toad For Oracle version 10.5 and I'm on Oracle 10g. I've tried running the following spool command a few times and it keeps crashing...I'm getting a "Out of Memory" error in my Toad window when I execute it as a script. Here's the code:
Spool on
set heading off
SET PAGESIZE 0
SET TRIMSPOOL ON
SET LINESIZE 100
set feedback off
set echo off
set termout off
Spool "C:\spooledtext.txt"
select
column1
from test_table
order by
column2,
column1
Spool off;
An ideas as to how I can get this query to spool to a text file without crashing and running out of memory?
Thanksuse sqlplus.
Or select smaller chunks and use copy to concat them afterwards.
Sybrand Bakker
Senior Oracle DBA -
RoboHelp 9 gives an out of memory error and crashes when I try to import or link a Frame 10 file or
I have Tech Suite 3. If I start a new RoboHelp project and try to import or link Frame files, RoboHelp tries for a while, then I get an Out of Memory error and the program crashes.
I opened one of the sample projects and was able to link to one of my frame files without any problem, so it seems to be an issue with creating something new.
Any suggestions?It happens when I create a new project and then try to import or link frame docs to make up the content. It starts scanning, then crashes. I did get it to the conversion setting page once, but no further.
It does not happen if I open one of the supplied example projects and link a file. But then it doesn't let me choose, during import, any style mapping. And I can't delete the sample project fold
Twice now it has told me when I tried to import (not link, but import) that my .fm file could not be opened, and told me to verify that Frame is installed (it is) and that the file is a valid frame file (it is).
The docs and project are in separate folders on my C: drive. -
Uploading large files from applet to servlet throws out of memory error
I have a java applet that needs to upload files from a client machine
to a web server using a servlet. the problem i am having is that in
the current scheme, files larger than 17-20MB throw an out of memory
error. is there any way we can get around this problem? i will post
the client and server side code for reference.
Client Side Code:
import java.io.*;
import java.net.*;
// this class is a client that enables transfer of files from client
// to server. This client connects to a servlet running on the server
// and transmits the file.
public class fileTransferClient
private static final String FILENAME_HEADER = "fileName";
private static final String FILELASTMOD_HEADER = "fileLastMod";
// this method transfers the prescribed file to the server.
// if the destination directory is "", it transfers the file to
"d:\\".
//11-21-02 Changes : This method now has a new parameter that
references the item
//that is being transferred in the import list.
public static String transferFile(String srcFileName, String
destFileName,
String destDir, int itemID)
if (destDir.equals(""))
destDir = "E:\\FTP\\incoming\\";
// get the fully qualified filename and the mere filename.
String fqfn = srcFileName;
String fname =
fqfn.substring(fqfn.lastIndexOf(File.separator)+1);
try
//importTable importer = jbInit.getImportTable();
// create the file to be uploaded and a connection to
servlet.
File fileToUpload = new File(fqfn);
long fileSize = fileToUpload.length();
// get last mod of this file.
// The last mod is sent to the servlet as a header.
long lastMod = fileToUpload.lastModified();
String strLastMod = String.valueOf(lastMod);
URL serverURL = new URL(webadminApplet.strServletURL);
URLConnection serverCon = serverURL.openConnection();
// a bunch of connection setup related things.
serverCon.setDoInput(true);
serverCon.setDoOutput(true);
// Don't use a cached version of URL connection.
serverCon.setUseCaches (false);
serverCon.setDefaultUseCaches (false);
// set headers and their values.
serverCon.setRequestProperty("Content-Type",
"application/octet-stream");
serverCon.setRequestProperty("Content-Length",
Long.toString(fileToUpload.length()));
serverCon.setRequestProperty(FILENAME_HEADER, destDir +
destFileName);
serverCon.setRequestProperty(FILELASTMOD_HEADER, strLastMod);
if (webadminApplet.DEBUG) System.out.println("Connection with
FTP server established");
// create file stream and write stream to write file data.
FileInputStream fis = new FileInputStream(fileToUpload);
OutputStream os = serverCon.getOutputStream();
try
// transfer the file in 4K chunks.
byte[] buffer = new byte[4096];
long byteCnt = 0;
//long percent = 0;
int newPercent = 0;
int oldPercent = 0;
while (true)
int bytes = fis.read(buffer);
byteCnt += bytes;
//11-21-02 :
//If itemID is greater than -1 this is an import file
transfer
//otherwise this is a header graphic file transfer.
if (itemID > -1)
newPercent = (int) ((double) byteCnt/ (double)
fileSize * 100.0);
int diff = newPercent - oldPercent;
if (newPercent == 0 || diff >= 20)
oldPercent = newPercent;
jbInit.getImportTable().displayFileTransferStatus
(itemID,
newPercent);
if (bytes < 0) break;
os.write(buffer, 0, bytes);
os.flush();
if (webadminApplet.DEBUG) System.out.println("No of bytes
sent: " + byteCnt);
finally
// close related streams.
os.close();
fis.close();
if (webadminApplet.DEBUG) System.out.println("File
Transmission complete");
// find out what the servlet has got to say in response.
BufferedReader reader = new BufferedReader(
new
InputStreamReader(serverCon.getInputStream()));
try
String line;
while ((line = reader.readLine()) != null)
if (webadminApplet.DEBUG) System.out.println(line);
finally
// close the reader stream from servlet.
reader.close();
} // end of the big try block.
catch (Exception e)
System.out.println("Exception during file transfer:\n" + e);
e.printStackTrace();
return("FTP failed. See Java Console for Errors.");
} // end of catch block.
return("File: " + fname + " successfully transferred.");
} // end of method transferFile().
} // end of class fileTransferClient
Server side code:
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.*;
import java.net.*;
// This servlet class acts as an FTP server to enable transfer of
files
// from client side.
public class FtpServerServlet extends HttpServlet
String ftpDir = "D:\\pub\\FTP\\";
private static final String FILENAME_HEADER = "fileName";
private static final String FILELASTMOD_HEADER = "fileLastMod";
public void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException,
IOException
doPost(req, resp);
public void doPost(HttpServletRequest req, HttpServletResponse
resp)
throws ServletException,
IOException
// ### for now enable overwrite by default.
boolean overwrite = true;
// get the fileName for this transmission.
String fileName = req.getHeader(FILENAME_HEADER);
// also get the last mod of this file.
String strLastMod = req.getHeader(FILELASTMOD_HEADER);
String message = "Filename: " + fileName + " saved
successfully.";
int status = HttpServletResponse.SC_OK;
System.out.println("fileName from client: " + fileName);
// if filename is not specified, complain.
if (fileName == null)
message = "Filename not specified";
status = HttpServletResponse.SC_INTERNAL_SERVER_ERROR;
else
// open the file stream for the file about to be transferred.
File uploadedFile = new File(fileName);
// check if file already exists - and overwrite if necessary.
if (uploadedFile.exists())
if (overwrite)
// delete the file.
uploadedFile.delete();
// ensure the directory is writable - and a new file may be
created.
if (!uploadedFile.createNewFile())
message = "Unable to create file on server. FTP failed.";
status = HttpServletResponse.SC_INTERNAL_SERVER_ERROR;
else
// get the necessary streams for file creation.
FileOutputStream fos = new FileOutputStream(uploadedFile);
InputStream is = req.getInputStream();
try
// create a buffer. 4K!
byte[] buffer = new byte[4096];
// read from input stream and write to file stream.
int byteCnt = 0;
while (true)
int bytes = is.read(buffer);
if (bytes < 0) break;
byteCnt += bytes;
// System.out.println(buffer);
fos.write(buffer, 0, bytes);
// flush the stream.
fos.flush();
} // end of try block.
finally
is.close();
fos.close();
// set last mod date for this file.
uploadedFile.setLastModified((new
Long(strLastMod)).longValue());
} // end of finally block.
} // end - the new file may be created on server.
} // end - we have a valid filename.
// set response headers.
resp.setContentType("text/plain");
resp.setStatus(status);
if (status != HttpServletResponse.SC_OK)
getServletContext().log("ERROR: " + message);
// get output stream.
PrintWriter out = resp.getWriter();
out.println(message);
} // end of doPost().
} // end of class FtpServerServletOK - the problem you describe is definitely what's giving you grief.
The workaround is to use a socket connection and send your own request headers, with the content length filled in. You may have to multi-part mime encode the stream on its way out as well (I'm not about that...).
You can use the following:
http://porsche.cis.udel.edu:8080/cis479/lectures/slides-04/slide-02.html
on your server to get a feel for the format that the request headers need to take.
- Kevin
I get the out of Memory Error on the client side. I
was told that this might be a bug in the URLConnection
class implementation that basically it wont know the
content length until all the data has been written to
the output stream, so it uses an in memory buffer to
store the data which basically causes memory issues..
do you think there might be a workaround of any kind..
or maybe a way that the buffer might be flushed after
a certain size of file has been uploaded.. ?? do you
have any ideas? -
E71 keeps giving out of memory error; I can't find...
My Nokia E71 (it's black so it may be an E71x, I guess) keeps giving me out of memory errors. I use my phone for nothing but voice calls, text messages, and emails. I have cleared all call logs, deleted all emails except 5 (they have no attachments) and cleared deleted emails, and deleted all text messages. I went into file manager and made sure there are no images, videos, etc. on the phone. I set up options to use memory card for emails. I've turned the phone off, waited 15 or 20 seconds, and turned it back on.
I did all this a couple weeks ago. Ever since then. every couple days I get these out of memory errors, and the phone memory shows me 119 MB used and something like 300K free. I'm at the point where every few emails that come in, I have to delete all emails, erase all text messages, etc. or the phone is just too low on memory to operate.
What else can I try? I don't have any additional applications installed. I've even tried to delete built-in apps such as RealPlayer but it didn't seem like that was possible.
This is getting really annoying. Please help!@EricHarmon
Although all user data would be deleted, have you tried resetting device to "Out of box" state by keying in *#7370# followed by 12345 (default Nokia lock code unless altered by user)?
Happy to have helped forum with a Support Ratio = 42.5 -
Out of memory error - JS Runtime: How many users can one connect?
Not talking video here. Talking interactive apps, like chat. Ours crashes at about 500 connected users. When I report this I'm told "make sure you're not creating too many objects serverside" or "increase the JSRuntimeSize setting in your application.xml file to the max".
Have now done both of those things but still get this out of memory error. Let's say I optomized my app and got 100% more connection capacity. That would be 1,000 connected users - still nowhere near enough.
Are my dreams of 6,000 or 10,000 connected users enjoying all of the fruits of the FMS interactivity pipe dreams? Is it not meant for sessions of that size? Where does one find documentation or advice or application assistance on this issue?
How do large social media applications connect so many people concurrently.
Thoughts appreciated.
ThanksYes. I'm using the max.
<RuntimeSize>51200</RuntimeSize>
See:
http://help.adobe.com/en_US/FlashMediaServer/3.5_AdminGuide/WS5b3ccc516d4fbf351e63e3d119f2 926bcf-7ff0.html#WS5b3ccc516d4fbf351e63e3d119f2926bcf-7ed2
Don't think 100MB or 200MB would be valid settings. -
Out of Memory Error when transcoding
I am using winXP and Encore CS3. I don't have anything else open. My project is complete, but I cannot burn to DVD because I get this Out of Memory error, save and close to avoid loss. I am trying to transcode the audio track for the DVD. I've made 3 different projects. On one of the projects, I just downloaded, it did transcode. All of my menu work is in another program. Is there a way to get this one transcoded file over to the other project. Then I could be finished and burn. I don't understand why this one transcode will not work. the other music I brought in as assets for the menu and submenu transcoded fine. Sometime it will say 'transcode preset error'. I went all the way back to Premiere and changed setting there in hopes. can anyone help please
Thanks, disheartening? I'm distraught.
Everything else works, but not Encore. I tried to reinstall, but it keeps saying it cannot install until I close Bridge.
Bridge is not open.
I restarted. I uninstalled an earlier verion of Bridge.
Nothing doing.
still wants me to close Bridge.
I hate to do the whole thing over because of encore.
Help me think of a workaround! -
Out of memory error - from parsing a "fixed width file"
This may be fairly simple for someone out there but I am trying to write a simple program that can go through a "fixed width" flat txt file and parse it to be comma dilmeted.
I use a xml file with data dictionary specifications to do the work. I do this because there are over 430 fields that need to be parsed from a fixed width with close to 250,000 lines I can read the xml file fine to get the width dimensions but when I try to apply the parsing instructions, I get an out of memory error.
I am hoping it is an error with code and not the large files. If it is the latter, does anyone out there know some techniques for getting at this data?
Here is the code
import java.io.*;
import org.w3c.dom.Document;
import org.w3c.dom.*;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.DocumentBuilder;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
public class FixedWidthConverter{
String[] fieldNameArray;
String[] fieldTypeArray;
String[] fieldSizeArray;
public static void main(String args []){
FixedWidthConverter fwc = new FixedWidthConverter();
fwc.go();
fwc.loadFixedWidthFile();
//System.exit (0);
}//end of main
public void go(){
try {
DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
Document doc = docBuilder.parse (new File("files/dic.xml"));
// normalize text representation doc.getDocumentElement ().normalize ();
System.out.println ("Root element of the doc is " +
doc.getDocumentElement().getNodeName());
NodeList listOfFields = doc.getElementsByTagName("FIELD");
int totalFields = listOfFields.getLength();
System.out.println("Total no of fields : " + totalFields);
String[] fldNameArray = new String[totalFields];
String[] fldTypeArray = new String[totalFields];
String[] fldSizeArray = new String[totalFields];
for(int s=0; s<listOfFields.getLength() ; s++){
Node firstFieldNode = listOfFields.item(s);
if(firstFieldNode.getNodeType() == Node.ELEMENT_NODE){
Element firstFieldElement = (Element)firstFieldNode;
NodeList firstFieldNMList = firstFieldElement.getElementsByTagName("FIELD_NM");
Element firstFieldNMElement = (Element)firstFieldNMList.item(0);
NodeList textFNList = firstFieldNMElement.getChildNodes();
//System.out.println("Field Name : " +
//((Node)textFNList.item(0)).getNodeValue().trim());
//loads values into an array
//fldNameArray[s] = ((Node)textFNList.item(0)).getNodeValue().trim();
NodeList typeList = firstFieldElement.getElementsByTagName("TYPE");
Element typeElement = (Element)typeList.item(0);
NodeList textTypList = typeElement.getChildNodes();
//System.out.println("Field Type : " +
//((Node)textTypList.item(0)).getNodeValue().trim());
//loads values into an array
//fldTypeArray[s] = ((Node)textTypList.item(0)).getNodeValue().trim();
NodeList sizeList = firstFieldElement.getElementsByTagName("SIZE");
Element sizeElement = (Element)sizeList.item(0);
NodeList textSizeList = sizeElement.getChildNodes();
//System.out.println("Field Size : " +
//((Node)textSizeList.item(0)).getNodeValue().trim());
//loads values into an array
fldSizeArray[s] = ((Node)textSizeList.item(0)).getNodeValue().trim();
}//end of if clause
}//end of for loop with s var
//setFldNameArray(fldNameArray);
//setFldTypeArray(fldTypeArray);
setFldSizeArray(fldSizeArray);
catch (SAXParseException err) {
System.out.println ("** Parsing error" + ", line "
+ err.getLineNumber () + ", uri " + err.getSystemId ());
System.out.println(" " + err.getMessage ());
catch (SAXException e) {
Exception x = e.getException ();
((x == null) ? e : x).printStackTrace ();
catch (Throwable t) {
t.printStackTrace ();
}//end go();
public void setFldNameArray(String[] s){
fieldNameArray = s;
}//end setFldNameArray
public void setFldTypeArray(String[] s){
fieldTypeArray = s;
}//end setFldTypeArray
public void setFldSizeArray(String[] s){
fieldSizeArray = s;
}//end setFldSizeArray
public String[] getFldNameArray(){
return fieldNameArray;
}//end setFldNameArray
public String[] getFldTypeArray(){
return fieldTypeArray;
}//end setFldTypeArray
public String[] getFldSizeArray(){
return fieldSizeArray;
}//end setFldSizeArray
public int getNumLines(){
int countLines = 0;
try {
//File must be in same director and be the name of the string below
BufferedReader in = new BufferedReader(new FileReader("files/FLAT.txt"));
String str;
while ((str = in.readLine()) != null) {
countLines++;
in.close();
catch (IOException e) {}
return countLines;
}//end of getNumLines
public void loadFixedWidthFile(){
int c = getNumLines();
int i = 0;
String[] lineProcessed = new String[c];
String chars;
try {
//File must be in same director and be the name of the string below
BufferedReader in = new BufferedReader(new FileReader("files/FLAT.txt"));
String str;
while ((str = in.readLine()) != null) {
//System.out.println(str.length());
lineProcessed[i] = parseThatLine(str);
i++;
in.close();
catch (IOException e) {}
//write out the lineProcess[] array to another file
writeThatFile(lineProcessed);
}//end loadFixedWidthFile()
public void writeThatFile(String[] s){
try {
BufferedWriter out = new BufferedWriter(new FileWriter("files/outfilename.txt"));
for(int i = 0; i < s.length -1; i++){
out.write(s);
}//end for loop
out.close();
catch (IOException e) {}
}//end writeThatFile
public String parseThatLine(String s){
int start = 0;
int end = 0;
String parsedLine = "";
int numChars = getFldSizeArray().length;
//Print number of lines for testing
//System.out.println(numChars);
String[] oArray = getFldSizeArray();
//String chars = oArray[0];
//System.out.println(chars.length());
//oArray
for(int i = 0; i < numChars -1; i++ ){
if(i == 0){
start = 0;
end = end + Integer.parseInt(oArray[i])-1;
else
start = end;
end = end + Integer.parseInt(oArray[i]);
parsedLine = parsedLine + s.substring(start, end) + "~";
}//end for loop
return parsedLine;
}//End of parseThatLine
I have tried to illeminate as many arrays as I can thinking that was chewing up the memory but to no avail.
Any thoughts or ideas?
Message was edited by:
SaipanMan2005You should not keep a String array of all the lines of the file read.
Instead for each line read, parse it, then write the parsed line in the other file: public void loadFixedWidthFile() {
BufferedReader in = null;
BufferedWriter out = null;
try {
//File must be in same director and be the name of the string below
in = new BufferedReader(new FileReader("files/FLAT.txt"));
out = new BufferedWriter(new FileWriter("files/outfilename.txt"));
String str;
while ((str = in.readLine()) != null) {
//System.out.println(str.length());
str = parseThatLine(str);
//write out the parsed str to another file
out.write(str);
catch (IOException e) {
e.printStackTrace(); // At least print the exception - never swallow an exception
finally { // Use a finally block to be sure of closing the files even when exception occurs
try { in.close(); }
catch (Exception e) {}
try { out.close(); }
catch (Exception e) {}
}//end loadFixedWidthFile()Regards -
Loading JPEG/Gif images causes Out Of Memory Error
Hello Java gurus, please shed some light on this.....
I am not a java newbie, but I am a java newbie in the area of dealing with graphics. I am using JDK 1.4.2_01 on Win XP with 2.4ghz and 512 RAM. When I try to read in a (or a few) JPEG image into a JLabel using ImageIcon, I get an out of memory error everytime. This happens whether I am reading the image out of a jar file or out of a local directory. The JPEG's are 8.5" x 11", and range between 150kb to 900kb. I am trying to load approximately 10 images in a JTabbedPane using new JLabel(ImageIcon) on individual JPanels (one JPanel for each JPEG). Now I get the java.lang.outofmemory error whether I try to load 1 image or 10 images. Anyone got a clue as to what I am doing wrong? I actually do get one image loaded before the error gets thrown. So I do know that it is trying to load the right image. What is going on here? Is it an ImageIcon problem, or are there others who have run into this. It has brought this project to a grinding halt, and I had thought this would be the easier part!!!! Please help me out gurus! Thanks!What options/values are you suggesting that I set? Or do you mean something else? Thank you for any ideas that can help me solve this problem. I never had any issues dealing with using ImageIcon for toolbar button graphics (file sizes of 1-3kb), but now with dealing with full page graphics I have run into a brick wall with this out of memory error.
-
Out of memory errors when trying to sync local and remote sites
We cannot get our remote and local sites synchronized for the first time. We have a huge site and we get out or memory errors or the synch just doesn't work. Any solutions or insights?
Our site has 9,000+ HTML files and accompanying images, pdfs, etc. When we try to synch the remote to the local for the first time, it just will not happen. Every once in a while someone gets lucky, but for the most part, we either get an "out of memory" error or the synch just doesn't work, and it doesn't tell us anything. It just stops responding. HELP!Hi dmooresatx,
I am not aware of the limitations of the file sizes that are allowed for a successful sync operation. If you are using a purchased version of Dreamweaver CC, send me your Adobe ID along with your contact details (phone, email number). Click on my picture and use the message option. If you are using a team license, get these details from your administrator.
Thanks,
Preran -
Out of memory error in IBM JVM
Hi i am using websphere application server's dyna cache for getting performance optimiztion in my application.
I am able to load values into the cache using the command cache api in the dyna cache.When i clear the cache for loading another set of values the cache gets cleared but still ,while loading the second set of values i get an out of memory error
The dynacache is an distributed map
i want to know whether the error is due to improper garbage collection
on this map,if so help me to overcome this
The JVM configuration are as follows
Min 256mb
Max 768mb
I have a total of 1Gb ramMaybe your program's memory usage is rubbing against the upper limit, and something about the latest JVM caused it to break through.
Try using the command line parameter -mx500m (for 500 megs or whatever amount you neeed) -
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...
-
Hi,
At my job, we seem to have a memory leak related to JNI. We know we
have a memory leak because we keep getting Out of Memory errors even
after increasing the maximum heap size to more than 256 megs. And we
know that this is the application that is eating up all the system
memory.
We are running under Windows 2000, with both JDK 1.3.0 and JDK 1.4.1.
We tried looking at the problem under JProbe, but it shows a stable
Java heap (no problems, except that the Windows task manager shows it
growing and growing...)
I tried a strip down version, where I set the max heap size to 1 Meg,
and print out the total memory, memory used, and maximum memory used at
a 5 sec interval.
Memory used = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory().
Well, I let that strip down version running for about a day. The
maximum memory used has stabilized to about 1.1 Meg, and has not
increased. The current memory used increases until it gets to some
threshold, then it decreases again. However, the Windows task manager
shows the memory increasing -- and currently it is at 245 Megs!
In the lab, the behavior we see with the Windows task manager is as
follows:
1. Total memory used in the system increases until some threshold.
2. Then it goes back down by about 100 Megs.
3. This cycle continues, but at each cycle the memory goes back down
less and less, until the app crashes.
Now, our theory is that JNI is consuming all this memory (maybe we are
using JNI wrong). That's the only explanation we can come up with to
explain what we have seen (Java showing an OK heap, but the task
manager showing it growing, until crashing).
Does that make sense? Can the new operator throw an Out of Memory
error if the system does not have enough memory to give it, even if
there is still free heap space as far as the Runtime object is
concerned? Does the Runtime object figures objects allocated through
JNI methods into the heap used space?
Note that I know the task manager is not a reliable indicator.
However, I don't think a Java app is supposed to runaway with system
memory -- the problem is not simply that the Java app is consuming too
much memory, but that it seems to always want more memory. Besides, we
do get the Out of Memory error.
Thanks for your help,
Nicolas RiveraHi,
there are two sources of memory leakage in JNI:
- regular leaks in c/c++ code;
- not released local/global references of java objects in JNI.
I think that the first issue in not a problem for you. The second is more complex. In your JNI code you should check
- how many local references alive you keep in your code as their number is restricted (about 16 and can be enlarged). The good style is not to store local references but keep only global.
- any local reference accepted from java call in JNI are released by JVM. You should release local references you created in JNI and also global references.
- do not use a large number of java object references. Each new reference gets new memory in JVM. Try to reuse refences.
I guess that is your problem.
Vitally
Maybe you are looking for
-
Ffmpeg: unable to pass filename correctly with colon in it
If I try to use the command in the script directly from the command line on a filename with a colon in it, there are no problems; however, if I try to use the script to do it the filename isn't being read correctly. ffmpeg is throwing at me: /run/me
-
where will store the Sales text which we maintained in the Material master record. Can any body help me to solve this problem. Plz treat as urgent basis. Thx Ramesh.B
-
Setting up Users Calendar with Free /Busy Details share permssion, Outlook 2007 client cannot open the user shared folder but if we use OWA 2010 or Outlook 2010 client no issue opening the user shared calendar with Free/Busy Details setting. The foll
-
hi friends in prepare automatic posting for foreign currency tc.oba1 KDB, KDF, KDW, KDZ, RDF what is difference between thease exchange keys what purpose use thease keys individually explain regards shiva
-
Replying does not show original message
After upgrading to Safari 4 (final release not beta), I started to notice that when replying an email the original message would not always show. I have selected all the correct settings in preferences. Does anyone have a suggestion?. As a side note,