Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » java.lang.outofmemoryerror permgen space
java.lang.outofmemoryerror permgen space [message #510724] Thu, 28 January 2010 08:06 Go to next message
Eclipse UserFriend
Originally posted by: rodrigo.garcia.kotasoft.com

Hi,

I have developed an rcp app that have different views and 1 multipage
editor, one of the pages of the editor is prepared to show a birt
report.I'm using the birt report viewer.

Eclipse 3.5, BIRT 2.5.1, Ubuntu gtk_x86_64bits

If I launch my plugins as an eclipse application it works ok and the
report is shown.

If I launch the product from the eclipse instance I have the outofmemory
problem and the app dies, so I have added the following vm args and it
works ok

-Dosgi.requiredJavaVersion=1.5 -XX:MaxPermSize=256m -Xms40m -Xmx512m

Before to export my product I've created a config.ini

#Product Runtime Configuration File
osgi.splashPath=platform:/base/plugins/com.kotasoft.wps
eclipse.application=com.kotasoft.wps.application
eclipse.product=com.kotasoft.wps.product
#Product Runtime Configuration File
#org.eclipse.update.reconcile=false
osgi.bundles=org.eclipse.equinox.common@2:start,org.eclipse.update.configurator@3:start,org.eclipse.core.runtime@start

#org.eclipse.equinox.simpleconfigurator.configUrl=file:org.e clipse.equinox.simpleconfigurator/bundles.info

#osgi.bundles.defaultStartLevel=4
org.eclipse.platform
--launcher.XXMaxPermSize
256
-vmargs
-Dosgi.requiredJavaVersion=1.5
-XX:MaxPermSize=256
-Xms40m
-Xmx512m

But when I export my product and launch it I have the same problem and
the app doesn't respond

I have tried without success to increase the MaxPermSize up to 512m

How can I solve this problem, any idea?

The page that shows the report has a browser widget and in order to show
the report I do the following:

formView.getForm().setBusy(false);
try {

URL[] urls =
FileLocator.findEntries(BirtBundleActivator.getDefault().get Bundle(),
new Path("/work_info.rptdesign"));
String path = FileLocator.toFileURL(urls[0]).getFile();

HashMap<String, Object> myparms = new HashMap<String, Object>();
myparms.put( "SERVLET_NAME_KEY", "frameset" );
myparms.put( "FORMAT_KEY", "html" );
myparms.put( "ALLOW_PAGE", true );

ViewerPlugin.getDefault( ).getPluginPreferences(
).setValue("APPCONTEXT_EXTENSION_KEY", "WPSBirtReportAppContext");
WebViewer.display(path, progrressBrowser, myparms);

}
catch (Exception me){
me.printStackTrace();
}

formView.layout(true);

This is in the my ui plugin, and the report is in another plugin with
its java event handlers together.

Thanks in advance.
Re: java.lang.outofmemoryerror permgen space [message #510788 is a reply to message #510724] Thu, 28 January 2010 16:17 Go to previous message
Eclipse UserFriend
Originally posted by: rodrigo.garcia.kotasoft.com

In windows OS I don't have this problem and the app works ok.


Rodrigo García escribió:
> Hi,
>
> I have developed an rcp app that have different views and 1 multipage
> editor, one of the pages of the editor is prepared to show a birt
> report.I'm using the birt report viewer.
>
> Eclipse 3.5, BIRT 2.5.1, Ubuntu gtk_x86_64bits
>
> If I launch my plugins as an eclipse application it works ok and the
> report is shown.
>
> If I launch the product from the eclipse instance I have the outofmemory
> problem and the app dies, so I have added the following vm args and it
> works ok
>
> -Dosgi.requiredJavaVersion=1.5 -XX:MaxPermSize=256m -Xms40m -Xmx512m
>
> Before to export my product I've created a config.ini
>
> #Product Runtime Configuration File
> osgi.splashPath=platform:/base/plugins/com.kotasoft.wps
> eclipse.application=com.kotasoft.wps.application
> eclipse.product=com.kotasoft.wps.product
> #Product Runtime Configuration File
> #org.eclipse.update.reconcile=false
> osgi.bundles=org.eclipse.equinox.common@2:start,org.eclipse.update.configurator@3:start,org.eclipse.core.runtime@start
>
> #org.eclipse.equinox.simpleconfigurator.configUrl=file:org.e clipse.equinox.simpleconfigurator/bundles.info
>
> #osgi.bundles.defaultStartLevel=4
> org.eclipse.platform
> --launcher.XXMaxPermSize
> 256
> -vmargs
> -Dosgi.requiredJavaVersion=1.5
> -XX:MaxPermSize=256
> -Xms40m
> -Xmx512m
>
> But when I export my product and launch it I have the same problem and
> the app doesn't respond
>
> I have tried without success to increase the MaxPermSize up to 512m
>
> How can I solve this problem, any idea?
>
> The page that shows the report has a browser widget and in order to show
> the report I do the following:
>
> formView.getForm().setBusy(false);
> try {
>
> URL[] urls =
> FileLocator.findEntries(BirtBundleActivator.getDefault().get Bundle(),
> new Path("/work_info.rptdesign"));
> String path = FileLocator.toFileURL(urls[0]).getFile();
>
> HashMap<String, Object> myparms = new HashMap<String,
> Object>();
> myparms.put( "SERVLET_NAME_KEY", "frameset" );
> myparms.put( "FORMAT_KEY", "html" );
> myparms.put( "ALLOW_PAGE", true );
>
> ViewerPlugin.getDefault( ).getPluginPreferences(
> ).setValue("APPCONTEXT_EXTENSION_KEY", "WPSBirtReportAppContext");
> WebViewer.display(path, progrressBrowser, myparms);
>
> }
> catch (Exception me){
> me.printStackTrace();
> }
>
> formView.layout(true);
>
> This is in the my ui plugin, and the report is in another plugin with
> its java event handlers together.
>
> Thanks in advance.
Re: java.lang.outofmemoryerror permgen space [message #510809 is a reply to message #510788] Thu, 28 January 2010 12:22 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Rodrigo,

Are you sure the MaxPermSize is getting set in the product? Run the
attached report and look at the osgi startup parms. Make sure to run it
using preview and not frameset.

Jason

<?xml version="1.0" encoding="UTF-8"?>
<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.20"
id="1">
<property name="createdBy">Eclipse BIRT Designer Version
2.5.1.v20090903 Build &lt;2.5.1.v20090917-1447></property>
<property name="units">in</property>
<property name="comments">Copyright (c) 2006 Innovent Solutions,
Inc.</property>
<method name="beforeFactory"><![CDATA[// Create a hash table which
will contain lists of other lists
var topMap = new Packages.java.util.Hashtable();


// Request Attributes
var request = reportContext.getHttpServletRequest();
var requestAttrMap = new Packages.java.util.Hashtable();
var attrNames = request.getAttributeNames();
do {
var aName = attrNames.nextElement();
requestAttrMap.put(aName, request.getAttribute(aName).toString());
} while (attrNames.hasMoreElements())
topMap.put("requestAttributes", requestAttrMap);

// Request Parameters
var requestParamMap = new Packages.java.util.Hashtable();
var paramIter = request.getParameterMap().entrySet().iterator();
do{
var entry = paramIter.next();
requestParamMap.put(entry.getKey(), (entry.getValue()[0]));
} while (paramIter.hasNext())
topMap.put("requestParameters",requestParamMap);


// Session Attributes
var sessionAttrMap = new Packages.java.util.Hashtable();
var session = request.getSession();
// Insert a variable on the session
session.setAttribute("ReportAttribute", "arbitrary value to pass to
container");
var sessionAttrNames = session.getAttributeNames();
var i = 0;
do {
i ++;
var aaa = sessionAttrNames.nextElement();
sessionAttrMap.put(aaa, session.getAttribute(aaa));
} while (sessionAttrNames.hasMoreElements())
topMap.put("sessionAttributes", sessionAttrMap);


// Session Attributes
var ac = reportContext.getAppContext();

topMap.put("AppContextAttributes", ac);



// Get the system properties
topMap.put("systemProps", Packages.java.lang.System.getProperties());

// Store top map as a global
reportContext.setPersistentGlobalVariable("topMap", topMap);]]></method>
<property name="layoutPreference">auto layout</property>
<data-sources>
<script-data-source name="setScript" id="4"/>
</data-sources>
<data-sets>
<script-data-set name="setEnvironmentVars" id="5">
<list-property name="resultSetHints">
<structure>
<property name="position">1</property>
<property name="name">propName</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">propValue</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">propType</property>
<property name="dataType">string</property>
</structure>
</list-property>
<list-property name="columnHints">
<structure>
<property name="columnName">propName</property>
</structure>
<structure>
<property name="columnName">propValue</property>
</structure>
<structure>
<property name="columnName">propType</property>
</structure>
</list-property>
<structure name="cachedMetaData">
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">propName</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">propValue</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">propType</property>
<property name="dataType">string</property>
</structure>
</list-property>
</structure>
<property name="dataSource">setScript</property>
<method name="open"><![CDATA[aMap =
reportContext.getPersistentGlobalVariable("topMap");
topIter = aMap.entrySet().iterator();
if (topIter == null)
{
topIterator = new Packages.java.util.Iterator();
Packages.java.util.logging.Logger.getLogger("").info("OPEN NULL " );
}
innerIter = null;]]></method>
<method name="fetch"><![CDATA[do
{ // find an innerIter that has a new value
if (innerIter == null || innerIter.hasNext() == false)
{ // no value in the inner iterator, get the next Hashtable out of the
toHashtable
if (topIter.hasNext())
{
outerObject = topIter.next();
innerIter = outerObject.getValue().entrySet().iterator();
}
else
{ // no more top hash tables. close things up
return false;
}
}
}
while (innerIter.hasNext() == false)

// we must have another innerIter
innerObject = innerIter.next();

row["propName"] = innerObject.getKey();
row["propValue"] = innerObject.getValue().toString();
row["propType"] = outerObject.getKey();
return true;



/*
Iterator i = topMap.entrySet().iterator();
while (i.hasNext()) {
Entry entry = (Entry) i.next();
logger.info(entry.getKey() + " " + entry.getValue() );
}
*/]]></method>
</script-data-set>
</data-sets>
<styles>
<style name="detail" id="36">
<property name="backgroundColor">#FFFF80</property>
<property name="fontFamily">"Arial"</property>
<property name="fontSize">small</property>
</style>
<style name="headerfooter" id="37">
<property name="backgroundColor">#004080</property>
<property name="fontFamily">"Arial"</property>
<property name="fontSize">small</property>
<property name="fontWeight">bold</property>
<property name="color">#FFFFFF</property>
</style>
<style name="groupheader" id="38">
<property name="backgroundColor">#0080FF</property>
<property name="fontFamily">"Arial"</property>
<property name="fontSize">small</property>
<property name="fontWeight">bold</property>
<property name="color">#FFFFFF</property>
</style>
</styles>
<page-setup>
<simple-master-page name="Simple MasterPage" id="2">
<property name="orientation">landscape</property>
<property name="topMargin">0.5in</property>
<property name="leftMargin">0.5in</property>
<property name="bottomMargin">0.5in</property>
<property name="rightMargin">0.5in</property>
</simple-master-page>
</page-setup>
<body>
<table id="6">
<property name="width">100%</property>
<property name="dataSet">setEnvironmentVars</property>
<list-property name="boundDataColumns">
<structure>
<property name="name">propName</property>
<expression
name="expression">dataSetRow["propName"]</expression>
</structure>
<structure>
<property name="name">propValue</property>
<expression
name="expression">dataSetRow["propValue"]</expression>
</structure>
<structure>
<property name="name">propType</property>
<expression
name="expression">dataSetRow["propType"]</expression>
<simple-property-list name="aggregateOn">
<value>propType</value>
</simple-property-list>
</structure>
</list-property>
<property name="pageBreakInterval">50</property>
<column id="16"/>
<column id="17"/>
<header>
<row id="7">
<property name="style">headerfooter</property>
<cell id="8">
<label id="18">
<text-property
name="text">propName</text-property>
</label>
</cell>
<cell id="9">
<label id="20">
<text-property
name="text">propValue</text-property>
</label>
</cell>
</row>
</header>
<group id="22">
<property name="groupName">propType</property>
<property name="interval">none</property>
<property name="sortDirection">asc</property>
<expression name="keyExpr">row["propType"]</expression>
<structure name="toc">
<expression
name="expressionValue">row["propType"]</expression>
</structure>
<header>
<row id="23">
<property name="backgroundColor">#FFFF80</property>
<cell id="24">
<data id="29">
<property name="fontWeight">bold</property>
<property
name="resultSetColumn">propType</property>
</data>
</cell>
<cell id="25"/>
</row>
<row id="33">
<property name="height">2pt</property>
<property name="backgroundColor">#000000</property>
<cell id="34"/>
<cell id="35"/>
</row>
</header>
<footer>
<row id="26">
<cell id="27"/>
<cell id="28"/>
</row>
</footer>
</group>
<detail>
<row id="10">
<property name="style">groupheader</property>
<cell id="11">
<data id="19">
<property name="fontSize">small</property>
<property
name="resultSetColumn">propName</property>
</data>
</cell>
<cell id="12">
<data id="21">
<property name="fontSize">small</property>
<property
name="resultSetColumn">propValue</property>
</data>
</cell>
</row>
<row id="30">
<property name="height">2pt</property>
<property name="backgroundColor">#C0C0C0</property>
<cell id="31"/>
<cell id="32"/>
</row>
</detail>
<footer>
<row id="13">
<cell id="14"/>
<cell id="15"/>
</row>
</footer>
</table>
</body>
</report>


Rodrigo García wrote:
> In windows OS I don't have this problem and the app works ok.
>
>
> Rodrigo García escribió:
>> Hi,
>>
>> I have developed an rcp app that have different views and 1 multipage
>> editor, one of the pages of the editor is prepared to show a birt
>> report.I'm using the birt report viewer.
>>
>> Eclipse 3.5, BIRT 2.5.1, Ubuntu gtk_x86_64bits
>>
>> If I launch my plugins as an eclipse application it works ok and the
>> report is shown.
>>
>> If I launch the product from the eclipse instance I have the
>> outofmemory problem and the app dies, so I have added the following vm
>> args and it works ok
>>
>> -Dosgi.requiredJavaVersion=1.5 -XX:MaxPermSize=256m -Xms40m -Xmx512m
>>
>> Before to export my product I've created a config.ini
>>
>> #Product Runtime Configuration File
>> osgi.splashPath=platform:/base/plugins/com.kotasoft.wps
>> eclipse.application=com.kotasoft.wps.application
>> eclipse.product=com.kotasoft.wps.product
>> #Product Runtime Configuration File
>> #org.eclipse.update.reconcile=false
>> osgi.bundles=org.eclipse.equinox.common@2:start,org.eclipse.update.configurator@3:start,org.eclipse.core.runtime@start
>>
>> #org.eclipse.equinox.simpleconfigurator.configUrl=file:org.e clipse.equinox.simpleconfigurator/bundles.info
>>
>> #osgi.bundles.defaultStartLevel=4
>> org.eclipse.platform
>> --launcher.XXMaxPermSize
>> 256
>> -vmargs
>> -Dosgi.requiredJavaVersion=1.5
>> -XX:MaxPermSize=256
>> -Xms40m
>> -Xmx512m
>>
>> But when I export my product and launch it I have the same problem and
>> the app doesn't respond
>>
>> I have tried without success to increase the MaxPermSize up to 512m
>>
>> How can I solve this problem, any idea?
>>
>> The page that shows the report has a browser widget and in order to
>> show the report I do the following:
>>
>> formView.getForm().setBusy(false); try {
>> URL[] urls =
>> FileLocator.findEntries(BirtBundleActivator.getDefault().get Bundle(),
>> new Path("/work_info.rptdesign"));
>> String path = FileLocator.toFileURL(urls[0]).getFile();
>> HashMap<String, Object> myparms = new
>> HashMap<String, Object>();
>> myparms.put( "SERVLET_NAME_KEY", "frameset" );
>> myparms.put( "FORMAT_KEY", "html" );
>> myparms.put( "ALLOW_PAGE", true );
>> ViewerPlugin.getDefault(
>> ).getPluginPreferences( ).setValue("APPCONTEXT_EXTENSION_KEY",
>> "WPSBirtReportAppContext");
>> WebViewer.display(path, progrressBrowser, myparms);
>> }
>> catch (Exception me){
>> me.printStackTrace();
>> }
>>
>> formView.layout(true);
>>
>> This is in the my ui plugin, and the report is in another plugin with
>> its java event handlers together.
>>
>> Thanks in advance.
Previous Topic:Highlighting Issue with Styles
Next Topic:Event handler designer
Goto Forum:
  


Current Time: Fri Apr 26 13:01:48 GMT 2024

Powered by FUDForum. Page generated in 0.03669 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top