Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8867741
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:06:51+00:00 2026-06-14T17:06:51+00:00

Getting an exception while trying to deploy my maven-based application into Glassfish 3.1.2.2 .

  • 0

Getting an exception while trying to deploy my maven-based application into Glassfish 3.1.2.2.

I’m using org.glassfish.maven.plugin for deployment.

Here’s my source files:

pom.xml

<plugin>
    <groupId>org.glassfish.maven.plugin</groupId>
    <artifactId>maven-glassfish-plugin</artifactId>
    <version>${glassfish.maven.plugin.version}</version>
    <configuration>
        <glassfishDirectory>${local.glassfish.home}</glassfishDirectory>
        <echo>true</echo>
        <debug>true</debug>
        <autoCreate>true</autoCreate>
        <glassfishDirectory>${local.glassfish.home}</glassfishDirectory>
        <user>${local.glassfish.user}</user>
        <passwordFile>${local.glassfish.passfile}</passwordFile>
        <domain>
            <name>${local.glassfish.domain}</name>
            <httpPort>${local.glassfish.httpPort}</httpPort>
            <adminPort>${local.glassfish.adminPort}</adminPort>
        </domain>
        <components>
            <component>
                <name>${project.artifactId}</name>
                <artifact>${project.build.directory}/${project.build.finalName}.war</artifact>
            </component>
        </components>
    </configuration>
</plugin>

settings.xml

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                      http://maven.apache.org/xsd/settings-1.0.0.xsd">
    <localRepository/>
    <interactiveMode/>
    <usePluginRegistry/>
    <offline/>
    <pluginGroups/>
    <servers/>
    <mirrors/>
    <proxies/>
    <profiles>
        <profile>
            <id>glassfish-context</id>
            <properties>
                <local.glassfish.home>/home/talha/glassfish-3.1.2.2</local.glassfish.home>
                <local.glassfish.user>admin</local.glassfish.user>
                <local.glassfish.domain>dms</local.glassfish.domain>
                <local.glassfish.httpPort>8080</local.glassfish.httpPort>
                <local.glassfish.adminPort>4848</local.glassfish.adminPort>
                <local.glassfish.passfile>
                    ${local.glassfish.home}/glassfish/domains/${local.glassfish.domain}/master-password
                </local.glassfish.passfile>
            </properties>
        </profile>
    </profiles>

    <activeProfiles>
        <activeProfile>glassfish-context</activeProfile>
    </activeProfiles>
</settings>

Full Stacktrace

[ERROR] Failed to execute goal org.glassfish.maven.plugin:maven-glassfish-plugin:2.1:deploy (default-cli) on project dms: Deployment of /home/talha/IdeaProjects/DMS/target/DMS.war failed. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.glassfish.maven.plugin:maven-glassfish-plugin:2.1:deploy (default-cli) on project dms: Deployment of /home/talha/IdeaProjects/DMS/target/DMS.war failed.
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoFailureException: Deployment of /home/talha/IdeaProjects/DMS/target/DMS.war failed.
    at org.glassfish.maven.plugin.command.AsadminCommand.execute(AsadminCommand.java:121)
    at org.glassfish.maven.plugin.DeployGlassfishMojo.doExecute(DeployGlassfishMojo.java:66)
    at au.net.ocean.maven.plugin.OceanMojo.execute(OceanMojo.java:67)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
    ... 19 more
[ERROR] 
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T17:06:52+00:00Added an answer on June 14, 2026 at 5:06 pm

    Your configuration is almost the exact same as mine with 2 exceptions.

    1. I’m specifying a passwordFile in my user home with a file name of .asadminpass
    2. I have an <executions> element defined that breaks the build if removed.
    <executions>
      <execution>
        <phase>none</phase>
        <goals>
          <goal>deploy</goal>
        </goals>
        <configuration>
          <debug>true</debug>
          <terse>false</terse>
          <autoCreate>false</autoCreate>
          <domain>
            <name>${local.glassfish.domain}</name>
            <httpPort>${local.glassfish.httpPort}</httpPort>
            <adminPort>${local.glassfish.adminPort}</adminPort>
          </domain>
        </configuration>
      </execution>
    </executions>
    

    If neither of those help, try including your glassfish log file in the question. That should indicate what failed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Getting the following error/exception while trying to compile my maven based web application... can
I am getting the following exception while adding data into database: org.hibernate.HibernateException: The database
I am getting this exception while trying to call SOAP webservice using axis. basically
Getting Exception while running query using Criteria API org.hibernate.QueryException: could not resolve property: com
I am getting the following exception while trying to write an .xlsx file using
I'm trying to deploy the first rails application using Capistrano. I'm getting an error
hi i am getting the following exception while running my application and my applicationContext.xml
I am Getting a run time Exception while using this code Runtime rt =
I'm trying to deploy my rails application by using Passenger and Capistrano on Dreamhost.
I am getting this exception while trying to generate a .PDF file from my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.