We're updating the issue view to help you get more done. 

Remote Deploy Fails on Jetty7x

Description

Hello,

I've been struggling to make this work. Can anybody help me?

I'm using:
Maven2
Jetty 7.1.4.v20100610 Server

Here's my pom configuration:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 <plugin> <groupId>org.codehaus.cargo</groupId> <artifactId>cargo-maven2-plugin</artifactId> <version>1.0.1-sr-1</version> <configuration> <container> <containerId>jetty7x</containerId> <type>remote</type> </container> <configuration> <type>runtime</type> <properties> <cargo.remote.username>maven</cargo.remote.username> <cargo.remote.password>maven</cargo.remote.password> <cargo.hostname>hostname.com</cargo.hostname> <cargo.servlet.port>8080</cargo.servlet.port> </properties> </configuration> <deployer> <type>remote</type> <deployables> <deployable> <groupId>my.groupId</groupId> <artifactId>my.artifactId</artifactId> <type>war</type> <properties> <context>/myContext</context> </properties> </deployable> </deployables> </deployer> </configuration> </plugin>

When I do 'mvn cargo:deploy', I get this error:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 [INFO] [cargo:deploy {execution: default-cli}] java.io.IOException: Server returned HTTP response code: 405 for URL: http://hostname.com:8080/cargo-jetty-deployer/deploy?path=/myContext at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:532) at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1324) at java.security.AccessController.doPrivileged(Native Method) at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1318) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:972) at org.codehaus.cargo.container.jetty.JettyRemoteDeployer.getResponseMessage(JettyRemoteDeployer.java:275) [...] Caused by: java.io.IOException: Server returned HTTP response code: 405 for URL: ttp://hostname.com:8080/cargo-jetty-deployer/deploy?path=/myContext at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1269) at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:391) at org.codehaus.cargo.container.jetty.JettyRemoteDeployer.getResponseMessage(JettyRemoteDeployer.java:265) ... 24 more [INFO] ------------------------------------------------------------------------ [ERROR] FATAL ERROR [INFO] ------------------------------------------------------------------------ [INFO] Failed to deploy [/path/to/my/webapp.war] [INFO] ------------------------------------------------------------------------ [INFO] Trace org.codehaus.cargo.container.ContainerException: Failed to deploy [/path/to/my/webapp.war] at org.codehaus.cargo.container.jetty.JettyRemoteDeployer.deploy(JettyRemoteDeployer.java:119) at org.codehaus.cargo.maven2.DeployerDeployMojo.performDeployerActionOnSingleDeployable(DeployerDeployMojo.java:79) at org.codehaus.cargo.maven2.AbstractDeployerMojo.performDeployerActionOnAllDeployables(AbstractDeployerMojo.java:111) at org.codehaus.cargo.maven2.AbstractDeployerMojo.doExecute(AbstractDeployerMojo.java:54) at org.codehaus.cargo.maven2.AbstractCargoMojo.execute(AbstractCargoMojo.java:255) [...] at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.codehaus.cargo.container.ContainerException: at org.codehaus.cargo.container.jetty.JettyRemoteDeployer.deploy(JettyRemoteDeployer.java:113) ... 23 more org.codehaus.cargo.container.ContainerException: at org.codehaus.cargo.container.jetty.JettyRemoteDeployer.deploy(JettyRemoteDeployer.java:113) at org.codehaus.cargo.maven2.DeployerDeployMojo.performDeployerActionOnSingleDeployable(DeployerDeployMojo.java:79) at org.codehaus.cargo.maven2.AbstractDeployerMojo.performDeployerActionOnAllDeployables(AbstractDeployerMojo.java:111) at org.codehaus.cargo.maven2.AbstractDeployerMojo.doExecute(AbstractDeployerMojo.java:54) at org.codehaus.cargo.maven2.AbstractCargoMojo.execute(AbstractCargoMojo.java:255)

Do I need to run the cargo-jetty-deployer application in my remote server? If yes, where can I get the application that is compatible with Jetty 7.1.4.v20100610 Server? I tried deploying cargo-jetty-deployer-1.0.1.war to Jetty 7.1.4.v20100610 Server but it failed with a ClassNotFoundException so I assumed the war has incompatible libraries with the server. Here's the error:

1 2 3 4 5 6 7 8 9 java.lang.ClassNotFoundException: org.mortbay.jetty.webapp.WebAppContext at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:319) at java.lang.ClassLoader.loadClass(ClassLoader.java:264) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:369) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:322) at org.eclipse.jetty.util.Loader.loadClass(Loader.java:90)

I also tried adding in libraries that has org.mortbay.jetty.webapp.WebAppContext but I still get error:

1 2 3 4 5 java.lang.IllegalArgumentException: Object is not of type class org.mortbay.jetty.webapp.WebAppContext at org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.java:195) at org.eclipse.jetty.webapp.JettyWebXmlConfiguration.configure(JettyWebXmlConfiguration.java:77) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:992) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:588)

Any info will help.

Thanks in advance.

Status

Assignee

Savas Ali Tokmen

Reporter

Don Santillan

Components

Fix versions

Affects versions

1.0.1

Priority

Major