orctom/was-maven-plugin

Issue with deployment of was EAR with 1.1.3.2

Opened this issue · 3 comments

I am having an issue with the 1.1.3.2 plugin. When I deploy an application EAR file to WebSphere and the application EAR file is not already deployed to WebSphere, the plugin deploys fine. If the application EAR is already installed on WebSphere but NOT started, then the if a redeploy of the application EAR is run, the redeploy works fine.

Here is the problem. If the application EAR is deployed to WAS and IS started, then the deploy fails during the 'START APPLICATION' step with an error indicating that the application is already started.

I only want to restart the application after the deployment and not the server, so I am setting 'restartAfterDeploy' to false.

We are using the 1.1.3.2 version of the plugin and Version 8.5.5. of WAS.

Can you review my use of the plugin and see if you see anything out of the ordinary and/or is there something else I need to do when redeploying using 1.1.3.2. This is not a problem when using 1.1.3.1.

Thanks
Matt Goodnight

Attached is my configuration of the plugin, the settings.xml file and the error output from running the pom.xml.
my use of plugin.txt
settings for maven.txt
plugin deploy error.txt

The log indicates that the app is already started, and calling starting the app failed.
Looks like there're cases that the app would be started automatically after been installed to WAS. That's strange. Did it start when you see this error?

Yes, the app appears to be starting automatically with 1.1.3.2 but not with 1.1.3.1. but this only appears to be the case with a redeployment of an app that is already deployed. I have watched the was console and when the app is being installed for the first time, I see that it is not running until the 'START APPLICATION' portion of the plugin starts it. But in a redeployment, the app is running as soon as it is installed and then getting the 'already started' error when the plugin tries to start. So, even though I get an error, when I check the WAS console, the app is running.

Maybe we should check the app's status, in the jython script, if the app is running, skip the startApplication method.
But I'm not working with WebSphere any more, I don't have any environment to debug and test the changes, so you might have to help yourself. Make a copy of the jython script and place it in the root of the project (add a script tag for the name of your script) and remove the startApplication part for this very case. Or even better if you can look up docs for wsadmin, see if you can add a status check before starting the application.