Servlet 404 not found

Hi,
I was doing this tutorial : https://developer.atlassian.com/server/framework/atlassian-sdk/control-access-with-sal/

But when I run: atlas-run --product jira --version 7.13.0

and try to Join to http://localhost:2990/jira/plugins/servlet/test

I get Error 404.

In the bash I get this error: Error creating bean with name ‘com.atlassian.plugins.tutorial.refapp.MyPluginServlet’: Unsatisfied dependency expressed through constructor argument with index 0 of type [com.atlassian.sal.api.user.UserManager]: No qualifying bean of type [com.atlassian.sal.api.user.UserManager] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency.

This is a screenshot of a part of my code:

What I do wrong?
Thanks for your help

Hi,

You are using the SAL UserManager (from the Shared Access Library = SAL)
therefore you need this in your pom.xml:

        <dependency>
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-api</artifactId>
            <!-- done by jira-plugins-platform-pom -->
            <!--<version>${sal.api.version}</version>-->
            <scope>provided</scope>
        </dependency>

And then this in your pom.xml OSGI section:

                        <Import-Package>
                            com.atlassian.sal.*,
                            <!-- And the other stuff you have here .... -->
                            *                       
                        </Import-Package>

Then it should work :slight_smile:

You could also use the JiraUserManager (has same name, but other package), then you do not need SAL.

Cheers,
Bernhard

Hi!.
Thanks for the fast answer!.
I followed your instructions and I get the same problem :(.
Maybe I put the import in the wrong place: