Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v7.1
  HXTT Cobol v5.0
  HXTT DBF v7.1
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT Excel v6.1
  HXTT Json v1.0
  HXTT Paradox v7.1
  HXTT PDF v2.0
  HXTT Text(CSV) v7.1
  HXTT Word v1.1
  HXTT XML v4.0
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 | Refund | Sitemap