question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Plugin conflicts cause `java.lang.NoClassDefFoundError: org/apache/batik/w3c/dom/ElementTraversal`

See original GitHub issue

I think I have a similar issue to #1336. I’m working on enhancements to detekt’s Gradle plugin, namely auto-generating a detekt task for each Android build variant.

But when both detekt and SQLDelight’s Gradle plugins are on the build classpath together I get errors like:

Execution failed for task ':android:app:mergeProdReleaseResources'.
> org/apache/batik/w3c/dom/ElementTraversal

With the stacktrace showing “Caused by: java.lang.NoClassDefFoundError: org/apache/batik/w3c/dom/ElementTraversal”

I believe I’ve narrowed it down to the fact IntelliJ core is bundled with sqldelight plugin, since IntelliJ contains this interface:

package org.w3c.dom;
public interface ElementTraversal extends org.apache.batik.w3c.dom.ElementTraversal {}

I don’t know why it causes issues when both detekt and SQLDelight’s Gradle plugins are on the classpath, but there’s no issue when only one of them is (when only detekt plugin is on the build classpath there’s no issue, likewise when only SQLDelight is applied).

If there’s a known workaround can you please share? Thank you!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:14 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
tasomaniaccommented, Mar 16, 2020

Thanks for the hint. I was working on Kotlin Multiplatform project where I used Gradle Composite Builds to test out a Gradle Plugin. Moving my Gradle Plugin’s classpath to top fixed the issue.

0reactions
AlecStrongcommented, Apr 9, 2021

is it this stack trace? https://github.com/cashapp/sqldelight/issues/2058#issuecomment-713561334

and are you also on AS Canary?

Read more comments on GitHub >

github_iconTop Results From Across the Web

org.w3c.dom.ElementTraversal error in jenkins when building ...
I am using Jenkins 2.346.3 to build my android project apk. It was working fine when the project was using Android gradle plugin...
Read more >
PK95934: PLUGIN ERROR WHEN RHAPSODY IS ... - IBM
createRhapsodyApplicationDllServer(), problems occur. ... Rhapsody is launched: java.lang.ClassNotFoundException: SAIntegratorListenerPlugin at java.net.
Read more >
Custom java rule gives NoClassDefFoundError on Jenkins
We have our own sonar java plugin to add some custom java rules. ... the plugin in jenkins. I had the same problems...
Read more >
Conflict with commons-collections4 and Sponge Forge
plugins /BattleBot.jar} java.lang.NoClassDefFoundError: org/apache/commons/collections4/map/CaseInsensitiveMap at net.dv8tion.jda.core.utils.
Read more >
REST plugin conflicts with custom plugin - KNIME Forum
Execute failed: java.lang.ClassNotFoundException: org.apache.cxf.jaxrs.client.spec.ClientBuilderImpl cannot be found by ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found