Skip to Main Content

Java and JavaScript in the Database

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

serious memory leak when executing java stored procedure

96598Jan 25 2002
I use one simple example to test java stored procedure but i have met one serious problem. If it's not my fault, there exists serious bug of Oracle JVM. And the problem make it more like a toy.
(1) java program Test.java
public class Test {
public static void tst() {
}
}
(2) javac Test.java
(3) loadjava -user scott/tiger -oci8 -resolve -verbose Test.class
(4) create or replace procedure tst
AS LANGUAGE JAVA
NAME 'Test.tst()';
/
(5) test.sql
Begin
for loop_v in 1..100000000 loop
tst();
end loop;
end;
(7) execute the test.sql
sqlplus scott/tiger
>@test
(6) oracle version information:
oracle 8.1.7, Linux 2.4.2
(7) problem:
When the test.sql is executed , I use top tool to monitor the oracle process. I found the column SIZE value is gradually climbed. When reaching some point test.sql lose connection with oracle server. It always use out all the memory of Linux system.

If the test is correct, I think oracle java stored procedure is just like one toy.

zhu zhong hua



Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 4 2002
Added on Jan 25 2002
2 comments
566 views