Search code examples
open-liberty

How to deploy the new application in open-liberty server


How to deploy the application manually:

How to deploy the application.ear manually in the open liberty. Followed the documentation and dropped inside the /liberty/wlp/usr/servers/defaultserver/dropins directory.

From the admin console, it shows two application one in running state and another stopped.

application1.war - Running state
application2.ear - Stopped state (manually dropped in dropins directory)

Note: When perform the start action from admin console on application2. It gives the error message that can't locate the application2.ear defined in server.xml.

Server.xml:

<webapplication location="dropin/application2.ear" contextRoot="/test">

Solution

  • There are a number of things in the question that point to errors.

    1. An ear file is not a Web Application, so the use of the webApplication element with an ear file is likely in error. If you want to deploy an ear file in Liberty via server.xml config you would use enterpriseApplication.
    2. There is a likely typo in the location field where you likely intended dropins rather than dropin which means the application binary wasn't found.
    3. Liberty doesn't support applications configured in server.xml being placed in dropins, we see this as two applications with the same name and won't start the second one.

    Any of these symptoms will display in admin center two applications with one being stopped. Simplest thing given your configuration would be to just delete the server.xml configuration.