【问题标题】:Error while deploying hello1 web module to glassfish, from java tutorials将 hello1 Web 模块部署到 glassfish 时出错,来自 java 教程
【发布时间】:2018-04-05 06:19:39
【问题描述】:

我正在关注 java ee 文档中的 this tutorial,我正在尝试将一个简单的 Web 模块部署到 glasfish 服务器。

6.3.2.1 使用 NetBeans IDE 构建和打包 hello1 Web 模块

  1. 按照启动 GlassFish Server 中的说明启动 GlassFish Server NetBeans IDE,如果您还没有这样做的话。

  2. 从“文件”菜单中,选择“打开项目”。

  3. 在“打开项目”对话框中,导航至:
    tut-install/examples/web/jsf

  4. 选择 hello1 文件夹。

  5. 点击打开项目。

  6. 在 Projects 选项卡中,右键单击 hello1 项目并选择 Build。 此命令将项目部署到服务器。

当我点击Build 时,它失败并给了我以下错误

------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 26.227s
Finished at: Thu Apr 05 11:38:32 IST 2018
Final Memory: 11M/80M
------------------------------------------------------------------------
Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.4.4:redeploy (deploy) on project hello1: Execution deploy of goal org.codehaus.cargo:cargo-maven2-plugin:1.4.4:redeploy failed: Cannot create configuration. There's no registered configuration for the parameters (container [id = [glassfish5x], type = [installed]], configuration type [existing]). Actually there are no valid types registered for this configuration. Maybe you've made a mistake spelling it? -> [Help 1]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

我下载了 javaEE 并按照教程中的说明进行了所有操作,为什么会出现错误?

【问题讨论】:

  • 您应该将问题的 java-ee-8 标签更改为 java-ee-7

标签: jakarta-ee glassfish java-ee-7


【解决方案1】:

您使用的 Glassfish 5 似乎在编写 EE7 教程时还不存在。

试试downloading and installing the latest version of Glassfish 4(4.1.2 版),用它代替 Glassfish 5。

在继续教程之前验证您的 Glassfish 4 安装是否正常工作是绝对值得的:

  • 启动 Glassfish 4 服务器并在浏览器中输入 http://localhost:4848
  • 您应该会看到 Glassfish 4.x 管理控制台,如下所示。
  • 点击左上角的关于按钮验证版本。

【讨论】:

    【解决方案2】:

    我在 pom.xml (glassfish5\docs\javaee-tutorial\examples\pom.xml) 中更新了 cargo 版本: <cargo.plugin.version>1.8.4</cargo.plugin.version>

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-07-04
      • 2016-02-16
      • 2018-03-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-01-13
      相关资源
      最近更新 更多