glassfish
  1. glassfish
  2. GLASSFISH-14637

failed to read deployment descriptor when security manager is ON

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: 3.1_dev
    • Component/s: deployment
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      14,637

      Description

      Originally reported as part of issue 14628
      Raising this issue as 14628 might have issues in multiple components.

      Root cause of the issue seems to be due to insufficient privilege for hk2 to
      shutdown the executor service after parsing the deployment descriptor.

      I am not sure whether the fix is needed in Archivist (DOL) or in hk2.

      --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      [#|2010-11-12T14:03:05.938+0530|SEVERE|glassfish3.1|null|_ThreadID=17;_ThreadName=Thread-1;|Caused
      by: java.security.AccessControlException: access denied
      (java.lang.RuntimePermission modifyThread)|#]
      [#|2010-11-12T14:03:05.938+0530|SEVERE|glassfish3.1|null|_ThreadID=17;_ThreadName=Thread-1;|
      at
      java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)|#]
      [#|2010-11-12T14:03:05.938+0530|SEVERE|glassfish3.1|null|_ThreadID=17;_ThreadName=Thread-1;|
      at java.security.AccessController.checkPermission(AccessController.java:546)|#]
      [#|2010-11-12T14:03:05.938+0530|SEVERE|glassfish3.1|null|_ThreadID=17;_ThreadName=Thread-1;|
      at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)|#]
      [#|2010-11-12T14:03:05.938+0530|SEVERE|glassfish3.1|null|_ThreadID=17;_ThreadName=Thread-1;|
      at
      java.util.concurrent.ThreadPoolExecutor.shutdown(ThreadPoolExecutor.java:1094)|#]
      [#|2010-11-12T14:03:05.939+0530|SEVERE|glassfish3.1|null|_ThreadID=17;_ThreadName=Thread-1;|
      at org.glassfish.hk2.classmodel.reflect.Parser.close(Parser.java:211)|#]
      [#|2010-11-12T14:03:05.939+0530|SEVERE|glassfish3.1|null|_ThreadID=17;_ThreadName=Thread-1;|
      at
      org.glassfish.hk2.classmodel.reflect.Parser.awaitTermination(Parser.java:186)|#]
      [#|2010-11-12T14:03:05.939+0530|SEVERE|glassfish3.1|null|_ThreadID=17;_ThreadName=Thread-1;|
      at
      org.glassfish.hk2.classmodel.reflect.Parser.awaitTermination(Parser.java:90)|#]
      [#|2010-11-12T14:03:05.939+0530|SEVERE|glassfish3.1|null|_ThreadID=17;_ThreadName=Thread-1;|
      at
      com.sun.enterprise.deployment.annotation.impl.ModuleScanner.calculateResults(ModuleScanner.java:143)|#]
      [#|2010-11-12T14:03:05.939+0530|SEVERE|glassfish3.1|null|_ThreadID=17;_ThreadName=Thread-1;|
      at
      com.sun.enterprise.deployment.annotation.impl.ModuleScanner.process(ModuleScanner.java:123)|#]
      [#|2010-11-12T14:03:05.939+0530|SEVERE|glassfish3.1|null|_ThreadID=17;_ThreadName=Thread-1;|
      at
      com.sun.enterprise.deployment.archivist.Archivist.processAnnotations(Archivist.java:552)|#]
      [#|2010-11-12T14:03:05.940+0530|SEVERE|glassfish3.1|null|_ThreadID=17;_ThreadName=Thread-1;|
      at
      com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:440)|#]
      [#|2010-11-12T14:03:05.940+0530|SEVERE|glassfish3.1|null|_ThreadID=17;_ThreadName=Thread-1;|
      at
      com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:427)|#]
      [#|2010-11-12T14:03:05.940+0530|SEVERE|glassfish3.1|null|_ThreadID=17;_ThreadName=Thread-1;|
      at
      com.sun.enterprise.deployment.archivist.Archivist.readRestDeploymentDescriptors(Archivist.java:403)|#]
      [#|2010-11-12T14:03:05.940+0530|SEVERE|glassfish3.1|null|_ThreadID=17;_ThreadName=Thread-1;|
      at
      com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:378)|#]
      [#|2010-11-12T14:03:05.940+0530|SEVERE|glassfish3.1|null|_ThreadID=17;_ThreadName=Thread-1;|
      at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:243)|#]
      [#|2010-11-12T14:03:05.940+0530|SEVERE|glassfish3.1|null|_ThreadID=17;_ThreadName=Thread-1;|
      at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:252)|#]
      [#|2010-11-12T14:03:05.941+0530|SEVERE|glassfish3.1|null|_ThreadID=17;_ThreadName=Thread-1;|
      at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:213)|#]
      [#|2010-11-12T14:03:05.941+0530|SEVERE|glassfish3.1|null|_ThreadID=17;_ThreadName=Thread-1;|
      at
      com.sun.enterprise.connectors.util.ConnectorDDTransformUtils.getConnectorDescriptor(ConnectorDDTransformUtils.java:210)|#]
      --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

      • Test case to reproduce :
        appserv-tests/devtests/jdbc/statementwrapper
      • NOTE : enable security manager
        asadmin create-jvm-options -Djava.security.manager
        restart the server.

        Issue Links

          Activity

          Hide
          Jagadish added a comment -

          Created an attachment (id=5436)
          server.log showing exceptions when executing jdbc-dev-test

          Show
          Jagadish added a comment - Created an attachment (id=5436) server.log showing exceptions when executing jdbc-dev-test
          Hide
          Hong Zhang added a comment -

          will discuss with jerome about this

          Show
          Hong Zhang added a comment - will discuss with jerome about this
          Hide
          Hong Zhang added a comment -

          For any DOL parsing triggered outside of the normal deployment code path,
          create an executor service in DOL and use that to construct parser for
          annotation scanning so HK2 code does not need to shut it down.

          Show
          Hong Zhang added a comment - For any DOL parsing triggered outside of the normal deployment code path, create an executor service in DOL and use that to construct parser for annotation scanning so HK2 code does not need to shut it down.

            People

            • Assignee:
              Hong Zhang
              Reporter:
              Jagadish
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: