WebSphere Application Server & Liberty

WebSphere Application Server & Liberty

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

AccessControlException with server.xml in Websphere 8.5.5

  • 1.  AccessControlException with server.xml in Websphere 8.5.5

    Posted Mon March 16, 2015 04:19 AM

    Hi,



    I have added xmlparserv2.jar in server.xml and restarted the server. But at start of websphere 8.5.5, I am getting the below error results server is failed to start. When i removed the above jar entry in server.xml file, server is working fine as expected. I just want to know any compatibility issues with this xmlparserV2.jar and WAS version 8.5.5. If don't place the jar file, i am getting application specific error like org.apache.xml.parser ClassNotFoundExceptions.


    I have restarted the server and also mahcine to check any kind of file lock but even after restarts of respective approaches, i am getting this error.


    java.security.AccessControlException: Access denied (java.io.FilePermission C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\config\cells\WIN-COSA3MGR20ONode01Cell\nodes\WIN-COSA3MGR20ONode01\servers\server1\server.xml read) at java.security.AccessController.throwACE(AccessController.java:100)


    at java.security.AccessController.checkPermission(AccessController.java:174)


    at java.lang.SecurityManager.checkPermission(SecurityManager.java:544)


    at java.lang.SecurityManager.checkRead(SecurityManager.java:883)


    at java.io.File.isDirectory(File.java:763)


    at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:77)


    at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:173) at java.net.URL.openStream(URL.java:1022)


    at oracle.xml.parser.v2.XMLReader.openURL(XMLReader.java:2078)


    Code where i suspect getting the error :


    public static Document validateXMLSchema(Reader in) throws XMLParseException, Exception

    {

    DOMParser dp = new DOMParser();

    dp.setValidationMode(3);

    dp.setPreserveWhitespace(true);

    dp.parse(in);

    return dp.getDocument();

    }



  • 2.  AccessControlException with server.xml in Websphere 8.5.5

    Posted Tue March 17, 2015 09:11 AM
    Hi Naresh,

      Have you checked the jar file (xmlparserV2.jar) permissions?

      Take in mind the user who edit the file and the user who start the server.

      Hope this helps. Tell us if you need more support.
     
    Regards