Below is my whole code....
JSP Page : Where I call my function getList(String[], String)
<%@ page import="java.util.*" %>
<jsp:useBean id="limitDB" scope="page" class="com.eximbay.keblimit.KEBLimitDBWrap" />
<jsp:setProperty name="limitDB" property="*"/>
<%
String modType = request.getParameter("modType");
String[] merchantNo = request.getParameterValues("chkBox");
ArrayList<KEBLimitEntity> entityList = limitDB.getList(merchantNo,"mod");
%>
KEBLimitDBWrap.java file :
public ArrayList getList(String[] merchantNo,String type) throws AppException{
ArrayList<KEBLimitEntity> entityList = new ArrayList<KEBLimitEntity>();
Connection con = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
StringBuffer sbQuery = new StringBuffer();
try{
con = getConnection();
sbQuery = new StringBuffer();
if(type.equals("mod"))
{
sbQuery.append(" select ");
sbQuery.append(" merchantno, krname, enname, apprvcurrency, settledcurrency, remitcurrency, limitcurrency, limitamount, ksnettid, kicctid, smartrotid ");
sbQuery.append(" from ");
sbQuery.append(" EXIMGW.keb_merchant ");
sbQuery.append("where pg='KP' ");
if((merchantNo != null) && (merchantNo.length > 0)){
sbQuery.append(" and ");
sbQuery.append(" merchantno in ( ");
for(int i=0; i<merchantNo.length; i++){
if(i>0) sbQuery.append(",");
sbQuery.append("'"+merchantNo[i]+"'");
}
sbQuery.append(") ");
}
sbQuery.append(" order by merchantno ");
pstmt = con.prepareStatement(sbQuery.toString());
rs = pstmt.executeQuery();
while(rs.next()){
KEBLimitEntity entity = new KEBLimitEntity();
entity.setMerchantNo(rs.getString("merchantno"));
entity.setKrName(rs.getString("krname"));
entity.setEnName(rs.getString("enname"));
entity.setApprvCurrency(rs.getString("apprvcurrenc y"));
entity.setSettledCurrency(rs.getString("settledcur rency"));
entity.setRemitCurrency(rs.getString("remitcurrenc y"));
entity.setLimitCurrency(rs.getString("limitcurrenc y"));
entity.setLimitAmount(rs.getDouble("limitamount")) ;
entity.setKsnetTid(AppUtil.checkNull(rs.getString( "ksnettid")));
entity.setKiccTid(AppUtil.checkNull(rs.getString(" kicctid")));
entity.setSmartroTid(AppUtil.checkNull(rs.getStrin g("smartrotid")));
entityList.add(entity);
}
rs.close();
pstmt.close();
}
}catch(SQLException e){
System.out.println("[KEBLimitDBWrap::getList]SQLException : " + e);
if(con != null) closeConnection(con);
throw new AppException("SY02", e.toString(), "[KEBLimitDBWrap::getList]", "Your request is denied. Please contact us!!");
}catch(Exception e){
System.out.println("[KEBLimitDBWrap::getList]Exception : " + e);
throw new AppException("SY01", e.toString(), "[KEBLimitDBWrap::getList]", "Your request is denied. Please contact us!!");
}finally{
try{
if(rs != null) rs.close();
if(pstmt != null) pstmt.close();
if(con != null) freeConnection(con);
}catch(Exception ie){}
}
return entityList;
}
And here is the stacktrace :
An error occurred at line: 13 in the jsp file: /admin/system/keb_Modify.jsp
The method getList(String[]) in the type KEBLimitDBWrap is not applicable for the arguments (String[], String)
10: String modType = request.getParameter("modType");
11: String[] merchantNo = request.getParameterValues("chkBox");
12:
13: ArrayList<KEBLimitEntity> entityList = limitDB.getList(merchantNo,"mod");
14:
15:
Stacktrace:
at org.apache.jasper.compiler.DefaultErrorHandler.jav acError(DefaultErrorHandler.java:95)
at org.apache.jasper.compiler.ErrorDispatcher.javacEr ror(ErrorDispatcher.java:330)
at org.apache.jasper.compiler.JDTCompiler.generateCla ss(JDTCompiler.java:457)
at org.apache.jasper.compiler.Compiler.compile(Compil er.java:374)
at org.apache.jasper.compiler.Compiler.compile(Compil er.java:352)
at org.apache.jasper.compiler.Compiler.compile(Compil er.java:339)
at org.apache.jasper.JspCompilationContext.compile(Js pCompilationContext.java:594)
at org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:344)
at org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:391)
at org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:334)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:722)
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:304)
at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.ApplicationDispatcher.inv oke(ApplicationDispatcher.java:684)
at org.apache.catalina.core.ApplicationDispatcher.pro cessRequest(ApplicationDispatcher.java:471)
at org.apache.catalina.core.ApplicationDispatcher.doF orward(ApplicationDispatcher.java:402)
at org.apache.catalina.core.ApplicationDispatcher.for ward(ApplicationDispatcher.java:329)
at com.eximbay.InvokerServlet.doPost(InvokerServlet.j ava:64)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:641)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:722)
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:304)
at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:240)
at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:164)
at org.apache.catalina.authenticator.AuthenticatorBas e.invoke(AuthenticatorBase.java:462)
at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:164)
at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:100)
at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:395)
at org.apache.coyote.ajp.AjpProcessor.process(AjpProc essor.java:301)
at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHan dler.process(AjpProtocol.java:183)
at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHan dler.process(AjpProtocol.java:169)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProce ssor.run(JIoEndpoint.java:302)
at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 13 in the jsp file: /admin/system/keb_Modify.jsp
The method getList(String[]) in the type KEBLimitDBWrap is not applicable for the arguments (String[], String)
10: String modType = request.getParameter("modType");
11: String[] merchantNo = request.getParameterValues("chkBox");
12:
13: ArrayList<KEBLimitEntity> entityList = limitDB.getList(merchantNo,"mod");
14:
15:
Stacktrace:
at org.apache.jasper.compiler.DefaultErrorHandler.jav acError(DefaultErrorHandler.java:95)
at org.apache.jasper.compiler.ErrorDispatcher.javacEr ror(ErrorDispatcher.java:330)
at org.apache.jasper.compiler.JDTCompiler.generateCla ss(JDTCompiler.java:457)
at org.apache.jasper.compiler.Compiler.compile(Compil er.java:374)
at org.apache.jasper.compiler.Compiler.compile(Compil er.java:352)
at org.apache.jasper.compiler.Compiler.compile(Compil er.java:339)
at org.apache.jasper.JspCompilationContext.compile(Js pCompilationContext.java:594)
at org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:344)
at org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:391)
at org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:334)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:722)
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:304)
at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.ApplicationDispatcher.inv oke(ApplicationDispatcher.java:684)
at org.apache.catalina.core.ApplicationDispatcher.pro cessRequest(ApplicationDispatcher.java:471)
at org.apache.catalina.core.ApplicationDispatcher.doF orward(ApplicationDispatcher.java:402)
at org.apache.catalina.core.ApplicationDispatcher.for ward(ApplicationDispatcher.java:329)
at com.eximbay.InvokerServlet.doPost(InvokerServlet.j ava:64)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:641)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:722)
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:304)
at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:240)
at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:164)
at org.apache.catalina.authenticator.AuthenticatorBas e.invoke(AuthenticatorBase.java:462)
at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:164)
at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:100)
at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:395)
at org.apache.coyote.ajp.AjpProcessor.process(AjpProc essor.java:301)
at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHan dler.process(AjpProtocol.java:183)
at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHan dler.process(AjpProtocol.java:169)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProce ssor.run(JIoEndpoint.java:302)
at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
2012. 4. 18 오후 6:48:45 org.apache.catalina.core.ApplicationDispatcher invoke
심각: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: Unable to compile class for JSP: