JBOSS Agent receiving Unable to get the Method object for getRawStatusCode
search cancel

JBOSS Agent receiving Unable to get the Method object for getRawStatusCode

book

Article ID: 137386

calendar_today

Updated On:

Products

CA Application Performance Management Agent (APM / Wily / Introscope) CA Application Performance Management (APM / Wily / Introscope) INTROSCOPE

Issue/Introduction

JBOSS Agent receiving below error message every seconds:


ERROR] [IntroscopeAgent.Spring HTTP Client Data Resolver] Unable to get the Method object for getRawStatusCode from org.springframework.http.client.CommonsClientHttpResponse : java.lang.NoSuchMethodException: org.springframework.http.client.CommonsClientHttpResponse.getRawStatusCode()

[ERROR] [IntroscopeAgent.Spring HTTP Client Data Resolver] Unable to get the Method object for getRawStatusCode from org.springframework.http.client.CommonsClientHttpResponse : java.lang.NoSuchMethodException: org.springframework.http.client.CommonsClientHttpResponse.getRawStatusCode()

Environment

Any Application Performance management release.

Cause

The errors are related to calls to methods in SpringFramework, a third-party library (https://projects.spring.io/spring-framework/). 

Perhaps you have either a corrupt version of this library or an incompatible one. 

Resolution


The error messages can be seen clearly in the Agent logs. They represent calls to non-existent methods, for example: 


[ERROR] [IntroscopeAgent.Spring HTTP Client Data Resolver] Unable to get the Method object for getURI from org.springframework.http.client.CommonsClientHttpRequest : java.lang.NoSuchMethodException: org.springframework.http.client.CommonsClientHttpRequest.getURI() 


In this example, the getURI() method is not found. The calling class in fact does not have a getURI() method; CommonsClientHttpRequest is an HTTP client implementation that uses Apache Commons HttpClient, and indeed lacks getURI() and other expected methods in some older versions of SpringFramework: 


http://grepcode.com/file/repository.springsource.com/org.springframework/org.springframework.web/3.0.2/org/springframework/http/client/CommonsClientHttpRequest.ja


It is nothing that impact your monitoring, you can safely ignore it or try to change log level for WARN, so these message will stop to be written.


To change the log level:


1) Open your Agent.Profile from the monitored application.

2) search for below row:


# Changing this property requires restarting the Monitored Process

log4j.logger.IntroscopeAgent=INFO, logfile


3) Change INFO to WARN as this way:


# Changing this property requires restarting the Monitored Process

log4j.logger.IntroscopeAgent=WARN, logfile


4) Save the file.

5) No one restart is needed.