Results 1 to 2 of 2
  1. #1
    Hnin Hnin is offline Member
    Join Date
    Dec 2008
    Posts
    1
    Rep Power
    0

    Default Can't trace where the error, need help

    type Exception report

    message

    description The server encountered an internal error () that prevented it from fulfilling this request.

    exception

    org.apache.jasper.JasperException: null
    org.apache.jasper.servlet.JspServletWrapper.handle JspException(JspServletWrapper.java:460)
    org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:373)
    org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:329)
    org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:265)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
    com.jenkov.servlet.multipart.MultipartFilter.doFil ter(MultipartFilter.java:75)


    root cause

    java.lang.NumberFormatException: null
    java.lang.Integer.parseInt(Unknown Source)
    java.lang.Integer.parseInt(Unknown Source)
    com.bizmann.prosesdoc.controller.DocumentControl.i sDocumentDeleted(DocumentControl.java:1624)
    org.apache.jsp.search.searchdocname_jsp._jspServic e(searchdocname_jsp.java:283)
    org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:98)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
    org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:331)
    org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:329)
    org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:265)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
    com.jenkov.servlet.multipart.MultipartFilter.doFil ter(MultipartFilter.java:75)


    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.25 logs.

    ------------------------------------------------------------------------

    Hi all,

    The problem is when i run tomcat and using this page to search documents.
    1st time, 2nd time, 3rd time is ok. it give me result.
    In 4th time, I can't get the result and give me this error.
    I don't know how to trace it.
    If anybody knows, pls help me.
    I think is it related to garbage collection.

    Here's jsp page for reference.

    <%@ page

    import = "com.bizmann.prosesdoc.controller.*"
    import = "com.bizmann.prosesdoc.entity.*"
    import = "com.bizmann.prosesdoc.resource.*"
    import = "com.bizmann.proseslite.controller.*"
    import = "com.bizmann.proseslite.entity.*"

    import = "java.util.*"
    import = "java.lang.*"
    import = "java.io.*"
    %>
    <%
    //User information
    String loginId = (String)session.getAttribute("user");

    //CP
    if(loginId == null){
    response.sendRedirect("../include/redirect.jsp");
    }

    UserControl userCtrl= new UserControl();
    int userId= userCtrl.getUserIdByLoginId(loginId);


    String path = request.getParameter("path");
    String storageId = request.getParameter("storageId");
    String DocName = request.getParameter("DocName");
    session.removeAttribute("SearchList1");
    %>
    <script type="text/javascript">
    var testwindow=null;

    function fn_onload(){
    parent.frames["left"].location.href='../workSpace.jsp?pagelink=No Load';
    }

    function fn_changepage(pageno){
    var curpageno = document.getElementById("hd_curpage").value;
    if(curpageno!=pageno){
    document.getElementById("btn_page"+curpageno).clas sName="btnpage";
    document.getElementById("btn_page"+pageno).classNa me="btncurrentpage";
    document.getElementById("hd_curpage").value = pageno;
    document.getElementById("tb_result"+curpageno).sty le.display="none";
    document.getElementById("tb_result"+pageno).style. display= "";
    }
    }

    function fn_openDocumentPage(i){
    if(i!=-1){
    testwindow = window.open("document.jsp?did="+i+"&action=null&li nk=null","","menubar=no,toolbar=no,height=300");
    //testwindow.moveTo(300,300);
    testwindow.focus();
    }
    }


    function fnClick(pagename){

    storage = parent.frames['left'].document.getElementById("selectedStorage").value;
    hidstorage = storage.replace("lblStorage","hidStorage");
    var path = parent.frames['left'].document.getElementById(hidstorage).value;

    if(pagename=="searchgeneral"){
    parent.document.frames("right").location.href = "../search/searchgeneral.jsp?path="+path;
    }else if(pagename=="searchindex"){
    parent.document.frames("right").location.href = "../search/searchindex.jsp?path="+path;
    }
    else if(pagename=="searchdocname"){
    parent.document.frames("right").location.href = "../search/searchdocname.jsp?path="+path;
    }
    }

    function fnSearch(){
    var DocName = document.getElementById("tb_gs").value;

    if (DocName =="" || DocName==null)
    {
    alert("Please enter Document's name.");
    }
    else
    {
    storage = parent.frames['left'].document.getElementById("selectedStorage").value;
    hidstorage = storage.replace("lblStorage","hidStorage");
    storageId1 = storage.replace("lblStorage", "");
    var path = parent.frames['left'].document.getElementById(hidstorage).value;

    document.getElementById("path").value=path;
    document.getElementById("DocName").value = DocName;
    document.getElementById("storageId").value = storageId1;
    document.frmsearchdocname.submit();
    }

    //parent.document.frames("right").location.href = "../search/searchdocname.jsp?path="+path+"&storageId="+storag eId+"&DocName="+DocName;

    }
    function fn_openFolder(path,i,storeid){
    var selectedPath = path;

    if(i!=-1){
    var docid = i;
    }
    //var a = parent.frames['left'].document.getElementById("selectedStorage").value;
    //alert("selected storage = " + storeid);
    if(path == "Trash Bin")
    {
    //setRightHref("../trashRestoreDoc.jsp");
    enableButton("searchDocument", searchDocumentLink);
    parent.frames['right'].location.href = "../trashRestoreDoc.jsp?type=workspace"
    }
    else
    {
    enableButton("searchDocument", searchDocumentLink);
    parent.frames['right'].location.href="../workArea.jsp?action=search&path="+selectedPath+"&s electedDoc="+i+"&selectedStorage="+storeid;
    }
    }

    function fnOnload()
    {
    storage = parent.frames['left'].document.getElementById("selectedStorage").value;
    hidstorage = storage.replace("lblStorage","hidStorage");
    storageId1 = storage.replace("lblStorage", "");
    var path = parent.frames['left'].document.getElementById(hidstorage).value;

    document.getElementById("path").value = path;
    }

    </script>
    </head>

    <body onload="fnOnload()">
    <%
    ArrayList result = new ArrayList();
    DocumentControl documentControl = new DocumentControl();

    int nor = 10;
    int pageno = 1;
    int precord = 0;
    String did = "-1";
    String dname = "";
    String dpath = "";
    String dstoreId = "";
    String cursor = "";

    String visibility = "hidden";
    String check = "t";
    String showCalendar = "none";
    boolean gsreadOnly = false;


    if(DocName!=null && (!DocName.equals(""))){
    result = documentControl.SearchbyDocName(ResourceUtil.padCo lon(DocName),Integer.parseInt(storageId),userId);
    pageno = result.size()/nor +1;
    }else{
    DocName="";
    }
    %>

    <div class="path">
    <input id="path" style="width: 100%" type="text" name="path" value="<%=path%>"></input>
    </div>
    <ol id="toc">
    <li><a onclick="fnClick('searchgeneral')">General Search</a></li>
    <li><a onclick="fnClick('searchindex')">By Index Field</a></li>
    <li class="current"><a onclick="fnClick('searchdocname')">By Document Name</a></li>
    </ol>
    <br>
    <div class="content" >
    <input type="hidden" id="hd_curpage" name="hd_curpage" value="1" />
    <form name="frmsearchdocname" action="searchdocname.jsp" method="post">

    <table width="550px" height="400px">
    <tr valign="top"><td height="40px">
    <table width="100%"><tr><td align="right" width="230">Document Name</td>
    <td align="center" width="135"><input type="text" name="tb_gs" id="tb_gs" value="" size="50"></td>
    <tr><td colspan= "3" align="right"><input type="button" name="btn_gs" id="btn_gs" class="button" value="Search" onclick="fnSearch()"></input></table>

    </td></tr>
    <tr><td height="100%">
    <table width="100%" height="100%">
    <tr><td colspan="2"class="tbtitle" height="16">Search Results</td></tr>
    <tr><td width="49%" class="tbsubtitle">Document Name</td>
    <td height="15" width="49%" class="tbsubtitle">Path</td></tr>
    <tr><td height="345" colspan="2">
    <!-- Display Searching Result -->
    <%if(result.size()==0){%>
    <table width="100%" height="100%" class="tbresult">
    <tr><td><span class="">No Record</span></td></tr>
    </table>
    <%}else{%>
    <%for(int p=0; p<pageno; p++){
    precord = p*nor;
    if(p==0){
    visibility = "";
    } else{
    visibility = "none";
    }
    %>
    <table name="tb_result<%= p+1%>" id="tb_result<%= p+1%>" width="100%" height="100%" class="tbresult" style="display: <%=visibility%>">
    <%for(int i=0; i<nor; i++){
    if((i+precord)<result.size()){
    did = (String)((Map)result.get(i+precord)).get("id");
    dname = (String)((Map)result.get(i+precord)).get("name");
    dpath = (String)((Map)result.get(i+precord)).get("path");
    dstoreId = (String)((Map)result.get(i+precord)).get("storeid" );
    cursor = "pointer";

    System.out.println("doc path = "+dpath);
    System.out.println("doc name = "+dname);
    System.out.println("doc id = "+did);

    int del = documentControl.isDocumentDeleted(did);
    //check method is_deleted=1, then dpath= trash bin
    if(del==1 || del==2){
    dpath ="Trash Bin";
    }

    }else{
    did = "-1";
    dname = " &nbsp; ";
    dpath = " &nbsp; ";
    cursor = "default";
    }
    %>
    <tr><td width="49%" class="tbcell" align="left"><a class="btnresult" href="#" onclick="return fn_openDocumentPage(<%= did %>)"><span id="sname<%=i%>"><%= dname%></span></a></td>
    <!-- //TODO: (Optional) Open the corresponding folder when user click on the path -->
    <td width="49%" class="tbcell" align="left"><a class="btnresult" href="#" onclick="fn_openFolder('<%=ResourceUtil.trimColonJ S(dpath)%>',<%= did %>,<%=dstoreId%>)"><span id="spath<%=i%>"><%= dpath%></span></a></td></tr>
    <%}%>
    </table>
    <%}%>
    <%}%>
    </td></tr>
    <tr><td colspan="2" height="16"><% for(int i = 0; i< pageno; i++){ %>
    <input type="button" name="<%= "btn_page" + (i+1) %>" value="<%= (i+1)%>" <%if(i==0){%> class="btncurrentpage"<%}else{%> class="btnpage"<%}%> onclick="fn_changepage(<%= i+1%>)" />
    <% }%> </td></tr>
    </table>
    </td></tr>

    <input type="hidden" name="storageId" id="storageId" value="<%=storageId%>"></input>
    <input type="hidden" name="action" value=""></input>
    <input type="hidden" name="DocName" id="DocName" value="<%=DocName%>"></input>
    </table>
    </form>
    </div>
    </body>
    </html>

  2. #2
    dragonlinux is offline Member
    Join Date
    Mar 2009
    Posts
    3
    Rep Power
    0

Similar Threads

  1. Error trace in swing application
    By dnyan123 in forum AWT / Swing
    Replies: 15
    Last Post: 10-21-2008, 02:50 PM
  2. error 530 error authentication required
    By rgale in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 05-12-2008, 04:28 PM
  3. Stack Trace
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-10-2007, 05:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •