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

Error while deploying hello1 web module to glassfish, from java tutorials

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

I am following this tutorial from the java ee documentation and I'm trying to deploy a simple web module to the glasfish server.

6.3.2.1 To Build and Package the hello1 Web Module Using NetBeans IDE

  1. Start GlassFish Server as described in To Start GlassFish Server Using NetBeans IDE, if you have not already done so.

  2. From the File menu, choose Open Project.

  3. In the Open Project dialog box, navigate to:
    tut-install/examples/web/jsf

  4. Select the hello1 folder.

  5. Click Open Project.

  6. In the Projects tab, right-click the hello1 project and select Build. This command deploys the project to the server.

When I clicked Build, it failed and gave me the following error

------------------------------------------------------------------------
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

I downloaded javaEE and did everything just as they instructed in the tutorial, why am I getting an error?

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

It looks like you are using Glassfish 5 which did not exist when the EE7 tutorial was written.

Try downloading and installing the latest version of Glassfish 4 (version 4.1.2), and use that instead of Glassfish 5.

It's definitely worth verifying that your installation of Glassfish 4 is working before resuming the tutorial:

  • Start the Glassfish 4 server and enter http://localhost:4848 in your browser.
  • You should see the Glassfish 4.x admin console as shown below.
  • Click the About button in the top left to verify the version.

glassfishAdmin