参考:
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.express.doc/info/exp/ae/rsec_serverpolicy.html
错误信息(在Systemout.Log文件中)
java.security.AccessControlException: Access denied (java.io.FilePermission
解决方法
修改
server.policy 文件,在
install_root/properties/server.policy 中找到此文件。此文件包含这些缺省许可权:
// Allow to use ibm jdk extensions
grant codeBase "file:${was.install.root}/java/ext/-" {
permission java.security.AllPermission;
};
// Allow to use ibm tools
grant codeBase "file:${was.install.root}/java/tools/ibmtools.jar" {
permission java.security.AllPermission;
};
// Allow to use sun tools
grant codeBase "file:/QIBM/ProdData/Java400/jdk14/lib/tools.jar" {
permission java.security.AllPermission;
};
// Allow to use sun tools (V5R2M0 codebase)
grant codeBase "file:/QIBM/ProdData/OS400/Java400/jdk/lib/tools.jar" {
permission java.security.AllPermission;
};
// WebSphere system classes
grant codeBase "file:${was.install.root}/plugins/-" {
permission java.security.AllPermission;
};
grant codeBase "file:${was.install.root}/lib/-" {
permission java.security.AllPermission;
};
grant codeBase "file:${was.install.root}/classes/-" {
permission java.security.AllPermission;
};
// Allow the WebSphere deploy tool all permissions
grant codeBase "file:${was.install.root}/deploytool/-" {
permission java.security.AllPermission;
};
// Allow the WebSphere deploy tool all permissions
grant codeBase "file:${was.install.root}/optionalLibraries/-" {
permission java.security.AllPermission;
};
// Allow Channel Framework classes all permission
grant codeBase "file:${was.install.root}/installedChannels/-" {
permission java.security.AllPermission;
};
grant codeBase "file:${user.install.root}/lib/-" {
permission java.security.AllPermission;
};
grant codeBase "file:${user.install.root}/classes/-" {
permission java.security.AllPermission;
};
如果节点上有一些服务器程序需要许可权,而这些许可权在 server.policy 文件和 server.policy 文件中未定义为缺省值,那么更新 server.policy 文件。缺少许可权将创建 java.security.AccessControlException 异常。缺少的许可权在异常数据中列示。
然后重新启动服务器