• 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 Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Wednesday in Jira

Join our webinar: How 1B+ feature flag events helped us build the new Jira

Every time you release software, there's a bit of risk – that there's a bug, that something breaks, or that the feature doesn't resonate with customers. Feature flagging helps make high stakes s...

134 views 0 3
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