How to use P6Spy in Jetty?

Help
aaron luo
2008-09-04
2013-04-25
  • aaron luo
    aaron luo
    2008-09-04

    HI all,
        I am using Jetty as application server and I want to hack SQL execution via P6Spy. But I encountered a very serious exception. If I set P6Spy's appender as 'com.p6spy.engine.logging.appender.Log4jLogger', the Jetty must throw one exception which was listed as following:

    WARNING: EXCEPTION
    org.apache.jasper.JasperException: sealing violation: can't seal package javax.servlet.jsp: already loaded
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:372)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
        at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:473)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
        at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
        at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)
        at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
        at org.mortbay.http.HttpServer.service(HttpServer.java:909)
        at org.mortbay.http.HttpConnection.service(HttpConnection.java:820)
        at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:986)
        at org.mortbay.http.HttpConnection.handle(HttpConnection.java:837)
        at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:245)
        at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
        at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
    2008-9-4 16:11:06 org.mortbay.jetty.servlet.ServletHandler handle
    SEVERE: /cashman/logIn/Default.jsp:

    If I use 'com.p6spy.engine.logging.appender.StdoutLogger' or 'com.p6spy.engine.logging.appender.FileLogger, Jetty works well.

    Doesn't P6Spy support Jetty integration?
    '