I am following hello world tutorial and getting below error on my very first compile.
[ERROR] Found a type [com.atlassian.plugin.spring.scanner.annotation.imports.StashImport] annotated as a component, but the type is not a concrete class. NOT adding to index file!!
[ERROR] Found a type [com.atlassian.plugin.spring.scanner.annotation.imports.RefappImport] annotated as a component, but the type is not a concrete class. NOT adding to index file!!
[ERROR] Found a type [com.atlassian.plugin.spring.scanner.annotation.imports.JiraImport] annotated as a component, but the type is not a concrete class. NOT adding to index file!!
[ERROR] Found a type [com.atlassian.plugin.spring.scanner.annotation.imports.FecruImport] annotated as a component, but the type is not a concrete class. NOT adding to index file!!
[ERROR] Found a type [com.atlassian.plugin.spring.scanner.annotation.imports.ConfluenceImport] annotated as a component, but the type is not a concrete class. NOT adding to index file!!
[ERROR] Found a type [com.atlassian.plugin.spring.scanner.annotation.imports.BitbucketImport] annotated as a component, but the type is not a concrete class. NOT adding to index file!!
[ERROR] Found a type [com.atlassian.plugin.spring.scanner.annotation.imports.BambooImport] annotated as a component, but the type is not a concrete class. NOT adding to index file!!
[ERROR] Found a type [com.atlassian.plugin.spring.scanner.annotation.export.ModuleType] annotated as a component, but the type is not a concrete class. NOT adding to index file!!
[ERROR] Found a type [com.atlassian.plugin.spring.scanner.annotation.component.StashComponent] annotated as a component, but the type is not a concrete class. NOT adding to index file!!
[ERROR] Found a type [com.atlassian.plugin.spring.scanner.annotation.component.RefappComponent] annotated as a component, but the type is not a concrete class. NOT adding to index file!!
[ERROR] Found a type [com.atlassian.plugin.spring.scanner.annotation.component.JiraComponent] annotated as a component, but the type is not a concrete class. NOT adding to index file!!
[ERROR] Found a type [com.atlassian.plugin.spring.scanner.annotation.component.FecruComponent] annotated as a component, but the type is not a concrete class. NOT adding to index file!!
[ERROR] Found a type [com.atlassian.plugin.spring.scanner.annotation.component.ConfluenceComponent] annotated as a component, but the type is not a concrete class. NOT adding to index file!!
[ERROR] Found a type [com.atlassian.plugin.spring.scanner.annotation.component.ClasspathComponent] annotated as a component, but the type is not a concrete class. NOT adding to index file!!
[ERROR] Found a type [com.atlassian.plugin.spring.scanner.annotation.component.BitbucketComponent] annotated as a component, but the type is not a concrete class. NOT adding to index file!!
[ERROR] Found a type [com.atlassian.plugin.spring.scanner.annotation.component.BambooComponent] annotated as a component, but the type is not a concrete class. NOT adding to index file!!
I have looked at another similar question but couldn't resolve this issue.
below is my pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.atlassian.tutorial</groupId>
<artifactId>myConfluenceMacro</artifactId>
<version>1.0.0-SNAPSHOT</version>
<organization>
<name>Example Company</name>
<url>http://www.example.com/</url>
</organization>
<name>myConfluenceMacro</name>
<description>This is the com.atlassian.tutorial:myConfluenceMacro plugin for Atlassian Confluence.</description>
<packaging>atlassian-plugin</packaging>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.atlassian.confluence</groupId>
<artifactId>confluence</artifactId>
<version>${confluence.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.atlassian.plugin</groupId>
<artifactId>atlassian-spring-scanner-annotation</artifactId>
<version>${atlassian.spring.scanner.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.atlassian.plugin</groupId>
<artifactId>atlassian-spring-scanner-runtime</artifactId>
<version>${atlassian.spring.scanner.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
<scope>provided</scope>
</dependency>
<!-- WIRED TEST RUNNER DEPENDENCIES -->
<dependency>
<groupId>com.atlassian.plugins</groupId>
<artifactId>atlassian-plugins-osgi-testrunner</artifactId>
<version>${plugin.testrunner.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
<version>1.1.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.2.2-atlassian-1</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>confluence-maven-plugin</artifactId>
<version>${amps.version}</version>
<extensions>true</extensions>
<configuration>
<productVersion>${confluence.version}</productVersion>
<productDataVersion>${confluence.data.version}</productDataVersion>
<enableQuickReload>true</enableQuickReload>
<!-- See here for an explanation of default instructions: -->
<!-- https://developer.atlassian.com/docs/advanced-topics/configuration-of-instructions-in-atlassian-plugins -->
<instructions>
<Atlassian-Plugin-Key>${atlassian.plugin.key}</Atlassian-Plugin-Key>
<!-- Add package to export here -->
<Export-Package>
com.atlassian.tutorial.api,
</Export-Package>
<!-- Add package import here -->
<Import-Package>
org.springframework.osgi.*;resolution:="optional",
org.eclipse.gemini.blueprint.*;resolution:="optional",
*
</Import-Package>
<!-- Ensure plugin is spring powered -->
<Spring-Context>*</Spring-Context>
</instructions>
</configuration>
</plugin>
<plugin>
<groupId>com.atlassian.plugin</groupId>
<artifactId>atlassian-spring-scanner-maven-plugin</artifactId>
<version>${atlassian.spring.scanner.version}</version>
<executions>
<execution>
<goals>
<goal>atlassian-spring-scanner</goal>
</goals>
<phase>process-classes</phase>
</execution>
</executions>
<configuration>
<scannedDependencies>
<dependency>
<groupId>com.atlassian.plugin</groupId>
<artifactId>atlassian-spring-scanner-external-jar</artifactId>
</dependency>
</scannedDependencies>
<verbose>false</verbose>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<confluence.version>6.14.0</confluence.version>
<confluence.data.version>6.14.0</confluence.data.version>
<amps.version>8.0.0</amps.version>
<plugin.testrunner.version>2.0.1</plugin.testrunner.version>
<atlassian.spring.scanner.version>1.2.13</atlassian.spring.scanner.version>
<!-- This property ensures consistency between the key in atlassian-plugin.xml and the OSGi bundle's key. -->
<atlassian.plugin.key>${project.groupId}.${project.artifactId}</atlassian.plugin.key>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
</project>
below is my atlassian-plugin.xml
<atlassian-plugin key="${atlassian.plugin.key}" name="${project.name}" plugins-version="2">
<plugin-info>
<description>${project.description}</description>
<version>${project.version}</version>
<vendor name="${project.organization.name}" url="${project.organization.url}" />
<param name="plugin-icon">images/pluginIcon.png</param>
<param name="plugin-logo">images/pluginLogo.png</param>
</plugin-info>
<!-- add our i18n resource -->
<resource type="i18n" name="i18n" location="myConfluenceMacro"/>
<!-- add our web resources -->
<web-resource key="myConfluenceMacro-resources" name="myConfluenceMacro Web Resources">
<dependency>com.atlassian.auiplugin:ajs</dependency>
<resource type="download" name="myConfluenceMacro.css" location="/css/myConfluenceMacro.css"/>
<resource type="download" name="myConfluenceMacro.js" location="/js/myConfluenceMacro.js"/>
<resource type="download" name="images/" location="/images"/>
<context>myConfluenceMacro</context>
</web-resource>
<xhtml-macro name="helloworld" class="com.atlassian.tutorial.macro.helloworld" key='helloworld-macro'>
<description key="helloworld.macro.desc"/>
<category name="formatting"/>
<parameters>
<parameter name="Name" type="string" />
<parameter name="Color" type="enum">
<value name="red"/>
<value name="green"/>
<value name="blue"/>
</parameter>
</parameters>
</xhtml-macro>
</atlassian-plugin>
I tried to migrate from spring-scanner 1.2.13 to 2.0 with the help of this tutorial https://bitbucket.org/atlassian/atlassian-spring-scanner/src/master/ but this caused more issues, so I reverted them.
Any help regarding this issue.
Hello there!
Raj, this error is most likely thrown due to the fact that the your scanner is scanning its own types. You should be able to check the bigger discussion and how to fix this here:
SCANNER-24 | Scanner logs ERRORs about own annotations not being components
The workaround to this would be to set this under the plugin configuration file:
<includeExclude>-com.atlassian.plugin.spring.scanner.annotation.*</includeExclude>
Looking forward to your reply!
@Diego I am new to plugin development and I had a small doubt what do you mean by a plugin configuration file and where do I find it?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think Diego means the pom.xml, here you have following tag structur in which you also find the configuration tag.
<project ... >
<build>
<plugins>
<plugin>
<configuration>
...
</configuration>
</plugin>
</plugins>
</build>
...
Best regards,
Nici
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nici,
Thanks for the reply, I have that issue resolved on the same day but I forgot to update it here.
Thanks again,
Dharanitharan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Ho did you solved the issue.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The "Hello world" article has, unfortunately, not been updated.
Unfortunately, the source code has not been updated also.
file https://bitbucket.org/serverecosystem/myconfluencemacro/src/master/src/main/java/com/atlassian/tutorial/macro/helloworld.java is incorrect
The solution is to comment lines 6 and 13
// import com.atlassian.plugin.spring.scanner.annotation.component.Scanned;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.