Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Databases / February 2004

Tip: Looking for answers? Try searching our database.

HAT reports leaks due to JDBC calls

Thread view: 
qazmlp - 09 Feb 2004 07:05 GMT
TRACE 41834:
    java/lang/StringBuffer.copy(StringBuffer.java:Compiled method)
    java/lang/StringBuffer.setLength(StringBuffer.java:Compiled method)
    oracle/jdbc/driver/OracleSql.parse(OracleSql.java:Compiled method)
    oracle/jdbc/driver/OracleConnection.nativeSQL(OracleConnection.java:Compiled
method)
    oracle/jdbc/driver/OracleStatement.expandSqlEscapes(OracleStatement.java:Compiled
method)
    oracle/jdbc/driver/OracleStatement.parseSqlKind(OracleStatement.java:Compiled
method)
    oracle/jdbc/driver/OracleStatement.doExecuteWithTimeout(OracleStatement.java:Compiled
method)
    oracle/jdbc/driver/OracleStatement.executeQuery(OracleStatement.java:Compiled
method)

         percent            live           alloc'ed    stack class
rank   self   accum    bytes    objs     bytes    objs trace name
   1  2.20%   2.20%    66816      16   1135872     272 41834 [C

Wheeever, I do executeQuery in my JDBC code, the profiler(HAT
available wit reports memory leaks with
the above stack.
In fact, I call close() for all the JDBC functions, wherever it is
required so.

What else could be the problem?
Joe Weinstein - 09 Feb 2004 15:50 GMT
> TRACE 41834:
>     java/lang/StringBuffer.copy(StringBuffer.java:Compiled method)
>     java/lang/StringBuffer.setLength(StringBuffer.java:Compiled method)
>     oracle/jdbc/driver/OracleSql.parse(OracleSql.java:Compiled method)
>     oracle/jdbc/driver/OracleConnection.nativeSQL(OracleConnection.java:Compiled

I haven't heard any memory leaks in oracle jdbc drivers, and many people are using
them in very long-running applications. You might try making the call
Statement.setEscapeProcessing(false) to stop that area of code from running.

Joe Weinstein at BEA

> method)
>     oracle/jdbc/driver/OracleStatement.expandSqlEscapes(OracleStatement.java:Compiled
[quoted text clipped - 17 lines]
>
> What else could be the problem?
Philip Michael - 11 Feb 2004 19:04 GMT
You may try the JFluid profiler (http://research.sun.com/projects/jfluid) -
it's free, and the latest version (1.4) has an interesting feature that
addresses "memory leak debugging". If you really have a leak, it would show
you exactly which objects are leaking.
qazmlp - 12 Feb 2004 03:17 GMT
> You may try the JFluid profiler (http://research.sun.com/projects/jfluid) -
> it's free, and the latest version (1.4) has an interesting feature that
> addresses "memory leak debugging". If you really have a leak, it would show
> you exactly which objects are leaking.
Reading the "installation instructions" page, it looks like the tool
works only with JDK 1.4. But, I have, 1.2.2. Can you confirm it?

Thanks!
Philip Michael - 12 Feb 2004 19:07 GMT
> > You may try the JFluid profiler (http://research.sun.com/projects/jfluid) -
> > it's free, and the latest version (1.4) has an interesting feature that
[quoted text clipped - 4 lines]
>
> Thanks!

Yes, in fact it works only with its own special JDK, which is 1.4.2 with
some experimental extensions.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.