首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Mule EHCache在Mule中抛出异常

Mule EHCache在Mule中抛出异常
EN

Stack Overflow用户
提问于 2014-10-27 16:10:58
回答 1查看 253关注 0票数 0

我有一个Mule应用程序,它使用Mule EHCache Scope .我参考了以下内容:- http://ricston.com/blog/cache-scope-ehcache/,现在,如果您查看本文的评论部分,就会提到将EHCache jars (ehcache-core-2.6.0.jar)放置在$ Mule /lib/user中,如果是Mule Studio,则将它们放置到Mule.现在我完全按照它说的做了.

在Mule studio中,应用程序是运行良好的,没有任何问题。但是如果我试图在Mule企业中部署和运行3.5.1独立的..。我得到以下例外:-

代码语言:javascript
复制
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:

现在我把ehcache-core-2.6.5.jar放在$MULE_HOME/lib/user of Mule独立..。仍然有例外..。请帮帮忙

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-07-21 06:25:08

最后,我将ehcache-core-2.6.5.jar放在项目中的lib文件夹中,然后它就像往常一样工作了。但是仍然把相同的jar文件放在独立的

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/26591887

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档