Jetty
  1. Jetty
  2. JETTY-1096

provide an option to exclude jetty/maven/plexus from the parent class loader when running web apps via "mvn jetty:run"

    Details

    • Type: Improvement Improvement
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 6.1.16
    • Fix Version/s: 6.1.26
    • Component/s: Maven
    • Labels:
      None
    • Number of attachments :
      0

      Description

      I've severe pain when using plexus/maven in a web app as the plugin creates a class loader where the WebAppClassLoader's parent class loader includes maven/plexus etc. Any chance of an option to disable this behaviour?

        Issue Links

          Activity

          Hide
          Jan Bartel added a comment -

          Hi James,

          We mark the org.apache.maven.* and org.codehaus.plexus.* packages for the webapp's classloader in such a way as to allow the webapp to provide their own copies of them to fix a previous bug report with interference from the parent classloader, here's the reference to it: http://jira.codehaus.org/browse/JETTY-463 .

          I think that patch should have been applied for jetty-6.1.16, but it might be worth while trying the latest and greatest 6.1.20 anyway.

          If you get no joy, then I guess there must be some classes that are being loaded by the parent loader that the child loader is trying to access. Can you attach an example stack trace for me and/or a little webapp that has some plexus or maven dependencies that show up the problem?

          BTW I don't suppose you happen to have set parentLoaderPriority=true for the webapp?

          ta muchly,
          Jan

          Show
          Jan Bartel added a comment - Hi James, We mark the org.apache.maven.* and org.codehaus.plexus.* packages for the webapp's classloader in such a way as to allow the webapp to provide their own copies of them to fix a previous bug report with interference from the parent classloader, here's the reference to it: http://jira.codehaus.org/browse/JETTY-463 . I think that patch should have been applied for jetty-6.1.16, but it might be worth while trying the latest and greatest 6.1.20 anyway. If you get no joy, then I guess there must be some classes that are being loaded by the parent loader that the child loader is trying to access. Can you attach an example stack trace for me and/or a little webapp that has some plexus or maven dependencies that show up the problem? BTW I don't suppose you happen to have set parentLoaderPriority=true for the webapp? ta muchly, Jan
          Hide
          Jan Bartel added a comment -

          James - any more info?

          Show
          Jan Bartel added a comment - James - any more info?
          Hide
          Jan Bartel added a comment -

          James,

          We thought we had fixed this back in JETTY-463, but I just discovered a problem with the patch, which meant it wasn't working.

          So this is really fixed in 6.1.26 and svn r6184.

          Show
          Jan Bartel added a comment - James, We thought we had fixed this back in JETTY-463 , but I just discovered a problem with the patch, which meant it wasn't working. So this is really fixed in 6.1.26 and svn r6184.
          Hide
          Jan Bartel added a comment -

          Also fixed in jetty-7 and jetty-8

          Show
          Jan Bartel added a comment - Also fixed in jetty-7 and jetty-8

            People

            • Assignee:
              Jan Bartel
              Reporter:
              james strachan
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: