Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

AccessControlException

0 views
Skip to first unread message

skeng

unread,
Feb 7, 2005, 3:38:50 AM2/7/05
to
I'm writing an RMI. I've tested my server & client program using WSAD.
it works perfectly.
However, after i deployed it to the WebSphere server, it gives me the
following error when i start server1 (my rmi server code is embeded in
the web-project, i register the rmi when the server start up)

[2/7/05 12:43:15:975 SGT] 73eb2 StartupServle E
com.cv.tibs.web.utils.StartupServlet
java.security.AccessControlException: access denied
(java.net.SocketPermission 127.0.0.1:1204 connect,resolve)

***************************
and when i try to access the admin console it gives me the following
error:

[2/7/05 12:54:31:082 SGT] 6df123 WebGroup I SRVE0181I:
[adminconsole] [/admin] [Servlet.LOG]: action: Error creating Action
instance for path '/logoff', class name
'com.ibm.ws.console.core.action.LogoffAction':
java.security.AccessControlException: access denied
(java.lang.RuntimePermission getClassLoader)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:267)
at java.security.AccessController.checkPermission(AccessController.java:394)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:540)
at java.lang.Thread.getContextClassLoader(Thread.java:1109)
at org.apache.struts.action.ActionServlet.processActionCreate(ActionServlet.java:1631)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1577)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)

*************
it ends up that i need to uninstall the project using commandline so
that i can use server1. the following are my rmi server code

if (System.getSecurityManager() == null) {
System.setSecurityManager(new RMISecurityManager());
}
LocateRegistry.createRegistry(1124);
// Create an instance
FpxService svr = new FpxService();
try {
// ... and bind it with the RMI Registry
Naming.rebind ("rmi://localhost:1124/tibs/fpx", svr);
} catch (java.rmi.RemoteException e) {
logger.error("Cannot create remote server object", e);
} catch (java.net.MalformedURLException e) {
logger.error("Cannot look up server object", e);
}

and i've tried using both my own policy file, and also modified
client.policy

grant{
permission java.net.SocketPermission "localhost:1124-", "connect,
resolve";
permission java.net.SocketPermission "localhost:1124-", "accept,
resolve";
};

what is not right?

0 new messages