Jasper Exception

org.apache.jasper.JasperException: The absolute uri: http://xmlns.oracle.com/bibeans/jsp cannot be resolved in either web.xml or the jar files deployed with this application
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:50)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:411)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:118)
org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:316)
org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:147)
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:418)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:483)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1539)
org.apache.jasper.compiler.Parser.parse(Parser.java:126)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:220)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:203)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:470)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
com.qdecisions.qmortgage.AuthorizationFilter.doFilter(AuthorizationFilter.java:70)

It's amazing, Mike.

Similar Messages

  • Jasper exception? Class not found? But the resources are there!

    Hi, thanks for reading. I am building a simple web application. Just servlets and jsp working together to either retrieve or add or edit or delete data in a mysql database.
    The problem i have is, some servlets compile and run fine and properly, while others return me the 'jasper error' (see below) and class not found error. The code in these servlets (those that work, and those that don't) are almost identical. I've checked them a couple of times, does not seems like there is any problem with the programming at all.
    Please advise. Thanks for reading. If there is any files that you think i should upload, please let me know. Though it says class not found, the resources are there! What could be wrong? From the advice of someone on another thread, i've looked into the web.xml. And it looks like its right.
    If anyone is willing to look into the matter for me. I'll upload all the files. (But that feels really rude to just impose on someone like that). Irregardless, thanks, really.
    And what about the Jasper Exception? I've googled that already. But nothing that i found has been useful (even the official ones from apache).
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Wrapper cannot find servlet class Maintenance.Support.AddProdLog or a class it depends on
         org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
         org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
         org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         java.lang.Thread.run(Thread.java:619)
    root cause
    java.lang.ClassNotFoundException: Maintenance.Support.AddProdLog
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352)
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
         org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
         org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
         org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         java.lang.Thread.run(Thread.java:619)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.17 logs.
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 55 in the jsp file: /support_editUAT.jsp
    Generated servlet error:
    C:\Documents and Settings\Administrator\.netbeans\5.5.1\apache-tomcat-5.5.17_base\work\Catalina\localhost\MaintenanceSite\org\apache\jsp\support_005feditUAT_jsp.java:110: cannot find symbol
    symbol  : variable branchname
    location: class org.apache.jsp.support_005feditUAT_jsp
          out.print( branchname);
                     ^
    An error occurred at line: 91 in the jsp file: /support_editUAT.jsp
    Generated servlet error:
    C:\Documents and Settings\Administrator\.netbeans\5.5.1\apache-tomcat-5.5.17_base\work\Catalina\localhost\MaintenanceSite\org\apache\jsp\support_005feditUAT_jsp.java:148: cannot find symbol
    symbol  : variable branchname
    location: class org.apache.jsp.support_005feditUAT_jsp
          out.print( branchname);
                     ^
    2 errors
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
    root cause
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 55 in the jsp file: /support_editUAT.jsp
    Generated servlet error:
    C:\Documents and Settings\Administrator\.netbeans\5.5.1\apache-tomcat-5.5.17_base\work\Catalina\localhost\MaintenanceSite\org\apache\jsp\support_005feditUAT_jsp.java:110: cannot find symbol
    symbol  : variable branchname
    location: class org.apache.jsp.support_005feditUAT_jsp
          out.print( branchname);
                     ^
    An error occurred at line: 91 in the jsp file: /support_editUAT.jsp
    Generated servlet error:
    C:\Documents and Settings\Administrator\.netbeans\5.5.1\apache-tomcat-5.5.17_base\work\Catalina\localhost\MaintenanceSite\org\apache\jsp\support_005feditUAT_jsp.java:148: cannot find symbol
    symbol  : variable branchname
    location: class org.apache.jsp.support_005feditUAT_jsp
          out.print( branchname);
                     ^
    2 errors
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
         org.apache.jasper.compiler.AntCompiler.generateClass(AntCompiler.java:249)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:297)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:303)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)

    Thanks for the reply. I'm sorry for cross-posting. The other thread is here: http://forum.java.sun.com/post!reply.jspa?messageID=9920352#
    sunish_jose suggested that:
    The servlet classes u mentioned in web.xml should be in WEB-INF/classes. U can add in many ways, you can manually copy and paste(But u have to follow the package structure) or You can mention the class folderd in your editor to
    WEB-INF/classes so that the editor will automaticall generate the class file into that folder with the folder structure. By looking at the error.txt what I can understand is Exceptions are thrown due to the above issue and more than that there are some compilation errors in support_getContact.jsp.
    And i'm looking into that right now.

  • Jsp 2.0 tagfile with name-from-attribute causes jasper exception

    hello there, i'm messing around with jsp 2.0 tag files and can't get this simple example to work (tried it for hours in variations ...)
    the tag file:
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%@ attribute name="v" required="true" %>
    <%@ variable name-from-attribute="v" variable-class="java.lang.Long" alias="a" scope="AT_END" %>
    <c:set var="a" value="${123}"/>
    <p> TAG: ${v} = ${a} </p>the jsp file:
    <%@ taglib prefix="demo" tagdir="/WEB-INF/tags/demo" %>
    <demo:varAttr v="x"/>
    <p> JSP: x = ${x} </p>exception :
    org.apache.jasper.JasperException: Unable to compile class for JSP
    root cause:
    java.lang.RuntimeException: org.apache.jasper.JasperException: /WEB-INF/tags/demo/varAttr.tag(3,1) The attribute directive (declared in line 2 and whose name attribute is "v", the value of this name-from-attribute attribute) must be of type java.lang.String, is "required" and not a "rtexprvalue".
    ... and so on
    everything else works fine (name-given attribute).
    i use tomcat 5.9.
    any ideas? maybe somebody could try my example on a different installation.
    thank you in advance for any help, because i ran out of ideas.

    The attribute "v" is not allowed to take runtime expressions if you are using it with a name-from-attribute.
    rtexprvalue defaults to true, so you must explicitly make it false.
    <%@ attribute name="v" required="true" rtexprvalue="false" %>Cheers,
    evnafets

  • Reg : Jasper Exception

    Hi ,
    I am deploying an application in a test env which is working perfectly in our dev environment and which doesnt need any code changes.I am getting an exception while deploying.The same code is working in our dev environment.
    Please help me in this.Thanks in advance.
    Mar 8, 2009 3:45:32 PM org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet jsp threw exception
    java.lang.NullPointerException
         at org.apache.jsp.index_jsp._jspInit(index_jsp.java:103)
         at org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:52)
         at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:159)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.core.test.test1.CachePreventionFilter.doFilter(CachePreventionFilter.java:42)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
         at java.lang.Thread.run(Unknown Source)

    What happens when i copy and paste the jar file in my application's lib directory?What happens is that you have the classes appearing twice in your class path.
    It will normally use the first version of the class that it comes across.
    For a web application, the Standard Tomcat resolution order is something like
    WEB-INF/classes
    jar files in WEB-INF/lib (alphabetical order of filename)
    jar files in [TOMCAT]/shared/lib
    jar files in [TOMCAT]/common/lib
    If it finds it in one of the earlier spots, it won't go looking further.
    For the server itself, the classpath is just the [TOMCAT]/common/lib and [TOMCAT]/server/lib directories.
    Thus jsp-api is in two different places - and will be retrieved from the two different places depending upon who is doing the loading - the web app or the server.
    As you have found, this can lead to issues.
    Bottom line - don't have servlet-api.jar, jsp-api.jar (or any other of the servlet classes) in your WEB-INF/lib directory.
    In fact if you can eliminate duplicate classes entirely from your classpath, you can prevent a lot of issues.

  • Authentication: Import Role problem - Jasper Exception

    Hi All,
    I'm trying to import roles from SAP BW 7.0 to BO Enterprise XI 3.1, but when I click on "import roles" on CMC, I get the following error:
    org.apache.jasper.JasperException
    I've followed all the steps on "Business Integration Kit for SAP - Installation and Configuration" PDF. The file sapjco.jar is in tomcat/shared/lib, the Tomcat classpath is configured, and the librfc32.dll and sapjcorfc.dll are on Windowssystem32 directory. I also applied login/accept_sso2_ticket  and login/create_sso2_ticket profiles on BW app server. I still get the same error.
    For information: I'm using Windows server 2008 64bit.
    Any suggestion?
    Regards
    André

    Hi Everyone,
    I am also getting the same error while importing roles from SAP BW 7.0 to BO Enterprise XI 3.1. The error text is "org.apache.jasper.JasperException".
    I too followed all the steps mentioned in "BusinessObjects Integration Kit for SAP - Installation and Configuration" PDF.
    The profile parameters login/create_sso2_ticket' and 'login/accept_sso2_ticket' on the SAP BW application server were already set to 2 & 1 resp.
    As discussed in this thread, I copied the librfc32.dll and sapjcorfc.dll files into C:\Windows\SYSWOW64 from Windows\system32 directory.
    I have used 32bit version of the sapjco.jar file and it is in tomcat/shared/lib.
    The SAP-BO server is installed on Windows Server 2003 R2 Standard x64 Edition SP2
    Can anyone help to resolve this issue?
    Thanks & Regards,
    Tushar

  • IPlanet 6.0 jasper exception lost

    Hi there
    I am using iPlanet 6.0 on a win32 box (although the problem also surfaces on Solaris 2.8).
    I have an web application that requires a servlet filter. I put the servlet filter in place in the web-app.xml as described by the docs, and everything works fine. That is, it works fine until one of my JSPs has a compile error. If my JSP fails to compile, I get no log message about why it failed to compile.
    If I remove the servlet filter from the web-app then I get my JSP compile errors back in the error log.
    I wrote the servlet filter code myself, and it does nothing much, and propogates any Exceptions upwards.
    Any ideas on where this logging information goes to ?
    Here is the code for a filter which hides the log for JSP compile errors.
    public class SleepFilter implements Filter {
    private static final long SLEEP_TIME = 5000;
    private static final Logger LOG = Logger.getLogger(SleepFilter.class);
    public void init(FilterConfig config) throws ServletException {
    LOG.debug("Sleep filter initialised");
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
    try {
    LOG.debug("Going to sleep .... zzzzzzzzzzzzzzzz.");
    Thread.sleep(SLEEP_TIME);
    LOG.debug("Wakey wakey rise and shine.");
    chain.doFilter(request, response);
    } catch (InterruptedException e) {
    // do nothing.
    public void destroy() {
    LOG.debug("Die, piggy, piggy, die.");
    Thanks in advance for your help
    Brian

    This problem has been reported as bug 4813726. Unfortunately, the issue has not yet been fixed, and I'm not aware of any work arounds.
    (It may be worth noting that the problem doesn't occur with the new Servlet/JSP container in Web Server 6.1.)

  • Jasper report issue report row 65535 but can't generated correctly

    Hi All ,
    We are trying to create report with jasper report . The issue is sometime generated report can be open.
    Below is test case and result .
    1.     when dummy all the returned field of procedure to ‘1’ and 20000 rows are to printed in report. The file size is 7564K. The excel can be open after several minutes waiting.
    2.     When dummy the procedure only return 5000 rows with actual data, the field type may be char, number. The file size is 2010K. The excel can be open quickly.
    3.     When dummy the procedure only return10000 rows with actual data. The file size is 3999K. The excel cannot be open.
    What the issue may be?
    Below is our code.
         * Generate the the report, currently generate excel report.
         * @param results - data set return from procedure execution
         * @param parameters - input parameters for Jasper Report design
         * @param procName - Jasper file name
         * @param outputFile - used as report file name
         * @throws JRException - Jasper exception
    private void ReportGenerator(List<ScriptParameterObject> results,HashMap<String, Object> parameters, String procName,String outputFile) throws JRException, Exception
    logger.info("Creating report: " + outputFile + ".xls");
    //URL en = ClassLoader.getSystemResource("jasper"+java.io.File.separator+procName + ".jasper");
              URL en = ClassLoader.getSystemResource(procName + ".jasper");
    if(en==null)
    throw new Exception("Can't find jasper file: " + procName + ".jasper");
    logger.debug("Loading jasper file: " + en.getPath());
    //InputStream isJasper = ClassLoader.getSystemResourceAsStream("jasper"+java.io.File.separator+procName + ".jasper");
    InputStream isJasper = ClassLoader.getSystemResourceAsStream(procName + ".jasper");
    JasperReport relatorio = (JasperReport) JRLoader.loadObject(isJasper);
              SapiData sapiData = new SapiData(results);
              logger.debug("Filling report file ..." + results.size());
    JasperPrint impressao=null;
    try{
              impressao = JasperFillManager.fillReport(relatorio,parameters, sapiData);
    catch(Exception ex){
    System.out.println(ex); ---never catch error. but not know why the .xls can't open
    if (impressao == null) {
    logger.debug("impressao == nul.");
    logger.debug("Filled report file successfully.");
              impressao.setLocaleCode(Locale.getDefault().getCountry());
              JRAbstractExporter saida = null;
              saida = new JRXlsExporter();
              saida.setParameter(JRExporterParameter.JASPER_PRINT, impressao);
              saida.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, outputFile     + ".xls");
              saida.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET,Boolean.FALSE);
              saida.setParameter(JRXlsExporterParameter.IS_WHITE_PAGE_BACKGROUND,Boolean.TRUE);
              saida.setParameter(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS,Boolean.TRUE);
              saida.setParameter(JRXlsExporterParameter.IS_COLLAPSE_ROW_SPAN,Boolean.TRUE);
              saida.setParameter(JRXlsExporterParameter.MAXIMUM_ROWS_PER_SHEET, Integer.decode("5000"));
    logger.debug("Exporting excel report file ...");
              saida.exportReport();
              logger.debug("Generated excel report file successfully: "+outputFile + ".xls");
              /* - used for generate html report
              JRAbstractExporter htmlExp = new JRHtmlExporter();
              htmlExp.setParameter(JRExporterParameter.JASPER_PRINT, impressao);
              htmlExp.setParameter(JRHtmlExporterParameter.OUTPUT_FILE_NAME,outputFile + ".html");
              htmlExp.setParameter(JRHtmlExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS,Boolean.TRUE);
              htmlExp.setParameter(JRHtmlExporterParameter.IS_WRAP_BREAK_WORD,Boolean.TRUE);
              htmlExp.exportReport();
         }

    I hava the same problem.Hava you solved it?

  • Jasper Jar creating problem

    Hey Guys,
    I'm facing a problem. I'm using Tomcat 5 to view the JSP pages I create. When I'm trying to include tag libraries, I see something called "apache jasper exception" and due to this my page can't be viewed.
    What can I do to get rid of this? :(
    Maninder

    This is a mine field of "correct programming style."
    External jars, if very general, could be placed in the directory jre/lib/ext.
    In some cases you can unzip the external jars and add them to your own jar.
    The manifest.mf migth be looked into, and of course you need to communicate your patching!
    As you remarked, it might be a problem of class path usage.
    For that the jar tool documentation might explain it better than I.

  • Java class bean can not access to DB in JSP file

    Hi, I wrote a java class bean in order to access to MySql database ,and this bean is used in a JSP file,so that the bean can query from DB and then display the queried information on the JSP file,but it can not work correctly,the following is the source code and error message popup by the system,
    does anybody has experience in solving thus question,Please reply ,Thank you for your help.
    %@ page contentType="text/html;charset=UTF-8" language="java" %>
    <%@ page import = "java.sql.*" %>
    <jsp:useBean id="conn" scope="page" class="news.conn"/>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>1</title>
    <style>
    <!--
    A:link {
         COLOR: #993399
    .s {
         FONT-SIZE: 13px; LINE-HEIGHT: 170%; FONT-FAMILY: "utf-8"
    -->
    </style>
    </head>
    <body>
    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
    <tr>
    <td width="100%">
    <img border="0" src="images/ruanjian.jpg" width="770" height="154"></td>
    </tr>
    <tr>
    <td width="100%">@</td>
    </tr>
    </table>
    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber2">
    <tr>
    <td width="13%">@</td>
    <td width="87%">
    <img border="0" src="images/mid-rdxw2.gif" width="101" height="18"><p>
    <%
              ResultSet rs,rsNest;
    String strSql=null;
    strSql = "select * from news where TYPE=1";     
              rs = conn.executeQuery(strSql);
              while (rs.next()){
    %>
    <span class="s"> <a href="newsContent.jsp?newsId=<%=rs.getInt(id")%">"><%=rs.getString("Title")%></a><br>
    <%
    %>
    <p>
    <img border="0" src="images/mid-hyxw2.gif" width="94" height="19"></p>
    <%
    strSql="select * from news where TYPE=2";     
              rs = conn.executeQuery(strSql);
              while (rs.next()){
    %>
    <span class="s"> <a href="newsContent.jsp?newsId=<%=rs.getInt("id")%>"><%=rs.getString("Title")%></a><br>
    <%
    %>
    <p>@</td>
    </tr>
    </table>
    <p align="center">Study Online</p>
    <p align="center">@</p>
    </body>
    </html>
    Error message:
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Exception in JSP: /newsMain.jsp:47
    44: strSql = "select * from news where TYPE=1";     
    45:           rs = conn.executeQuery(strSql);
    46:           
    47:           while (rs.next()){
    48:
    49: %>
    50:
    Stacktrace:
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:451)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    root cause
    java.lang.NullPointerException
         org.apache.jsp.newsMain_jsp._jspService(newsMain_jsp.java:98)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.27 l</a>

    nogoodatcoding wrote:
    Tolls wrote:
    Is that Jasper Exception telling us where the problem is in the jsp, though?
    If it is, then "rs" is null in the call rs.next()...which means conn.executeQuery() is returning null. Which means that whatever class conn is (news.conn?) has a problem maybe?That's possible. Though, it may just be the case that the 'conn' object itself is null! That line is the first place where it's being used and there are no checks that I can see...we'll have to wait for the OP to investigate and reply I guess.That's what I originally thought, then I noticed it was saying line 47, which is the rs.next() line. Assuming Jasper is correct in its choice of line, then it's the rs that's null. Which means the conn is doing strange things.
    Edit: Now that I think about it, going by the previous thread the OP posted, I'm wondering whether news.conn class is their attempt to move the JDBC stuff out of the JSP page, and it's grabbing the "real" connection (java.sql.Connection) and getting the result set and returning it...or getting something wrong and returning null.
    Edited by: Tolls on 11-Jun-2009 12:24

  • Problems when using javascript in jsp

    hello, i am implementing a program to upload files.
    a user can upload either a pdf or a latex file.
    so for example if the user uploads a pdf file the form action should be
    "uploadPDF.jsp" and if it is a latex file the action is "uploadlatex.jsp"
    currently when the user uploads the pdf file IT WORKS and does the action correctly but it does not do it for the other file (latex file) gives
    some long jasper exceptions pls help
    *************here is the code*******************
    <SCRIPT LANGUAGE="JavaScript">
    var extArray = new Array(".pdf", ".tex", ".txt");
    function LimitAttach(form, file) {
    allowSubmit = false;
    if (!file) return;
    while (file.indexOf("\\") != -1)
    file = file.slice(file.indexOf("\\") + 1);
    ext = file.slice(file.indexOf(".")).toLowerCase();
    for (var i = 0; i < extArray.length; i++) {
    if (ext = "pdf"){
    document.forms[0].action.value = "uploadPDF.jsp";
    allowSubmit = true;
    break;
    if (allowSubmit) form.submit();
    else
    alert("Please only upload files that end in types: "
    + (extArray.join(" ")) + "\nPlease select a new "
    + "file to upload and submit again.");
    </script>
    </HEAD>
    and below is the form
    <form action="" name="upform"enctype="multipart/form-data">
    <input type="file" name="PDFfilename" size="50"><br>
    <input type="hidden" name="todo" value="upload">
    <input type="submit" name="Submit" value="Upload" onclick="LimitAttach(this.form, this.form.PDFfilename.value)">
    </form>
    thanks,
    moh

    when uploading this latex file in a different jsp file and form it works fine
    however in the above form it does not...........here is the exception errors:
    org.apache.jasper.JasperException: This file appears to be damaged and cannot be repaired. This may not actually be a PDF file.
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
         com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
         com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
         com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
         com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
         org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
    root cause
    javax.servlet.ServletException: This file appears to be damaged and cannot be repaired. This may not actually be a PDF file.
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:858)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
         org.apache.jsp.uploadPDF_jsp._jspService(uploadPDF_jsp.java:209)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
         com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
         com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
         com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
         com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
         org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
    root cause
    com.adobe.acrobat.pdfobjstore.CantRebuildXRefException: This file appears to be damaged and cannot be repaired. This may not actually be a PDF file.
         com.adobe.acrobat.pdfobjstore.XRefTableRebuilder.buildTrailerDict(XRefTableRebuilder.java:141)
         com.adobe.acrobat.pdfobjstore.XRefTableRebuilder.rebuildXRefTable(XRefTableRebuilder.java:121)
         com.adobe.acrobat.pdfobjstore.XRefTableRebuilder.<init>(XRefTableRebuilder.java:46)
         com.adobe.acrobat.pdfobjstore.XRefTable.<init>(XRefTable.java:44)
         com.adobe.acrobat.pdfobjstore.XRefTable.<init>(XRefTable.java:64)
         com.adobe.acrobat.pdfobjstore.PDFObjMap.compute(PDFObjMap.java:122)
         com.adobe.pe.notify.VValue.handleRequest(VValue.java:172)
         com.adobe.acrobat.pdfobjstore.PDFObjMap.getTrailerDictRef(PDFObjMap.java:49)
         com.adobe.acrobat.pdfobjstore.VTrailerDict.computeReference(PDFObjStore.java:552)
         com.adobe.acrobat.pdfobjstore.VPDFReference.compute(VPDFReference.java:150)
         com.adobe.pe.notify.VValue.handleRequest(VValue.java:172)
         com.adobe.acrobat.pdfobjstore.VPDFReference.pdfReferenceValue(VPDFReference.java:161)
         com.adobe.acrobat.pdfobjstore.security.VEncryptionMethod.computeString(SecurityHandler.java:208)
         com.adobe.pe.vtypes.VString.compute(VString.java:55)
         com.adobe.pe.notify.VValue.handleRequest(VValue.java:172)
         com.adobe.pe.vtypes.VString.stringValue(VString.java:126)
         com.adobe.acrobat.pdfobjstore.security.VPDFObjStorePerms.computePDFObjStorePerms(VPDFObjStorePerms.java:41)
         com.adobe.acrobat.pdfobjstore.security.VPDFObjStorePerms.compute(VPDFObjStorePerms.java:54)
         com.adobe.pe.notify.VValue.handleRequest(VValue.java:172)
         com.adobe.acrobat.pdfobjstore.security.VPDFObjStorePerms.peObjStorePermsValue(VPDFObjStorePerms.java:32)
         com.adobe.acrobat.gui.AcroViewContext.setByteArraySource(AcroViewContext.java:587)
         com.adobe.acrobat.Viewer$3.buildChanges(Viewer.java:907)
         com.adobe.pe.notify.Transactor.commit(Transactor.java:70)
         com.adobe.acrobat.Viewer.setByteArraySource(Viewer.java:911)
         com.adobe.acrobat.Viewer.setDocumentByteArray(Viewer.java:948)
         com.adobe.acrobat.Viewer.setDocumentInputStream(Viewer.java:971)
         org.apache.jsp.uploadPDF_jsp._jspService(uploadPDF_jsp.java:106)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
         com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
         com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
         com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
         com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
         org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
    on the first line it says that the file may be corrupted but it is fine and works, thanks
    moh

  • Problem in compiling jsp file

    Hi,
    i am using tomcat 4.12 and jdk 1.4.
    My login page contains 3 frames. after succesful login into ur application, 7 frames are getting called.
    i have called a jsp page for each frame.
    sometimes while accessing my application, i am getting jasper exception like cannot resolve symbol....
    for example
    D:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\sample\web\helpdesklogin_jsp.java:404: cannot resolve symbol
    symbol : method --ite  (java.lang.String)
    location: class javax.servlet.jsp.JspWriter
    out.write("<tr bgcolor=\"ffffff\">\r\n ");
    i do not understand the what is the problem here....
    likewise i am getting jasper exception. but it is not frequently occured in the frame.
    is there any relation with autoflush page directive attribute...?
    if it then should i increase default buffer size ?
    Reply please
    Thanks

    Your helpdesklogin.jsp file has a compilation error. It's hard to tell, but it looks like you mis-typed out.write() somewhere.
    - Saish

  • Weird problems with CSS being applied to JSF pages

    I have this really weird problem with my CSS rules being applied to my JSF pages. My CSS rules don't get applied unless one of the following two things happen:
    - A page is reloaded (by redirecting to itself, or if there were validation errors)
    - The previous page in the history had the same relative reference to the same CSS file.
    If a page is newly loaded, and the previous page did not have that same CSS reference, the CSS styles will not show up. Also, if the above is true, and the page is reloaded by JSF, the CSS styles show up.
    Now, my problem could be solved if I put all JSP files in the same level, but the display of the first page would still be without the CSS style applied.
    Is this known behaviour? And if it is, does it have anything to do do with the way JSF handles URLs (always one level back)? Help and input is kindly appreciated!

    Dude,
    I tried the same
    <link rel="stylesheet" href="<h:outputText value="#{facesContext.externalContext.requestContextPath}"/pages/css/default.css" />
    and I got the following Jasper exception.... pointers plz ??
    =============================================================
    2005-08-24 14:18:55,937 [http-8080-Processor25] ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[mydemo].[FacesServlet] - Servlet.service() for servlet FacesServlet threw exception
    org.apache.jasper.JasperException: /myproj/eventCrit.jsp(8,78) Unterminated <h:outputText tag
         at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
         at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)
         at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:130)
         at org.apache.jasper.compiler.Parser.parseOptionalBody(Parser.java:1049)
         at org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1367)
         at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1564)
         at org.apache.jasper.compiler.Parser.parseBody(Parser.java:1793)
         at org.apache.jasper.compiler.Parser.parseOptionalBody(Parser.java:1060)
         at org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1367)
         at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1564)
         at org.apache.jasper.compiler.Parser.parse(Parser.java:126)
         at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:211)
         at org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
         at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:146)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
    =========================================================

  • 1.1 to 1.2 migration problem

    Hi;
    i am trying to port my JSF app to 1.2 from 1.1
    i was able to get my application deployed on tomcat6 without any modifications but when trying to access my first page i get:
    Aug 9, 2007 5:52:07 AM com.sun.faces.lifecycle.LifecycleImpl phase
    SEVERE: JSF1054: (Phase ID: RENDER_RESPONSE 6, View ID: /main.jsp) Exception thr
    own during phase execution: javax.faces.FacesException: org.apache.jasper.Jasper
    Exception: javax.servlet.ServletException: java.lang.NoSuchMethodError: com.sun.
    faces.taglib.jsf_core.LoadBundleTag.setBasename(Ljava/lang/String;)V
    i couldnt find anything in google for this.
    any help would be great. also, any link to usefull migration resources will be great.
    thanks in advance

    There are more changes needed than only downgrading the JAR files. New JSF 1.2 features/attributes/tags should also be removed from the jsp code.

  • Want to know abt jsp-precompile option

    Hi,
    if i passed jsp-precompile=true then what will happen?
    what situation we have to send that parameter...
    what is the exact functionality of jsp-precompile option....
    In our application we are having 200 jsp files.
    in our application, once the user logs then 7 frames are loaded and a jsp page is called for each frame...
    sometime i am getting jasper exception in some frame.... so should i pass this parameter to all jsp's..
    Reply please
    Thanks
    Saravanan

    I don't think precompile is an option that you pass to a JSP. It's a container option, and how it's supported depends on the container AFAIk. I don't think it's in the JSP spec, but I could be wrong.
    Basically what it does it turns the .jsp files into .java files (and possibly .java into .class files too) at the point where the app is deployed or started or something. This is in contrast to doing the compilation page by page when a given .jsp is requested.
    What you gain is smoother first-time loading of the pages at the cost of one-time startup delay.

  • A problem happened in javabean

    the following errors had appeared times. and i try many method to handle it ,but failed . i hope the genius can help me :
    org.apache.jasper.JasperException: /ch13/blobtest.jsp(3,0) The value for the useBean class attribute com.jspdev.ch13.BlobBean is invalid.
         org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
         org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:376)
         org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:150)
         org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1217)
         org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1116)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
         org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
         org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
         org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
         org.apache.jasper.compiler.Generator.generate(Generator.java:3261)
         org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:244)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:461)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:442)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:430)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:274)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

    I am a Java beginer. Your topic helped me with a little big problem I had running my first web application. I was trying to run a XPpetstore baseline, which is a web application developed by Rick Hightower for his book "Java Tools for eXtreme Programming, Mastering Open Source Tools, including Ant, JUnit and Cactus" published at John Wiley &Sons, Inc. 2002.
    The problem which is still not 100% clear to me is that original jsp category_sys.jsp <%@page import='xptoolkit.petstore.model.*' %>
    <jsp:useBean id='categorySystem' class='CategorySystem' scope='session'/>was throwing an jasper Exception
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: /category_sys.jsp(2,0) The value for the useBean class attribute CategorySystem is invalid.
         org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
         org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:376)
    ...(very long and confusing tail for me )
    after I've read this disscusion and changed the original category_sys.jsp into <%@page import='xptoolkit.petstore.model.*' %>
    <jsp:useBean id='categorySystem' class='xptoolkit.petstore.model.CategorySystem' scope='session'/>everything wroks fine. Only thing I do not understand completly is that even if I have imported the package using <%@page import directive tomcat cannot find the CategorySystem class. Can somebody give me some explanation?
    Anyway thanks for your help so far!
    Karel

Maybe you are looking for