Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Possible Memory Leak
Possible Memory Leak [message #368824] Mon, 29 June 2009 15:46 Go to next message
Jorge Carvalho is currently offline Jorge CarvalhoFriend
Messages: 3
Registered: July 2009
Junior Member
I've been experiencing a possible memory leak using BIRT in JBoss

I have a servlet that generates reports using BIRT Report Engine 2.5 and
each time i generate one, it seams that a JDBC connection leaks. App
memory usage increases and after closing the RunAndRender task i also
receive the message "[CachedConnectionManager] Closing a connection for
you. Please close them yourself:
org.jboss.resource.adapter.jdbc.WrappedConnection@1a88afb".

Using Report Viewer i do not get this message.

I'm using an JNDI DataSource of JBoss 4.0.5 and BIRT Report Engine 2.5.

Does anyone have a clue about this question? Is it a bug? Any patch?

The DataSource:
<local-tx-datasource>
<jndi-name>myMoDS</jndi-name>
<connection-url>jdbc:xxxxx</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>xxxxx</user-name>
<password>xxxxx</password>

<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter </exception-sorter-class-name>
<connection-property name="char.encoding">UTF-8</connection-property>
<min-pool-size>5</min-pool-size>
<max-pool-size>100</max-pool-size>
<idle-timeout-minutes>500</idle-timeout-minutes>
<metadata>
<type-mapping>mySQL</type-mapping>
</metadata>
</local-tx-datasource>


Thank you,
Jorge
Re: Possible Memory Leak [message #368834 is a reply to message #368824] Tue, 30 June 2009 04:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jasonweathersby.windstream.net

Jorge,

We have not seen this on other app servers. Are you sure this is not on
the JBoss side?

Jason

Jorge Carvalho wrote:
> I've been experiencing a possible memory leak using BIRT in JBoss
>
> I have a servlet that generates reports using BIRT Report Engine 2.5 and
> each time i generate one, it seams that a JDBC connection leaks. App
> memory usage increases and after closing the RunAndRender task i also
> receive the message "[CachedConnectionManager] Closing a connection for
> you. Please close them yourself:
> org.jboss.resource.adapter.jdbc.WrappedConnection@1a88afb".
> Using Report Viewer i do not get this message.
>
> I'm using an JNDI DataSource of JBoss 4.0.5 and BIRT Report Engine 2.5.
> Does anyone have a clue about this question? Is it a bug? Any patch?
>
> The DataSource:
> <local-tx-datasource>
> <jndi-name>myMoDS</jndi-name>
> <connection-url>jdbc:xxxxx</connection-url>
> <driver-class>com.mysql.jdbc.Driver</driver-class>
> <user-name>xxxxx</user-name>
> <password>xxxxx</password>
>
> <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter </exception-sorter-class-name>
>
> <connection-property name="char.encoding">UTF-8</connection-property>
> <min-pool-size>5</min-pool-size>
> <max-pool-size>100</max-pool-size>
> <idle-timeout-minutes>500</idle-timeout-minutes>
> <metadata>
> <type-mapping>mySQL</type-mapping>
> </metadata>
> </local-tx-datasource>
>
>
> Thank you,
> Jorge
>
Re: Possible Memory Leak [message #368836 is a reply to message #368834] Tue, 30 June 2009 08:19 Go to previous messageGo to next message
Jorge Carvalho is currently offline Jorge CarvalhoFriend
Messages: 3
Registered: July 2009
Junior Member
Hi Jason, thank for the answer,

No, i'm not sure about that.

But the fact is that BIRT isn't closing the datasource connections when i
call task.close().

I've found a similar problem reporting in
" http://dev.eclipse.org/newslists/news.eclipse.birt/msg26246. html", but
with older BIRT versions.

J
Re: Possible Memory Leak [message #368842 is a reply to message #368836] Tue, 30 June 2009 13:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jasonweathersby.windstream.net

Jorge,

Log a bugzilla entry and I will try this on my JBoss install.

Jason

Jorge Carvalho wrote:
> Hi Jason, thank for the answer,
>
> No, i'm not sure about that.
>
> But the fact is that BIRT isn't closing the datasource connections when
> i call task.close().
>
> I've found a similar problem reporting in
> " http://dev.eclipse.org/newslists/news.eclipse.birt/msg26246. html", but
> with older BIRT versions.
>
> J
>
>
>
Re: Possible Memory Leak [message #368853 is a reply to message #368842] Wed, 01 July 2009 10:25 Go to previous messageGo to next message
Jorge Carvalho is currently offline Jorge CarvalhoFriend
Messages: 3
Registered: July 2009
Junior Member
I've reported this possible bug,

https://bugs.eclipse.org/bugs/show_bug.cgi?id=282128

Thank you
Re: Possible Memory Leak [message #479399 is a reply to message #368853] Mon, 10 August 2009 21:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mnovakouski.hotmail.com

Hello,

I just wanted to chime in and say that I'm experiencing the same problem,
and it's causing massive memory leaks for my application. I'm using BIRT
2.5 and JBoss 4.2.2. I tried backfitting to BIRT Runtime 2.3.2 since as
the OP said this problem existed in 2.2 and was marked as completed in
2.3, but I don't know how to revert the .rptdesign files to 2.3. There's
a bunch of info out there about how you can't use a runtime that's older
than the report designer version, and I don't know if there's a way around
that. If anyone has any guidance as to how I might revert my .rptdesign
files to the 2.3.2 report designer so that I can use the 2.3.2 Runtime and
see if the problem goes away, I'd very much appreciate it.

Many Thanks,
Marc
Re: Possible Memory Leak [message #479589 is a reply to message #479399] Tue, 11 August 2009 16:22 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Marc,

Are you getting the log message about closing the connection? I just
made a comment on the bug entry. The connections should be getting
closed automatically by default.

Jason

mnovakouski wrote:
> Hello,
>
> I just wanted to chime in and say that I'm experiencing the same
> problem, and it's causing massive memory leaks for my application. I'm
> using BIRT 2.5 and JBoss 4.2.2. I tried backfitting to BIRT Runtime
> 2.3.2 since as the OP said this problem existed in 2.2 and was marked as
> completed in 2.3, but I don't know how to revert the .rptdesign files to
> 2.3. There's a bunch of info out there about how you can't use a
> runtime that's older than the report designer version, and I don't know
> if there's a way around that. If anyone has any guidance as to how I
> might revert my .rptdesign files to the 2.3.2 report designer so that I
> can use the 2.3.2 Runtime and see if the problem goes away, I'd very
> much appreciate it.
>
> Many Thanks,
> Marc
>
Re: Possible Memory Leak [message #479631 is a reply to message #479589] Tue, 11 August 2009 19:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mnovakouski.hotmail.com

Hi Jason,
Yes, I'm getting (what I think is) the exact message that the OP was
reporting. Here's a copy/paste in case I missed something subtle:

11:03:50,998 INFO [CachedConnectionManager] Closing a connection for you.
Please close them yourself:
org.jboss.resource.adapter.jdbc.WrappedConnection@1fc719b
11:04:08,472 INFO [CachedConnectionManager] Closing a connection for you.
Please close them yourself:
org.jboss.resource.adapter.jdbc.WrappedConnection@48e385

I doubt it means anything significant, but I tend to get 1 error when the
report parameter selection window comes up, and then another one once the
report itself is generated.

Additional background info: I'm currently running about 7 reports on my
production server, and most of them will run ok, though they all get 1 or
more of these errors whenever they run, while one of them seems to hit an
infinite loop whenever I run it and just chews up memory till I get a
broken pipe exception (unfortunately I don't have one handy at the moment
for posting). That one has a bunch of tables embedded in tables so it
makes sense that it would take additional resources to process it; but it
works without much issue when I preview it in the report designer, so I'm
hopeful that I can make it work in production.

Thanks very much for looking at this!

Jason Weathersby wrote:

> Marc,

> Are you getting the log message about closing the connection? I just
> made a comment on the bug entry. The connections should be getting
> closed automatically by default.

> Jason

> mnovakouski wrote:
>> Hello,
>>
>> I just wanted to chime in and say that I'm experiencing the same
>> problem, and it's causing massive memory leaks for my application. I'm
>> using BIRT 2.5 and JBoss 4.2.2. I tried backfitting to BIRT Runtime
>> 2.3.2 since as the OP said this problem existed in 2.2 and was marked as
>> completed in 2.3, but I don't know how to revert the .rptdesign files to
>> 2.3. There's a bunch of info out there about how you can't use a
>> runtime that's older than the report designer version, and I don't know
>> if there's a way around that. If anyone has any guidance as to how I
>> might revert my .rptdesign files to the 2.3.2 report designer so that I
>> can use the 2.3.2 Runtime and see if the problem goes away, I'd very
>> much appreciate it.
>>
>> Many Thanks,
>> Marc
>>
Re: Possible Memory Leak [message #479646 is a reply to message #479631] Tue, 11 August 2009 20:39 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Marc,

Can you add this comment to the bugzilla entry? It would also be good if
you could try the following:

1 - add the following jsp page to your birt viewer app(Modify the url to
be correct):
<%
java.lang.String teststr = "OdaJDBCDriverPassInConnectionCloseAfterUse";
session.setAttribute( "AppContextKey", teststr );
java.lang.Boolean boolObj = true;
session.setAttribute( "AppContextValue", boolObj );
%>
<%
String redirectURL =
" http://localhost:8080/2.5.0/frameset?__report=AppContext.rpt design";
response.sendRedirect(redirectURL);
%>

2 - Add the AppContext.rptdesign to your reports (you may have to change
the path in the jsp redirect) The report is attached.

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.0.v20090603 Build &lt;2.5.0.v20090617-0630></property>
<property name="units">in</property>
<property name="comments">Copyright (c) 2006 &lt;&lt;Your Company
Name here>></property>
<html-property name="description">Creates a blank report with no
predefined content.</html-property>
<method name="beforeFactory"><![CDATA[iter =
reportContext.getAppContext().entrySet().iterator();
siz = reportContext.getAppContext().size();

kys = "";
vls = "";
while (iter.hasNext()){
innerObject = iter.next();
kys = kys + innerObject.getKey() + "\n";
val = innerObject.getValue();
if( val != null ){
vls = vls + innerObject.getValue().toString() + "\n";
}else{
vls = vls + "NULL" + "\n";
}
}]]></method>
<text-property name="displayName">Blank Report</text-property>
<property name="iconFile">/templates/blank_report.gif</property>
<property name="layoutPreference">auto layout</property>
<data-sources>
<oda-data-source
extensionID="org.eclipse.birt.report.data.oda.jdbc" name="Data Source"
id="41">
<property
name="odaDriverClass">org.eclipse.birt.report.data.oda.sampledb.Driver </property>
<property name="odaURL">jdbc:classicmodels:sampledb</property>
<property name="odaUser">ClassicModels</property>
</oda-data-source>
</data-sources>
<styles>
<style name="detail" id="32">
<property name="backgroundColor">#BACAE2</property>
<property name="fontFamily">"Arial"</property>
<property name="fontSize">small</property>
</style>
<style name="headerfooter" id="33">
<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="34">
<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="topMargin">1in</property>
<property name="leftMargin">1.25in</property>
<property name="bottomMargin">1in</property>
<property name="rightMargin">1.25in</property>
<page-footer>
<text id="3">
<property name="contentType">html</property>
<text-property
name="content"><![CDATA[<value-of>new Date()</value-of>]]></text-property>
</text>
</page-footer>
</simple-master-page>
</page-setup>
<body>
<grid id="10">
<property name="width">100%</property>
<column id="11"/>
<column id="12"/>
<column id="29"/>
<row id="14">
<property name="style">headerfooter</property>
<cell id="15">
<label id="8">
<text-property name="text">Value of close
connections</text-property>
</label>
</cell>
<cell id="16">
<label id="9">
<text-property name="text">Appliction Context
Keys</text-property>
</label>
</cell>
<cell id="26">
<label id="30">
<text-property name="text">Appliction Context
Values</text-property>
</label>
</cell>
</row>
<row id="18">
<property name="style">detail</property>
<cell id="19">
<data id="7">
<list-property name="boundDataColumns">
<structure>
<property name="name">data item</property>
<expression name="expression">try {
OdaJDBCDriverPassInConnectionCloseAfterUse.toString();
} catch (e) {
"My Object Was Not Found";
}</expression>
<property name="dataType">any</property>
</structure>
</list-property>
<property name="resultSetColumn">data
item</property>
</data>
</cell>
<cell id="20">
<data id="4">
<list-property name="boundDataColumns">
<structure>
<property name="name">data item</property>
<expression
name="expression">kys;</expression>
<property name="dataType">any</property>
</structure>
</list-property>
<property name="resultSetColumn">data
item</property>
</data>
</cell>
<cell id="27">
<data id="31">
<list-property name="boundDataColumns">
<structure>
<property name="name">data item</property>
<expression
name="expression">vls</expression>
<property name="dataType">any</property>
</structure>
</list-property>
<property name="resultSetColumn">data
item</property>
</data>
</cell>
</row>
<row id="36">
<property name="style">headerfooter</property>
<cell id="37">
<property name="colSpan">3</property>
<property name="rowSpan">1</property>
<label id="40">
<text-property name="text">Example JSP Code to
Test</text-property>
</label>
</cell>
</row>
<row id="22">
<property name="style">headerfooter</property>
<cell id="23">
<property name="colSpan">3</property>
<property name="rowSpan">1</property>
<text id="35">
<property name="contentType">plain</property>
<text-property name="content"><![CDATA[<%
java.lang.String teststr = "MyTest";
request.setAttribute( "AppContextKey", teststr );
java.lang.String stringObj = "This test my Application Context From the
Viewer";
request.setAttribute( "AppContextValue", stringObj );

%>
<jsp:forward page= "<%= "/run?__report=AppContext.rptdesign"
%>"/>]]></text-property>
</text>
</cell>
</row>
</grid>
</body>
</report>


mnovakouski wrote:
> Hi Jason,
> Yes, I'm getting (what I think is) the exact message that the OP was
> reporting. Here's a copy/paste in case I missed something subtle:
>
> 11:03:50,998 INFO [CachedConnectionManager] Closing a connection for
> you. Please close them yourself:
> org.jboss.resource.adapter.jdbc.WrappedConnection@1fc719b
> 11:04:08,472 INFO [CachedConnectionManager] Closing a connection for
> you. Please close them yourself:
> org.jboss.resource.adapter.jdbc.WrappedConnection@48e385
>
> I doubt it means anything significant, but I tend to get 1 error when
> the report parameter selection window comes up, and then another one
> once the report itself is generated.
> Additional background info: I'm currently running about 7 reports on my
> production server, and most of them will run ok, though they all get 1
> or more of these errors whenever they run, while one of them seems to
> hit an infinite loop whenever I run it and just chews up memory till I
> get a broken pipe exception (unfortunately I don't have one handy at the
> moment for posting). That one has a bunch of tables embedded in tables
> so it makes sense that it would take additional resources to process it;
> but it works without much issue when I preview it in the report
> designer, so I'm hopeful that I can make it work in production.
>
> Thanks very much for looking at this!
>
> Jason Weathersby wrote:
>
>> Marc,
>
>> Are you getting the log message about closing the connection? I just
>> made a comment on the bug entry. The connections should be getting
>> closed automatically by default.
>
>> Jason
>
>> mnovakouski wrote:
>>> Hello,
>>>
>>> I just wanted to chime in and say that I'm experiencing the same
>>> problem, and it's causing massive memory leaks for my application.
>>> I'm using BIRT 2.5 and JBoss 4.2.2. I tried backfitting to BIRT
>>> Runtime 2.3.2 since as the OP said this problem existed in 2.2 and
>>> was marked as completed in 2.3, but I don't know how to revert the
>>> .rptdesign files to 2.3. There's a bunch of info out there about how
>>> you can't use a runtime that's older than the report designer
>>> version, and I don't know if there's a way around that. If anyone
>>> has any guidance as to how I might revert my .rptdesign files to the
>>> 2.3.2 report designer so that I can use the 2.3.2 Runtime and see if
>>> the problem goes away, I'd very much appreciate it.
>>>
>>> Many Thanks,
>>> Marc
>>>
>
>
Re: Possible Memory Leak [message #479665 is a reply to message #479646] Tue, 11 August 2009 21:19 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mnovakouski.hotmail.com

Jason,

I'd love to try your suggestion; unfortunately I was not the original
developer of the web app so I'm still trying to get up to speed on how
everything works. So while I know how to create the AppContext.rptdesign
file and where to put it, I'm not really sure where the xml for the first
step is supposed to go. We have a Generate_Report.jsp file which is where
the list of reports is specified; should I dump that in there? Or does it
become a separate jsp page, and where should it go?

I should specify that our deployment is very simple-we take the
WebViewerExample directory from the 2.5 BIRT runtime distribution, rename
it to birt.war, dump our rptdesign files in there, and throw it in the
jboss deploy directory. So if you could specify which file the jsp goes
in or if it becomes a new file and where that goes, that would be very
helpful. If it is helpful, the content of the Generate_Report.jsp file is
the following:

<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<title>Generate Report</title>
<SCRIPT TYPE="text/javascript">
<!--
function dropdown(mySel)
{
var myWin, myVal;
myVal = mySel.options[mySel.selectedIndex].value;
if(myVal)
{
if(mySel.form.target)myWin = parent[mySel.form.target];
else myWin = window;
if (! myWin) return true;
myWin.location = myVal;
}
return false;
}
//-->
</SCRIPT>
<s:head/>
</head>
<body>
<FORM
ACTION="Report"
METHOD=POST onSubmit="return dropdown(this.gourl)">
<SELECT NAME="gourl">
<OPTION VALUE="">Choose a report...
<OPTION VALUE="/birt/frameset?__report=rptdesign/x.rptdesign">x
<OPTION VALUE="/birt/frameset?__report=rptdesign/y.rptdesign">y
<OPTION VALUE="/birt/frameset?__report=rptdesign/z.rptdesign">z
<OPTION VALUE="/birt/frameset?__report=rptdesign/a.rptdesign">a
<OPTION VALUE="/birt/frameset?__report=rptdesign/b.rptdesign">b
<OPTION VALUE="/birt/frameset?__report=rptdesign/c.rptdesign">c
<OPTION VALUE="/birt/frameset?__report=rptdesign/d.rptdesign">d
</SELECT>

<INPUT TYPE=SUBMIT VALUE="Go">
</FORM>
</body>
</html>

As soon as I get everything in the right place I'll give it a go and let
you know what I see.
Re: Possible Memory Leak [message #479822 is a reply to message #479665] Wed, 12 August 2009 15:58 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Just for testing purposes extract the birt war and put this jsp (name it
whatever you want)
<%
java.lang.String teststr = "OdaJDBCDriverPassInConnectionCloseAfterUse";
session.setAttribute( "AppContextKey", teststr );
java.lang.Boolean boolObj = true;
session.setAttribute( "AppContextValue", boolObj );
%>
<%
String redirectURL =
" http://localhost:8080/2.5.0/frameset?__report=AppContext.rpt design";
response.sendRedirect(redirectURL);
%>

Right under the WebViewerExample directory. Rewar and redeploy.

Jason

mnovakouski wrote:
> Jason,
>
> I'd love to try your suggestion; unfortunately I was not the original
> developer of the web app so I'm still trying to get up to speed on how
> everything works. So while I know how to create the
> AppContext.rptdesign file and where to put it, I'm not really sure where
> the xml for the first step is supposed to go. We have a
> Generate_Report.jsp file which is where the list of reports is
> specified; should I dump that in there? Or does it become a separate
> jsp page, and where should it go?
> I should specify that our deployment is very simple-we take the
> WebViewerExample directory from the 2.5 BIRT runtime distribution,
> rename it to birt.war, dump our rptdesign files in there, and throw it
> in the jboss deploy directory. So if you could specify which file the
> jsp goes in or if it becomes a new file and where that goes, that would
> be very helpful. If it is helpful, the content of the
> Generate_Report.jsp file is the following:
>
> <%@ taglib prefix="s" uri="/struts-tags" %>
> <html>
> <head>
> <title>Generate Report</title>
> <SCRIPT TYPE="text/javascript">
> <!--
> function dropdown(mySel)
> {
> var myWin, myVal;
> myVal = mySel.options[mySel.selectedIndex].value;
> if(myVal)
> {
> if(mySel.form.target)myWin = parent[mySel.form.target];
> else myWin = window;
> if (! myWin) return true;
> myWin.location = myVal;
> }
> return false;
> }
> //-->
> </SCRIPT>
> <s:head/>
> </head>
> <body>
> <FORM ACTION="Report" METHOD=POST onSubmit="return
> dropdown(this.gourl)">
> <SELECT NAME="gourl">
> <OPTION VALUE="">Choose a report...
> <OPTION VALUE="/birt/frameset?__report=rptdesign/x.rptdesign">x
> <OPTION VALUE="/birt/frameset?__report=rptdesign/y.rptdesign">y
> <OPTION VALUE="/birt/frameset?__report=rptdesign/z.rptdesign">z
> <OPTION VALUE="/birt/frameset?__report=rptdesign/a.rptdesign">a
> <OPTION VALUE="/birt/frameset?__report=rptdesign/b.rptdesign">b
> <OPTION VALUE="/birt/frameset?__report=rptdesign/c.rptdesign">c
> <OPTION VALUE="/birt/frameset?__report=rptdesign/d.rptdesign">d
> </SELECT>
>
> <INPUT TYPE=SUBMIT VALUE="Go">
> </FORM>
> </body>
> </html>
>
> As soon as I get everything in the right place I'll give it a go and let
> you know what I see.
>
Re: Possible Memory Leak [message #479872 is a reply to message #479822] Wed, 12 August 2009 20:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mnovakouski.hotmail.com

Hi Jason,
Ok, so what I did was to put the AppContext rptdesign file with the rest
of the rptdesign files, add it to the list in my Generate_Report.jsp file,
and create a "test.jsp" file with the contents copy/pasted from your post.
I put the test.jsp in the root directory of the birt.war directory
uploaded into jboss. Running the report on the server resulted in the
following screenshot:

http://i690.photobucket.com/albums/vv266/mnovakouski/birttes tpicture.jpg

I also got a bunch of these errors when I ran it, though they are probably
not relevant:
15:08:50,122 ERROR [STDERR] Aug 12, 2009 3:08:50 PM
org.eclipse.birt.report.model.metadata.ChoicePropertyType validateXml
SEVERE: Not found choice: any


I'm not sure if that was what you were expecting, I know you said
something about modifying the path to be correct, but I'm not sure what
the path should be pointing at (the .rptdesign file itself? if so what's
the point of the "frameset?__report=" fragment) so I left it alone. For
the record the path to the .rptdesign file is:
/root/jboss-4.2.2.GA/server/default/deploy/birt.war/rptdesig n

I do apologize if not knowledgeable enough about the server world to make
this easy; this is my first exposure to server development in about 10
years of software development and I'm learning as I go. If it would be
easier you can contact me on hotmail at my username, either email or msn.
Re: Possible Memory Leak [message #480037 is a reply to message #479872] Thu, 13 August 2009 14:28 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Did you run the test.jsp before running the rptdesign I posted?
BTW those errors have to do with the latest version of BIRT no longer
supports the any data type. You may have to update the designs to pick
a specific data type for those values.

mnovakouski wrote:
> Hi Jason,
> Ok, so what I did was to put the AppContext rptdesign file with the rest
> of the rptdesign files, add it to the list in my Generate_Report.jsp
> file, and create a "test.jsp" file with the contents copy/pasted from
> your post. I put the test.jsp in the root directory of the birt.war
> directory uploaded into jboss. Running the report on the server
> resulted in the following screenshot:
>
> http://i690.photobucket.com/albums/vv266/mnovakouski/birttes tpicture.jpg
>
> I also got a bunch of these errors when I ran it, though they are
> probably not relevant:
> 15:08:50,122 ERROR [STDERR] Aug 12, 2009 3:08:50 PM
> org.eclipse.birt.report.model.metadata.ChoicePropertyType validateXml
> SEVERE: Not found choice: any
>
>
> I'm not sure if that was what you were expecting, I know you said
> something about modifying the path to be correct, but I'm not sure what
> the path should be pointing at (the .rptdesign file itself? if so what's
> the point of the "frameset?__report=" fragment) so I left it alone. For
> the record the path to the .rptdesign file is:
> /root/jboss-4.2.2.GA/server/default/deploy/birt.war/rptdesig n
>
> I do apologize if not knowledgeable enough about the server world to
> make this easy; this is my first exposure to server development in about
> 10 years of software development and I'm learning as I go. If it would
> be easier you can contact me on hotmail at my username, either email or
> msn.
>
Re: Possible Memory Leak [message #480088 is a reply to message #480037] Thu, 13 August 2009 18:33 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mnovakouski.hotmail.com

Jason,

My apologies, I went back and ran the test.jsp page first then ran the
report, and the result was the following:

http://i690.photobucket.com/albums/vv266/mnovakouski/birttes tpicture2.jpg

Just in case it's meaningful, when I ran test.jsp it gave me an unable to
connect error to the redirect. It was still pointing at localhost:8080 so
that makes sense, I can change it to point at the report itself if
necessary.

Also, I did know about the non-support of the "any" data type, I fixed
that when I upgraded all my reports from 2.2 to 2.5; although I figured it
wasn't, I just wanted to mention it in case it was meaningful to the test.

One other note I would make is that I recreated the report in 2.3.2.2, ran
it in the same environment with the 2.3.2.2 BIRT runtime, and I don't get
the "close the connections yourself" error (though I'm still getting a
definite memory leak, I'm trying to profile that to figure it out).

Thanks!
Re: Possible Memory Leak [message #480122 is a reply to message #480088] Thu, 13 August 2009 23:30 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

So after running that report, which just adds a app context setting to
close the connection you are still getting the errors? If so watch the
bugzilla id for comments from the devs. Also be sure to post results of
profile.

Thanks

Jason

mnovakouski wrote:
> Jason,
>
> My apologies, I went back and ran the test.jsp page first then ran the
> report, and the result was the following:
>
> http://i690.photobucket.com/albums/vv266/mnovakouski/birttes tpicture2.jpg
>
> Just in case it's meaningful, when I ran test.jsp it gave me an unable
> to connect error to the redirect. It was still pointing at
> localhost:8080 so that makes sense, I can change it to point at the
> report itself if necessary.
>
> Also, I did know about the non-support of the "any" data type, I fixed
> that when I upgraded all my reports from 2.2 to 2.5; although I figured
> it wasn't, I just wanted to mention it in case it was meaningful to the
> test.
>
> One other note I would make is that I recreated the report in 2.3.2.2,
> ran it in the same environment with the 2.3.2.2 BIRT runtime, and I
> don't get the "close the connections yourself" error (though I'm still
> getting a definite memory leak, I'm trying to profile that to figure it
> out).
>
> Thanks!
>
Re: Possible Memory Leak [message #480266 is a reply to message #480122] Fri, 14 August 2009 15:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mnovakouski.hotmail.com

Ok, so I restarted the server, ran the test.jsp, ran a regular report to
establish that I still got the "Closing a connection for you" error, ran
the AppContext report, and then attempted to run a number of different
reports. I still got the error, there was no change except for some
reason on one of the errors it gave me a full stack trace (it usually just
gives me the top-level error):

10:40:50,527 INFO [CachedConnectionManager] Closing a connection for you.
Please close them yourself:
org.jboss.resource.adapter.jdbc.WrappedConnection@92c877
java.lang.Throwable: STACKTRACE
at
org.jboss.resource.connectionmanager.CachedConnectionManager .registerConnection(CachedConnectionManager.java:290)
at
org.jboss.resource.connectionmanager.BaseConnectionManager2. allocateConnection(BaseConnectionManager2.java:417)
at
org.jboss.resource.connectionmanager.BaseConnectionManager2$ ConnectionManagerProxy.allocateConnection(BaseConnectionMana ger2.java:842)
at
org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnect ion(WrapperDataSource.java:88)
+ 200 more lines

In any case, the problem persists.

As far as the profiler, I must be doing something wrong-I ran the JBoss
Profiler on my system, and apparently when just trying to run a single
simple report, it collected so much data that it couldn't parse it into a
report. I may have to try to find a different profiler.

In any case however, I'm concerned that the memory leak I'm getting isn't
necessarily related to the error we're looking at, because memory usage
increases at alarming rates even when I run the same reports rebuilt in
birt 2.3.2 using the birt 2.3.2 runtime, which as I mentioned previously
does Not result in the error we're looking at.

> Jason Weathersby wrote:

> So after running that report, which just adds a app context setting to
> close the connection you are still getting the errors? If so watch the
> bugzilla id for comments from the devs. Also be sure to post results of
> profile.

> Thanks

> Jason

> mnovakouski wrote:
>> Jason,
>>
>> My apologies, I went back and ran the test.jsp page first then ran the
>> report, and the result was the following:
>>
>> http://i690.photobucket.com/albums/vv266/mnovakouski/birttes tpicture2.jpg
>>
>> Just in case it's meaningful, when I ran test.jsp it gave me an unable
>> to connect error to the redirect. It was still pointing at
>> localhost:8080 so that makes sense, I can change it to point at the
>> report itself if necessary.
>>
>> Also, I did know about the non-support of the "any" data type, I fixed
>> that when I upgraded all my reports from 2.2 to 2.5; although I figured
>> it wasn't, I just wanted to mention it in case it was meaningful to the
>> test.
>>
>> One other note I would make is that I recreated the report in 2.3.2.2,
>> ran it in the same environment with the 2.3.2.2 BIRT runtime, and I
>> don't get the "close the connections yourself" error (though I'm still
>> getting a definite memory leak, I'm trying to profile that to figure it
>> out).
>>
>> Thanks!
>>
Re: Possible Memory Leak [message #480289 is a reply to message #480266] Fri, 14 August 2009 18:28 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

I believe on JBoss you can set GC interval. If you can, for testing
purposes you may want to speed it up just see if this is normal.



mnovakouski wrote:
> Ok, so I restarted the server, ran the test.jsp, ran a regular report to
> establish that I still got the "Closing a connection for you" error, ran
> the AppContext report, and then attempted to run a number of different
> reports. I still got the error, there was no change except for some
> reason on one of the errors it gave me a full stack trace (it usually
> just gives me the top-level error):
>
> 10:40:50,527 INFO [CachedConnectionManager] Closing a connection for
> you. Please close them yourself:
> org.jboss.resource.adapter.jdbc.WrappedConnection@92c877
> java.lang.Throwable: STACKTRACE
> at
> org.jboss.resource.connectionmanager.CachedConnectionManager .registerConnection(CachedConnectionManager.java:290)
>
> at
> org.jboss.resource.connectionmanager.BaseConnectionManager2. allocateConnection(BaseConnectionManager2.java:417)
>
> at
> org.jboss.resource.connectionmanager.BaseConnectionManager2$ ConnectionManagerProxy.allocateConnection(BaseConnectionMana ger2.java:842)
>
> at
> org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnect ion(WrapperDataSource.java:88)
>
> + 200 more lines
>
> In any case, the problem persists.
> As far as the profiler, I must be doing something wrong-I ran the JBoss
> Profiler on my system, and apparently when just trying to run a single
> simple report, it collected so much data that it couldn't parse it into
> a report. I may have to try to find a different profiler.
> In any case however, I'm concerned that the memory leak I'm getting
> isn't necessarily related to the error we're looking at, because memory
> usage increases at alarming rates even when I run the same reports
> rebuilt in birt 2.3.2 using the birt 2.3.2 runtime, which as I mentioned
> previously does Not result in the error we're looking at.
>
>> Jason Weathersby wrote:
>
>> So after running that report, which just adds a app context setting to
>> close the connection you are still getting the errors? If so watch
>> the bugzilla id for comments from the devs. Also be sure to post
>> results of profile.
>
>> Thanks
>
>> Jason
>
>> mnovakouski wrote:
>>> Jason,
>>>
>>> My apologies, I went back and ran the test.jsp page first then ran
>>> the report, and the result was the following:
>>>
>>> http://i690.photobucket.com/albums/vv266/mnovakouski/birttes tpicture2.jpg
>>>
>>>
>>> Just in case it's meaningful, when I ran test.jsp it gave me an
>>> unable to connect error to the redirect. It was still pointing at
>>> localhost:8080 so that makes sense, I can change it to point at the
>>> report itself if necessary.
>>>
>>> Also, I did know about the non-support of the "any" data type, I
>>> fixed that when I upgraded all my reports from 2.2 to 2.5; although I
>>> figured it wasn't, I just wanted to mention it in case it was
>>> meaningful to the test.
>>>
>>> One other note I would make is that I recreated the report in
>>> 2.3.2.2, ran it in the same environment with the 2.3.2.2 BIRT
>>> runtime, and I don't get the "close the connections yourself" error
>>> (though I'm still getting a definite memory leak, I'm trying to
>>> profile that to figure it out).
>>>
>>> Thanks!
>>>
>
>
Re: Possible Memory Leak [message #480300 is a reply to message #480289] Fri, 14 August 2009 20:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mnovakouski.hotmail.com

Well, I messed with the GC Interval (and a few other JVM settings) and it
does seem like the memory leak itself has been mostly, if not entirely,
resolved. So that just leaves tracking down this "close your own
connections" issue, though it doesn't seem to impact performance that
much. Thanks for the suggestion!
Re: Possible Memory Leak [message #480567 is a reply to message #480300] Mon, 17 August 2009 16:18 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Thanks. Watch the bug it should be addressed soon.

mnovakouski wrote:
> Well, I messed with the GC Interval (and a few other JVM settings) and
> it does seem like the memory leak itself has been mostly, if not
> entirely, resolved. So that just leaves tracking down this "close your
> own connections" issue, though it doesn't seem to impact performance
> that much. Thanks for the suggestion!
>
Re: Possible Memory Leak [message #480619 is a reply to message #480567] Mon, 17 August 2009 23:15 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mnovakouski.hotmail.com

Fantastic, thanks very much.
Re: Possible Memory Leak [message #1782204 is a reply to message #480619] Tue, 20 February 2018 12:12 Go to previous message
Roshan Kumar is currently offline Roshan KumarFriend
Messages: 1
Registered: February 2018
Junior Member
Getting below error while executing rptdesign.

Note: jndi datasource has been used. with Birt 4.6.0

17:30:09,525 WARN [org.jboss.jca.adapters.jdbc.WrappedConnection] (default task-9) IJ030040: Closing a statement you left open, please do your own housekeeping for: java:/datasources/solcentreDS: java.lang.Throwable: STACKTRACE
at org.jboss.jca.adapters.jdbc.WrappedConnection.registerStatement(WrappedConnection.java:1971)
at org.jboss.jca.adapters.jdbc.WrappedStatement.<init>(WrappedStatement.java:129)
at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.<init>(WrappedPreparedStatement.java:84)
at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.<init>(WrappedPreparedStatement.java:69)
at org.jboss.jca.adapters.jdbc.jdk7.WrappedPreparedStatementJDK7.<init>(WrappedPreparedStatementJDK7.java:51)
at org.jboss.jca.adapters.jdbc.jdk7.WrappedConnectionJDK7.wrapPreparedStatement(WrappedConnectionJDK7.java:82)
at org.jboss.jca.adapters.jdbc.WrappedConnection.prepareStatement(WrappedConnection.java:454)
at org.eclipse.birt.report.data.oda.jdbc.Statement.prepare(Statement.java:131)
at org.eclipse.birt.report.data.oda.jdbc.bidi.BidiStatement.prepare(BidiStatement.java:48)
at org.eclipse.datatools.connectivity.oda.consumer.helper.OdaQuery.doPrepare(OdaQuery.java:240)
at org.eclipse.datatools.connectivity.oda.consumer.helper.OdaQuery.prepare(OdaQuery.java:187)
at org.eclipse.birt.data.engine.odaconsumer.Connection.prepareOdaQuery(Connection.java:290)
at org.eclipse.birt.data.engine.odaconsumer.Connection.prepareStatement(Connection.java:197)
at org.eclipse.birt.data.engine.executor.DataSource.prepareStatement(DataSource.java:302)
at org.eclipse.birt.data.engine.executor.DataSourceQuery.prepare(DataSourceQuery.java:296)
at org.eclipse.birt.data.engine.impl.PreparedOdaDSQuery$OdaDSQueryExecutor.prepareOdiQuery(PreparedOdaDSQuery.java:621)
at org.eclipse.birt.data.engine.impl.QueryExecutor.prepareExecution(QueryExecutor.java:349)
at org.eclipse.birt.data.engine.impl.PreparedQuery.doPrepare(PreparedQuery.java:463)
at org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.produceQueryResults(PreparedDataSourceQuery.java:190)
at org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.execute(PreparedDataSourceQuery.java:178)
at org.eclipse.birt.data.engine.impl.PreparedOdaDSQuery.execute(PreparedOdaDSQuery.java:179)
at org.eclipse.birt.report.data.adapter.impl.DataRequestSessionImpl.execute(DataRequestSessionImpl.java:651)
at org.eclipse.birt.report.engine.data.dte.DteDataEngine.doExecuteQuery(DteDataEngine.java:158)
at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.execute(AbstractDataEngine.java:286)
at org.eclipse.birt.report.engine.executor.ExecutionContext.executeQuery(ExecutionContext.java:1947)
at org.eclipse.birt.report.engine.executor.QueryItemExecutor.executeQuery(QueryItemExecutor.java:80)
at org.eclipse.birt.report.engine.executor.TableItemExecutor.execute(TableItemExecutor.java:62)
at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplicateItemExecutor.execute(SuppressDuplicateItemExecutor.java:43)
at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.execute(WrappedReportItemExecutor.java:46)
at org.eclipse.birt.report.engine.internal.executor.l18n.LocalizedReportItemExecutor.execute(LocalizedReportItemExecutor.java:34)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:65)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.resumeLayout(HTMLInlineStackingLM.java:111)
at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.layoutNodes(HTMLInlineStackingLM.java:160)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLRepeatHeaderLM.layoutChildren(HTMLRepeatHeaderLM.java:46)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:92)
at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:100)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:181)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:77)
at org.eclipse.birt.report.service.ReportEngineService.runAndRenderReport(ReportEngineService.java:937)
at org.eclipse.birt.report.service.BirtViewerReportService.runAndRenderReport(BirtViewerReportService.java:973)
at org.eclipse.birt.report.service.actionhandler.BirtRunAndRenderActionHandler.__execute(BirtRunAndRenderActionHandler.java:76)
at org.eclipse.birt.report.service.actionhandler.AbstractBaseActionHandler.execute(AbstractBaseActionHandler.java:90)
at org.eclipse.birt.report.presentation.aggregation.layout.RunFragment.doService(RunFragment.java:120)
at org.eclipse.birt.report.presentation.aggregation.layout.FramesetFragment.service(FramesetFragment.java:86)
at org.eclipse.birt.report.servlet.ViewerServlet.__doGet(ViewerServlet.java:181)
at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.doGet(BirtSoapMessageDispatcherServlet.java:160)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.service(BirtSoapMessageDispatcherServlet.java:122)
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:86)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:130)
at org.eclipse.birt.report.filter.ViewerFilter.doFilter(ViewerFilter.java:68)
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132)
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:208)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132)
at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85)
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58)
at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:72)
at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:282)
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:261)
at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:80)
at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:172)
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:199)
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:774)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Previous Topic:cannot view reports in birt
Next Topic:Sum only on specific bars in a chart
Goto Forum:
  


Current Time: Wed Jun 20 08:08:21 GMT 2018

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

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

Back to the top