[
https://issues.apache.org/jira/browse/SMX4-1395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13625067#comment-13625067
]
Freeman Fang commented on SMX4-1395:
------------------------------------
Hi,
It's during VOTE now, you can find it in the staging repo[1] and test and vote
it.
[1]https://repository.apache.org/content/repositories/orgapacheservicemix-060/org/apache/servicemix/bundles/org.apache.servicemix.bundles.ehcache/
Freeman
> EHCache bundle should include the META-INF/services so the ServiceLoader works
> ------------------------------------------------------------------------------
>
> Key: SMX4-1395
> URL: https://issues.apache.org/jira/browse/SMX4-1395
> Project: ServiceMix 4
> Issue Type: Bug
> Components: Bundles
> Reporter: Claus Ibsen
> Assignee: Freeman Fang
> Fix For: bundles-2013.03
>
>
> This file is missing in the bundle JAR
> {code}
> META-INF/services/
> META-INF/services/net.sf.ehcache.EhcacheInit
> {code}
> Which causes the bundle to NOT work in OSGi at all.
> {code}
> 013-03-06 11:52:13,095 | WARN | (3)-192.168.1.80 | OsgiDefaultCamelContext
> | e.camel.impl.DefaultCamelContext 1763 | 68 -
> org.apache.camel.camel-core - 2.11.0.SNAPSHOT | Error occurred while shutting
> down service: Endpoint[cache://foo]. This exception will be ignored.
> net.sf.ehcache.CacheException: java.lang.AssertionError: No
> net.sf.ehcache.EhcacheInit services found
> at
> net.sf.ehcache.LibraryInit.init(LibraryInit.java:56)[88:org.apache.servicemix.bundles.ehcache:2.6.3.1]
> at
> net.sf.ehcache.CacheManager.init(CacheManager.java:366)[88:org.apache.servicemix.bundles.ehcache:2.6.3.1]
> at
> net.sf.ehcache.CacheManager.<init>(CacheManager.java:259)[88:org.apache.servicemix.bundles.ehcache:2.6.3.1]
> at
> net.sf.ehcache.CacheManager.newInstance(CacheManager.java:1037)[88:org.apache.servicemix.bundles.ehcache:2.6.3.1]
> at
> net.sf.ehcache.CacheManager.newInstance(CacheManager.java:983)[88:org.apache.servicemix.bundles.ehcache:2.6.3.1]
> at
> net.sf.ehcache.CacheManager.create(CacheManager.java:959)[88:org.apache.servicemix.bundles.ehcache:2.6.3.1]
> at
> org.apache.camel.component.cache.DefaultCacheManagerFactory.createCacheManagerInstance(DefaultCacheManagerFactory.java:25)[90:org.apache.camel.camel-cache:2.11.0.SNAPSHOT]
> at
> org.apache.camel.component.cache.CacheManagerFactory.getInstance(CacheManagerFactory.java:27)[90:org.apache.camel.camel-cache:2.11.0.SNAPSHOT]
> {code}
> I manually added that META-INF/services file to the bundle, and then it
> worked in OSGi.
> For example the camel/tests/camel-itest-osgi now works fine.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira