cangwolf / javamelody

Automatically exported from code.google.com/p/javamelody
0 stars 0 forks source link

JavaMelody v1.45.1 Gives NoSuchMethodException on JIRA v5.2.2 #317

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Access JavaMelody report via http://<host>:<port>/monitoring

2. What is the expected output? What do you see instead?

Expect to see login screen, which id displayed and seems to work fine.  After 
authentication, expect to see JavaMelody report.  Instead, there is an 
exception:

{{{
java.lang.IllegalStateException: java.lang.NoSuchMethodException: 
$Proxy45.hasPermission(int, com.atlassian.jira.user.ApplicationUser)
    at net.bull.javamelody.JiraMonitoringFilter.hasJiraSystemAdminPermission(JiraMonitoringFilter.java:169)
    at net.bull.javamelody.JiraMonitoringFilter.checkJiraAdminPermission(JiraMonitoringFilter.java:108)
    at net.bull.javamelody.JiraMonitoringFilter.hasNotPermission(JiraMonitoringFilter.java:90)
    at net.bull.javamelody.JiraMonitoringFilter.doFilter(JiraMonitoringFilter.java:80)
    at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:74)
    at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42)
    at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77)
    at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at com.atlassian.jira.web.filters.steps.ChainedFilterStepRunner.doFilter(ChainedFilterStepRunner.java:78)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at com.atlassian.core.filters.cache.AbstractCachingFilter.doFilter(AbstractCachingFilter.java:33)
    at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at com.atlassian.core.filters.encoding.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:41)
    at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)
    at com.atlassian.jira.web.filters.PathMatchingEncodingFilter.doFilter(PathMatchingEncodingFilter.java:49)
    at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at com.atlassian.jira.startup.JiraStartupChecklistFilter.doFilter(JiraStartupChecklistFilter.java:74)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at com.atlassian.multitenant.servlet.MultiTenantServletFilter.doFilter(MultiTenantServletFilter.java:91)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at com.atlassian.jira.web.filters.steps.ChainedFilterStepRunner.doFilter(ChainedFilterStepRunner.java:78)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoSuchMethodException: $Proxy45.hasPermission(int, 
com.atlassian.jira.user.ApplicationUser)
    at java.lang.Class.getMethod(Unknown Source)
    at net.bull.javamelody.JiraMonitoringFilter.hasJiraSystemAdminPermission(JiraMonitoringFilter.java:164)
    ... 45 more
}}}

3. What version of the product are you using? On what application server, JDK, 
operating system?

JavaMelody v1.45.1
JIRA v5.2.2
Apache Tomcat/7.0.29
Java Version v1.6.0_35 
MySQL: v5.5.19

4. Please provide any additional information below.

Exception also occured with JIRA v5.2.  Was able to roll back to JavaMelody 
v1.45.0 without any problem.

These JIRA servers are using Java JRE not JDK as I can live without the memory 
histogram for now.  It is also not yet using a jdbc datasource from jndi.

Original issue reported on code.google.com by msymo...@gmail.com on 17 Jun 2013 at 10:47

GoogleCodeExporter commented 9 years ago
Issue 318 has been merged into this issue.

Original comment by evernat@free.fr on 19 Jun 2013 at 8:03

GoogleCodeExporter commented 9 years ago
This issue was unfortunately caused by the fix of issue 314 for JIRA 6, as I 
will explain soon.
The workaround is to use in JIRA 5 the version 1.45.0 instead of 1.45.1.
You can download version 1.45.0 at 
https://javamelody.googlecode.com/files/jira-javamelody-1.45.0.jar

Original comment by evernat@free.fr on 19 Jun 2013 at 8:05

GoogleCodeExporter commented 9 years ago
This is now fixed and committed in trunk (revision 3424).
The plugin for JIRA / Confluence / Bamboo is released as v1.45.2 with the fix.
You can download v1.45.2 at:
https://marketplace.atlassian.com/plugins/net.bull.javamelody

The problem was that the signature of the "hasPermission" method has changed in 
JIRA 6, causing issue 314. And the fix for issue 314 worked for JIRA 6 but 
broke in JIRA 5.1 and 5.2 by incorrectly thinking that it was JIRA 6.

Original comment by evernat@free.fr on 5 Jul 2013 at 9:31