我今天遇到了GigaSpaces Java开发的一个问题。我在tomcat下的web应用程序给我带来了这样的失败
2013-08-15 10:13:29,217 [JavaSpaceFactory.java:57] INFO - JavaSpaceFactory #getSpace java.security.AccessControlException:访问被拒绝(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]错误 - java.security.AccessControlException:访问被拒绝(java.net.SocketPermission 127.0.0.1:4174 connect,resolve)
这可以通过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");
tomcat已进入$ CATALINA_HOME / conf / catalina.policy条目
授予{ ....... permission java.net.SocketPermission“*”,“accept,connect,listen,resolve”;
...................
};
GigaSpace已进入$ GIGASPACES_HOME / policy / gigaspaces.policy条目权限java.net.SocketPermission“*”,“listen,resolve,connect,accept”;
这种违规可能是什么情况?