Cargo
  1. Cargo
  2. CARGO-983

cargo-jetty-7-and-onwards-deployer fails perform remote deploy on jetty-hightide (Jetty@Codehaus)

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.0
    • Fix Version/s: 1.1.4
    • Component/s: Documentation, Jetty
    • Labels:
      None
    • Environment:
      os: windows 7 ultimate x86
      mvn: 3.0.3 (r1075438)
      java: jdk 1.6.0_23
      jetty:7.4.1
      cargo-maven2-plugin: 1.0.1 / 1.1.0
      cargo-jetty-7-and-onwards-deployer: 1.0.6 / 1.1.0 / 1.1.1-20110517.190953-14
    • Complexity:
      Intermediate
    • Tested on JDKs:
      jdk 1.6.0_23
    • Number of attachments :
      7

      Description

      I'm trying to use the cargo-maven2-plugin to perform a remote deploy on a remote jetty container. First I deployed cargo-jetty-7-and-onwards-deployer to jetty (copied the war into JETTY/webapps – it was picked up without errors), but after I issued `mvn cargo:deploy' on my project the following exception is reported in jetty's log:

      2011-05-23 15:19:41.767:WARN::Error for /cargo-jetty-deployer/deploy
      java.lang.NoClassDefFoundError: org/eclipse/jetty/server/handler/ContextHandler
      ...

      I attached an eclipse project (test.zip) which after issuing `mvn cargo:deploy' fails like this. I attached the logs from jetty (2011_05_24.stderrout) and maven (mvnlog) also.

      1. 2011_05_24.stderrout.log
        15 kB
        Kohányi Róbert
      2. 2011_05_26.stderrout.log
        8 kB
        Kohányi Róbert
      3. jetty.xml
        4 kB
        Kohányi Róbert
      4. log
        10 kB
        Kohányi Róbert
      5. mvnlog
        22 kB
        Kohányi Róbert

        Issue Links

          Activity

          Hide
          Savas Ali Tokmen added a comment -

          Hi Kohányi

          Thank you for your analysis. I have no idea what these options do, perhaps someone else who knows more about Jetty can answer?

          One other potential difference between the Jetty started by CARGO and the Jetty that you start manually are the Jetty profiles enabled. Based on http://bamboo.ci.codehaus.org/artifact/CARGO-SAMPLESJETTY8X/JOB1/build-53/Container-logs/jetty8x/remote/RemoteDeploymentTest/testDeployUndeployRedeployWarRemotely/cargo.log I believe CARGO uses OPTIONS=Server,jsp,jmx,resources,websocket,ext

          Does this ring any bell to you?

          Show
          Savas Ali Tokmen added a comment - Hi Kohányi Thank you for your analysis. I have no idea what these options do, perhaps someone else who knows more about Jetty can answer? One other potential difference between the Jetty started by CARGO and the Jetty that you start manually are the Jetty profiles enabled. Based on http://bamboo.ci.codehaus.org/artifact/CARGO-SAMPLESJETTY8X/JOB1/build-53/Container-logs/jetty8x/remote/RemoteDeploymentTest/testDeployUndeployRedeployWarRemotely/cargo.log I believe CARGO uses OPTIONS=Server,jsp,jmx,resources,websocket,ext Does this ring any bell to you?
          Hide
          Kohányi Róbert added a comment - - edited

          OK, I've figured out, the last thing you mentioned, that CARGO uses these:

          OPTIONS=Server,jsp,jmx,resources,websocket,ext
          

          instead of the default (that comes with Jetty's default jetty.ini):

          OPTIONS=Server,jsp,jmx,resources,websocket,ext,plus,annotations
          

          helped a bit.

          This way everything works almost as it should.

          (Also, removing annotations from the OPTIONS requires one to comment out the line (in jetty.ini) that imports etc/jetty-annotations.xml and as a result that annotations aren't used the plus option and the import for etc/jetty-plus.xml also have to be removed.)

          However, this is quite a let down, because this way one can't use Jetty's additional features: like JNDI (me for example ).

          I don't know if this is related, but as per Jetty's documentation at Eclipse, the ContextDeployer is deprecated in favor of something else.

          Next week I'll try to update your DeployerServer or hack-up a new implementation and see if I'm able to overcome this.

          Show
          Kohányi Róbert added a comment - - edited OK, I've figured out, the last thing you mentioned, that CARGO uses these: OPTIONS=Server,jsp,jmx,resources,websocket,ext instead of the default (that comes with Jetty's default jetty.ini ): OPTIONS=Server,jsp,jmx,resources,websocket,ext,plus,annotations helped a bit. This way everything works almost as it should. (Also, removing annotations from the OPTIONS requires one to comment out the line (in jetty.ini ) that imports etc/jetty-annotations.xml and as a result that annotations aren't used the plus option and the import for etc/jetty-plus.xml also have to be removed.) However, this is quite a let down, because this way one can't use Jetty's additional features: like JNDI (me for example ). I don't know if this is related, but as per Jetty's documentation at Eclipse, the ContextDeployer is deprecated in favor of something else. Next week I'll try to update your DeployerServer or hack-up a new implementation and see if I'm able to overcome this.
          Hide
          Savas Ali Tokmen added a comment -

          Hi Kohányi

          I'm very glad that at least one workaround has been found

          When looking into the Jetty documentation, I think that the new DeploymentManager exists since Jetty 7.1 (but not in Jetty 7.0): http://archive.eclipse.org/jetty/7.1.0.v20100505/apidocs/org/eclipse/jetty/deploy/DeploymentManager.html

          If you can rewrite the DeployerServer using the Jetty DeploymentManager then it would be great; we would then simply add a note saying that "it only works with Jetty 7.1 and onwards; not Jetty 7.0". We also would recheck if it does work the Jetty@Codehaus...

          Thank you

          Show
          Savas Ali Tokmen added a comment - Hi Kohányi I'm very glad that at least one workaround has been found When looking into the Jetty documentation, I think that the new DeploymentManager exists since Jetty 7.1 (but not in Jetty 7.0): http://archive.eclipse.org/jetty/7.1.0.v20100505/apidocs/org/eclipse/jetty/deploy/DeploymentManager.html If you can rewrite the DeployerServer using the Jetty DeploymentManager then it would be great; we would then simply add a note saying that "it only works with Jetty 7.1 and onwards; not Jetty 7.0". We also would recheck if it does work the Jetty@Codehaus... Thank you
          Hide
          Savas Ali Tokmen added a comment -

          Hi Kohányi

          I have opened the same issue for https://jira.codehaus.org/browse/CARGO-1049 so let's continue the work over there.

          Thank you

          Show
          Savas Ali Tokmen added a comment - Hi Kohányi I have opened the same issue for https://jira.codehaus.org/browse/CARGO-1049 so let's continue the work over there. Thank you
          Hide
          Savas Ali Tokmen added a comment -

          This has actually been fixed FOR REAL in thanks to CARGO-1049. Documentation updated.

          Show
          Savas Ali Tokmen added a comment - This has actually been fixed FOR REAL in thanks to CARGO-1049 . Documentation updated.

            People

            • Assignee:
              Savas Ali Tokmen
              Reporter:
              Kohányi Róbert
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: