Warm tip: This article is reproduced from serverfault.com, please click

jakarta ee-将 hello1 Web 模块部署到 glassfish 时出错,来自 java 教程

(jakarta ee - Error while deploying hello1 web module to glassfish, from java tutorials)

发布于 2018-04-05 06:19:39

我正在遵循java ee 文档中的本教程,并且正在尝试将一个简单的 Web 模块部署到 glasfish 服务器。

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

  1. 如使用 NetBeans IDE 启动 GlassFish Server 中所述启动 GlassFish Server(如果你尚未这样做)。

  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 并按照教程中的指示进行了所有操作,为什么会出现错误?

Questioner
Rockstar5645
Viewed
11
skomisa 2018-04-17 14:42:10

看起来你正在使用编写 EE7 教程时不存在的 Glassfish 5。

尝试下载并安装最新版本的 Glassfish 4(版本 4.1.2),并使用它代替 Glassfish 5。

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

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

glassfishAdmin