com.bitbucket.rest.HelloResource registered in SERVER runtime does not implement any provider interfaces applicable in the SERVER runtime. Due to constraint configuration problems the provider com.bitbucket.rest.HelloResource will be ignored

I am seeing a weird error for REST Resource for the atlassian plugin I am working on for Bitbucket data center version 9.4.3. The same code works fine with Bitbucket 8.9.9.

The error message is

com.bitbucket.rest.HelloResource registered in SERVER runtime does not implement any provider interfaces applicable in the SERVER runtime. Due to constraint configuration problems the provider com.bitbucket.rest.HelloResource will be ignored.

Because of this error message when I call the REST endpoint, it results in 404 not found error code

Please note that I added this simple rest end point for purpose of debugging. I am getting the same error message for other REST endpoints as well.

Following is the copy of properties & dependencies in pom.xml

	<properties>
		<fixtures.version>1.0.0</fixtures.version>
		<fixtures.git.version>0.0.1</fixtures.git.version>
		<fixtures.bitbucket.version>0.0.3</fixtures.bitbucket.version>
		<jgit.version>4.8.0.201706111038-r</jgit.version>
		<atlassian.plugins.version>7.1.7</atlassian.plugins.version>
		<bitbucket.version>9.4.3</bitbucket.version>
		<guava.version>26.0-jre</guava.version>
		<jersey.version>1.8-atlassian-12</jersey.version>
		<jackson.version>1.9.14-atlassian-6</jackson.version>
		<slf4j.version>1.7.25</slf4j.version>
		<spring.version>5.3.29</spring.version>
		<metrics.version>3.1.2</metrics.version>
		<rxjava.version>2.0.6</rxjava.version>
	</properties>

   <dependencies>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-osgi-bridge</artifactId>
            <version>${atlassian.plugins.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
			<groupId>javax.inject</groupId>
			<artifactId>javax.inject</artifactId>
			<version>1</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>javax.annotation</groupId>
			<artifactId>javax.annotation-api</artifactId>
			<version>1.3.2</version>
		</dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>3.1.0</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.bitbucket.server</groupId>
            <artifactId>bitbucket-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.bitbucket.server</groupId>
            <artifactId>bitbucket-spi</artifactId>
            <version>${bitbucket.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.bitbucket.server</groupId>
            <artifactId>bitbucket-git-api</artifactId>
            <version>${bitbucket.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.bitbucket.server</groupId>
            <artifactId>bitbucket-util</artifactId>
            <version>${bitbucket.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.bitbucket.server</groupId>
            <artifactId>bitbucket-scm-common</artifactId>
            <version>${bitbucket.version}</version>
            <scope>provided</scope>
        </dependency>        
        <dependency>
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <version>2.6</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.sun.jersey</groupId>
            <artifactId>jersey-core</artifactId>
				<version>${jersey.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.sun.jersey</groupId>
            <artifactId>jersey-server</artifactId>
            <version>${jersey.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.sun.jersey</groupId>
            <artifactId>jersey-client</artifactId>
				<version>${jersey.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-core-asl</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
             <groupId>org.codehaus.jackson</groupId>
			 <artifactId>jackson-mapper-asl</artifactId>
             <scope>compile</scope>
        </dependency>  
        <dependency>
              <groupId>org.codehaus.jackson</groupId>
			  <artifactId>jackson-jaxrs</artifactId>
              <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>${spring.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-tx</artifactId>
            <version>${spring.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-osgi</artifactId>
        </dependency>

        <!-- Reactive Streams dependencies -->
        <dependency>
            <groupId>io.reactivex.rxjava2</groupId>
            <artifactId>rxjava</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.github.akarnokd</groupId>
            <artifactId>rxjava2-jdk8-interop</artifactId>
            <scope>compile</scope>
        </dependency>

        <!-- Test dependencies -->
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-all</artifactId>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>

        <!-- metrics -->
        <dependency>
            <groupId>io.dropwizard.metrics</groupId>
            <artifactId>metrics-core</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>io.dropwizard.metrics</groupId>
            <artifactId>metrics-servlets</artifactId>
            <scope>compile</scope>
        </dependency>
		
    </dependencies>

and this is the code from HelloResource.java

package com.bitbucket.rest.hello;

import javax.inject.Inject;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

@Path("hello")
@Produces({ MediaType.APPLICATION_JSON })
public class HelloResource {

   @Inject
   public HelloResource() {
   }

   @GET
   public Response getMessage() {
      return Response.ok("Hello").build();
   }

}

Any assistance would be greatly appreciated

1 Like