@ComponentImport not work

I run command ‘atlas-run’ start , get error:
an.plugins.rest.common.error.jersey.ThrowableExceptionMapper - [http-nio-5990-exec-4] - Uncaught exception thrown by REST service: Could not initialize class com.atlassian.plugins.rest.doclet.generators.schema.Annotations

SpacePermissionsRest.class
package com.atlassian.plugins.pmomanage.rest;

import com.atlassian.confluence.spaces.SpaceManager;
import com.atlassian.plugin.spring.scanner.annotation.component.Scanned;
import com.atlassian.plugin.spring.scanner.annotation.imports.ComponentImport;
import com.atlassian.plugins.rest.common.security.AnonymousAllowed;
import org.springframework.beans.factory.annotation.Autowired;

import javax.inject.Inject;
import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

/**

  • A resource of message.
    */
    @Path("/spaceperm")
    @Scanned
    public class SpacePermissionsRest {

    @ComponentImport
    private final SpaceManager spaceManager;

    @Inject
    public SpacePermissionsRest(SpaceManager spaceManager) {
    this.spaceManager = spaceManager;
    }

    @GET
    @AnonymousAllowed
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response getSpacePermissions()
    {
    return Response.ok(new SpacePermissionsRestModel(“Hello World”)).build();
    }

    @GET
    @AnonymousAllowed
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response getMessage()
    {
    return Response.ok(new SpacePermissionsRestModel(“Hello World”)).build();
    }
    }

pom.xml

<?xml version="1.0" encoding="UTF-8"?> 4.0.0 com.atlassian.plugins.pmomanage pmomanage 1.0 Example Company http://www.example.com/ pmomanage This is the com.atlassian.plugins.pmomanage:pmomanage plugin for Atlassian Refapp. atlassian-plugin junit junit test javax.servlet javax.servlet-api provided com.atlassian.sal sal-api provided com.atlassian.plugin atlassian-spring-scanner-annotation ${atlassian.spring.scanner.version} compile com.atlassian.plugin atlassian-spring-scanner-runtime ${atlassian.spring.scanner.version} runtime javax.inject javax.inject 1 provided org.slf4j slf4j-simple com.atlassian.plugins atlassian-plugins-osgi-testrunner ${plugin.testrunner.version} test javax.ws.rs jsr311-api 1.1.1 provided com.google.code.gson gson 2.2.2-atlassian-1 javax.servlet servlet-api 2.4 provided javax.xml.bind jaxb-api 2.1 provided com.atlassian.plugins.rest atlassian-rest-common 1.0.2 provided org.apache.wink wink-client 1.1.3-incubating test org.mockito mockito-all 1.8.5 test com.atlassian.confluence confluence ${confluence.version} provided com.atlassian.plugins.rest com.atlassian.jersey-library 5.0.1 pom com.atlassian.platform platform ${platform.version} pom import com.atlassian.platform third-party ${platform.version} pom import com.atlassian.maven.plugins maven-refapp-plugin ${amps.version} true ${refapp.version} true false ${atlassian.plugin.key} com.atlassian.plugins.pmomanage.api, org.springframework.osgi.*;resolution:="optional", org.eclipse.gemini.blueprint.*;resolution:="optional", * * com.atlassian.plugin atlassian-spring-scanner-maven-plugin ${atlassian.spring.scanner.version} atlassian-spring-scanner process-classes com.atlassian.plugin atlassian-spring-scanner-external-jar false 6.4.0 5.10.0 3.0.0 3.3.6 6.3.13 1.2.3 1.2.13 ${project.groupId}.${project.artifactId} UTF-8 1.8 1.8

atlassian-plug.xml

<?xml version="1.0" encoding="UTF-8"?> ${project.description} ${project.version} images/pluginIcon.png images/pluginLogo.png com.atlassian.auiplugin:ajs pmomanage The Space Permissions Rest Plugin

plug-content.xml

<?xml version="1.0" encoding="UTF-8"?>


atlassian-scanner:scan-indexes/

Can you repost the files and make sure to wrap them in the code block in the editor? The formatting got lost so it’s a bit hard to read.

Can you also check to see if there were any errors thrown from Confluence when it installed your app? Also which version of Confluence are you working with?