JAVA
[ERROR] uncategorized SQLException for SQL []; SQL state [null]; error code [17004];
iWithJoy
2011. 5. 20. 12:17
JEUS 6 + Oracle 11g 조합으로 타서버에서는 정상수행하던 쿼리가 오류 발생
문제의 원인은 null 이 들어가서 타입오류가 원인!
본래의 쿼리가 위와 같을 경우, address 가 null 로 들어갈 때 발생하면,
uncategorized SQLException for SQL []; SQL state [null]; error code [17004];
Invaild column type
Invaild column type
문제의 원인은 null 이 들어가서 타입오류가 원인!
insert into Person (name, age, address)
values (#name#, #age#, #address#)
values (#name#, #age#, #address#)
본래의 쿼리가 위와 같을 경우, address 가 null 로 들어갈 때 발생하면,
insert into Person (name, age, address)
values (#name#, #age#, #address:VARCHAR:NO_ENTRY#)
타입 지정과 null 이 들어오더라도 처리할 수 있도록 변경 필요! (이 경우, jdbc 에서 setNull 처리 예상)values (#name#, #age#, #address:VARCHAR:NO_ENTRY#)