Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7666647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T14:53:10+00:00 2026-05-31T14:53:10+00:00

I am deploying a Spring Roo application on Websphere and I need to implement

  • 0

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:

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) 
 at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
 at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1335)
 at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1325)
 at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)
 at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:93)
 at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)
 at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)
 at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
 at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
 at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
 at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
 at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
 at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)
 at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:93)
 at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)
 at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467)
 at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:397)
 at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
 at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
 at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
 at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1708)
 at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.java:381)
 at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:299)
 ...

I believe the problem is security settings for the application. (Or the absence 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.

My was.policy file:

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;
};

Question:

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…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T14:53:11+00:00Added an answer on May 31, 2026 at 2:53 pm

    I believe META-INF/was.policy is only supported for EARs, not standalone WARs. Suggestions:

    1. Create an EAR around the WAR and create the file there.
    2. Deploy the WAR as a standalone module, but update the application to add the file after deploying it. While deploying, the product will create an EAR around the WAR. It should be possible to use AdminApp.update with partialapp to do add the single file.
    3. Disable Java 2 security. If you’re granting AllPermission to your application anyway, what’s the point?
    4. Add the permissions to PROFILE_HOME/config/cells/CELL/nodes/NODE/app.policy. This would affect all applications, though.
    5. Add the permissions to PROFILE_HOME/properties/server.policy. This requires hard-coding the path (or setting a system property in the server JVM and using that).
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've just started learning Spring (and Java) and I'm putting together an application that
I am trying to deploy my spring application in a server machine which having
I am currently deploying a Rails application using Capistrano. Cap deploy:update_code usually works just
I'm using Spring and Hibernate in a Java-EE application. The project is hosted at
I'm embedding Jetty in a Spring based application. I configure my Jetty server in
I am deploying my application to Tomcat 6.0.20. Application uses Hibernate as ORM, Spring,
We're deploying an application on a semi-embedded device that has memory constraints. Looking to
I am trying to configure Spring Security in my simple application. Here is my
I'm trying to deploy (Run as->Run on Server) a basic Roo web-app (MVC +
I am developing a Java Web application with Spring MVC and I am having

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.