Skip to content
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

CLASS_NOT_FOUND after upgrading to com.rollbar:rollbar-log4j2:1.7.3 #230

Closed
st-h opened this issue Jul 13, 2020 · 3 comments · Fixed by #231
Closed

CLASS_NOT_FOUND after upgrading to com.rollbar:rollbar-log4j2:1.7.3 #230

st-h opened this issue Jul 13, 2020 · 3 comments · Fixed by #231

Comments

@st-h
Copy link

st-h commented Jul 13, 2020

After upgrading to rollbar-log4j2:1.7.3 log4j stops working and the following trace is printed to stderr

2020-07-13 21:27:02,393 main ERROR Error processing element Rollbar: CLASS_NOT_FOUND
2020-07-13 21:27:02,396 main ERROR Unable to locate plugin type for Rollbar
2020-07-13 21:27:02,459 main ERROR Unable to locate plugin for Rollbar
2020-07-13 21:27:02,461 main ERROR Unable to invoke factory method in class org.apache.logging.log4j.core.config.AppendersPlugin for element appenders: java.lang.NullPointerException java.lang.NullPointerException
#011at org.apache.logging.log4j.core.config.plugins.visitors.PluginElementVisitor.visit(PluginElementVisitor.java:52)
#011at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.generateParameters(PluginBuilder.java:258)
#011at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:135)
#011at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:1002)
#011at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:942)
#011at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:552)
#011at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:241)
#011at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:288)
#011at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:618)
#011at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:691)
#011at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:708)
#011at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:263)
#011at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:243)
#011at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)
#011at org.apache.logging.log4j.LogManager.getContext(LogManager.java:174)
#011at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:669)
#011at io.vertx.core.logging.Log4j2LogDelegate.<init>(Log4j2LogDelegate.java:31)
#011at io.vertx.core.logging.Log4j2LogDelegateFactory.createDelegate(Log4j2LogDelegateFactory.java:28)
#011at io.vertx.core.logging.LoggerFactory.getLogger(LoggerFactory.java:74)
#011at io.vertx.core.logging.LoggerFactory.getLogger(LoggerFactory.java:67)
#011at io.vertx.core.impl.launcher.commands.ClasspathHandler.<init>(ClasspathHandler.java:45)
#011at io.vertx.core.impl.launcher.commands.BareCommand.<init>(BareCommand.java:49)
#011at io.vertx.core.impl.launcher.commands.RunCommand.<init>(RunCommand.java:39)
#011at io.vertx.core.spi.launcher.DefaultCommandFactory.create(DefaultCommandFactory.java:60)
#011at io.vertx.core.impl.launcher.VertxCommandLauncher.getNewCommandInstance(VertxCommandLauncher.java:179)
#011at io.vertx.core.impl.launcher.VertxCommandLauncher.execute(VertxCommandLauncher.java:234)
#011at io.vertx.core.impl.launcher.VertxCommandLauncher.dispatch(VertxCommandLauncher.java:383)
#011at io.vertx.core.impl.launcher.VertxCommandLauncher.dispatch(VertxCommandLauncher.java:346)
#011at io.vertx.core.impl.launcher.VertxCommandLauncher$dispatch.call(Unknown Source)
#011at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
#011at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
#011at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:139)
#011at Launcher.main(Launcher.groovy:18)

log4j version: 2.13.3
Suspecting this is related to the upgrade to Gradle 6. Our build still uses Gradle 5.6.4. Downgrading to 1.7.2 resolves the issue. Unfortunately I can not easily upgrade our deployment to Gradle 6, as it is not (yet) available within our build pipeline.

As the upgrade has been to a patch version, I wouldn't expect any breaking changes. Are you possibly aware of similar issues?

@basoko
Copy link
Contributor

basoko commented Jul 14, 2020

Hi @st-h,

I'm sorry you faced this issue, we were not aware it. Seems that after upgrading to Gradle 6 the log4j2 annotation processor was not executed and as a result of it the Log4j2Plugins.dat file was not generated.

I've merged a change that should fix the issue, could you please try with the com.rollbar:rollbar-log4j2:1.7.4-SNAPSHOT version to see if that fixes your issue? If you confirm it, I can release a new version to solve this.

Thanks!

@st-h
Copy link
Author

st-h commented Jul 14, 2020

@basoko thanks for the prompt response and explanation. I just tried and 1.7.4-SNAPSHOT seems to work fine 👍

@basoko
Copy link
Contributor

basoko commented Jul 15, 2020

@st-h Thanks for verifying it!

We've released the com.rollbar:rollbar-log4j2:1.7.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants