PUBLIC - Liferay Portal Community Edition
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-1378

Context xml file should not be copied to domain1/conf directory when appserver = Glassfish.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 5.1.2, 5.2.2
    • Fix Version/s: 5.2.0, 5.2.3
    • Component/s: None
    • Labels:
      None
    • Branch Version/s:
      5.1.x
    • Backported to Branch:
      Committed
    • Similar Issues:
      Show 5 results 

      Description

      PortletExplodedTomcatListener is being used to support directory deployment through Portal Pack NetBeans Plug-in. By using this feature, instead of war file, the build directory of the project inside NetBeans gets deployed to the appserver. And any changes in the JSP/javascripts are automatically picked up by the glassfish/tomcat appserver without any redeployment.

      PortletExplodedTomcatListener is currently doing the following things

      1. Massage the exploded directory
      2. Then copy context xml to tomcat's conf directory (Which is required for the deployment of portlet app on tomcat)

      But the second step is not required when the appserver type is Glassfish. Currently the copyContextFile() copies the context xml file to Glassfish's domain1/conf directory. Because of that glassfish is throwing exception during every deployment (Though the exception is harmless).

      Fix :

      • In PortletExplodedTomcatListener, don't copy context xml file if the appserver type is glassfish.

        Activity

        Hide
        Brian Chan added a comment -

        Modified the logic to be ServerDetector.isTomcat instead of !ServerDetector.isGlassfish

        Show
        Brian Chan added a comment - Modified the logic to be ServerDetector.isTomcat instead of !ServerDetector.isGlassfish
        Hide
        satyaranjan added a comment -

        The context xml is still getting copied incase of glassfish server. Beacause the server type is returned as "glassfish-tomcat" incase of glassfish container and the check ServerDetector.isTomcat() is true for glassfish also.

        So the if condition should be changed to

        if (ServerDetector.isTomcat() && !ServerDetector.isGlassFish())

        { copyContextFile(file); }
        Show
        satyaranjan added a comment - The context xml is still getting copied incase of glassfish server. Beacause the server type is returned as "glassfish-tomcat" incase of glassfish container and the check ServerDetector.isTomcat() is true for glassfish also. So the if condition should be changed to if (ServerDetector.isTomcat() && !ServerDetector.isGlassFish()) { copyContextFile(file); }

          People

          • Assignee:
            satyaranjan
            Reporter:
            satyaranjan
            Recent user:
            Randy Zhu
            Participants of an Issue:
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Days since last comment:
              6 years, 12 weeks ago

              Development

                Structure Helper Panel