2014-10-27 100 views
0

我有一個使用騾子的EHCache範圍 .. 我從下面取出的參考騾子應用: - http://ricston.com/blog/cache-scope-ehcache/ 現在,如果你看文章是的註釋部分提到放置的EHCache罐(ehcache的核心-2.6.0.jar)內騾獨立的$ MULE_HOME/lib中/用戶和櫃面騾工作室的這些地方MULE_STUDIO_INSTALL_DIR $ /插件/ org.mule.tooling.server。$版本/ mule/lib/user ...現在我完全按照它所說的..的EHCache騾子在騾子獨立拋出異常

在Mule工作室的應用程序是運行良好沒有任何問題..但如果我嘗試部署在騾子企業3.5.1獨立運行。我得到的異常以下內容: -

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的核心-2.6.5.jar$ MULE_HOME的/ lib目錄/用戶騾子獨立.. 仍然得到例外..請幫助

回答

0

我最終把ehcache的核心-2.6.5.jar在lib文件夾中的項目,然後將其恢復正常運作..但仍然放置獨立的jar文件不起作用