[ 
https://issues.apache.org/jira/browse/CAMEL-10681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15813825#comment-15813825
 ] 

Sumit Kumar commented on CAMEL-10681:
-------------------------------------

It worked with your suggestion. I had removed the caching code earlier, so i 
just tested with a basic route as below:

from("ehcache://fileProfilesCachePrimary?configUri=classpath:ehcache/ehcache-config.xml&keyType=java.lang.String").log("Cache
 Loaded...") ;

On Starting the app, below comes successfully in the console: 

2017-01-09 20:17:13,668 [t.Server.main()] INFO  SpringCamelContext             
- Route: route7 started and consuming from: 
ehcache://fileProfilesCachePrimary?configUri=classpath%3Aehcache%2Fehcache-config.xml&keyType=java.lang.String


> camel-ehcache - configUri does not work appropriately 
> ------------------------------------------------------
>
>                 Key: CAMEL-10681
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10681
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-ehcache
>    Affects Versions: 2.18.1
>            Reporter: Sumit Kumar
>            Assignee: Luca Burgazzoli
>            Priority: Minor
>             Fix For: 2.19.0
>
>         Attachments: ehcache-config.xml
>
>
> camel-ehcache component fail to initialize cache for the provided value of 
> configUri.
> Different option to setup the configUri were attempted, but everytime it 
> gives the error
> Caused by: java.lang.IllegalArgumentException: CacheConfiguration must be 
> specified 
>         at org.apache.camel.util.ObjectHelper.notNull(ObjectHelper.java:308) 
>         at 
> org.apache.camel.component.ehcache.EhcacheConfiguration.getMandatoryConfiguration(EhcacheConfiguration.java:243)
>  
>         at 
> org.apache.camel.component.ehcache.EhcacheManager.getCache(EhcacheManager.java:72)
>  
>         at 
> org.apache.camel.component.ehcache.EhcacheManager.getCache(EhcacheManager.java:88)
>  
> As per documentation, the configuration option is "The default cache 
> configuration to be used to create caches if configUri is not set".
> So if i am setting up configUri than the error for configuration should not 
> come.
> The approaches attempted for configUri are documented in the camel user forum 
> at the below link
> http://camel.465427.n5.nabble.com/Camel-EhCache-2-18-1-Exception-during-initialization-td5792164.html



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to