glassfish
  1. glassfish
  2. GLASSFISH-8558

Richaccess Deployment Failure: Error in generating security policy

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Cannot Reproduce
    • Affects Version/s: V3
    • Fix Version/s: V3
    • Component/s: security
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: Sun

    • Issuezilla Id:
      8,558

      Description

      Build 51
      Solaris 10 Sparc U7
      JDK1.6.0_14 B08

      Built Richaccess application using JDK1.6.0_14 B08. During deployment to das,
      encountered the following error. Richaccess is a MDB application.

      /export/home/glassfishv3/glassfish/bin/asadmin deploy --host
      bigapp-niagara-3.red.iplanet.com --port 4848 --user admin --passwordfile
      passwordfile --target server /export/home/richaccess/richAccess.ear
      remote failure: Exception while deploying the app :
      org.glassfish.deployment.common.DeploymentException: Error in generating
      security policy for richAccess – Inconsistent Module State

      Command deploy failed.

      Exception in Server Log:
      *************************
      [#|2009-06-18T14:02:11.239-0700|SEVERE|glassfish|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=16;_ThreadName=Thread-1;|Exception
      while deploying the app
      org.glassfish.deployment.common.DeploymentException: Error in generating
      security policy for richAccess – Inconsistent Module State
      at
      com.sun.enterprise.security.SecurityUtil.linkPolicyFile(SecurityUtil.java:324)
      at
      com.sun.enterprise.security.SecurityDeployer$AppDeployEventListener.event(SecurityDeployer.java:109)
      at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:79)
      at
      com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:277)
      at
      com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:173)
      at
      org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:250)
      at
      com.sun.enterprise.v3.admin.CommandRunnerImpl$4.execute(CommandRunnerImpl.java:419)
      at
      com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:434)
      at
      com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:521)
      at
      com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:137)
      at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:313)
      at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:180)
      at
      com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:165)
      at
      com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
      at
      com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:209)
      at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:746)
      at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:655)
      at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:905)
      at
      com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:161)
      at
      com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:136)
      at
      com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:103)
      at
      com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:89)
      at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
      at
      com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
      at
      com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
      at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
      at
      java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at
      java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:619)

      #]

        Activity

        Hide
        meenap added a comment -

        I just tried the deployment using B50 and it deployed successfully without any
        exceptions. Manual access of application was also successful with B50.

        asadmin deploy --host localhost --port 4848 --user admin --passwordfile
        passwordfile --target server ../richaccess/richAccess.ear

        Command deploy executed successfully.

        [#|2009-06-18T15:12:59.556-0700|INFO|glassfish|javax.enterprise.system.container.ejb.com.sun.ejb.containers|_ThreadID=11;_ThreadName=Thread-1;|Portable
        JNDI names for EJB SFSB :
        [java:global/richAccess/sfsb/SFSB!samples.rmiiiopclient.ejb.SFSBRemoteHomeRef,
        java:global/richAccess/sfsb/SFSB]|#]

        [#|2009-06-18T15:12:59.558-0700|INFO|glassfish|javax.enterprise.system.container.ejb.com.sun.ejb.containers|_ThreadID=11;_ThreadName=Thread-1;|Glassfish-specific
        (Non-portable) JNDI names for EJB SFSB : [ejb/SFSB]|#]

        [#|2009-06-18T15:12:59.593-0700|INFO|glassfish|org.jvnet.hk2.osgiadapter|_ThreadID=11;_ThreadName=Thread-1;org.glassfish.security.websecurity
        [120];|Started bundle org.glassfish.security.websecurity [120]|#]

        [#|2009-06-18T15:12:59.933-0700|INFO|glassfish|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=11;_ThreadName=Thread-1;|Loading
        application richAccess#richAccess.war at /richAccess|#]

        [#|2009-06-18T15:12:59.936-0700|INFO|glassfish|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=11;_ThreadName=Thread-1;|Loading
        richAccess Application done is 25981 ms|#]

        Show
        meenap added a comment - I just tried the deployment using B50 and it deployed successfully without any exceptions. Manual access of application was also successful with B50. asadmin deploy --host localhost --port 4848 --user admin --passwordfile passwordfile --target server ../richaccess/richAccess.ear Command deploy executed successfully. [#|2009-06-18T15:12:59.556-0700|INFO|glassfish|javax.enterprise.system.container.ejb.com.sun.ejb.containers|_ThreadID=11;_ThreadName=Thread-1;|Portable JNDI names for EJB SFSB : [java:global/richAccess/sfsb/SFSB!samples.rmiiiopclient.ejb.SFSBRemoteHomeRef, java:global/richAccess/sfsb/SFSB]|#] [#|2009-06-18T15:12:59.558-0700|INFO|glassfish|javax.enterprise.system.container.ejb.com.sun.ejb.containers|_ThreadID=11;_ThreadName=Thread-1;|Glassfish-specific (Non-portable) JNDI names for EJB SFSB : [ejb/SFSB] |#] [#|2009-06-18T15:12:59.593-0700|INFO|glassfish|org.jvnet.hk2.osgiadapter|_ThreadID=11;_ThreadName=Thread-1;org.glassfish.security.websecurity [120] ;|Started bundle org.glassfish.security.websecurity [120] |#] [#|2009-06-18T15:12:59.933-0700|INFO|glassfish|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=11;_ThreadName=Thread-1;|Loading application richAccess#richAccess.war at /richAccess|#] [#|2009-06-18T15:12:59.936-0700|INFO|glassfish|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=11;_ThreadName=Thread-1;|Loading richAccess Application done is 25981 ms|#]
        Hide
        Nithya Ramakrishnan added a comment -

        Could you please attach the application ear file. We shall examine the issue in
        detail.

        Thanks
        Nithya

        Show
        Nithya Ramakrishnan added a comment - Could you please attach the application ear file. We shall examine the issue in detail. Thanks Nithya
        Hide
        meenap added a comment -

        Created an attachment (id=2905)
        Richaccess ear

        Show
        meenap added a comment - Created an attachment (id=2905) Richaccess ear
        Hide
        Nithya Ramakrishnan added a comment -

        COuld you also provide steps to create the required resources? -
        jms/e2e/richAppTopic and others if any?

        Show
        Nithya Ramakrishnan added a comment - COuld you also provide steps to create the required resources? - jms/e2e/richAppTopic and others if any?
        Hide
        meenap added a comment -

        Here are the commands that need to be executed for this app:

        $asadmin create-file-user --host <hostname> --port 4848 --user admin
        --passwordfile <path_of_passwordfile> --groups user --target <target_name> test

        $asadmin create-jms-resource --host <hostname> --port 4848 --user admin
        --passwordfile <path_of_passwordfile> --target <target_name>
        --restype=javax.jms.TopicConnectionFactory
        --enabled=true jms/e2e/richAppTopicConnectionFactory

        $asadmin create-jms-resource --host <hostname> --port 4848 --user admin
        --passwordfile <path_of_passwordfile> --target <target_name> --enabled=true
        --restype=javax.jms.Topic --enabled=true --property
        imqDestinationName=richAppTopic jms/e2e/richAppTopic

        Deploy the app.

        Show
        meenap added a comment - Here are the commands that need to be executed for this app: $asadmin create-file-user --host <hostname> --port 4848 --user admin --passwordfile <path_of_passwordfile> --groups user --target <target_name> test $asadmin create-jms-resource --host <hostname> --port 4848 --user admin --passwordfile <path_of_passwordfile> --target <target_name> --restype=javax.jms.TopicConnectionFactory --enabled=true jms/e2e/richAppTopicConnectionFactory $asadmin create-jms-resource --host <hostname> --port 4848 --user admin --passwordfile <path_of_passwordfile> --target <target_name> --enabled=true --restype=javax.jms.Topic --enabled=true --property imqDestinationName=richAppTopic jms/e2e/richAppTopic Deploy the app.
        Hide
        meenap added a comment -

        Once you are able to deploy the app successfully, the following are the steps to
        test the app manually:

        1) Access the URL: http://<hostname>:8080/richAccess
        2) Type in username/password as test/test
        3) Select books and click submit
        4) This leads to a successful page.

        Show
        meenap added a comment - Once you are able to deploy the app successfully, the following are the steps to test the app manually: 1) Access the URL: http://<hostname>:8080/richAccess 2) Type in username/password as test/test 3) Select books and click submit 4) This leads to a successful page.
        Hide
        Nithya Ramakrishnan added a comment -

        Followed the steps to create users resources and tried
        deploying/undeploying/redeploying the application. Seems to deploy without any
        issues.

        Show
        Nithya Ramakrishnan added a comment - Followed the steps to create users resources and tried deploying/undeploying/redeploying the application. Seems to deploy without any issues.
        Hide
        meenap added a comment -

        Tried deploying Richaccess using B55 with JDK1.6.0_14, the deployment went
        through fine. Couldn't reproduce the following exception and the application is
        also working as expected. Closing this issue.

        Show
        meenap added a comment - Tried deploying Richaccess using B55 with JDK1.6.0_14, the deployment went through fine. Couldn't reproduce the following exception and the application is also working as expected. Closing this issue.

          People

          • Assignee:
            kumarjayanti
            Reporter:
            meenap
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: