JavaSpace exception on ServiceRegistrar call

橙三吉。 提交于 2020-01-05 05:53:12

问题


i have today a one problem with Java development for GigaSpaces. My web-application under tomcat brings me such failure

2013-08-15 10:13:29,217 [JavaSpaceFactory.java:57] INFO - JavaSpaceFactory#getSpace java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:4174 connect,resolve) jini://localhost:4174 with localhost:4174 2013-08-15 10:13:29,218 [JavaSpaceFactory.java:59] ERROR - java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:4174 connect,resolve)

This occurs by the call on the line ServiceRegistrar sr = locator.getRegistrar();

        jSpaceURL = CommandServiceImpl.getConfigProperty("jSpace.URL"); // jSpace.URL    = jini://localhost:4174
        LookupLocator locator = new LookupLocator(jSpaceURL);
        host = locator.getHost();
        port = locator.getPort();
        logger.info("lookup service jini://" + host + ":" + port);
        ServiceRegistrar sr = locator.getRegistrar(); (!!!!!!!!!!!!!!!!!!!!   Here is Exception java.net.SocketPermission 127.0.0.1:4174 connect,resolve  !!!!!!!!!!!!!!!!!!)
        logger.info("registrar is ok");

The tomcat has into $CATALINA_HOME/conf/catalina.policy the entry

grant { ....... permission java.net.SocketPermission "*", "accept, connect, listen, resolve";

...................

};

GigaSpace has into $GIGASPACES_HOME/policy/gigaspaces.policy the entry permission java.net.SocketPermission "*", "listen, resolve, connect, accept";

What could be a case for the such breach?

来源:https://stackoverflow.com/questions/18250689/javaspace-exception-on-serviceregistrar-call

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!