Hi all, When I run the
following piece of code: Properties properties = new Properties(); properties.put("java.naming.provider.url", url); properties.put("java.naming.factory.initial", jndiContextClass); properties.setProperty(Context.SECURITY_PRINCIPAL,
"administrator"); properties.setProperty(Context.SECURITY_CREDENTIALS,
"administrator"); Context context = new InitialContext(properties); PromotionInfoManagerHome promotionInfoManagerHome
= (PromotionInfoManagerHome) context.lookup("PromotionInfoManager"); PromotionInfoManager promotionInfoManager
= promotionInfoManagerHome.create(); PromotionProgramValue promotionProgramValue
= new PromotionProgramValue("test", "test", "published",
null, false); promotionInfoManager.createPromotionProgram(promotionProgramValue); I get the
following exception: java.rmi.ServerException: RemoteException
occurred in server thread; nested exception is: java.rmi.ServerException: EJBException:; nested exception is: javax.ejb.EJBException: checkSecurityAssociation;
CausedByException is: Insufficient
method permissions, principal=null, method=createPromotionProgram,
interface=REMOTE, requiredRoles=[Administrator,
SystemUser], principalRoles=[] … Although the
account I used above (username=administrator, password=administrator, and its
role is “Administrator”) is a valid account, when I use that account to login
from my web server, and then call the method of the bean above, everything is OK.
Please tell me what the problem is. Thanks and regards Quan |
- Re: [JBoss-user] Insufficient method permissions Pham Thanh Quan
- Re: [JBoss-user] Insufficient method permissions Scott M Stark
- RE: [JBoss-user] Insufficient method permissions Pham Thanh Quan