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

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

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

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>


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

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>

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

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!!!!

 

Have you resolved your issue?

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,197 views 13 19
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot