Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.0
    • Fix Version/s: 2.2.0
    • Component/s: Application servers
    • Labels:
      None
    • Environment:
      Jetspeed trunk 772355
      Apache Tomcat 6.0.18

      Description

      Tomcat 6 configuration needs to be adjusted for Jetspeed to start and run properly (where Tomcat 5.5.26 works out of the box). In catalina.properties,

      common.loader=$

      {catalina.home}/lib,${catalina.home}

      /lib/*.jar

      must be changed into

      common.loader=$

      {catalina.home}/lib,${catalina.home}

      /lib/*.jar,$

      {catalina.base}/lib/*.jar,${catalina.base}

      /common/endorsed/*.jar,$

      {catalina.base}

      /shared/lib/*.jar

      Otherwise exceptions occur when starting Tomcat:

      SEVERE: Error deploying configuration descriptor myportal.xml
      java.lang.NoClassDefFoundError: org/apache/jetspeed/security/User

      and

      SEVERE: error stopping
      LifecycleException: Pipeline has not been started

      To reproduce

      • download Tomcat 6.0.18 and unzip – do not touch any configuration files
      • generate a custom portal with the maven archetype
      • edit Jetspeed configuration and set server directory to location of downloaded/unzipped Tomcat 6.0.18
      • build and deploy custom portal (mvn jetspeed:mvn -Dtarget=all)
      • start Tomcat

        Activity

        Niels van Kampenhout created issue -
        David Sean Taylor made changes -
        Field Original Value New Value
        Assignee Randy Watler [ rwatler ]
        Hide
        Ate Douma added a comment -

        Actually, I configure this a little different myself to get it more like Tomcat 5:

        1. unchanged default common.loader
          common.loader=$ {catalina.home}/lib,${catalina.home}

          /lib/*.jar

        1. modified shared.loader (default empty)
          shared.loader=$ {catalina.home}/shared/classes,${catalina.home}

          /shared/lib/*.jar

        Maybe I should be using $

        {catalina.base}

        instead of $

        {catalina.home}

        , but I don't run multiple instances so for me it doesn't make a difference.

        Anyway, I wouldn't consider this a "bug" really.
        Nothing "broken" within Jetspeed for this, except that it just needs a little documentation for the end-user IMO

        Show
        Ate Douma added a comment - Actually, I configure this a little different myself to get it more like Tomcat 5: unchanged default common.loader common.loader=$ {catalina.home}/lib,${catalina.home} /lib/*.jar modified shared.loader (default empty) shared.loader=$ {catalina.home}/shared/classes,${catalina.home} /shared/lib/*.jar Maybe I should be using $ {catalina.base} instead of $ {catalina.home} , but I don't run multiple instances so for me it doesn't make a difference. Anyway, I wouldn't consider this a "bug" really. Nothing "broken" within Jetspeed for this, except that it just needs a little documentation for the end-user IMO
        Hide
        Randy Watler added a comment -

        I am modifying the jetspeed-deploy-maven-plugin mojo to complete the "profile" implementation already in place.

        My plan is to set the <profile/> tag in the build using the old org.apache.jetspeed.catalina.version.major property everyone expects to work.

        Profile will accept "tomcat5", "tomcat5.5", and "tomcat6" settings using the following:

        <profile>tomcat$

        {org.apache.jetspeed.catalina.version.major}

        </profile>

        Should be done later today.

        This will mean that no changes to catalina.properties will be needed for deployment.

        Show
        Randy Watler added a comment - I am modifying the jetspeed-deploy-maven-plugin mojo to complete the "profile" implementation already in place. My plan is to set the <profile/> tag in the build using the old org.apache.jetspeed.catalina.version.major property everyone expects to work. Profile will accept "tomcat5", "tomcat5.5", and "tomcat6" settings using the following: <profile>tomcat$ {org.apache.jetspeed.catalina.version.major} </profile> Should be done later today. This will mean that no changes to catalina.properties will be needed for deployment.
        Hide
        Ate Douma added a comment -

        Sounds cool!

        However, I think we no longer need nor should support Tomcat5.
        Tomcat itself doesn't even list that version any more on their homepage.
        Furthermore, Tomcat5.0.x required a different context file structure, so supporting that needs us maintaining (at least) two different context file definitions as well.

        I actually want to state we can/should only (formally) support Tomcat 5.5.27+ or Tomcat 6.0.18+.

        Why?
        Tomcat 5.5.23 worked fine, but thereafter they broke JAAS support with 5.5.24 and 5.5.25.
        When 5.5.26 came out, it turned out they "flipped" the logic for the Realm useContextClassLoader attribute setting (now needs to be "true" while on 5.5.23 it needed to be "false").
        But 5.5.26 had several other big problems which got eventually fixed with release 5.5.27.
        Version 5.5.27 luckily works fine again.

        Similar problems existed with early Tomcat6, but since version 6.0.18 it actually works very nicely, and the same context file as needed for 5.5.26+ can be used for 6.0.18+ as well.

        Show
        Ate Douma added a comment - Sounds cool! However, I think we no longer need nor should support Tomcat5. Tomcat itself doesn't even list that version any more on their homepage. Furthermore, Tomcat5.0.x required a different context file structure, so supporting that needs us maintaining (at least) two different context file definitions as well. I actually want to state we can/should only (formally) support Tomcat 5.5.27+ or Tomcat 6.0.18+. Why? Tomcat 5.5.23 worked fine, but thereafter they broke JAAS support with 5.5.24 and 5.5.25. When 5.5.26 came out, it turned out they "flipped" the logic for the Realm useContextClassLoader attribute setting (now needs to be "true" while on 5.5.23 it needed to be "false"). But 5.5.26 had several other big problems which got eventually fixed with release 5.5.27. Version 5.5.27 luckily works fine again. Similar problems existed with early Tomcat6, but since version 6.0.18 it actually works very nicely, and the same context file as needed for 5.5.26+ can be used for 6.0.18+ as well.
        Hide
        Randy Watler added a comment -

        Issue resolved by implementing jetspeed-deploy-maven-plugin <profile/> configurations for build and archetypes as was previously done for installer, (installer profile setting is currently hard coded to 'tomcat6').

        To use, set the org.apache.jetspeed.catalina.version.major property to '5' or '6' in your maven2 properties. '6' is the default setting.

        The <profile/> property should be set in all tomcat jetspeed-deploy-maven-plugin build invocations, (pom.xml):

        <plugin>
        <groupId>org.apache.portals.jetspeed-2</groupId>
        <artifactId>jetspeed-deploy-maven-plugin</artifactId>
        <version>$

        {org.apache.portals.jetspeed.version}

        </version>
        <executions>
        <execution>
        ...
        <configuration>
        <targetBaseDir>$

        {org.apache.jetspeed.server.home}

        </targetBaseDir>
        <portalName>$

        {org.apache.jetspeed.portal.context.name}

        </portalName>
        <profile>tomcat$

        {org.apache.jetspeed.catalina.version.major}</profile>
        ...
        </configuration>
        </execution>
        </executions>
        </plugin>
        ...

        Commit revision: 772523

        Relevant overview from jetspeed-deploy-maven-plugin mojo source:

        /**
        * Support only Tomcat 5.5.27+ or Tomcat 6.0.18+. The profile attribute is
        * typically set in the plugin configurations using the following tags:
        *
        * <profile>tomcat${org.apache.jetspeed.catalina.version.major}

        </profile>

        • or
        • <profile>tomcat$ {tomcat.version.major}

          </profile>
          *

        • The supported values for the org.apache.jetspeed.catalina.version.major
        • property are '5', '5.5', and '6'. If unset, the profile value will be
        • 'tomcat' or 'tomcatnull', which will imply the default tomcat support.
          *
        • The supported values for the tomcat.version.major are '5' and '6'.
          *
        • Tomcat 6, ('tomcat6'), support is the default; Tomcat 5, ('tomcat5'), and
        • Tomcat 5.5, ('tomcat5.5'), both map to Tomcat 5.5 which is the minimum
        • Tomcat 5.X version currently supported.
          */
          private static final String PROFILE_TOMCAT = "tomcat";
          private static final String PROFILE_TOMCAT_NULL = "tomcatnull";
          private static final String PROFILE_TOMCAT5 = "tomcat5";
          private static final String PROFILE_TOMCAT55 = "tomcat5.5";
          private static final String PROFILE_TOMCAT6 = "tomcat6";
          private static final String DEFAULT_PROFILE = PROFILE_TOMCAT6;
        Show
        Randy Watler added a comment - Issue resolved by implementing jetspeed-deploy-maven-plugin <profile/> configurations for build and archetypes as was previously done for installer, (installer profile setting is currently hard coded to 'tomcat6'). To use, set the org.apache.jetspeed.catalina.version.major property to '5' or '6' in your maven2 properties. '6' is the default setting. The <profile/> property should be set in all tomcat jetspeed-deploy-maven-plugin build invocations, (pom.xml): <plugin> <groupId>org.apache.portals.jetspeed-2</groupId> <artifactId>jetspeed-deploy-maven-plugin</artifactId> <version>$ {org.apache.portals.jetspeed.version} </version> <executions> <execution> ... <configuration> <targetBaseDir>$ {org.apache.jetspeed.server.home} </targetBaseDir> <portalName>$ {org.apache.jetspeed.portal.context.name} </portalName> <profile>tomcat$ {org.apache.jetspeed.catalina.version.major}</profile> ... </configuration> </execution> </executions> </plugin> ... Commit revision: 772523 Relevant overview from jetspeed-deploy-maven-plugin mojo source: /** * Support only Tomcat 5.5.27+ or Tomcat 6.0.18+. The profile attribute is * typically set in the plugin configurations using the following tags: * * <profile>tomcat${org.apache.jetspeed.catalina.version.major} </profile> or <profile>tomcat$ {tomcat.version.major} </profile> * The supported values for the org.apache.jetspeed.catalina.version.major property are '5', '5.5', and '6'. If unset, the profile value will be 'tomcat' or 'tomcatnull', which will imply the default tomcat support. * The supported values for the tomcat.version.major are '5' and '6'. * Tomcat 6, ('tomcat6'), support is the default; Tomcat 5, ('tomcat5'), and Tomcat 5.5, ('tomcat5.5'), both map to Tomcat 5.5 which is the minimum Tomcat 5.X version currently supported. */ private static final String PROFILE_TOMCAT = "tomcat"; private static final String PROFILE_TOMCAT_NULL = "tomcatnull"; private static final String PROFILE_TOMCAT5 = "tomcat5"; private static final String PROFILE_TOMCAT55 = "tomcat5.5"; private static final String PROFILE_TOMCAT6 = "tomcat6"; private static final String DEFAULT_PROFILE = PROFILE_TOMCAT6;
        Randy Watler made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ate Douma made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Randy Watler
            Reporter:
            Niels van Kampenhout
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development