[kaffe] (no subject)

曹丰 caofeng at tomosoft.com
Tue Apr 23 18:45:57 PDT 2002


Dear Sir:
  I wrote a simple test java program. It can run on the windows2000
normally, but can not run on the RHlinux7.1. It can be compiled
correctly on linux. When I wan using java command to execute it, there
is always a same error report. I don't know why. So I send this mail
with my code and the error file to you for help. 

Desire your answer. Thank you very much!

sincere caofeng

The following is my code.

import java.sql.*;
import java.util.*;

public class InsertDatabase{
	String  url;
	Connection con ;
	Statement stmt;
	ResultSet rs;
	String sql;
	String id,name;
	int  score;

	public static void main(String args[]) throws Exception{
		InsertDatabase j=new InsertDatabase();
		if(args.length < 2){
			System.out.println("\n"+"Usage java
InsertDatabase -i no name"+"\n");
			return;
		}
		
		if(args[0].equals("-i"))
j.start(Integer.parseInt(args[1]), args[2]);
		
	}//main
	
	public void start(int empno, String ename)throws Exception{
		DriverManager.registerDriver(new
oracle.jdbc.driver.OracleDriver());

		url = "jdbc:oracle:oci8:@";
		con = DriverManager.getConnection (url, "scott",
"tiger");
try{
		PreparedStatement pstmt = con.prepareStatement("insert
into emp (empno) values (?)");
				
		//// Add LESLIE as employee number 1500
		pstmt.setInt (1, 734);          // The first ? is for
EMPNO
		//// Do the insertion
		pstmt.executeUpdate();
		
     		pstmt.close();
		con.close();
}catch(SQLException e){
	System.err.println("Error: "+e.getMessage());
	return;
}  

	}
	
}///~


The following is error file:

java.lang.ExceptionInInitializerError: [exception was
kaffe.util.SupportDisabled: GNU gmp was not found by Kaffe configure
script]
	at
oracle.jdbc.dbaccess.DBConversion.IntToNumberBytes(DBConversion.java:lin
e unknown, pc 0x8265f6e)
	at
oracle.jdbc.driver.OraclePreparedStatement.setInt(OraclePreparedStatemen
t.java:line unknown, pc 0x83811ac)
	at InsertDatabase.start(InsertDatabase.java:33)
	at InsertDatabase.main(InsertDatabase.java:20)
kaffe.util.SupportDisabled: GNU gmp was not found by Kaffe configure
script
	at java.lang.Throwable.fillInStackTrace(Throwable.java:native)
	at java.lang.Throwable.<init>(Throwable.java:38)
	at java.lang.Error.<init>(Error.java:21)
	at kaffe.util.SupportDisabled.<init>(SupportDisabled.java:22)
	at java.math.BigInteger.initialize0(BigInteger.java:native)
	at java.math.BigInteger.<clinit>(BigInteger.java:30)
	at java.math.BigDecimal.<init>(BigDecimal.java:36)
	at
oracle.jdbc.dbaccess.DBConversion.IntToNumberBytes(DBConversion.java:lin
e unknown, pc 0x8265f6e)
	at
oracle.jdbc.driver.OraclePreparedStatement.setInt(OraclePreparedStatemen
t.java:line unknown, pc 0x83811ac)
	at InsertDatabase.start(InsertDatabase.java:33)
	at InsertDatabase.main(InsertDatabase.java:20)



























More information about the kaffe mailing list