Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: The method getList(String[]) not applicable for the arguments (String[], String)

  1. #1
    Junior Member
    Join Date
    Apr 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post The method getList(String[]) not applicable for the arguments (String[], String)

    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:


  2. #2
    Junior Member
    Join Date
    Apr 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: The method getList(String[]) not applicable for the arguments (String[], String)

    My problem is now solved, I restarted tomcat service... & now it works perfectly fine...

Similar Threads

  1. Replies: 7
    Last Post: December 11th, 2011, 11:58 PM
  2. How to change a String value into a number and then back into a String.
    By javapenguin in forum What's Wrong With My Code?
    Replies: 5
    Last Post: November 18th, 2011, 01:43 PM
  3. [SOLVED] difference between String Concatenation and String -Buffer/Builder .append(<value>)
    By chronoz13 in forum Java Theory & Questions
    Replies: 5
    Last Post: September 3rd, 2011, 08:16 AM
  4. Replies: 18
    Last Post: March 2nd, 2011, 10:52 AM
  5. [SOLVED] String Matcher finding only char not a whole string
    By Kakashi in forum What's Wrong With My Code?
    Replies: 11
    Last Post: February 18th, 2011, 09:58 AM