New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
org.jolokia.server.core.service.impl.JulLogHandler is broken in the java agent. #631
Comments
I don't know what Thanks for the report. |
Indeed, a LogHandler needs to have a noop constructor. @fbacchella could you just add another constructor with-no arg like in public JulLogHandler() {
this(null);
} |
jrds.agent.RProbeJolokiaImpl is my code, not related to jolokia. |
Ah sorry, I was a bit confused of |
There's if (pArguments.length == 0) {
return pClass.getConstructor().newInstance();
} else {
Constructor<T> ctr = lookupConstructor(pClass, pArguments);
return ctr.newInstance(pArguments);
} in |
Yeah, but this is called by // Creat a log handler from either the given class or by creating a default log handler printing
// out to stderr
private LogHandler createLogHandler(String pLogHandlerClass, final boolean pIsDebug) {
if (pLogHandlerClass != null) {
return ClassUtil.newInstance(pLogHandlerClass);
} else {
return new StdoutLogHandler(pIsDebug);
}
} so without arguments, and hence |
I pasted the wrong stack. jrds.agent.RProbeJolokiaImpl$JulLogHandler was an exact copy-past to help me understand the cause of the problem I had with org.jolokia.server.core.service.impl.JulLogHandler and exactly the same error message. And doing so I saw that the empty constructor was missing. Sorry for the confusion. |
The right stack:
|
Fixed with #651. |
I configure the java agent to use org.jolokia.server.core.service.impl.JulLogHandler as the logger using the property
logHandlerClass
.But it fails because the agent search for a constructor with no arguments:
And the constructor for this handler is:
The text was updated successfully, but these errors were encountered: