我今天在 GigaSpaces 的 Java 开发方面遇到了一个问题。我在tomcat下的网络应用程序给我带来了这样的失败
2013-08-15 10:13:29,217 [JavaSpaceFactory.java:57] 信息 - JavaSpaceFactory#getSpace java.security.AccessControlException: 访问被拒绝 (java.net.SocketPermission 127.0.0.1:4174 connect,resolve) jini://localhost :4174 与 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 条目
grant { ....... 权限 java.net.SocketPermission "*", "accept, connect, listen, resolve";
.....................
};
GigaSpace 有进入 $GIGASPACES_HOME/policy/gigaspaces.policy 的入口权限 java.net.SocketPermission "*", "listen, resolve, connect, accept";
这种违规行为可能是什么情况?