Solving ‘Out of Memory’ problem – Using JNLP
Quite often in XI projects you may feel the need to define large data types or message type. These message types definitions are quite often imported through external XSD’s, DTD’s. Also interfaces which we would need to define could also the large enough. When working with such large data, the XI client usually throws an Out of Memory exception.
Here’s a way to solve them and the best part of it is, it’s solvable locally at the XI client end! We expand the default memory that the JVM runs on. Your computer memory may be in Gigs, but the JVM doesn’t utilize more than 512 M of your computer memory unless specified otherwise.
Clean Java Web Start cache.
Click on File > Preferences
Go to advance tab and click on ‘Clear Folder’ button and subsequently click on ‘yes’ in the confirmation box that appears.
Close the Java Web Start clicking the ‘OK’ button.
Get the Launcher File
Open the XI home page and place your mouse on the link ‘Integration Repository’. Note: Just place the mouse and do not click here.
Note down the URL highlighted above:
In my case it is http://—-
/rep/start/repository.jnlp. This is the launcher file path on the server.
Download the launcher file
Open the launcher file through Wordpad and save it on your desktop. You can still call this ‘repository.jnlp’.
Note: The extension must be jnlp.
Edit the launcher file.
The launcher file would initially look like this:
<jnlp spec=”1.0+” codebase=”http://—-
Next launch the Integration Builder:
Design through the jnlp stored on your desktop. Double click on the jnlp file.
1. How will I be able to determine the amount of memory my xsd’s needs?
A. Though it cant be exactly determined how much memory your xsd’s need, it has been found that xsds with size of approx 700 KB need just around 1024M. And the relation between the memory requirements and the size of XSD’s is more or less proportional. If your XSDs still don’t load try incrementing your heap size and the Xmx by small amounts and re-try.
2. What is JNLP?
A. Java Network Launching Protocol (JNLP) is the protocol, defined as an XML file format, that specifies how Java Web Start applications are launched.
3. My computer cant recognize jnlp file. It tries to find an appropriate editor to open .jnlp file. Is there a solution?
A. Open control panel > Folder options. Click on ‘File Types’ tab. Search for file with extension ‘jnlp’ and make sure it opens with javaw.
4. The jnlp file launches my application, but the application aborts before I get my login screen. What may be the possible error?
A. Most likely you have specified your heap size and the Xmx parameter more than the available RAM. Say you have specified 2048 M when the maximum RAM available in your machine is 1024 M.
5. Is there any hardware solution?
A. On a 32-bit processor machines, the largest contiguous memory address space the operating system can allocate to a process is 1.8GB. Because of this, the maximum heap size can only be set up to 1.8GB. On 64-bit processor machines, the 1.8 GB limit does not apply. Upgrading your machine to a 64-but processor can also be an option.
This will solve most of out of memory problem that we come across due to large volume of data.