activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hrvoje Habjanic (JIRA)" <>
Subject [jira] Created: (AMQ-2010) META-INF/services files ended up in wrong bundle (jar), missing imports
Date Fri, 21 Nov 2008 14:17:05 GMT
META-INF/services files ended up in wrong bundle (jar), missing imports

                 Key: AMQ-2010
             Project: ActiveMQ
          Issue Type: Bug
    Affects Versions: 5.1.0
         Environment: Springsource DM 1.0.0.RC2, java jdk (sun) 1.6_07, Linux 32bit
            Reporter: Hrvoje Habjanic
            Priority: Trivial


I'm unable to use namespaces in spring xml files. It just cannot resolve namespace

[2008-11-21 15:06:59.627] server-dm-7              rk.beans.factory.xml.DefaultBeanDefinitionDocumentReader.unknown
D Loading bean definitions
[2008-11-21 15:06:59.628] server-dm-7    
D Trying to resolving namespace handler for
[2008-11-21 15:06:59.630] server-dm-7              .app.spring.GenericModuleOsgiBundleXmlApplicationContext.unknown
E Pre refresh error
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem:
Unable to locate Spring NamespaceHandler for XML schema namespace []
Offending resource: URL [bundleentry://89/META-INF/spring/bundle-context-amq.xml]

        at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(
        at org.springframework.beans.factory.parsing.ReaderContext.error(
        at org.springframework.beans.factory.parsing.ReaderContext.error(
        at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.error(

To make long story short, it seems that in the process of building jar, someone forgot to
move META-INF/services files in separate bundles.

In OSGI enviroment, classpath loader of one bundle can only see files in jars (bundles) which
he has import directive, including local root. In current build of activemq, META-INF/services
files are all stored in META-INF/services dir under activemq-core bundle.On the other hand,
namespace parser is in xbean.spring bundle (referenced by META-INF/spring.handlers). Because
parser is in separate bundle, it can not "see" META-INF/services directory, and it dies. Also,
import for org.apache.xbean.spring.context.v2 is missing from activemq-core. Additionally,
for bundle loader to scan for spring.schema file, bundle _must_ import org.springframework.beans.factory.xml,
which is also missing from manifest file. I'm not 100% shure in this, maybe all files from
META-INF/services should be moved from activemq-core to xbaen.spring ...

Anyhow, fix to make it work is to:
- move META-INF/services in propriate bundles
- add following import to activemq-core:

That's it for now. :-)


This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message