jdbc - StelsDBF java.lang.OutOfMemoryError: Java heap space -


i using evaluation version of stelsdbf jdbc driver 5.2 have dbf file 8302 rows , 43 cols 5mb , stelsdbf seems not working. stelsdbf works fine other smaller files.

my query

select codi,descrip \"data.dbf\" limit 10 

when try results following

exception in thread "'data.dbf' producer" java.lang.outofmemoryerror: java heap space     @ jstels.database.b.d.if(unknown source)     @ jstels.database.b.e.do(unknown source)     @ jstels.jdbc.dbf.a.b.a(unknown source)     @ jstels.jdbc.common.h2.operationtable$a.do(unknown source)     @ jstels.jdbc.common.h2.operationtable$a.a(unknown source)     @ jstels.utils.b.b$a.run(unknown source) 

i added parameter &dbpath=d:/juan/sync/syncro_db&temppath=c:/temp , next

exception in thread "'data.dbf' producer" java.lang.outofmemoryerror: java heap space     @ jstels.database.b.d.if(unknown source)     @ jstels.database.b.e.do(unknown source)     @ jstels.jdbc.dbf.a.b.a(unknown source)     @ jstels.jdbc.common.h2.operationtable$a.do(unknown source)     @ jstels.jdbc.common.h2.operationtable$a.a(unknown source)     @ jstels.utils.b.b$a.run(unknown source) java.sql.sqlexception: [stelsdbf jdbc driver] can't load file 'data.dbf' h2 database. error was: time out in 'consumer' thread     @ jstels.jdbc.common.h2.operationtables.loadtable(unknown source)     @ jstels.jdbc.common.h2.g.a(unknown source)     @ jstels.jdbc.common.h2.g.executequery(unknown source)     @ com.rhemsolutions.customer.teststelsdbf.main(teststelsdbf.java:27) 

i added vm arguments ide -xx:maxpermsize=512m -xmx2048m same exceptions.

here code:

import java.sql.connection; import java.sql.drivermanager; import java.sql.resultset; import java.sql.sqlexception; import java.sql.statement;  public class teststelsdbf {      public static void main(string[] args) {         string drive = "d:/juan/dbf";          try {             class.forname("jstels.jdbc.dbf.dbfdriver2");         } catch (classnotfoundexception e) {             e.printstacktrace();         }           try { //          connection conn = drivermanager.getconnection("jdbc:jstels:dbf:"+drive+"?extension=.dbf"); //            connection conn = drivermanager.getconnection("jdbc:jstels:dbf:"+drive+"?extension=.dbf&dbpath=d:/juan/sync/syncro_db&temppath=c:/temp");               connection conn = drivermanager.getconnection("jdbc:jstels:dbf:"+drive+"?extension=.dbf&dbinmemory=false&temppath=c:/temp");              string cli = "select codi,descrip \"data.dbf\" limit 10";             statement stmt = conn.createstatement();              resultset rs = stmt.executequery(cli);             (int j = 1; j <= rs.getmetadata().getcolumncount(); j++) {                 system.out.print(rs.getmetadata().getcolumnname(j) + "\t");             }             system.out.println();             while (rs.next()) {                 (int j = 1; j <= rs.getmetadata().getcolumncount(); j++) {                   system.out.print(rs.getobject(j) + "\t");                 }                 system.out.println();               }              rs.close();              stmt.close();              conn.close();         } catch (sqlexception e) {             e.printstacktrace();         }     } } 

sorry many exceptions. me? in advance.

imho, need move synchrobase out of java heap.

i notice tried persistent synchrobase. 2 suggestions:

1) not use root of drive, directory. move .dbf files there.

string drive = "d:/mydb"; 

2) try temporary synchrobase.

connection conn = drivermanager.getconnection("jdbc:jstels:dbf:"+drive+"?extension=.dbf&dbinmemory=false&temppath=c:/temp"); 

Comments

Popular posts from this blog

java - JavaFX 2 slider labelFormatter not being used -

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -