You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by marcin <mt...@gmail.com> on 2015/01/19 20:39:47 UTC

Activemq 5.10 - problem with create broker in osgi environment

Hi,

My application runs on OSGi environment. One of the modules is embeded
activemq broker in version 5.5. I would like to upgrade activemq broker to
5.10. Unfortunately, during the start broker's module exception is thrown:

org.springframework.beans.factory.BeanDefinitionStoreException: Unrecognized
xbean namespace mapping: http://activemq.apache.org/schema/core
        at
org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parseBeanFromExtensionElement(XBeanNamespaceHandler.java:284)[62:org.apache.xbean
.spring:3.18.0]
        at
org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:156)[62:org.apache.xbean.spring:3.18.0]
        at
org.apache.xbean.spring.context.v2.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:49)[62:org.apache.xbean.spring:3.18.0]
        at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1432)[49:org.apache
.servicemix.bundles.spring-beans:3.2.12.RELEASE_1]
        at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1422)[49:org.apache
.servicemix.bundles.spring-beans:3.2.12.RELEASE_1]
        at
org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:187
)[49:org.apache.servicemix.bundles.spring-beans:3.2.12.RELEASE_1]
        at
org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.jav
a:147)[49:org.apache.servicemix.bundles.spring-beans:3.2.12.RELEASE_1]
.....

Comparing activemq-core module (5.5) with activemq-osgi (5.10) I noticed
that activemq-core (5.5) module exports package
META-INF.services.org.apache.xbean.spring.http.activemq.apache.org.schema
while the activemq-osgi (5.10) module does not export this package. When I
edit the MANIFEST.MF adding in Export-Package: ....,
META-INF.services.org.apache.xbean.spring.http.activemq.apache.org.schema
everything works.

My question is why activemq-osgi (5.10) does not export package
META-INF.services.org.apache.xbean.spring.http.activemq.apache.org.schema ?

Regards,
Marcin



--
View this message in context: http://activemq.2283324.n4.nabble.com/Activemq-5-10-problem-with-create-broker-in-osgi-environment-tp4690121.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Activemq 5.10 - problem with create broker in osgi environment

Posted by marcin <mt...@gmail.com>.
Hi Hadrian,

I'm using spring but with activemq 5.5 everything works fine. I noticed that
in case of activemq-osgi 5.10 
org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler (I'm using xbean
3.18.0) cannot read 
META-INF/services/org/apache/xbean/spring/http/activemq.apache.org/schema/core
which is located inside bundle activemq-osgi. Because bundle activemq-osgi
doesn't export this package, it isn't visible for other bundles in
particular for xbean bundle. 


Cheers, 
Marcin



--
View this message in context: http://activemq.2283324.n4.nabble.com/Activemq-5-10-problem-with-create-broker-in-osgi-environment-tp4690121p4690202.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Activemq 5.10 - problem with create broker in osgi environment

Posted by Hadrian Zbarcea <hz...@gmail.com>.
Hi Marcin,

I quickly looked at your xml. You are not using blueprint, just spring. 
I saw the error you mentioned a few times. I didn't try to reproduce, I 
will try tomorrow if I could manage to find the time. However, from my 
vague recollection the issue is related to a bundle fragment not being 
loaded and that's the reason for the
namespace handler mia. Either a bundle not installed or start order. 
I'll try to dig into it tomorrow, unless someone recalls the exact 
context and answers first.

And yes, there was some repackaging done since 5.5.

Cheers,
Hadrian

On 01/19/2015 02:57 PM, marcin wrote:
> Hi,
>
> Thanks for quick response. I attach my config file  localhost-broker.xml
> <http://activemq.2283324.n4.nabble.com/file/n4690124/localhost-broker.xml>
> .
>
> Regards,
> Marcin
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Activemq-5-10-problem-with-create-broker-in-osgi-environment-tp4690121p4690124.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Activemq 5.10 - problem with create broker in osgi environment

Posted by marcin <mt...@gmail.com>.
Hi,

Thanks for quick response. I attach my config file  localhost-broker.xml
<http://activemq.2283324.n4.nabble.com/file/n4690124/localhost-broker.xml> 
.

Regards,
Marcin



--
View this message in context: http://activemq.2283324.n4.nabble.com/Activemq-5-10-problem-with-create-broker-in-osgi-environment-tp4690121p4690124.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Activemq 5.10 - problem with create broker in osgi environment

Posted by Hadrian Zbarcea <hz...@gmail.com>.
Hard to tell without seeing your xml configuration. My first suspicion 
is that you are mixing the spring and blueprint namespaces.
Probably using a blueprint xml and define a bean in the spring namespace.

Cheers,
Hadrian


On 01/19/2015 02:39 PM, marcin wrote:
> Hi,
>
> My application runs on OSGi environment. One of the modules is embeded
> activemq broker in version 5.5. I would like to upgrade activemq broker to
> 5.10. Unfortunately, during the start broker's module exception is thrown:
>
> org.springframework.beans.factory.BeanDefinitionStoreException: Unrecognized
> xbean namespace mapping: http://activemq.apache.org/schema/core
>          at
> org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parseBeanFromExtensionElement(XBeanNamespaceHandler.java:284)[62:org.apache.xbean
> .spring:3.18.0]
>          at
> org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:156)[62:org.apache.xbean.spring:3.18.0]
>          at
> org.apache.xbean.spring.context.v2.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:49)[62:org.apache.xbean.spring:3.18.0]
>          at
> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1432)[49:org.apache
> .servicemix.bundles.spring-beans:3.2.12.RELEASE_1]
>          at
> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1422)[49:org.apache
> .servicemix.bundles.spring-beans:3.2.12.RELEASE_1]
>          at
> org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:187
> )[49:org.apache.servicemix.bundles.spring-beans:3.2.12.RELEASE_1]
>          at
> org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.jav
> a:147)[49:org.apache.servicemix.bundles.spring-beans:3.2.12.RELEASE_1]
> .....
>
> Comparing activemq-core module (5.5) with activemq-osgi (5.10) I noticed
> that activemq-core (5.5) module exports package
> META-INF.services.org.apache.xbean.spring.http.activemq.apache.org.schema
> while the activemq-osgi (5.10) module does not export this package. When I
> edit the MANIFEST.MF adding in Export-Package: ....,
> META-INF.services.org.apache.xbean.spring.http.activemq.apache.org.schema
> everything works.
>
> My question is why activemq-osgi (5.10) does not export package
> META-INF.services.org.apache.xbean.spring.http.activemq.apache.org.schema ?
>
> Regards,
> Marcin
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Activemq-5-10-problem-with-create-broker-in-osgi-environment-tp4690121.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.