jfinal使用druid的监控的问题

小草一号 发布于 2014/12/17 12:02
阅读 891
收藏 0

@JFinal 你好,想跟你请教个问题:

我采用1.9版本:

publicvoidconfigHandler(Handlers me) {

  DruidStatViewHandler dvh = newDruidStatViewHandler("/druid");
  me.add(dvh);

}

访问druid/index.html的时候提示:

javax.servlet.ServletException: Filter execution threw an exception
org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)

java.lang.IllegalAccessError: tried to access method com.alibaba.druid.support.http.StatViewServlet.returnResourceFile(Ljava/lang/String;Ljava/lang/String;Ljavax/servlet/http/HttpServletResponse;)V from class com.jfinal.plugin.druid.DruidStatViewHandler$JFinalStatViewServlet
com.jfinal.plugin.druid.DruidStatViewHandler$JFinalStatViewServlet.service(DruidStatViewHandler.java:163)
com.jfinal.plugin.druid.DruidStatViewHandler.handle(DruidStatViewHandler.java:69)
com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:72)
org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)

加载中
0
JFinal
JFinal
    shiro 的 filter 影响到了 Druid,先将 shiro filter 去掉后试试,另外上面的异常信息不完全,无法知道导致异常的原因
小草一号
小草一号
重新换最新druid的jar包就可以了,URL监控需要web.xml中设置才能显示
返回顶部
顶部