-
1. Re: Ehcache on Fuse ESB
davsclaus Aug 1, 2011 8:29 AM (in response to farha)There is the camel-cache component which uses EHCache
-
2. Re: Ehcache on Fuse ESB
farha Aug 2, 2011 7:46 AM (in response to davsclaus)Yeah..I have read that but couldn't get anything out of it dat would be my help.
I have a working use case that moves a file from input folder to output folder through XSLT moving through activemq input and output queue respectively. I want the transformed file to go to the cache and then to output queue.
How can I do this? kindly help!
-
3. Re: Ehcache on Fuse ESB
davsclaus Aug 2, 2011 11:37 AM (in response to farha)In one route you send the file to the cache
You need to specify a cache key and an operation (ADD) to add it to the cache.
And in another route you consume from the cache using that same key.
-
4. Re: Ehcache on Fuse ESB
farha Aug 3, 2011 2:10 AM (in response to davsclaus)Thanks fo the reply.
1
4 <to uri="cache:cache key ?"/>
5 </route>
As above, i need to route from xslt to a cache. How to define cache in a apt way. ( still how to create & syntax ). Also defining ADD for the same.
Help out by modifying the above code. (Line 4 )
-
5. Re: Ehcache on Fuse ESB
davsclaus Aug 3, 2011 5:19 AM (in response to farha)Hi
You need to set these 2 headers as shown:
1
-
6. Re: Ehcache on Fuse ESB
farha Aug 4, 2011 2:13 AM (in response to davsclaus)Hi Dav
I think , both the headers have to be embedded into ' To Uri tag '. Since how both the headers are linked with it.
By the way it doesn't worked. Since the bundle is still in failure.
FYI: I am using SMX4 and Deploying using Camel-Blueprint.
Help out.
Farha
-
7. Re: Ehcache on Fuse ESB
davsclaus Aug 4, 2011 3:24 AM (in response to farha)You have installed the camel-cache feature right? That must be installed first.
This can be done from the shell using the following command:
features:install camel-cache
-
8. Re: Ehcache on Fuse ESB
farha Aug 4, 2011 3:27 AM (in response to davsclaus)Yeah I have done that. And it's active.
-
9. Re: Ehcache on Fuse ESB
davsclaus Aug 4, 2011 3:34 AM (in response to farha)Do you see any errors/stacktraces or the likes from the log? I assume when you say failure its your Camel bundle that is in failed state?
-
-
11. Re: Ehcache on Fuse ESB
davsclaus Aug 4, 2011 6:45 AM (in response to farha)The log file is in the data/log directory and named servicemix.log.
You may take a look in that log file to look for any kind of failure/error.
In the shell there is a log command you can use as well.
log:display
log:display-exception
As well as a log:tail (in one of the latest releases)
I suggest to check that servicemix.log and see if there is any hint why your application is in failure state.
-
12. Re: Ehcache on Fuse ESB
farha Aug 5, 2011 12:56 AM (in response to davsclaus)In the log I am getting this error. How to resolve it?
10:20:07,160 | ERROR | rint Extender: 2 | BlueprintContainerImpl | ? ? | 10
- org.apache.aries.blueprint - 0.3.1 | Unable to start blueprint container for bundle sample.xml
org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to intialize bean camel-10
at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:638)[10:org.apache.aries.blue
print:0.3.1]
at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:724)[10:org.apache.aries.bluep
rint:0.3.1]
at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:64)[10:org.apache.aries.blueprint:0.3
.1]
at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:219)[10:org
.apache.aries.blueprint:0.3.1]
at org.apache.aries.blueprint.container.BlueprintRepository.createInstance(BlueprintRepository.java:198)[10:org.
apache.aries.blueprint:0.3.1]
at org.apache.aries.blueprint.container.BlueprintRepository.create(BlueprintRepository.java:137)[10:org.apache.a
ries.blueprint:0.3.1]
at org.apache.aries.blueprint.container.BlueprintContainerImpl.getComponentInstance(BlueprintContainerImpl.java:
718)[10:org.apache.aries.blueprint:0.3.1]
at org.apache.camel.blueprint.handler.CamelNamespaceHandler$CamelDependenciesFinder.process(CamelNamespaceHandle
r.java:499)[221:org.apache.camel.camel-blueprint:2.7.1.fuse-00-27]
at org.apache.aries.blueprint.container.BlueprintContainerImpl.processProcessors(BlueprintContainerImpl.java:495
)[10:org.apache.aries.blueprint:0.3.1]
at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:314)[10:org.apa
che.aries.blueprint:0.3.1]
at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:227)[10:org.apach
e.aries.blueprint:0.3.1]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)[:1.6.0-rc]
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)[:1.6.0-rc]
at java.util.concurrent.FutureTask.run(Unknown Source)[:1.6.0-rc]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)[:1.6.0-rc]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)[:1.6.0-rc]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)[:1.6.0-rc]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)[:1.6.0-rc]
at java.lang.Thread.run(Unknown Source)[:1.6.0-rc]
Caused by: org.apache.camel.FailedToCreateProducerException: Failed to create Producer for endpoint: Endpoint[cache://my
Cache]. Reason: java.lang.ClassCastException: net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory cannot be c
ast to net.sf.ehcache.distribution.CacheManagerPeerListenerFactory
at org.apache.camel.impl.ProducerCache.doGetProducer(ProducerCache.java:362)
at org.apache.camel.impl.ProducerCache.acquireProducer(ProducerCache.java:93)
at org.apache.camel.impl.ProducerCache.startProducer(ProducerCache.java:124)
at org.apache.camel.processor.SendProcessor.doStart(SendProcessor.java:146)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54)
at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:60)
at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:74)
at org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:77)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54)
at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:60)
at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:74)
at org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:77)
at org.apache.camel.processor.interceptor.TraceInterceptor.doStart(TraceInterceptor.java:434)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54)
at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:60)
at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:74)
at org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:77)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54)
at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:60)
at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:74)
at org.apache.camel.processor.RedeliveryErrorHandler.doStart(RedeliveryErrorHandler.java:891)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54)
at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:60)
at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:74)
at org.apache.camel.processor.DefaultChannel.doStart(DefaultChannel.java:146)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54)
at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:60)
at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:86)
at org.apache.camel.processor.MulticastProcessor.doStart(MulticastProcessor.java:938)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54)
at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:60)
at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:74)
at org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:77)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54)
at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:60)
at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:74)
at org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:77)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54)
at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:60)
at org.apache.camel.impl.RouteService.startChildService(RouteService.java:250)
at org.apache.camel.impl.RouteService.warmUp(RouteService.java:146)
at org.apache.camel.impl.DefaultCamelContext.doWarmUpRoutes(DefaultCamelContext.java:1839)
at org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:1765)
at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:1555)
at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1447)
at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1338)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54)
at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1316)
at org.apache.camel.blueprint.BlueprintCamelContext.maybeStart(BlueprintCamelContext.java:78)
at org.apache.camel.blueprint.BlueprintCamelContext.init(BlueprintCamelContext.java:73)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.6.0-rc]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)[:1.6.0-rc]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)[:1.6.0-rc]
at java.lang.reflect.Method.invoke(Unknown Source)[:1.6.0-rc]
at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:226)[10:org.apache.aries.bluepri
nt:0.3.1]
at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:824)[10:org.apache.aries.blueprint:0.3
.1]
at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:636)[10:org.apache.aries.blue
print:0.3.1]
... 18 more
Caused by: java.lang.ClassCastException: net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory cannot be cast t
o net.sf.ehcache.distribution.CacheManagerPeerListenerFactory
at net.sf.ehcache.config.ConfigurationHelper.createCachePeerListeners(ConfigurationHelper.java:159)[ehcache-core
-2.4.3.jar:]
at net.sf.ehcache.CacheManager.configure(CacheManager.java:542)[ehcache-core-2.4.3.jar:]
at net.sf.ehcache.CacheManager.init(CacheManager.java:324)[ehcache-core-2.4.3.jar:]
at net.sf.ehcache.CacheManager.(CacheManager.java:270)[ehcache-core-2.4.3.jar:]
at net.sf.ehcache.CacheManager.create(CacheManager.java:750)[ehcache-core-2.4.3.jar:]
at org.apache.camel.component.cache.DefaultCacheManagerFactory.createCacheManagerInstance(DefaultCacheManagerFac
tory.java:25)
at org.apache.camel.component.cache.CacheManagerFactory.instantiateCacheManager(CacheManagerFactory.java:27)
at org.apache.camel.component.cache.CacheProducer.doStart(CacheProducer.java:47)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54)
at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:60)
at org.apache.camel.impl.ProducerCache.doGetProducer(ProducerCache.java:360)
... 84 more
-
13. Re: Ehcache on Fuse ESB
davsclaus Aug 5, 2011 3:51 AM (in response to farha)It seems you are using EHCache 2.4.3. Did you install that by yourself?
EHCache is not osgi compliant out of the box. And you need to use the OSGi bundles from this repo
http://repo2.maven.org/maven2/org/apache/servicemix/bundles/org.apache.servicemix.bundles.ehcache/
A new bundle for EHCache 2.4.3 is on the way.
I suggest to use the default installation from Fuse ESB as its tested and certified to be working together.
-
14. Re: Ehcache on Fuse ESB
farha Aug 5, 2011 6:24 AM (in response to davsclaus)I have done the default installation only using
feature:install camel-cache