1

After upgrade from Java7 to Java8_u60 JavaMelody's monitoring-path param defined in web.xml is being ignored. In the log does not contain any useful information. I was exploring the JavaMelody guide, but I have not found nothing.

The monitoring section was defined to path www.domain.com/xxx/monitoring but after Java upgrade is in the default location www.domain.com/monitoring. Does anyone have any experiences with this issue? my web.xml conf:

<filter>
    <filter-name>javamelody</filter-name>
    <filter-class>net.bull.javamelody.MonitoringFilter</filter-class>
    <async-supported>true</async-supported>
    <init-param>
        <param-name>monitoring-path</param-name>
        <param-value>/xxx/monitoring</param-value>
    </init-param>
    <init-param>
        <param-name>url-exclude-pattern</param-name>
        <param-value>/resources/.*</param-value>
    </init-param>
</filter>

<filter-mapping>
    <filter-name>javamelody</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>ASYNC</dispatcher>
</filter-mapping>

<listener>
    <listener-class>net.bull.javamelody.SessionListener</listener-class>
</listener>

Used technologies: JavaMelody 1.57.0, Apache Tomcat 7, Spring

StackzOfZtuff
  • 2,534
  • 1
  • 28
  • 25
Peter Jurkovic
  • 2,686
  • 6
  • 36
  • 55
  • We are experiencing same issue in similar environment. We first noticed it on version _JavaMelody 1.55.0._ At the same time we upgraded Java 7 to Java 8. So may be Java upgrade is the reason. – ilya Sep 22 '15 at 09:17
  • I can confirm, with version 1.55.0 is the same. I've created the ticket on [JavaMelody's github](https://github.com/javamelody/javamelody/issues/498), but I have not got any feedback yet. – Peter Jurkovic Sep 22 '15 at 09:21
  • 1
    Did you consulted [https://code.google.com/p/javamelody/issues/detail?id=459](issue 459)? Some workarounds and explanations are described there. Issue is closed, so there is a big chance that it will help. – ilya Sep 22 '15 at 09:23
  • I didn't. Thank you. – Peter Jurkovic Sep 22 '15 at 09:25

1 Answers1

3

As I mentioned in my comment, the solution is described in issue 459.

  • You can either config JavaMelody using context-param in your web.xml (by default JavaMelody is configured through web-fragment.xml in its jar file, so by using context params you override its settings in web.xml)
  • Or just use any other filter name instead of "monitoring" (in this case filter settings in web-fragment.xml are ignored, but settings from application web.xml are activated)
ilya
  • 958
  • 2
  • 9
  • 16