1 Reply Latest reply on Jun 25, 2002 10:55 AM by Prasanna

    More Problems With Jetty

    Prasanna Newbie

      Hi,

      I am invoking a jsp page from browser the follwing error message was outputted

      ********************
      HTTP ERROR: 500 Unable to compile class for JSP An error occurred between lines: 84 and 104 in the jsp file: /travel/PORTtrav_plan_links.jsp Generated servlet error: /tmp/Jetty__8080___portal/travel/PORTtrav_0005fplan_0005flinks$jsp.java:119: Incompatible type for declaration. Can't convert java.lang.String to java.sql.Timestamp. java.sql.Timestamp tempDate=planInfo.getPlannedStartDate(); ^ An error occurred between lines: 84 and 104 in the jsp file: /travel/PORTtrav_plan_links.jsp Generated servlet error: /tmp/Jetty__8080___portal/travel/PORTtrav_0005fplan_0005flinks$jsp.java:120: Incompatible type for declaration. Can't convert java.lang.String to java.sql.Timestamp. java.sql.Timestamp tempDate1=planInfo.getPlannedEndDate(); ^ 2 errors
      ***********

      The methods planInfo.getPlannedEndDate() and planInfo.getPlannedStartDate() returns Timestamp only.

      Help me out.

      Regards,
      K.Prasanna

        • 1. Re: More Problems With Jetty
          Prasanna Newbie

          The context is

          A Servlet is Invoking A Session Bean.
          Session Bean returns a collection of Helper Objects.
          The Collection is populated in session and retrieved in the jsp page to be displpayed.

          Where we are getting error.

          The stack trace is

          ***********************

          An error occurred between lines: 84 and 109 in the jsp file: /travel/PORTtrav_plan_links.jsp

          Generated servlet error:
          /tmp/Jetty__8080___portal/travel/PORTtrav_0005fplan_0005flinks$jsp.java:121: Impossible for java.lang.String to be instance of java.sql.Timestamp.
          if(planInfo.getPlannedEndDate() instanceof Timestamp)
          ^1 error

          at org.apache.jasper.compiler.Compiler.compile(Compiler.java:285)
          at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:548)
          at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:176)
          at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:188)
          at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
          at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
          at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:371)
          at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:607)
          at org.mortbay.http.HttpContext.handle(HttpContext.java(Compiled Code))
          at org.mortbay.http.HttpContext.handle(HttpContext.java:1326)
          at org.mortbay.http.HttpServer.service(HttpServer.java(Compiled Code))
          at org.jboss.jetty.Jetty.service(Jetty.java:527)
          at org.mortbay.http.HttpConnection.service(HttpConnection.java:742)
          at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:915)
          at org.mortbay.http.HttpConnection.handle(HttpConnection.java:757)
          at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:151)
          at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:287)
          at org.mortbay.util.ThreadPool$JobRunner.run(ThreadPool.java:715)
          at java.lang.Thread.run(Thread.java:512)


          **********

          But the method returns a timestamp object.

          Regards
          K.Prasanna