Gigaspaces, Tomcat, and Policy Files

Hello,

I have configured our web application to use gigaspaces, but get the following on Tomcat startup:

{code}SEVERE: Failed to set Java Security Manager. Please verify the java.security.policy system property is set. java.security.AccessControlException: access denied (java.io.FilePermission C:\java\apps\eclipse_workspace\MyApp\build\MyApp\WEB-INF\classes\policy\gigaspaces.policy read) at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264) at java.security.AccessController.checkPermission(AccessController.java:427) at java.lang.SecurityManager.checkPermission(SecurityManager.java:532) at java.lang.SecurityManager.checkRead(SecurityManager.java:871) at java.io.File.exists(File.java:700) at org.apache.naming.resources.FileDirContext.file(FileDirContext.java:826) at org.apache.naming.resources.FileDirContext.lookup(FileDirContext.java:208) at org.apache.naming.resources.ProxyDirContext.lookup(ProxyDirContext.java:287) at org.apache.catalina.loader.WebappClassLoader.findResourceInternal(WebappClassLoader.java:1707) at org.apache.catalina.loader.WebappClassLoader.findResource(WebappClassLoader.java:920) at org.apache.catalina.loader.WebappClassLoader.getResource(WebappClassLoader.java:1054) at com.j_spaces.obf.ey.a(SourceFile:53) at com.j_spaces.core.client.SpaceFinder.a(SourceFile:422) at com.j_spaces.core.client.SpaceFinder.prepareUrl(SourceFile:278) at com.j_spaces.core.client.SpaceFinder.find(SourceFile:179) at org.springmodules.javaspaces.gigaspaces.GigaSpacesFactoryBean.createSpace(GigaSpacesFactoryBean.java:50) at org.springmodules.javaspaces.AbstractJavaSpaceFactoryBean.afterPropertiesSet(AbstractJavaSpaceFactoryBean.java:68) at org.springmodules.javaspaces.gigaspaces.GigaSpacesFactoryBean.afterPropertiesSet(GigaSpacesFactoryBean.java:88) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1091) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:396) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:233) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:145) at org.springframework.beans.factory.support.AbstractBeanFactory.getType(AbstractBeanFactory.java:352) at org.springframework.beans.factory.support.DefaultListableBeanFactory.isBeanTypeMatch(DefaultListableBeanFactory.java:257) at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:152) at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:206) at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:200) at org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:205) at org.springframework.beans.factory.support.DefaultListableBeanFactory.findMatchingBeans(DefaultListableBeanFactory.java:366) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:916) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:850) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:378) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:233) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:145) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:283) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:313) at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:139) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:252) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:190) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49) at foo.web.listener.StartupListener.contextInitialized(StartupListener.java:85) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4343) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595) at org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:903) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216) at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256) at org.apache.commons.digester.Rule.end(Rule.java:276) at org.apache.commons.digester.Digester.endElement(Digester.java:1058) at org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.java:76) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.commons.digester.Digester.parse(Digester.java:1567) at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:488) at org.apache.catalina.core.StandardHost.install(StandardHost.java:863) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:483) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091) at org.apache.catalina.core.StandardHost.start(StandardHost.java:789) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478) at org.apache.catalina.core.StandardService.start(StandardService.java:480) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313) at org.apache.catalina.startup.Catalina.start(Catalina.java:556) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425) [MyApp] ERROR [main] org.springframework.web.context.ContextLoader.initWebApplicationContext(211) | Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'gigaspace' defined in URL [file:/C:/java/apps/eclipse_workspace/MyApp/build/MyApp/WEB-INF/classes/foo/gigaspaces-expressionExperiment.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: com/j_spaces/obf/em java.lang.NoClassDefFoundError: com/j_spaces/obf/em{code}

I was looking at the policy settings as outlined here:

http://www.gigaspaces.com/wiki/displa...

Do I need any specific settings for tomcat? That is, is there anything in particular that must be set in catalina.policy in $CATALINA_HOME/conf?

Thanks.

{quote}This thread was imported from the previous forum. For your reference, the ... (more)

asked 2007-05-03 17:00:03 -0600

updated 2013-08-08 09:52:00 -0600

jaissefsfex gravatar image
edit retag flag offensive close merge delete