【问题标题】:Cargo plugin throws CargoException when deploying on Glassfish - Deployment has failed: null在 Glassfish 上部署时,Cargo 插件抛出 CargoException - 部署失败:null
【发布时间】:2012-06-28 22:57:25
【问题描述】:

我正在尝试在远程 Glassfish 服务器(版本 3.1.1(版本 12))上使用 Cargo Maven 插件部署 Web 应用程序。 Glassfish 服务器以及位于不同 Linux 服务器 (Ubuntu) 上的 Java 代码。我已经在 pom 文件中配置了所有必要的属性,并在 Windows 机器上测试了部署。有用。但它在 Linux Ubuntu 上失败了,但有一个有趣的例外:

27-Jun-2012 14:36:05    [ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.2.1:deploy (default-cli) on project my-web-project-app: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.2.1:deploy failed: Deployment has failed: null -> [Help 1]
27-Jun-2012 14:36:05    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.2.1:deploy (default-cli) on project mca-staff-app: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.2.1:deploy failed: Deployment has failed: null
27-Jun-2012 14:36:05            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
27-Jun-2012 14:36:05            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
27-Jun-2012 14:36:05            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
27-Jun-2012 14:36:05            at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
27-Jun-2012 14:36:05            at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
27-Jun-2012 14:36:05            at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
27-Jun-2012 14:36:05            at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
27-Jun-2012 14:36:05            at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
27-Jun-2012 14:36:05            at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
27-Jun-2012 14:36:05            at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
27-Jun-2012 14:36:05            at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
27-Jun-2012 14:36:05            at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
27-Jun-2012 14:36:05            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
27-Jun-2012 14:36:05            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
27-Jun-2012 14:36:05            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
27-Jun-2012 14:36:05            at java.lang.reflect.Method.invoke(Method.java:597)
27-Jun-2012 14:36:05            at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
27-Jun-2012 14:36:05            at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
27-Jun-2012 14:36:05            at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
27-Jun-2012 14:36:05            at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
27-Jun-2012 14:36:05    Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.2.1:deploy failed: Deployment has failed: null
27-Jun-2012 14:36:05            at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
27-Jun-2012 14:36:05            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
27-Jun-2012 14:36:05            ... 19 more
27-Jun-2012 14:36:05    Caused by: org.codehaus.cargo.util.CargoException: Deployment has failed: null
27-Jun-2012 14:36:05            at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.waitForProgressObject(AbstractJsr88Deployer.java:285)
27-Jun-2012 14:36:05            at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.deploy(AbstractJsr88Deployer.java:126)
27-Jun-2012 14:36:05            at org.codehaus.cargo.maven2.DeployerDeployMojo.performDeployerActionOnSingleDeployable(DeployerDeployMojo.java:56)
27-Jun-2012 14:36:05            at org.codehaus.cargo.maven2.AbstractDeployerMojo.performDeployerActionOnAllDeployables(AbstractDeployerMojo.java:178)
27-Jun-2012 14:36:05            at org.codehaus.cargo.maven2.AbstractDeployerMojo.doExecute(AbstractDeployerMojo.java:98)
27-Jun-2012 14:36:05            at org.codehaus.cargo.maven2.AbstractCargoMojo.execute(AbstractCargoMojo.java:311)
27-Jun-2012 14:36:05            at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
27-Jun-2012 14:36:05            ... 20 more

有人在 Linux 上使用 maven Cargo 插件进行远程应用程序部署吗?或者也许有人知道这里有什么问题?

【问题讨论】:

  • 这可能相关:stackoverflow.com/questions/26599957/…(也有一些建议)
  • 能否粘贴您的pom.xml 中描述货物部署的部分?另外,您是直接运行它还是由一些 CI 服务器(如 jenkins 或其他)运行?我记得使用 Cargo + Glassifsh 3 很痛苦,所以现在我使用 Glassfish REST API + curl 通过 Jenkins 进行部署
  • 空指针异常表示代码内部的返回值没有被正确处理(比如无条件使用方法的结果)。如果再次发生这种情况,则应针对 cargo 插件创建错误报告。

标签: linux maven ubuntu glassfish cargo


【解决方案1】:

默认密码是 adminadmin。如果您没有密码,那么使用“”使用货物作为密码将导致错误,如果密码字段为空。

使用下面的代码 enter code here enter code hereorg.codehaus.cargo enter code herecargo-maven2-plugin enter code here 1.7.16 enter code here ... enter code here enter code here

enter code here enter code here部署 enter code here 预集成测试 enter code here enter code here开始目标重新部署 enter code here enter code here enter code here enter code here 取消部署 enter code here 集成后测试 enter code here enter code here 取消部署 enter code here停止 enter code here enter code here

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-21
    • 2021-12-20
    • 2020-12-18
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多