# Atlassian-scanner 2 not available on runners?

**URL:** <https://community.developer.atlassian.com/t/atlassian-scanner-2-not-available-on-runners/38078>\
**Category:** Everything Else\
**Tags:** bamboo, remote-agent\
**Created:** [May 8, 2020, 1:48pm UTC](https://community.developer.atlassian.com/t/atlassian-scanner-2-not-available-on-runners/38078 "2020-05-08T13:48:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sknopp](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/sknopp/32/38990_2.png) [@sknopp](https://community.developer.atlassian.com/u/sknopp)\
**Post date:** [May 8, 2020, 1:48pm UTC](https://community.developer.atlassian.com/t/atlassian-scanner-2-not-available-on-runners/38078/1 "2020-05-08T13:48:14Z")

</div>

Hi,

when i want to run my plugin with a custom TaskType on a remote runner i get the following message when the plugin is being loaded:

`org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.atlassian.com/schema/atlassian-scanner]`

I’ve searched a bit for that and found out, that spring-annotations seem not to be supported for remote runners. But what should i do instead? I thought atlassian-scanner is mandatory when developing a plugin?  
I’m using Bamboo version 7.0.3 and atlassian-spring-scanner 2.2.0.

Thanks for any helpful hint!

---

<div class="post-metadata">

**Author:** ![remie](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/remie/32/34985_2.png) [@remie](https://community.developer.atlassian.com/u/remie)\
**Post date:** [May 8, 2020, 5:33pm UTC](https://community.developer.atlassian.com/t/atlassian-scanner-2-not-available-on-runners/38078/2 "2020-05-08T17:33:20Z")

</div>

Keep in mind that agents are running in a different context than Bamboo Server. They are lightweight instances designed only for a specific purpose (running tasks). This also means that they are not running Spring / OSGi. Changes are, you are probably not going to be able to do much dependency injection anyway.

What are you trying to accomplish?

---

<div class="post-metadata">

**Author:** ![sknopp](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/sknopp/32/38990_2.png) [@sknopp](https://community.developer.atlassian.com/u/sknopp)\
**Post date:** [May 15, 2020, 8:12am UTC](https://community.developer.atlassian.com/t/atlassian-scanner-2-not-available-on-runners/38078/3 "2020-05-15T08:12:35Z")

</div>

Nothing too special. In the task type i’m creating TestResults by reading and parsing a test report file. The task type uses one single `@ComponentImport` to access the `TestCollationService` and apply my `CustomTestReportCollector` as described here (and added the annotation): [Test Collection and Reporting](https://developer.atlassian.com/server/bamboo/test-collection-and-reporting/)

Btw. when i remove the annotation i get `No qualifying bean of type [com.atlassian.bamboo.build.test.TestCollationService] found for dependency` when i try to run it locally and the same error as above in the remote runner…

---

<div class="post-metadata">

**Author:** ![remie](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/remie/32/34985_2.png) [@remie](https://community.developer.atlassian.com/u/remie)\
**Post date:** [May 15, 2020, 11:33am UTC](https://community.developer.atlassian.com/t/atlassian-scanner-2-not-available-on-runners/38078/4 "2020-05-15T11:33:06Z")

</div>

Hmm, ok, so looking at the Bamboo sources, it seems that they are using Spring scanner in some of the built-in Tasks. For instance, if you look at the sources of `JUnitResultParserTask`, it reads:

```auto
    @Inject
    public JUnitResultParserTask(@ComponentImport TestCollationService testCollationService) {

```

With the following imports:

```auto
import com.atlassian.plugin.spring.scanner.annotation.imports.ComponentImport;
import javax.inject.Inject;

```

So it seems that this should be possible. I would really encourage you to look at the Bamboo sources to see if you can learn from how they have been doing it. Specifically, search for `implements TaskType` and you will be able to check out the constructors on all built-in tasks.
