Hi all,
I am deploying a Spring Roo application on Websphere and I need to implement Java 2 Security in that application. When I enable the Java 2 security on the server and deploy the application, it gives me this error:
I believe the problem is security settings for the application. (Or the absense of them.) Normally, Websphere expects a was.policy file to be included in the EAR, which defines these settings. However, because I am deploying a WAR - there is no apparent way to supply that file. If I drop it into either of the two META-INF directories in my application - the error is the same. As if, Websphere was not finding the was.policy file.Code:Error Message: javax.servlet.ServletException: SRVE0207E: Uncaught initialization exception created by servlet Error Code: 500 Target Servlet: MyApplication Error Stack: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [C:\Program Files\IBM\WebSphere 7.0\AppServer\profiles\AppSrv01\installedApps\antonNode01Cell\MyApplication-1_0_30_BUILD-SNAPSHOT_war.ear\MyApplication-1.0.30.BUILD-SNAPSHOT.war\WEB-INF\classes\com\transoftinc\vlm\myapp\annotations\CSV.class]; nested exception is java.security.AccessControlException: Access denied (java.lang.RuntimePermission accessDeclaredMembers) at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:237) at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:204) at org.springframework.context.annotation.ComponentScanBeanDefinitionParser.parse(ComponentScanBeanDefinitionParser.java:84) ...
My was.policy file:
My question for you, dear community, is this:Code:grant codeBase "file:${application}" { permission java.lang.RuntimePermission "accessDeclaredMembers"; permission java.security.AllPermission; }; grant codeBase "file:${jars}" { permission java.security.AllPermission; }; grant codeBase "file:${connectorComponent}" { permission java.security.AllPermission; }; grant codeBase "file:${webComponent}" { permission java.security.AllPermission; }; grant codeBase "file:${ejbComponent}" { permission java.security.AllPermission; };
How can I define security settings for my application?
And really, my goal is just to give all permissions and move on. I hope this is possible somehow...
Thank you!


Reply With Quote