나는 파이 차트와 JSF를 사용하여 동일한 페이지에 막대 그래프,이 쿼리에서 정보를 얻는 두 conponents 건물입니다 :은 java.sql.SQLException : 숫자 오버플로
select 'ACCOUNTS'PRODUCT,sum(ACCT_BAL_LCY) AMOUNT from account_master where schm_type in(?, ?, ?,?) and ACCT_BAL_LCY >0
union select 'BILLS'PRODUCT, sum(LIAB_AMT_LCY)AMOUNT from bills_details union select 'DOCUMENTARY CREDITS'PRODUCT,sum(LIAB_AMOUNT)AMOUNT
from DC_DETAILS union select 'GUARANTEES'PRODUCT, sum(LIAB_AMT_LCY)AMOUNT from BG_DETAILS;
방법 실행이입니다 :
private void createPieModel() {
pieModel = new PieChartModel();
categoryModel = new CartesianChartModel();
ChartSeries act = new ChartSeries();
act.setLabel("Product Types");
Connection conn;
db = new DBConnection();
conn = db.getDbConnection();
pr = new BiProperties();
try {
String sql = pr.getDBProperty().getProperty("liability.bank");
PreparedStatement ps = conn.prepareStatement(sql);
ps.setString(1, "SBA");
ps.setString(2, "CAA");
ps.setString(3, "TDA");
ps.setString(4, "CCA");
ResultSet rs = ps.executeQuery();
int i = 0;
while (rs.next()) {
pieModel.set(rs.getString(1), rs.getInt(2));
act.set(rs.getString(1), rs.getInt(2));//Error on this Line
cities.put(i, rs.getString(1));
i++;
}
categoryModel.addSeries(act);
} catch (SQLException asd) {
log.debug(Level.FATAL, asd);
}
}
시간에 모두 그래프로 표시, 배 그래프 중 어느 것도 보여주지와 다른 시간 만 원형 차트 쇼. 백 엔드 확인시이 오류가 발생합니다.
java.sql.SQLException: Numeric Overflow
어떻게 이런 일이 발생하지 않도록 할 수 있습니까?
이 유용 할 수 [http://stackoverflow.com/questions/16569578/java-sql-sqlexception-numeric-overflow-while-using-in-operator][1] [1] : http://stackoverflow.com/questions/16569578/java-sql-sqlexception-numeric-overflow-while-using-in-operator – sheu