pooven | 1 Dec 15:16 2007
Picon

Memeory leak in com.iBatis.sqlmap.engine.impl.SqlMapClientImpl class


We are using a iBatis 2.3.677 along with CrystalReport 11.8 ,Websphere
AppServer 6.0.23 and DB2 8.2 and Websphere Portal Server 5.1.0.4, in our
struts based portlet application. 

There are 183 reports we are using. 

We are facing the outOfMemory issue. After analysing the heapDump file
through the IBM HeapAnalyser we came to know that there is a memory leakage
around 8 MB in the 

com.iBatis.sqlmap.engine.impl.SqlMapClientImpl class, 

I called flushDataCache from the sqlMapper , still it is of no use. 

Can any one guide me in this regard. 

Thanks, 
P.Poovendran
--

-- 
View this message in context: http://www.nabble.com/Memeory-leak-in-com.iBatis.sqlmap.engine.impl.SqlMapClientImpl-class-tf4928332.html#a14105662
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.

Larry Meadors | 1 Dec 16:31 2007
Picon

Re: Memeory leak in com.iBatis.sqlmap.engine.impl.SqlMapClientImpl class

I'm not buying this one. :-)

You're going to have to do some more investigation (and explanation)
to show that this is an iBATIS issue.

I'd sooner believe that it's around integration with Crystal Reports.

Larry

On Dec 1, 2007 7:16 AM, pooven <poovendran_p <at> yahoo.com> wrote:
>
> We are using a iBatis 2.3.677 along with CrystalReport 11.8 ,Websphere
> AppServer 6.0.23 and DB2 8.2 and Websphere Portal Server 5.1.0.4, in our
> struts based portlet application.
>
> There are 183 reports we are using.
>
> We are facing the outOfMemory issue. After analysing the heapDump file
> through the IBM HeapAnalyser we came to know that there is a memory leakage
> around 8 MB in the
>
> com.iBatis.sqlmap.engine.impl.SqlMapClientImpl class,
>
> I called flushDataCache from the sqlMapper , still it is of no use.
>
> Can any one guide me in this regard.
>
>
> Thanks,
> P.Poovendran
(Continue reading)

bsterner | 1 Dec 20:54 2007
Picon

Re: resultMap and HashMap


Well, if my result map was this...

<resultMap id="diaryResult" class="Map">
	<result property="diaryId" column="DiaryID"/>
	<result property="entryDate" column="EntryDate" jdbcType="DATE"
javaType="java.util.Date"/>
</resultMap>

The result is a hashmap with the following entries

diaryId => {DiaryID Value}
entryDate => {Entry Date Value}

What I want is...

{DiaryID Value} => {Entry Date Value}

One of the columns makes the key, the other the value.  Would there be a way
to do this with a custom type handler, if it cannot be done using the
standard mapping rules?

--

-- 
View this message in context: http://www.nabble.com/resultMap-and-HashMap-tf4924592.html#a14108984
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.

bhaarat Sharma | 2 Dec 17:01 2007
Picon

Oracle stored procs returning multiple cursors

Hello,

Can someone please show a sample resultMap xml file which retrieves data from oracle stored procs?

I have stored procs which return multiple resultsets (cursors).  Does iBatis have a builtin datatype for oracle cursor types?

Thanks!

--
-bhaarat

Tom Henricksen | 3 Dec 14:42 2007

RE: Ibatis java.sql and log4j

P6spy is pretty easy to setup.

 

http://www.p6spy.com/documentation/index.htm

 

 

from what I remember you basically point your system to there driver

 

driver=com.p6spy.engine.spy.P6SpyDriver

 

Then setup the spy.properties to point to your drvier.


# ibm db2 driver

# realdriver=COM.ibm.db2.jdbc.net.DB2Driver

realdriver=com.ibm.db2.jcc.DB2Driver

 

 So in your case the Sybase driver.

 

-----Original Message-----
From: Warren [mailto:warren <at> clarksnutrition.com]
Sent: Friday, November 30, 2007 5:17 PM
To: user-java <at> ibatis.apache.org
Subject: RE: Ibatis java.sql and log4j

 

Thanks, I will quit knocking myself out trying to get JDBC to log by itself. p6spy, will this allow me to capture SQL statements. I am trying to rewrite an old servlet/jsp app that is no longer supported. It would sure speed things up if I could get my hands on the SQL. I do not have the source code and I have decompiled it, but its a mess. I am trying to get request level logging on the db side, but have not had any luck. It uses Sybase SQL Anywhere 8.0.2. Any sugestions?

-----Original Message-----
From: Jeff Butler [mailto:jeffgbutler <at> gmail.com]
Sent: Friday, November 30, 2007 1:42 PM
To: user-java <at> ibatis.apache.org
Subject: Re: Ibatis java.sql and log4j

iBATIS logs to the java.sql objects - so all the java.sql logging entries you see are actually iBATIS entries - NOT standard java.sql entries.  This is a <sarcasm>feature</sarcasm> of iBATIS and will not be available in other environments.

 

Many JDBC drivers can be configured to do logging, or you can use p6spy, in other environments.

 

Jeff Butler

 

 



 

On Nov 30, 2007 3:33 PM, Warren <warren <at> clarksnutrition.com> wrote:

I have an app that uses Ibatis and log4j to log Ibatis and java.sql. It logs
perfectly. I have another app that does not use Ibatis and I can not get
log4j to log java.sql. I know that logging is working and log4j has
initialized logging for java.sql.

Is Ibatis working with java.sql somehow so that log4j can log SQL
statements, or should you be able to log SQL statement and java.sql without
Ibatis?

Thanks,

Warren

 

Tom Henricksen | 3 Dec 14:45 2007

RE: Ibatis java.sql and log4j

And yes it will capture your SQL

Here is some of our output in our console

 

p6spy - 1196689443367|0|2|statement||select * from sysibm.SYSDUMMY1

 

-----Original Message-----
From: Tom Henricksen [mailto:TomH <at> A-t-g.com]
Sent: Monday, December 03, 2007 7:42 AM
To: user-java <at> ibatis.apache.org
Subject: RE: Ibatis java.sql and log4j

 

P6spy is pretty easy to setup.

 

http://www.p6spy.com/documentation/index.htm

 

 

from what I remember you basically point your system to there driver

 

driver=com.p6spy.engine.spy.P6SpyDriver

 

Then setup the spy.properties to point to your drvier.


# ibm db2 driver

# realdriver=COM.ibm.db2.jdbc.net.DB2Driver

realdriver=com.ibm.db2.jcc.DB2Driver

 

 So in your case the Sybase driver.

 

-----Original Message-----
From: Warren [mailto:warren <at> clarksnutrition.com]
Sent: Friday, November 30, 2007 5:17 PM
To: user-java <at> ibatis.apache.org
Subject: RE: Ibatis java.sql and log4j

 

Thanks, I will quit knocking myself out trying to get JDBC to log by itself. p6spy, will this allow me to capture SQL statements. I am trying to rewrite an old servlet/jsp app that is no longer supported. It would sure speed things up if I could get my hands on the SQL. I do not have the source code and I have decompiled it, but its a mess. I am trying to get request level logging on the db side, but have not had any luck. It uses Sybase SQL Anywhere 8.0.2. Any sugestions?

-----Original Message-----
From: Jeff Butler [mailto:jeffgbutler <at> gmail.com]
Sent: Friday, November 30, 2007 1:42 PM
To: user-java <at> ibatis.apache.org
Subject: Re: Ibatis java.sql and log4j

iBATIS logs to the java.sql objects - so all the java.sql logging entries you see are actually iBATIS entries - NOT standard java.sql entries.  This is a <sarcasm>feature</sarcasm> of iBATIS and will not be available in other environments.

 

Many JDBC drivers can be configured to do logging, or you can use p6spy, in other environments.

 

Jeff Butler

 

 



 

On Nov 30, 2007 3:33 PM, Warren <warren <at> clarksnutrition.com> wrote:

I have an app that uses Ibatis and log4j to log Ibatis and java.sql. It logs
perfectly. I have another app that does not use Ibatis and I can not get
log4j to log java.sql. I know that logging is working and log4j has
initialized logging for java.sql.

Is Ibatis working with java.sql somehow so that log4j can log SQL
statements, or should you be able to log SQL statement and java.sql without
Ibatis?

Thanks,

Warren

 

pns77 | 4 Dec 09:17 2007
Picon

Re: Memeory leak in com.iBatis.sqlmap.engine.impl.SqlMapClientImpl class


I am also facing a similar issue with ibatis - we arrived at the conclusion
after an analysis of heap dump. The following was the response that we got
for a ticket we had raised with IBM.

" ..Maximum heap was set to 1024m and almost 1000mb of heap is in use.
Anlaysis of the heapdump shows the com/ibatis/sqlmap/engine/* code occupying
most of heap(Nearly 900mb). .."

There seems to be too many char[] (character array) objects that get created
from com.iBatis.sqlmap.engine.impl.SqlMapClientImpl class. In our
application side we had explcitly set the "daoManager" object reference to
null so that it could be GC'ed. Still, we dont see any improvement. 

Would apprecitate if some one could suggest a solution.

Thanks,
P.N.Subramanian

pooven wrote:
> 
> We are using a iBatis 2.3.677 along with CrystalReport 11.8 ,Websphere
> AppServer 6.0.23 and DB2 8.2 and Websphere Portal Server 5.1.0.4, in our
> struts based portlet application. 
> 
> There are 183 reports we are using. 
> 
> We are facing the outOfMemory issue. After analysing the heapDump file
> through the IBM HeapAnalyser we came to know that there is a memory
> leakage around 8 MB in the 
> 
> com.iBatis.sqlmap.engine.impl.SqlMapClientImpl class, 
> 
> I called flushDataCache from the sqlMapper , still it is of no use. 
> 
> Can any one guide me in this regard. 
> 
> 
> Thanks, 
> P.Poovendran
> 

--

-- 
View this message in context: http://www.nabble.com/Memeory-leak-in-com.iBatis.sqlmap.engine.impl.SqlMapClientImpl-class-tf4928332.html#a14146385
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.

Jeff Butler | 4 Dec 16:42 2007
Picon

Re: Memeory leak in com.iBatis.sqlmap.engine.impl.SqlMapClientImpl class

I just did a quick scan of the iBATIS source code and see very little usage of char[] - and none at all in the class you mention.  The only place iBATIS creates any char[] of its own is in the ReaderInputStream class.
 
Question - do you have many mappings to char[]?  Perhaps it is not iBATIS that is leaking but rather something in your application is holding on to the objects created by iBATIS?
 
BTW - I have used iBATIS in the exact same environment you mention for several years and heve never experienced a memory leak.
 
Jeff Butler

On Dec 4, 2007 2:19 AM, pns77 <pnsrapuram <at> gmail.com> wrote:

I am also facing a similar issue with ibatis - we arrived at the conclusion
after an analysis of heap dump. The following was the response that we got
for a ticket we had raised with IBM.

" ..Maximum heap was set to 1024m and almost 1000mb of heap is in use.
Anlaysis of the heapdump shows the com/ibatis/sqlmap/engine/* code occupying
most of heap(Nearly 900mb). .."

There seems to be too many char[] (character array) objects that get created
from com.iBatis.sqlmap.engine.impl.SqlMapClientImpl class. In our
application side we had explcitly set the "daoManager" object reference to
null so that it could be GC'ed. Still, we dont see any improvement.

Would apprecitate if some one could suggest a solution.

We use WebSphere 6 on AIX / ibatis  accessing DB2 database.

Thanks,
P.N.Subramanian


pooven wrote:
>
> We are using a iBatis 2.3.677 along with CrystalReport 11.8 ,Websphere
> AppServer 6.0.23 and DB2 8.2 and Websphere Portal Server 5.1.0.4, in our
> struts based portlet application.
>
> There are 183 reports we are using.
>
> We are facing the outOfMemory issue. After analysing the heapDump file
> through the IBM HeapAnalyser we came to know that there is a memory
> leakage around 8 MB in the
>
> com.iBatis.sqlmap.engine.impl.SqlMapClientImpl class,
>
> I called flushDataCache from the sqlMapper , still it is of no use.
>
> Can any one guide me in this regard.
>
>
> Thanks,
> P.Poovendran
>

--
View this message in context: http://www.nabble.com/Memeory-leak-in-com.iBatis.sqlmap.engine.impl.SqlMapClientImpl-class-tf4928332.html#a14146385
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


Ashish Kulkarni | 4 Dec 20:20 2007
Picon

Java logging API and ibatis

Hi
How can i use java logging API to control logging of ibatis, for example if i have log4j, i put all the logging information in log4j.xml and from there i can control what logs i want from ibatis, for example i have added following lines in log4j.xml
<category name="com.ibatis">
<priority value="error" />
</category>

<category name="java.sql">
<priority value="error" />
</category>

So waht would i do if i am using java.util.Logger for logging


Ashish

pooven | 5 Dec 03:38 2007
Picon

Re: Memeory leak in com.iBatis.sqlmap.engine.impl.SqlMapClientImpl class


Hi,

Here with I am attaching the screen shot of the Heapdump analyser which
shows clearly the break up where in which package of the iBatis class
causing the memory leak.

Kindly if any one knows how to get rid of this issue , greatly appreciated.
Thanks and regds,
Poovendran

pns77 wrote:
> 
> I am also facing a similar issue with ibatis - we arrived at the
> conclusion after an analysis of heap dump. The following was the response
> that we got for a ticket we had raised with IBM.
> 
> " ..Maximum heap was set to 1024m and almost 1000mb of heap is in use.
> Anlaysis of the heapdump shows the com/ibatis/sqlmap/engine/* code
> occupying most of heap(Nearly 900mb). .."
> 
> There seems to be too many char[] (character array) objects that get
> created from com.iBatis.sqlmap.engine.impl.SqlMapClientImpl class. In our
> application side we had explcitly set the "daoManager" object reference to
> null so that it could be GC'ed. Still, we dont see any improvement. 
> 
> Would apprecitate if some one could suggest a solution.
> 
> We use WebSphere 6 on AIX / ibatis  accessing DB2 database.
> 
> Thanks,
> P.N.Subramanian
> 
> 
> pooven wrote:
>> 
>> We are using a iBatis 2.3.677 along with CrystalReport 11.8 ,Websphere
>> AppServer 6.0.23 and DB2 8.2 and Websphere Portal Server 5.1.0.4, in our
>> struts based portlet application. 
>> 
>> There are 183 reports we are using. 
>> 
>> We are facing the outOfMemory issue. After analysing the heapDump file
>> through the IBM HeapAnalyser we came to know that there is a memory
>> leakage around 8 MB in the 
>> 
>> com.iBatis.sqlmap.engine.impl.SqlMapClientImpl class, 
>> 
>> I called flushDataCache from the sqlMapper , still it is of no use. 
>> 
>> Can any one guide me in this regard. 
>> 
>> 
>> Thanks, 
>> P.Poovendran
>> 
> 
> 
http://www.nabble.com/file/p14164086/iBatis%2BMemory%2BLeak.bmp
iBatis+Memory+Leak.bmp 
--

-- 
View this message in context: http://www.nabble.com/Memeory-leak-in-com.iBatis.sqlmap.engine.impl.SqlMapClientImpl-class-tf4928332.html#a14164086
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


Gmane