Hello,
we are currently migrating our plugin to work with the latest Jira version (10). While following the migration guide (rest), we have made several adjustments, but we are encountering issues with the following error in our Jira 10 environment:
Error:
HTTP 405: http://our-jira-test-env:8080/rest/SITVmConnectorBackend/2/SITVmConnectorBackend
The plugin works fine in Jira 9, but in Jira 10, we are seeing this 405 error. Below are the migration steps we have taken:
<rest key="Backend Rest Resources" path="/SITVmConnectorBackend" version="2">
<description>Provides REST resources for the Backend.</description>
</rest>
<dependency>
<groupId>com.atlassian.plugins.rest</groupId>
<artifactId>atlassian-rest-v2-api</artifactId>
<version>8.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<version>2.1</version>
<scope>provided</scope>
</dependency>
<rest-migration key="rest-migration-key">
<rest-v2/>
</rest-migration>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
<scope>provided</scope>
</dependency>
@Scanned
@Path("/SITVmConnectorBackend")
public final class BackendServlet extends HttpServlet {
@ComponentImport
private final TemplateRenderer templateRenderer;
private final PluginLicenseManager pluginLicenseManager;
@ComponentImport
private final UserManager userManager;
@ComponentImport
private final LoginUriProvider loginUriProvider;
private final ActiveObjects ao;
@Inject
public BackendServlet(UserManager userManager, LoginUriProvider loginUriProvider, ...) {
this.ao = checkNotNull(ao);
...
}
@POST
@Path("/")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public Response post(String jsonBody, @Context HttpServletRequest request) {
...
}
}
Despite these changes, we still encounter the HTTP 405 error in Jira 10. The same code works without issue in Jira 9.
Is there anything we may have overlooked or missed in the migration process for Jira 10?