Reputation: 8311
I have a Mule application that uses Mule EHCache Scope .. I have taken reference from the following :- http://ricston.com/blog/cache-scope-ehcache/ Now if you look at the comment section of the article it is mentioned to place the EHCache jars (ehcache-core-2.6.0.jar) inside $MULE_HOME/lib/user of Mule Standalone and incase of Mule Studio place them to $MULE_STUDIO_INSTALL_DIR/plugins/org.mule.tooling.server.$version/mule/lib/user ... Now I have followed exactly what it said..
In Mule studio the application is running fine without any issue .. But if I try to deploy and run in Mule enterprise 3.5.1 Standalone .. I get following exception :-
org.mule.module.launcher.DeploymentInitException: Error: Unresolved compilation problems:
The import net.sf.ehcache cannot be resolved
The import net.sf.ehcache cannot be resolved
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
Element cannot be resolved to a type
Element cannot be resolved to a type
Ehcache cannot be resolved to a type
Element cannot be resolved to a type
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
at org.mule.module.launcher.application.DefaultMuleApplication.init(DefaultMuleApplication.java:181)
at org.mule.module.launcher.artifact.ArtifactWrapper$2.execute(ArtifactWrapper.java:62)
at org.mule.module.launcher.artifact.ArtifactWrapper.executeWithinArtifactClassLoader(ArtifactWrapper.java:129)
at org.mule.module.launcher.artifact.ArtifactWrapper.init(ArtifactWrapper.java:57)
at org.mule.module.launcher.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:25)
at org.mule.module.launcher.DefaultArchiveDeployer.guardedDeploy(DefaultArchiveDeployer.java:310)
at org.mule.module.launcher.DefaultArchiveDeployer.deployArtifact(DefaultArchiveDeployer.java:330)
at org.mule.module.launcher.DefaultArchiveDeployer.deployExplodedApp(DefaultArchiveDeployer.java:297)
at org.mule.module.launcher.DefaultArchiveDeployer.deployExplodedArtifact(DefaultArchiveDeployer.java:108)
at org.mule.module.launcher.DeploymentDirectoryWatcher.deployExplodedApps(DeploymentDirectoryWatcher.java:290)
at org.mule.module.launcher.DeploymentDirectoryWatcher.start(DeploymentDirectoryWatcher.java:151)
at org.mule.module.launcher.MuleDeploymentService.start(MuleDeploymentService.java:99)
at org.mule.module.launcher.MuleContainer.start(MuleContainer.java:152)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.mule.module.reboot.MuleContainerWrapper.start(MuleContainerWrapper.java:52)
at org.tanukisoftware.wrapper.WrapperManager$11.run(WrapperManager.java:4048)
Caused by: org.mule.api.config.ConfigurationException: Error creating bean with name 'cachingStrategy': Cannot create inner bean '(inner bean)' of type [com.anirban.EHCat
ban.EHCatche.EhcacheObjectStore]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problems:
The import net.sf.ehcache cannot be resolved
The import net.sf.ehcache cannot be resolved
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
Element cannot be resolved to a type
Element cannot be resolved to a type
Ehcache cannot be resolved to a type
Element cannot be resolved to a type
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
(org.mule.api.lifecycle.InitialisationException) (org.mule.api.config.ConfigurationException)
at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:49)
at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:69)
at org.mule.context.DefaultMuleContextFactory$1.configure(DefaultMuleContextFactory.java:84)
at org.mule.context.DefaultMuleContextFactory.doCreateMuleContext(DefaultMuleContextFactory.java:217)
at org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:76)
at org.mule.module.launcher.application.DefaultMuleApplication.init(DefaultMuleApplication.java:174)
... 18 more
Caused by: org.mule.api.config.ConfigurationException: Error creating bean with name 'cachingStrategy': Cannot create inner bean '(inner bean)' of type [com.anirban.EHCat
ban.EHCatche.EhcacheObjectStore]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problems:
The import net.sf.ehcache cannot be resolved
The import net.sf.ehcache cannot be resolved
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
Element cannot be resolved to a type
Element cannot be resolved to a type
Ehcache cannot be resolved to a type
Element cannot be resolved to a type
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
(org.mule.api.lifecycle.InitialisationException)
at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:49)
at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:69)
at org.mule.config.builders.AutoConfigurationBuilder.autoConfigure(AutoConfigurationBuilder.java:101)
at org.mule.config.builders.AutoConfigurationBuilder.doConfigure(AutoConfigurationBuilder.java:52)
at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:43)
... 23 more
Caused by: org.mule.api.lifecycle.InitialisationException: Error creating bean with name 'cachingStrategy': Cannot create inner bean '(inner bean)' of type [com.anirban.E
anirban.EHCatche.EhcacheObjectStore]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problems:
The import net.sf.ehcache cannot be resolved
The import net.sf.ehcache cannot be resolved
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
Element cannot be resolved to a type
Element cannot be resolved to a type
Ehcache cannot be resolved to a type
Element cannot be resolved to a type
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:113)
at org.mule.config.spring.SpringXmlConfigurationBuilder.createSpringRegistry(SpringXmlConfigurationBuilder.java:135)
at org.mule.config.spring.SpringXmlConfigurationBuilder.doConfigure(SpringXmlConfigurationBuilder.java:90)
at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:43)
... 27 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cachingStrategy': Cannot create inner bean '(inner bean)' of type [com.
ass [com.anirban.EHCatche.EhcacheObjectStore]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problems:
The import net.sf.ehcache cannot be resolved
The import net.sf.ehcache cannot be resolved
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
Element cannot be resolved to a type
Element cannot be resolved to a type
Ehcache cannot be resolved to a type
Element cannot be resolved to a type
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:282)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:126)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1391)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1132)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
at org.mule.config.spring.SpringRegistry.doInitialise(SpringRegistry.java:86)
at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:105)
... 30 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Instantiation of bean failed; nested exception is org.sp
The import net.sf.ehcache cannot be resolved
The import net.sf.ehcache cannot be resolved
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
Element cannot be resolved to a type
Element cannot be resolved to a type
Ehcache cannot be resolved to a type
Element cannot be resolved to a type
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1011)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:957)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:490)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:271)
... 44 more
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.anirban.EHCatche.EhcacheObjectStore]: Constructor threw exception;
The import net.sf.ehcache cannot be resolved
The import net.sf.ehcache cannot be resolved
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
Element cannot be resolved to a type
Element cannot be resolved to a type
Ehcache cannot be resolved to a type
Element cannot be resolved to a type
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:163)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1004)
... 48 more
Caused by: java.lang.Error: Unresolved compilation problems:
The import net.sf.ehcache cannot be resolved
The import net.sf.ehcache cannot be resolved
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
Element cannot be resolved to a type
Element cannot be resolved to a type
Ehcache cannot be resolved to a type
Element cannot be resolved to a type
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
Ehcache cannot be resolved to a type
at com.anirban.EHCatche.EhcacheObjectStore.<init>(EhcacheObjectStore.java:5)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:148)
... 50 more
INFO 2014-10-27 21:30:10,584 [WrapperListener_start_runner] org.mule.module.launcher.DeploymentDirectoryWatcher:
Now I have place the ehcache-core-2.6.5.jar in $MULE_HOME/lib/user of Mule Standalone .. Still getting the exception .. Please help
Upvotes: 0
Views: 260
Reputation: 8311
I ended up putting the ehcache-core-2.6.5.jar in the lib folder in the project and and then it was working as usual .. but still putting the same jar file of standalone doesn't work
Upvotes: 0