Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access 7.1.252
  HXTT Cobol 5.0.251
  HXTT DBF 7.1.252
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT Excel 6.1.255
  HXTT Json 1.0.223
  HXTT Paradox 7.1.251
  HXTT PDF 2.0.251
  HXTT Text(CSV) 7.1.251
  HXTT Word 1.1.251
  HXTT XML 4.0.252
Offshore Outsourcing
Free Resources
  Firewall Tunneling
  Search Indexing Robot
  Conditional Compilation
  Password Recovery for MS Access
  Password Recovery for Corel Paradox
  Checksum Tool for MD5
  Character Set Converter
  Pyramid - Poker of ZYH
   
   
   
Heng Xing Tian Tai Lab of Xi'an City (abbr, HXTT)

HXTT DBF
java.lang.StackOverflowError
Hernando
2005-07-06 00:00:00
I have been testing the evaluation version of HXTT DBF.
The code I I have tested is below.
When I run with : "java -cp .:./DBF_Direct_Access_JDBC30.jar Hxtt 10000", the answer I get is : "Exception in thread "main" java.lang.StackOverflowError"
I have tried running with "java -Xss256m -cp .:./DBF_Direct_Access_JDBC30.jar Hxtt 10000" but I it is the same.
Is it a bug or what?

import java.sql.*;
import java.io.*;

class Hxtt {
public static void main( String[] args ) throws SQLException, IOException, ClassNotFoundException {
long ti, tf;
int total;

try {
total = Integer.parseInt( args[0] );
} catch( Exception e ) {
total = 0;
System.err.println( "uso: java Hxtt " );
System.exit( 0 );
}

/* CONECTARSE */
ti = System.currentTimeMillis();

Class.forName( "com.hxtt.sql.dbf.DBFDriver" );
Connection con = DriverManager.getConnection( "jdbc:DBF:/." );
Statement stmt = con.createStatement();

/* CREAR TABLA */
stmt.execute( "CREATE TABLE TABLA ( CAMPO1 VARCHAR(10), CAMPO2 VARCHAR(10), CAMPO3 VARCHAR(10), CAMPO4 VARCHAR(10) ) " );

/* INDICE */
stmt.execute( "CREATE INDEX INDICE1 ON TABLA ( CAMPO1 )" );
stmt.execute( "CREATE INDEX INDICE2 ON TABLA ( CAMPO2 )" );
stmt.execute( "CREATE INDEX INDICE3 ON TABLA ( CAMPO3 )" );
stmt.execute( "CREATE INDEX INDICE4 ON TABLA ( CAMPO4 )" );

RandomAccessFile in = new RandomAccessFile( "registros.txt", "r" );
/* INSERTAR tuplas */
int cont = 0;
String s = in.readLine();
while( s != null && cont < total ) {
stmt.execute( "INSERT INTO TABLA values( '" + s.substring( 0, 10 ) + "', '" + s.substring( 10, 20 ) + "', '" + s.substring( 20, 30 ) + "', '" + s.substring( 30, 40 ) + "' )" );
cont++;
s = in.readLine();
}

/* CERRAR STATEMENT */
stmt.close();
/* CERRAR CONEXION */
con.close();

tf = System.currentTimeMillis();

System.out.println( "Registros indexados : " + total );
System.out.println( "Tiempo : " + ( tf - ti ) + " ms." );
}
}
Re:java.lang.StackOverflowError
HXTT Support
2005-07-07 00:00:00
Fixed a bug in IDX file cache. Thanks for your response. Please download the latest package.

Search Key   Search by Last 50 Questions




Google
 

Email: webmaster@hxtt.com
Copyright © 2003-2019 Heng Xing Tian Tai Lab of Xi'an City. | All Rights Reserved. | Privacy | Legal | Sitemap