Database problem

hello guys i am writing a program in java that stores some details into a postgresql database. The problem that i have is: one column of my table is set as serial (incremented with each entry, done by Postgresql automatically), in the specific code the serial column is traceid. My code to insert the values into the database looks like that:// Prepare a statement to insert into table TraceFile

String sql4 ="INSERT INTO tracefile(" +"traceid," +"filelocation,"

+"starttime," +"endtime," +"seqno," +"size," +"notes,"

+"keepflag," +"keepuntil," +"format) "

+"VALUES(?,?,?,?,?,?,?,?,?,?)";

try{

pstmt = conn.prepareStatement(sql4);

}catch (SQLException e2){

System.out.println(e2.getMessage());

}

// Set the values

try{

pstmt.setString(2, filename);

pstmt.setTimestamp(3, timestamp);

pstmt.setTimestamp(4, timestamp2);

pstmt.setInt(5, 10);

pstmt.setLong(6, length);

pstmt.setString(7,"Testing row");

pstmt.setString(8,"Keep for ever");

pstmt.setString(9,"14 July");

pstmt.setString(10,"pcap");

}catch (SQLException e2){

System.out.println(e2.getMessage());

}

// Insert the row

try{

pstmt.executeUpdate();

}catch (SQLException e2){

System.out.println(e2.getMessage());

// e2.printStackTrace();

}

// Close the Prepared Statement

try{

pstmt.close();

}catch (SQLException e2){

System.out.println(e2.getMessage());

}

And i get this error:

No value specified for parameter 1.

Do you know how i can avoid this error without setting any value to first column?

[2955 byte] By [N3trinoa] at [2007-11-27 10:04:15]
# 1
pstmt.setString(1, "");
PhHeina at 2007-7-13 0:39:16 > top of Java-index,Java Essentials,New To Java...
# 2
Thanks for the fast reply but when i do that i get this error:ERROR: column "traceid" is of type bigint but expression is of type character varying
N3trinoa at 2007-7-13 0:39:16 > top of Java-index,Java Essentials,New To Java...
# 3
The problem solved. The error wasn't in the java code but in the user privileges in PostgreSQL.
N3trinoa at 2007-7-13 0:39:16 > top of Java-index,Java Essentials,New To Java...