자바로 배치 프로그램을 짜서 돌리던중
중간 중간 아래와 같은 에러가 납니다.
처음부터 돌리면 동일한 곳에서 나는 것이 아니라 어떤 경우는 100회정도 돌다가...
어떤경우는 300회 정도 돌다가 에러가 발생을 하네요.
v-sql에서 직접 실행하면 정상적으로 데이터는 나와집니다.
오류 메시지...
java.sql.SQLException: The size of data received from server is different from the expected
at unisql.jdbc.driver.UniSQLResultSet.beforeGetValue(UniSQLResultSet.java:1565)
at unisql.jdbc.driver.UniSQLResultSet.getString(UniSQLResultSet.java:216)
at unisql.jdbc.driver.UniSQLResultSet.getString(UniSQLResultSet.java:433)
at moca.batch.AttendArtistIdxSet.main(AttendArtistIdxSet.java:57)
소스...........................
System.out.println(\"데이터 조회....\");
oldStmt = oldConn.createStatement();
oldRset = oldStmt.executeQuery(\"SELECT eh_host, eh_code from cls_exhibit where eh_type = \'개인\'\");
while(oldRset.next()) {
eh_host.add(oldRset.getString(\"eh_host\"));
eh_code.add(oldRset.getString(\"eh_code\"));
}
oldStmt.close();
oldConn.close();
idx = new int[eh_host.size()];
System.out.println(\"참여번호 조회 ....\");
newStmt = (UniSQLPreparedStatement)newConn.prepareStatement(\"select idx from artist where trim(id) = ? \");
for(int i=0; i<eh_host.size(); i++) {
//System.out.println(\"데이터 처리중... = \" + (String)eh_host.get(i));
newStmt.setString(1, ((String)eh_host.get(i)).trim());
rset1 = newStmt.executeQuery();
if(rset1.next()) {
System.out.println(\"데이터 처리중... = **\" + rset1.getString(\"idx\") + \"**\"); --> 여기에서 계속 오류 발생
idx[i] = Integer.parseInt(rset1.getString(\"idx\"));
}
else {
System.out.println(\"non artist id = \" + (String)eh_host.get(i));
}
rset1.close();
}
newStmt.close();
newConn.close();
|