servicemix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Freeman Fang (JIRA)" <j...@apache.org>
Subject [jira] [Work started] (SMX4-1395) EHCache bundle should include the META-INF/services so the ServiceLoader works
Date Wed, 06 Mar 2013 11:12:13 GMT

     [ https://issues.apache.org/jira/browse/SMX4-1395?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Work on SMX4-1395 started by Freeman Fang.

> 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
>
> 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

Mime
View raw message