我正在遵循java ee 文档中的本教程,并且正在尝试将一个简单的 Web 模块部署到 glasfish 服务器。
6.3.2.1 使用 NetBeans IDE 构建和打包 hello1 Web 模块
如使用 NetBeans IDE 启动 GlassFish Server 中所述启动 GlassFish Server(如果你尚未这样做)。
从文件菜单中,选择打开项目。
在打开项目对话框中,导航到:
tut-install /examples/web/jsf选择 hello1 文件夹。
单击打开项目。
在 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 并按照教程中的指示进行了所有操作,为什么会出现错误?
看起来你正在使用编写 EE7 教程时不存在的 Glassfish 5。
尝试下载并安装最新版本的 Glassfish 4(版本 4.1.2),并使用它代替 Glassfish 5。
在继续本教程之前,绝对值得验证你的 Glassfish 4 安装是否正常工作: