Hi again JB and thank you in advance.
The Hazelcast Feature is where it is defined and added the
/etc/hazelcast.xml file:

karaf@root>feature:info hazelcast
Feature hazelcast 3.5.2
Description:
  In memory data grid
Feature has no configuration
*Feature configuration files: *
*  /etc/hazelcast.xml*
Feature has no dependencies.
Feature contains followed bundles:
  mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1
  mvn:com.eclipsesource.minimal-json/minimal-json/0.9.2
  mvn:com.hazelcast/hazelcast-all/3.5.2
Feature has no conditionals.


Do you think I can create a feature for my fragment that also replace
the /etc/hazelcast.xml
file?
Would it work or would fail because the file already exists (created by the
hazelcast feature) and it won't be replaced?

Thank you,
Cristiano




Il giorno ven 25 mar 2016 alle ore 09:21 Cristiano Costantini <
[email protected]> ha scritto:

> Thank you again!
>
>
> Il giorno ven 25 mar 2016 alle ore 09:20 Jean-Baptiste Onofré <
> [email protected]> ha scritto:
>
>> Hi Cristiano,
>>
>> It should be hosted by [15:com.hazelcast:3.5.2] (cellar-core uses the
>> CombinedClassLoader).
>>
>> Regards
>> JB
>>
>> On 03/25/2016 09:17 AM, Cristiano Costantini wrote:
>> > Sorry, one more question:
>> > should I fragment [15:com.hazelcast:3.5.2] or should I fragment
>> > [107:org.apache.karaf.cellar.core:4.0.0] ?
>> > It is the second one who seems to find the class...
>> >
>> > (sorry for the question I'm not an expert on the concept of fragmented
>> > bundles).
>> >
>> > Here is the full stack trace:
>> >
>> > 2016-03-25 08:44:01,467 | WARN  | pool-46-thread-1 | Activator
>> >               | 109 - org.apache.karaf.cellar.hazelcast - 4.0.0 | Error
>> > starting activator
>> > com.hazelcast.core.HazelcastException: java.lang.ClassNotFoundException:
>> > com.hazelcast.examples.DummyStore
>> > at
>> >
>> com.hazelcast.util.ExceptionUtil.rethrow(ExceptionUtil.java:67)[15:com.hazelcast:3.5.2]
>> > at
>> >
>> com.hazelcast.map.impl.mapstore.StoreConstructor.getStoreFromClassOrNull(StoreConstructor.java:84)[15:com.hazelcast:3.5.2]
>> > at
>> >
>> com.hazelcast.map.impl.mapstore.StoreConstructor.createStore(StoreConstructor.java:46)[15:com.hazelcast:3.5.2]
>> > at
>> >
>> com.hazelcast.map.impl.mapstore.BasicMapStoreContext.create(BasicMapStoreContext.java:124)[15:com.hazelcast:3.5.2]
>> > at
>> >
>> com.hazelcast.map.impl.mapstore.MapStoreContextFactory.createMapStoreContext(MapStoreContextFactory.java:48)[15:com.hazelcast:3.5.2]
>> > at
>> >
>> com.hazelcast.map.impl.MapContainer.<init>(MapContainer.java:109)[15:com.hazelcast:3.5.2]
>> > at
>> >
>> com.hazelcast.map.impl.MapServiceContextImpl$1.createNew(MapServiceContextImpl.java:71)[15:com.hazelcast:3.5.2]
>> > at
>> >
>> com.hazelcast.map.impl.MapServiceContextImpl$1.createNew(MapServiceContextImpl.java:66)[15:com.hazelcast:3.5.2]
>> > at
>> >
>> com.hazelcast.util.ConcurrencyUtil.getOrPutSynchronized(ConcurrencyUtil.java:40)[15:com.hazelcast:3.5.2]
>> > at
>> >
>> com.hazelcast.map.impl.MapServiceContextImpl.getMapContainer(MapServiceContextImpl.java:112)[15:com.hazelcast:3.5.2]
>> > at
>> >
>> com.hazelcast.map.impl.proxy.MapProxySupport.<init>(MapProxySupport.java:161)[15:com.hazelcast:3.5.2]
>> > at
>> >
>> com.hazelcast.map.impl.proxy.MapProxyImpl.<init>(MapProxyImpl.java:74)[15:com.hazelcast:3.5.2]
>> > at
>> >
>> com.hazelcast.map.impl.MapRemoteService.createDistributedObject(MapRemoteService.java:44)[15:com.hazelcast:3.5.2]
>> > at
>> >
>> com.hazelcast.map.impl.MapRemoteService.createDistributedObject(MapRemoteService.java:32)[15:com.hazelcast:3.5.2]
>> > at
>> >
>> com.hazelcast.map.impl.MapService.createDistributedObject(MapService.java:141)[15:com.hazelcast:3.5.2]
>> > at
>> >
>> com.hazelcast.spi.impl.proxyservice.impl.ProxyRegistry.doCreateProxy(ProxyRegistry.java:191)[15:com.hazelcast:3.5.2]
>> > at
>> >
>> com.hazelcast.spi.impl.proxyservice.impl.ProxyRegistry.createProxy(ProxyRegistry.java:184)[15:com.hazelcast:3.5.2]
>> > at
>> >
>> com.hazelcast.spi.impl.proxyservice.impl.ProxyRegistry.getOrCreateProxy(ProxyRegistry.java:153)[15:com.hazelcast:3.5.2]
>> > at
>> >
>> com.hazelcast.spi.impl.proxyservice.impl.ProxyServiceImpl.getDistributedObject(ProxyServiceImpl.java:119)[15:com.hazelcast:3.5.2]
>> > at
>> >
>> com.hazelcast.instance.HazelcastInstanceImpl.getDistributedObject(HazelcastInstanceImpl.java:390)[15:com.hazelcast:3.5.2]
>> > at
>> >
>> com.hazelcast.instance.HazelcastInstanceImpl.getMap(HazelcastInstanceImpl.java:192)[15:com.hazelcast:3.5.2]
>> > at
>> >
>> com.hazelcast.instance.HazelcastInstanceProxy.getMap(HazelcastInstanceProxy.java:75)[15:com.hazelcast:3.5.2]
>> > at
>> >
>> org.apache.karaf.cellar.hazelcast.HazelcastGroupManager.init(HazelcastGroupManager.java:68)[109:org.apache.karaf.cellar.hazelcast:4.0.0]
>> > at
>> >
>> org.apache.karaf.cellar.hazelcast.internal.osgi.Activator.doStart(Activator.java:202)[109:org.apache.karaf.cellar.hazelcast:4.0.0]
>> > at
>> >
>> org.apache.karaf.util.tracker.BaseActivator.run(BaseActivator.java:233)[109:org.apache.karaf.cellar.hazelcast:4.0.0]
>> > at
>> >
>> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_60]
>> > at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_60]
>> > at
>> >
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_60]
>> > at
>> >
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_60]
>> > at java.lang.Thread.run(Thread.java:745)[:1.8.0_60]
>> > Caused by: java.lang.ClassNotFoundException:
>> > com.hazelcast.examples.DummyStore
>> > at
>> >
>> org.apache.karaf.cellar.core.utils.CombinedClassLoader.findClass(CombinedClassLoader.java:60)[107:org.apache.karaf.cellar.core:4.0.0]
>> > at java.lang.ClassLoader.loadClass(ClassLoader.java:424)[:1.8.0_60]
>> > at java.lang.ClassLoader.loadClass(ClassLoader.java:357)[:1.8.0_60]
>> > at
>> >
>> com.hazelcast.nio.ClassLoaderUtil.tryLoadClass(ClassLoaderUtil.java:125)[15:com.hazelcast:3.5.2]
>> > at
>> >
>> com.hazelcast.nio.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:114)[15:com.hazelcast:3.5.2]
>> > at
>> >
>> com.hazelcast.nio.ClassLoaderUtil.newInstance(ClassLoaderUtil.java:67)[15:com.hazelcast:3.5.2]
>> > at
>> >
>> com.hazelcast.map.impl.mapstore.StoreConstructor.getStoreFromClassOrNull(StoreConstructor.java:82)[15:com.hazelcast:3.5.2]
>> > ... 28 more
>> >
>> > thank you again!
>> >
>> > Il giorno ven 25 mar 2016 alle ore 09:14 Cristiano Costantini
>> > <[email protected] <mailto:[email protected]
>> >>
>> > ha scritto:
>> >
>> >     thank you very much JB!
>> >     (then I have to learn how to make fragments :-D)
>> >
>> >     Have a nice day
>> >
>> >     Il giorno ven 25 mar 2016 alle ore 09:02 Jean-Baptiste Onofré
>> >     <[email protected] <mailto:[email protected]>> ha scritto:
>> >
>> >         Hi Cristiano,
>> >
>> >         it should be a fragment of the Hazelcast bundle.
>> >
>> >         Regards
>> >         JB
>> >
>> >         On 03/25/2016 09:00 AM, Cristiano Costantini wrote:
>> >          > Hi All,
>> >          >
>> >          > If I want to configure persistence in the hazelcast.xml and I
>> >         add a
>> >          > MapStore configuration like this:
>> >          >
>> >          > <map-store
>> >          >
>> >
>>  
>> enabled="true"><class-name>com.hazelcast.examples.DummyStore</class-name><write-delay-seconds>60</write-delay-seconds><write-batch-size>1000</write-batch-size><write-coalescing>true</write-coalescing></map-store>
>> >          >
>> >          > How and where I can publish the
>> >         com.hazelcast.examples.DummyStore class
>> >          > in order to avoid the exception:
>> >          >
>> >          > 2016-03-25 08:44:01,467 | WARN  | pool-46-thread-1 |
>> Activator
>> >          >               | 109 - org.apache.karaf.cellar.hazelcast -
>> >         4.0.0 | Error
>> >          > starting activator
>> >          > com.hazelcast.core.HazelcastException:
>> >         java.lang.ClassNotFoundException:
>> >          > com.hazelcast.examples.DummyStore
>> >          > at
>> >          >
>> >
>>  
>> com.hazelcast.util.ExceptionUtil.rethrow(ExceptionUtil.java:67)[15:com.hazelcast:3.5.2]
>> >          > at
>> >          >
>> >
>>  
>> com.hazelcast.map.impl.mapstore.StoreConstructor.getStoreFromClassOrNull(StoreConstructor.java:84)[15:com.hazelcast:3.5.2]
>> >          > [...]
>> >          > at
>> >          >
>> >
>>  
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_60]
>> >          > at
>> >          >
>> >
>>  
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_60]
>> >          > at java.lang.Thread.run(Thread.java:745)[:1.8.0_60]
>> >          > Caused by: java.lang.ClassNotFoundException:
>> >          > com.hazelcast.examples.DummyStore
>> >          > at
>> >          >
>> >
>>  
>> org.apache.karaf.cellar.core.utils.CombinedClassLoader.findClass(CombinedClassLoader.java:60)[107:org.apache.karaf.cellar.core:4.0.0]
>> >          > at
>> >         java.lang.ClassLoader.loadClass(ClassLoader.java:424)[:1.8.0_60]
>> >          > [...]
>> >          > at
>> >          >
>> >
>>  
>> com.hazelcast.map.impl.mapstore.StoreConstructor.getStoreFromClassOrNull(StoreConstructor.java:82)[15:com.hazelcast:3.5.2]
>> >          > ... 28 more
>> >          >
>> >          >
>> >          >
>> >          > Thanks !
>> >          > Cristiano
>> >
>> >         --
>> >         Jean-Baptiste Onofré
>> >         [email protected] <mailto:[email protected]>
>> >         http://blog.nanthrax.net
>> >         Talend - http://www.talend.com
>> >
>>
>> --
>> Jean-Baptiste Onofré
>> [email protected]
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
>

Reply via email to