473,757 Members | 2,320 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

java.lang.OutOf MemoryError - Please Help-

Hi,

i wrote a java program, that create a rdf file parsing a file tree.
On the last step the shockwaves and gifs are checked and the byte
sizes are written in the rdf file as nodes.

The 1. Problem: A java.lang.OutOf MemoryError is throwm. Sometimes on
the 45 shockwave, sometimes on the 53 shockwave...
code:

for(int i = 0; i < objects.getLeng th(); i++){
String xValue = "concat(./dir/text(), ./objects/object/param[@name
=
'movie']/@value)";
// XPath Ausdruck anwenden
XObject xO = XPathAPI.eval(o bjects.item(i), xValue);
// the shockwave
f = new File(xO.toStrin g());
// byte size
long size = f.length();
String x = "/*/Description[contains(@about , '" + f.getPath() +
"')]";
nodes = XPathAPI.select NodeList(root, x.replace('\\', '/'));
if(nodes.getLen gth() == 1){
Node extent = target.createEl ement("dcterms: extent");
Node bytesize = target.createEl ement("lom-tech:ByteSize") ;
Node value = target.createEl ement("rdf:valu e");
Node length = target.createTe xtNode("" + size);
value.appendChi ld(length);
bytesize.append Child(value);
extent.appendCh ild(bytesize);
nodes.item(0).a ppendChild(exte nt);
}
}

the 2. Problem.

After parsing the shockwaves i want to scall down images in the file
tree and save it. After this i want to add the new image url as node
to the rdf tree.

the same Exception!!!!

Thanks and greetings

novel
Jul 17 '05 #1
1 3189
novel wrote:
Hi,

i wrote a java program, that create a rdf file parsing a file tree.
On the last step the shockwaves and gifs are checked and the byte
sizes are written in the rdf file as nodes.

The 1. Problem: A java.lang.OutOf MemoryError is throwm. Sometimes on
the 45 shockwave, sometimes on the 53 shockwave...


You have two options:

1) Use the -Xmx option to the java executable to increase the available
memory to the java process. (See the SDK tool documentation for details.)

2) Re-write your algorithms to use less memory.

Please, no side wagers on which one the OP will use :)

Ray

Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
9650
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej and I was wondering if anyone here would be able to give me some tips for young players such as myself, for learning the language. Is this the best Newsgroup for support with JAVA?
1
5449
by: Marwa5 | last post by:
I’m a service desk 4.5 administrator & I have a lot of java errors on our servers & SD application so kindly check below errors & waiting your help: “Java.lang.OutOfMemoryError” & “java.lang.NullPointerException”
1
2631
by: sunilkumar.r80 | last post by:
Hi I have a problem in reading a .xls file using java. I am using jakarta POI ApI for that it work fine for a 9000 rows contians 25 colums. But i need to read more than 25000 rows (in a single sheet) It shows the message " java.lang.OutOfMemoryError: Java heap space" so can any one help me in this time Thanks
14
5691
by: mlw | last post by:
Do not take anything about this, it is not a flame or troll, while I'm not new to Java I favor C++. However, I may need to use it in a contract position, and am concerned that the restrictions it places on application code. Take, for instance, this C++ construct: class foo { char *m_name;
0
2561
by: subashinicse | last post by:
hi everybody, am working with J2EE &hibernate... while i run my application,am sending an object(filetype of size more than 8MB) from jboss to securityserver,where am getting ERROR as java.lang.outofMemoryerror: java heap space,i tried by changing the java heap size in jboss. but still am getting the error. can anybody help me out!!! its urgent!!!! thank you..
0
1405
by: subashinicse | last post by:
hi everybody, am working with J2EE &hibernate... while i run my application,am sending an object(filetype of size more than 8MB) from jboss to securityserver,where am getting ERROR as java.lang.outofMemoryerror: java heap space,i tried by changing the java heap size in jboss. but still am getting the error. can anybody help me out!!! its urgent!!!! thank you..
5
14992
blazedaces
by: blazedaces | last post by:
Ok, so you know my problem, java is running out of memory reading with SAX, the event-based xml parser intended more-so than DOM for extremely large files. I'll try to explain what I've been doing and why I have to do it. Hopefully someone has a suggestion... Alright, so I'm using a gps-simulation program that outputs gps data, like longitude, lattitude, altitude, etc. (hundreds of terms, these are just the well known ones). In the newer...
1
1144
by: KritiGuleria | last post by:
Hi i am getting an error java.lang.OutOfMemoryError while running a few java files. i have already increased JVM heap memory (Xmx=512 and Xms=512 from 256). but this didnot fix my problem. the RAM of my system is 1GB. Please suggest me what should be done in order to solve this issue
1
7140
by: HxRLxY | last post by:
I have a program that shows a thumbnail of an image. If the user clicks on the thumbnail a new JFrame is opened that shows the full size image. If the image is larger than the screen, it gets scaled to the the size of the screen. Functionally, the program works well. However, when testing I found that after clicking the thumbnails of several images (and subsequently closing their viewing frames), I get an java.lang.OutOfMemoryError: Java...
0
9487
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9297
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10069
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9884
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7285
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6556
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5324
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3828
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2697
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.