안녕하세요
고수님들 다름이 아니라
prepareStatement문을 사용해 informix DB에 데이터를 입력하는데
이게 잘 되다가 어느 순간( 정해져 있는건 아님 하루에 3번 수행을 하는데 발생 지점은 다 틀립니다. )
이 오류가 나면서 try{}catch(){}에도 걸리지 않고 그냥 죽어 버려요
지금 작업은 쓰래드를 이용해 작업을 하는데 이 오류가 발생하면 그냥 죽어 버립니다.
오류지점을 보면 밑의 insSnrUnstablesStmt = conn.prepareStatement(sql.toString()); 이부분에서 오류가 발생을 합니다.
도저희 원인을 모르겠습니다.
5601이 지원을 안한다고 하는데 서버에서 확인해보면 지원을 하고 있습니다.
그리고 만약지원을 하지 않는다면 아예 처음부터 안들어가야 하는데 잘 들어가다가 어느 순간 오류가 발생을 합니다.
고수님들 원인좀 잡아주세요.
<소스 일부 >
sql.append("\n INSERT INTO STAT_SNRUNSTABLES ( ");
sql.append("\n GENDATETIME, ");
sql.append("\n PART, ");
sql.append("\n CMTSNAME, ");
sql.append("\n CMTSID, ");
sql.append("\n MACADDR, ");
sql.append("\n CELLNO, ");
sql.append("\n SLOTNO, ");
sql.append("\n PORTNO, ");
sql.append("\n UP, ");
sql.append("\n DOWN, ");
sql.append("\n CASE ");
sql.append("\n ) VALUES ( ");
sql.append("\n ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ");
sql.append("\n ) ");
try {
insSnrUnstablesStmt = conn.prepareStatement(sql.toString()); <-- 이부분
int index = 1;
String printTemp = "";
for (Enumeration e = cmVector.elements(); e.hasMoreElements();) {
printTemp = "";
try{
index = 1;
cm = (CMOperStatus) e.nextElement();
if (cm == null) {
continue;
}
if (cm.cellno == null) {
cm.cellno = "unknown";
}
if ((cm.macaddr == null) || (cm.slot == null) || (cm.portno == null)) {
continue;
}
insSnrUnstablesStmt.setString(index++, gendatetime);
insSnrUnstablesStmt.setInt (index++, part);
insSnrUnstablesStmt.setString(index++, cmtsname);
insSnrUnstablesStmt.setString(index++, cmtsid);
insSnrUnstablesStmt.setString(index++, cm.macaddr);
insSnrUnstablesStmt.setString(index++, cm.cellno);
insSnrUnstablesStmt.setString(index++, cm.slot);
insSnrUnstablesStmt.setString(index++, cm.portno);
insSnrUnstablesStmt.setFloat(index++, cm.cmUpSnr);
insSnrUnstablesStmt.setFloat(index++, cm.cmDownSnr);
insSnrUnstablesStmt.setInt(index++, cm.snr_unstable_case);
printTemp = gendatetime+"|"+part+"|"+cmtsname+"|"+cmtsid+"|"+cm.macaddr+"|"+cm.cellno+"|";
printTemp += cm.slot+"|"+cm.portno+"|"+cm.cmUpSnr+"|"+cm.cmDownSnr+"|"+cm.snr_unstable_case;
//logger.writeLog(printTemp);
result += insSnrUnstablesStmt.executeUpdate();
insSnrUnstablesStmt.clearParameters();
}catch(SQLException se){
logger.writeLog("saveSnrUnstables["+se.getMessage()+"]");
StackTraceElement[] elem = se.getStackTrace();
for( int i = 0; i < elem.length; i++ )
logger.writeLog("saveSnrUnstables===>"+elem[i]);
}catch(UnsupportedCharsetException ue){
logger.writeLog("saveSnrUnstables["+ue.getMessage()+"]");
logger.writeLog(cmtsid+"/"+cmtsname+"/"+cm.macaddr+"/"+cm.cellno+"/"+cm.slot+"/"+cm.portno+"/"+part+"/");
logger.writeLog(cm.cmUpSnr+"/"+cm.cmDownSnr+"/"+cm.snr_unstable_case);
}
}
<오류코드>
java.lang.Error: java.nio.charset.UnsupportedCharsetException: 5601
at java.lang.StringCoding.lookupCharset(StringCoding.java:84)
at java.lang.StringCoding.encode(StringCoding.java:361)
at java.lang.StringCoding.encode(StringCoding.java:378)
at java.lang.String.getBytes(String.java:608)
at java.io.UnixFileSystem.canonicalize(Native Method)
at java.io.File.getCanonicalPath(File.java:513)
at java.io.FilePermission$1.run(FilePermission.java:209)
at java.security.AccessController.doPrivileged(Native Method)
at java.io.FilePermission.init(FilePermission.java:203)
at java.io.FilePermission.(FilePermission.java:253)
at sun.net.www.protocol.file.FileURLConnection.getPermission(FileURLConnection.java:193)
at sun.net.www.protocol.jar.JarFileFactory.getPermission(JarFileFactory.java:111)
at sun.net.www.protocol.jar.JarFileFactory.getCachedJarFile(JarFileFactory.java:81)
at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:50)
at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:85)
at sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:105)
at java.net.URL.openStream(URL.java:960)
at sun.misc.Service.parse(Service.java:203)
at sun.misc.Service.access$100(Service.java:111)
at sun.misc.Service$LazyIterator.hasNext(Service.java:257)
at java.nio.charset.Charset$1.getNext(Charset.java:301)
at java.nio.charset.Charset$1.hasNext(Charset.java:316)
at java.nio.charset.Charset$2.run(Charset.java:359)
at java.security.AccessController.doPrivileged(Native Method)
at java.nio.charset.Charset.lookupViaProviders(Charset.java:356)
at java.nio.charset.Charset.lookup(Charset.java:383)
at java.nio.charset.Charset.isSupported(Charset.java:405)
at java.lang.StringCoding.lookupCharset(StringCoding.java:80)
at java.lang.StringCoding.decode(StringCoding.java:209)
at java.lang.String.(String.java:327)
at com.informix.lang.IfxToJavaType.IfxToJavaChar(IfxToJavaType.java:138)
at com.informix.lang.IfxToJavaType.IfxToJavaChar(IfxToJavaType.java:121)
at com.informix.asf.IfxDataInputStream.readChar(IfxDataInputStream.java:301)
at com.informix.jdbc.IfxSqli.receiveDescribe(IfxSqli.java:2314)
at com.informix.jdbc.IfxSqli.dispatchMsg(IfxSqli.java:2033)
at com.informix.jdbc.IfxSqli.receiveMessage(IfxSqli.java:1995)
at com.informix.jdbc.IfxSqli.executePrepare(IfxSqli.java:977)
at com.informix.jdbc.IfxResultSet.executePrepare(IfxResultSet.java:186)
at com.informix.jdbc.IfxPreparedStatement.setupExecutePrepare(IfxPreparedStatement.java:182)
at com.informix.jdbc.IfxPreparedStatement.(IfxPreparedStatement.java:165)
at com.informix.jdbc.IfxSqliConnect.prepareStatement(IfxSqliConnect.java:1267)
at com.rms.tubbie.db.dao.StatSnrUnstablesDAO.saveSnrUnstables(StatSnrUnstablesDAO.java:90)
at com.rms.tubbie.service.manager.StatSnrUnstablesManager.saveSnrUnstables(StatSnrUnstablesManager.java:37)
at com.rms.tubbie.cmd.ThreadBatchProcessor.run(ThreadBatchProcessor.java:316)
Caused by: java.nio.charset.UnsupportedCharsetException: 5601
at java.nio.charset.Charset.forName(Charset.java:428)
at java.lang.StringCoding.lookupCharset(StringCoding.java:82) |