Bitbucket Plugin REST Api call 500 error

Hi, we have deployed a plugin in Bitbucket which makes REST Api call to Bitbucket to fetch user details but when making that Api call, we are getting 500 error. Api response message


And in the Bitbucket logs we got this exception:

ThrowableExceptionMapper Uncaught exception 116b60dd-a554-4c1e-a7f7-2bc70c8557bf thrown by REST service: com/rometools/rome/feed/rss/Channel
java.lang.NoClassDefFoundError: com/rometools/rome/feed/rss/Channel
    at org.springframework.http.converter.feed.RssChannelHttpMessageConverter.supports(
    at org.springframework.http.converter.AbstractHttpMessageConverter.canRead(
    at org.springframework.web.client.RestTemplate$AcceptHeaderRequestCallback.canReadResponse(
    at org.springframework.web.client.RestTemplate$AcceptHeaderRequestCallback.lambda$doWithRequest$0(
    at java.base/$2$1.accept(
    at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(
    at java.base/
    at java.base/
    at java.base/$ReduceOp.evaluateSequential(
    at java.base/
    at java.base/
    at org.springframework.web.client.RestTemplate$AcceptHeaderRequestCallback.doWithRequest(
    at org.springframework.web.client.RestTemplate$HttpEntityRequestCallback.doWithRequest(
    at org.springframework.web.client.RestTemplate.doExecute(
    at org.springframework.web.client.RestTemplate.execute(
    ... 286 frames trimmed
Caused by: java.lang.ClassNotFoundException: com.rometools.rome.feed.rss.Channel not found by com.atlassian.platform.dependencies.platform-spring-bundle [7]
    at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(
    ... 58 common frames omitted

Tried adding the com/rometools/rome/feed/rss/Channel dependency in the plugin still it isn’t working. It is happening specifically when making the rest template call.
what could be the issue? Any help is appreciated!

  1. Which Bitbucket version is this?
  2. What’s the exact REST endpoint you’re hitting and how are you calling it? (e.g. is it ?)
  3. Do you see the same error when calling the same REST endpoint outside of your plugin e.g. through Postman?
  4. If this is a plugin you’re installing on Bitbucket, have you considered using Bitbucket’s Java API e.g. UserService#getUserByName ?
1 Like

Hi StanleySu,
We are using Bitbucket version 8.19.3. We are hitting this endpoint /rest/api/latest/admin/users and we are calling it by using Rest Template call. No we aren’t getting any error through Postman. Thanks for replying we already figured it out that the issue is Bitbucket doesn’t have the dependencies required for Rest Template to make the API call. We are now using HttpsURLConnection and it is working fine.