Pergunta

I've a litle big problem with java heap memory I'm trying to migrate from oracle database 11g to access file 2007

This is not a problem below 65.000 records, now from there... The aplication is throwing java heap exception, the memory consumption is raising over 600m and the CPU usage over 50% until the exeption.

As far as i know the rset.next() don't get all data (over 50 colums x +65000 row), but some records x time i've try to set fetch size too, nothing happened

rset.setFetchSize(1000);

i've erase my code and show a output, same error

while (rset.next()) {
 if (cont % 5000 == 0) {
     System.out.println(cont + " proccesed and counting ...");
 }
}

please don't give me the answer of using -xm(s, x)512, 1024, etc... this could solved, not in my particulary case (i've tryied to set this even higher xD, nothing happend, i got the same exception at 65.000 records too)

Is there any other options i could try??, meaby changing some driver configurations or string conections ?? please help

sorry aboubt my english

this is my connection:

Class.forName("oracle.jdbc.driver.OracleDriver");
this.conn = DriverManager.getConnection("jdbc:oracle:thin:@" + getServer() + ":1521:orcl", getUser(), getPassword());
                this.stmt = this.conn.createStatement(java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE, java.sql.ResultSet.CONCUR_UPDATABLE);
Foi útil?

Solução

It looks like the problem is that you are using a Scrollable ResultSet and that is going to use more memory.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top