It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

A NoClassDefFoundError: org/w3c/dom/Element Problem

Rinoux Yang Oct 18, 2016

I've followed the tutorial of creating a Bitbucket plugin, when adding a dependency of pmd(whatever is 5.1.3 or 5.5.1), when 'atlas-debug', even I write nothing in the plugin project, always an error comes like:

NoClassDefFoundError: org/w3c/dom/Element

so I add a dependency 'xml-apis' which contains the specified class, then :

LinkageError: org/w3c/dom/Element

then I exclude 'jaxen', it runs without error, but the 'pmd' could not start successfully.

 

1 answer

1 accepted

1 vote
Answer accepted
Michael Heemskerk Atlassian Team Oct 18, 2016

Can you try to add an OSGI package import for the org.w3c.dom package in the Import-Package section of the bitbucket-maven-plugin in your pom.xml? That way, the plugin classloader will find the correct version of org.w3c.dom.Element that is exported by Bitbucket.

Rinoux Yang Oct 18, 2016

thank u, sounds useful, I am trying

Rinoux Yang Oct 27, 2016

You answer is really helpful, I worked it out finally. 

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder

...ipe.sh :  #!/bin/bash source "$(dirname "$0")/common.sh" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

3,299 views 1 22
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you