Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.atlassian.com/schema/atlassian-scanner]

WPSC June 16, 2016

Trying to upgrade a plug-in we developed in-house to JIRA 7 and get this error.

org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.atlassian.com/schema/atlassian-scanner]
Offending resource: URL [bundle://218.0:0/META-INF/spring/plugin-context.xml]

We were able to use the latest SDK and build a sample plugin which loads correctly.  We think that we found and copied all of the changes for the new OSGi framework to our plugin but can't get past this error.  Clearly we are still missing something.  Any suggestions?

 

6 answers

1 vote
WPSC September 14, 2016

We solved the problem by handling the dependency in a different way.  I am still not clear on why we had a problem but I suspect it had something to do with class load order.  We change our dependency in the POM on an external library 'spring-jdbc" to "provided" and then used the maven-dependency-plugin to add that jar file to /META-INF/lib in the output path.  You should be able to use this for any dependency not provided by Atlassian.

<plugin>
    <artifactId>maven-dependency-plugin</artifactId>
    <executions>
        <execution>
            <id>copy-dependency</id>
            <phase>process-resources</phase>
            <goals>
                <goal>copy-dependencies</goal>
            </goals>
            <configuration>
                <outputDirectory>${project.build.outputDirectory}/META-INF/lib</outputDirectory>
                <includeArtifactIds>spring-jdbc,spring-tx</includeArtifactIds>
                <stripVersion>false</stripVersion>
            </configuration>
        </execution>
    </executions>
</plugin>


0 votes
aturch September 14, 2016

Have you resolved your issue?

0 votes
WPSC June 22, 2016

I have gone back to the beginning and am trying to load a working 6.4.11 plugin in JIRA 7.1.2 without the Atlassian spring scanner.  This gives me essentially the same error. {{Unable to locate Spring NamespaceHandler for XML schema namespace http://www.eclipse.org/gemini/blueprint/schema/blueprint}}

I have included dependencies in the POM for gemini-blueprint-io, -core, -extender to have all the possible artifacts.  But still get the same NamespaceHandler error.  

This error normally does point to a missing dependency but I don't know which one.

Help!!!!

 

0 votes
WPSC June 17, 2016

Can any (Atlassian) tell me which jar or groupId/artifactId contains the namespace handler for "http://www.atlassian.com/schema/atlassian-scanner"?

0 votes
WPSC June 16, 2016

Yes I copied the dependencies from the sample plugin

 <dependency>
<groupId>com.atlassian.plugin</groupId>
<artifactId>atlassian-spring-scanner-annotation</artifactId>
<version> 1.2.6</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.atlassian.plugin</groupId>
<artifactId>atlassian-spring-scanner-runtime</artifactId>
<version> 1.2.6</version>
<scope>runtime</scope>
</dependency>
0 votes
Petar Petrov (Appfire)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 16, 2016

This looks like a dependency problem. Do you have a dependency on atlassian-spring-scanner-annotation? Can you post your pom.xml file?

Suggest an answer

Log in or Sign up to answer