cancel
Showing results for 
Search instead for 
Did you mean: 

Java heap space in Stack Bar Chart in MII 12.1

Former Member
0 Kudos

I am getting java heap space error with following details in my console when i am trying to load a stack bar chart.

Exception in thread "AWT-EventQueue-2" java.lang.OutOfMemoryError: Java heap space

at java.awt.image.DataBufferUShort.<init>(Unknown Source)

at java.awt.image.Raster.createPackedRaster(Unknown Source)

at java.awt.image.DirectColorModel.createCompatibleWritableRaster(Unknown Source)

at sun.awt.image.SunVolatileImage.getBackupImage(Unknown Source)

at sun.awt.image.VolatileSurfaceManager.getBackupSurface(Unknown Source)

at sun.awt.image.VolatileSurfaceManager.initialize(Unknown Source)

at sun.awt.image.SunVolatileImage.<init>(Unknown Source)

at sun.awt.image.SunVolatileImage.<init>(Unknown Source)

at java.awt.GraphicsConfiguration.createCompatibleVolatileImage(Unknown Source)

at java.awt.GraphicsConfiguration.createCompatibleVolatileImage(Unknown Source)

at javax.swing.RepaintManager.getVolatileOffscreenBuffer(Unknown Source)

at javax.swing.RepaintManager$PaintManager.paint(Unknown Source)

at javax.swing.BufferStrategyPaintManager.paint(Unknown Source)

at javax.swing.RepaintManager.paint(Unknown Source)

at javax.swing.JComponent.paint(Unknown Source)

at java.awt.GraphicsCallback$PaintCallback.run(Unknown Source)

at sun.awt.SunGraphicsCallback.runOneComponent(Unknown Source)

at sun.awt.SunGraphicsCallback.runComponents(Unknown Source)

at java.awt.Container.paint(Unknown Source)

at com.sap.xmii.applet.common.BaseApplet.paint(BaseApplet.java:840)

at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)

at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)

at javax.swing.RepaintManager.seqPaintDirtyRegions(Unknown Source)

at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)

at java.awt.event.InvocationEvent.dispatch(Unknown Source)

at java.awt.EventQueue.dispatchEvent(Unknown Source)

at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.run(Unknown Source)

My java version is Java - 6 Update 22

MII version - 12.1.8 Build 24

Kindly help me to solve this.

Thanks in advance.

Selva

Accepted Solutions (1)

Accepted Solutions (1)

former_member193328
Active Participant
0 Kudos

Hi Selvakumar

This means that Java on your machine (where you are viewing the applet( is running low on heam memory and you need to increase it. This can be done in the following way (if your machine is a Windoes machine).

1. Go to Control Panel

2. Select Java (Or Java Plug-in)

3. Select Tab Java

4. You should see either "Java Applet Runtime Settings" or "Java Application Runtime Settings" or both or "Java Runtime Environment Settings".

5. Select view button next to either "Java Applet Runtime Settings" or "Java Runtime Environment Settings" (whichever is available). In my system I have Java 6 64bit on Windows 7 and I see only "Java Runtime Environment Setting". I have another system with Java 1.5 on XP (Pretty old machine) and I have the 2 options mentioned earlier. Not sure when this changed.

6. In the next screen in the Runtime Parameter section enter the value -Xmx<someinteger>m where some integer is the value in MBs you want for the heap. this should depend on your Ram and other properties.

If you want to know the current value of your heap you can try the URL

http://www.duckware.com/support/javahelp.html

Regards

Partha

Former Member
0 Kudos

Hi Partha,

Thanks for your very quick reply,

My System java Memory was 91 MB .

If i double it also i am getting the similar error.

I have checked it in other 3 of our machines and similar thing is happening.

Its happening only with the stack bar chart in one particular page.

Rest other charts are loading fine.

Thanks,

Selva

former_member193328
Active Participant
0 Kudos

Hi Selva

It is possible that this page loads a lot of data and required more than 91 MB. I am not sure of this. You can try setting it to something very high and check if the issue goes away.

Regards

Partha

Former Member
0 Kudos

Hi Selva,

Are you trying to set Properties of chart using javascript functions?

We have faced similar issue but due to some error in javascript code.

Anshul

Former Member
0 Kudos

Hi Anshul,

No I am not setting any properties from js.

I am just using setparam and update chart methods.

same kind of js code is working for line chart.

Thanks,

Selva

jcgood25
Active Contributor
0 Kudos

Make sure that your RowCount is set to a meaningful number (not something like 99999999).

Former Member
0 Kudos

Hi Jeremy,

Row Count is 1000.

Thanks,

Selva

Former Member
0 Kudos

Hi Jeremy,

Ya it was with the row count only,

Previously i checked the wrong template.

It started working once i set the row count to 1000.

Thank you so much for the help

Thanks,

Selva

Answers (0)