You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "metatech (JIRA)" <ji...@apache.org> on 2013/12/18 16:42:07 UTC
[jira] [Commented] (SMX4-1245) activemq-broker.xml stays in
Blueprint "GracePeriod" state forever
[ https://issues.apache.org/jira/browse/SMX4-1245?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13851844#comment-13851844 ]
metatech commented on SMX4-1245:
--------------------------------
This "fragment/host" relationship problem is also exhibited by the Hibernate/EJB bundles.
[ 194] [Resolved ] [ ] [ ] [ 50] com.springsource.org.hibernate.annotations (3.4.0.GA)
[ 195] [Resolved ] [ ] [ ] [ 50] com.springsource.org.hibernate.ejb (3.4.0.GA)
[ 196] [Active ] [ ] [ ] [ 50] com.springsource.org.hibernate (3.3.2.GA)
On the first SMX start-up after installation, the fragment is sometimes not properly attached to the host, which can throw errors such as below :
{code}
Caused by: java.lang.NoClassDefFoundError: org/hibernate/ejb/HibernatePersistence
at org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter.<init>(HibernateJpaVendorAdapter.java:57)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)[:1.6.0_41]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)[:1.6.0_41]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)[:1.6.0_41]
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)[:1.6.0_41]
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:126)
... 33 more
Caused by: java.lang.ClassNotFoundException: org.hibernate.ejb.HibernatePersistence not found by org.springframework.orm [167]
at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:787)
at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71)
at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_41]
... 39 more
{code}
> activemq-broker.xml stays in Blueprint "GracePeriod" state forever
> ------------------------------------------------------------------
>
> Key: SMX4-1245
> URL: https://issues.apache.org/jira/browse/SMX4-1245
> Project: ServiceMix 4
> Issue Type: Bug
> Environment: ServiceMix 4.3
> Reporter: metatech
>
> In a small proportion of the time (about 20%), during the first start of ServiceMix after installation, the bundle "activemq-broker.xml" stays in the "GracePeriod" forever (ie no timeout after 5 minutes). It is waiting for a namespace handler for the namespace "http://activemq.apache.org/schema/core", which should be exported by the bundle "activemq-blueprint", which is declared as a OSGi fragment of the "activemq-core" bundle. When the problem occurs, the fragment is not properly attached to the host bundle. See the extract of the Karaf console :
> {code}
> [ 46] [Active ] [ ] [ ] [ 60] activemq-core (5.4.2)
> [ 56] [Installed ] [ ] [ ] [ 60] activemq-blueprint (5.4.2)
> [ 59] [Active ] [GracePeriod ] [ ] [ 60] activemq-broker.xml (0.0.0)
> {code}
> There are no "Hosts:" and "Fragments:" lines.
> The activemq-blueprint stays in "Installed" state instead of "Resolved", and cannot be started manually because it is a fragment bundle.
> Proposed short-term workaround (untested) : merge both bundles "activemq-core" and "activemq-blueprint".
> Long-term solution : I guess the problem is due to a race condition between the starting of the bundles and the discovery of the "host-fragment" relationship : maybe a 2-phase mechanism is needed.
--
This message was sent by Atlassian JIRA
(v6.1.4#6159)