Joseph Sayegh
Joseph Sayegh

Reputation: 25

jenkins Websphere deployer plugin successfully connect but fail deploying

I have Websphere Portal 8.5.5.2 Cluster of 2 Windows Server Nodes. I have a separate Jenkins Build Server (also windows), I configured the plugin correctly and click test connection returns connection successful. when running build now to deploy the ear file it returns an error:

13:51:31 Started by user Jenkins
13:51:31 Building in workspace C:\Jenkins\workspace\Deploy
13:51:31 Connecting to IBM WebSphere Application Server...
13:51:31 The following artifacts will be deployed in this order...
13:51:31 -------------------------------------------
13:51:31 AdvisorsThemeEAR_20160505.ear
13:51:31 -------------------------------------------
13:51:31 Error deploying to IBM WebSphere Application Server: org.jenkinsci.plugins.websphere.services.deployment.DeploymentServiceException: ADMA0092E: An unexpected exception occurred while preparing task MapJaspiProvider. Check the server machine First Failure Data Capture tool (FFDC) for more information.
13:51:31    at org.jenkinsci.plugins.websphere.services.deployment.WebSphereDeploymentService.getAppName(WebSphereDeploymentService.java:193)
13:51:31    at org.jenkinsci.plugins.websphere.services.deployment.WebSphereDeploymentService.getAppName(WebSphereDeploymentService.java:169)
13:51:31    at org.jenkinsci.plugins.websphere_deployer.WebSphereDeployerPlugin.getAppName(WebSphereDeployerPlugin.java:318)
13:51:31    at org.jenkinsci.plugins.websphere_deployer.WebSphereDeployerPlugin.createArtifact(WebSphereDeployerPlugin.java:275)
13:51:31    at org.jenkinsci.plugins.websphere_deployer.WebSphereDeployerPlugin.perform(WebSphereDeployerPlugin.java:197)
13:51:31    at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
13:51:31    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
13:51:31    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
13:51:31    at hudson.model.Build$BuildExecution.post2(Build.java:185)
13:51:31    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
13:51:31    at hudson.model.Run.execute(Run.java:1763)
13:51:31    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
13:51:31    at hudson.model.ResourceController.execute(ResourceController.java:98)
13:51:31    at hudson.model.Executor.run(Executor.java:410)
13:51:31 Caused by: com.ibm.websphere.management.application.client.AppDeploymentException: ADMA0092E: An unexpected exception occurred while preparing task MapJaspiProvider. Check the server machine First Failure Data Capture tool (FFDC) for more information. [Root exception is java.lang.NoSuchMethodError: com.ibm.ejs.models.base.bindings.applicationbnd.ApplicationBinding.getJaspiRefBinding()Lcom/ibm/ejs/models/base/bindings/commonbnd/JaspiRefBinding;]
13:51:31    at com.ibm.websphere.management.application.client.AppDeploymentController.getNthTask(AppDeploymentController.java:575)
13:51:31    at com.ibm.websphere.management.application.client.AppDeploymentController.getNextTask(AppDeploymentController.java:611)
13:51:31    at org.jenkinsci.plugins.websphere.services.deployment.WebSphereDeploymentService.getAppName(WebSphereDeploymentService.java:185)
13:51:31    ... 13 more
13:51:31 Caused by: java.lang.NoSuchMethodError: com.ibm.ejs.models.base.bindings.applicationbnd.ApplicationBinding.getJaspiRefBinding()Lcom/ibm/ejs/models/base/bindings/commonbnd/JaspiRefBinding;
13:51:31    at com.ibm.ws.security.jaspi.MapJaspiHelper.prepareTask(MapJaspiHelper.java:148)
13:51:31    at com.ibm.websphere.management.application.client.AppDeploymentController.prepareTask(AppDeploymentController.java:586)
13:51:31    at com.ibm.websphere.management.application.client.AppDeploymentController.getNthTask(AppDeploymentController.java:567)
13:51:31    ... 15 more
13:51:31 
13:51:31 Build step 'Deploy To IBM WebSphere Application Server' changed build result to FAILURE
13:51:31 Finished: FAILURE

I checked that I can deploy the ear file using wsadmin with the same parameters configured in the plugin (SOAP Port, cell, node, server...) and it was successful.

What am I missing? I tried searching for similar error messages but didn't find anything. I also tried to search the ffdc logs but the logs don't update even after running the plugin so I am clueless.

Upvotes: 2

Views: 2155

Answers (3)

npn_or_pnp
npn_or_pnp

Reputation: 515

As you mentioned, you cannot have 2 different version of the websphere jar files at the same time.

You're getting a Null pointer because you MUST specify a deployment timeout in your configuration!! I'd suggest "30" seconds or more for a cluster deployment.

Update: I just released v1.5.5. You should consider using this plugin version moving forward.

Upvotes: 0

Joseph Sayegh
Joseph Sayegh

Reputation: 25

I suspect that the problem was that i had the jar files of was 7 and was 8.5 in the websphere deployer plugin folder at the same time. now i have only the was 8.5 jar files and it is working. however after deploying successfully it fails starting the app. i tested it with 2 different apps i had. following is the jenkins log of one of the apps:

<code> 
09:49:17 Started by user Jenkins
09:49:17 Building in workspace C:\Jenkins\workspace\Deploy
09:49:17 Connecting to IBM WebSphere Application Server...
09:49:17 The following artifacts will be deployed in this order...
09:49:17 -------------------------------------------
09:49:17 Calculator_20160505.war
09:49:17 -------------------------------------------
09:49:17 Generating EAR For Artifact: Calculator_20160505
09:49:17 Deploying 'Calculator_20160505' to IBM WebSphere Application Server
09:49:18 InstallApplication] ADMA5003I: The JavaServer Pages (JSP) files in the Web Archive (WAR) Calculator_20160505.war compiled successfully.[InProgress]
09:49:19 InstallApplication] ADMA0215I: The JavaServer Pages (JSP) compile task completed.[InProgress]
09:49:19 InstallApplication] ADMA5005I: The application Calculator_20160505 is configured in the WebSphere Application Server repository.[InProgress]
09:49:19 InstallApplication] ADMA5005I: The application Calculator_20160505 is configured in the WebSphere Application Server repository.[InProgress]
09:49:19 InstallApplication] ADMA5081I: The bootstrap address for client module is configured in the WebSphere Application Server repository.[InProgress]
09:49:19 InstallApplication] ADMA5053I: The library references for the installed optional package are created.[InProgress]
09:49:19 InstallApplication] ADMA5005I: The application Calculator_20160505 is configured in the WebSphere Application Server repository.[InProgress]
09:49:19 InstallApplication] ADMA5001I: The application binaries are saved in c:\IBM\WebSphere\AppServer\profiles\dmgr01\wstemp\154b32d16e5\workspace\cells\dmgrCell01\applications\Calculator_20160505.ear\Calculator_20160505.ear[InProgress]
09:49:19 InstallApplication] ADMA5005I: The application Calculator_20160505 is configured in the WebSphere Application Server repository.[InProgress]
09:49:19 InstallApplication] SECJ0400I: Successfully updated the application Calculator_20160505 with the appContextIDForSecurity information.[InProgress]
09:49:19 InstallApplication] ADMA5005I: The application Calculator_20160505 is configured in the WebSphere Application Server repository.[InProgress]
09:49:19 InstallApplication] ADMA5005I: The application Calculator_20160505 is configured in the WebSphere Application Server repository.[InProgress]
09:49:20 InstallApplication] ADMA5113I: Activation plan created successfully.[InProgress]
09:49:20 InstallApplication] ADMA5011I: The cleanup of the temp directory for application Calculator_20160505 is complete.[InProgress]
09:49:22 InstallApplication] ADMA5013I: Application Calculator_20160505 installed successfully.[Completed]
09:49:22 Starting Application 'Calculator_20160505'...
09:49:22 Error deploying to IBM WebSphere Application Server: java.lang.NumberFormatException: For input string: ""
09:49:22    at java.lang.NumberFormatException.forInputString(Unknown Source)
09:49:22    at java.lang.Integer.parseInt(Unknown Source)
09:49:22    at java.lang.Integer.parseInt(Unknown Source)
09:49:22    at org.jenkinsci.plugins.websphere_deployer.WebSphereDeployerPlugin.startArtifact(WebSphereDeployerPlugin.java:239)
09:49:22    at org.jenkinsci.plugins.websphere_deployer.WebSphereDeployerPlugin.perform(WebSphereDeployerPlugin.java:209)
09:49:22    at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
09:49:22    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
09:49:22    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
09:49:22    at hudson.model.Build$BuildExecution.post2(Build.java:185)
09:49:22    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
09:49:22    at hudson.model.Run.execute(Run.java:1763)
09:49:22    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
09:49:22    at hudson.model.ResourceController.execute(ResourceController.java:98)
09:49:22    at hudson.model.Executor.run(Executor.java:410)
09:49:22 
09:49:22 Build step 'Deploy To IBM WebSphere Application Server' changed build result to FAILURE
09:49:22 Finished: FAILURE 
</code>

after adding timeout parameter in jenkins job according to: [link] (https://issues.jenkins-ci.org/browse/JENKINS-30093) the error changed:

<code>
10:20:01 Started by user Jenkins
10:20:01 Building in workspace C:\Jenkins\workspace\Deploy
10:20:02 Connecting to IBM WebSphere Application Server...
10:20:02 The following artifacts will be deployed in this order...
10:20:02 -------------------------------------------
10:20:02 Calculator_20160505.war
10:20:02 -------------------------------------------
10:20:02 Generating EAR For Artifact: Calculator_20160505
10:20:02 Deploying 'Calculator_20160505' to IBM WebSphere Application Server
10:20:05 Error deploying to IBM WebSphere Application Server: org.jenkinsci.plugins.websphere.services.deployment.DeploymentServiceException: Failed to install artifact: 
10:20:05    at org.jenkinsci.plugins.websphere.services.deployment.WebSphereDeploymentService.installArtifact(WebSphereDeploymentService.java:251)
10:20:05    at org.jenkinsci.plugins.websphere_deployer.WebSphereDeployerPlugin.deployArtifact(WebSphereDeployerPlugin.java:227)
10:20:05    at org.jenkinsci.plugins.websphere_deployer.WebSphereDeployerPlugin.perform(WebSphereDeployerPlugin.java:201)
10:20:05    at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
10:20:05    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
10:20:05    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
10:20:05    at hudson.model.Build$BuildExecution.post2(Build.java:185)
10:20:05    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
10:20:05    at hudson.model.Run.execute(Run.java:1763)
10:20:05    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
10:20:05    at hudson.model.ResourceController.execute(ResourceController.java:98)
10:20:05    at hudson.model.Executor.run(Executor.java:410)
10:20:05 
10:20:05 Build step 'Deploy To IBM WebSphere Application Server' changed build result to FAILURE
10:20:05 Finished: FAILURE
</code>

i guess i have to dig deeper in this issue before posting all the debug steps i do. but help is still appreciated. thanks

Upvotes: 0

Alexandre Polozoff
Alexandre Polozoff

Reputation: 316

It is really hard to read your log as I can't tell which line goes with which statement. That said...

The key here is the 13 more 13:51:31 Caused by: java.lang.NoSuchMethodError: so is it the getAppName() that is missing?

I don't know anything about Jenkins but it looks like the wrong version of the Jenkins WebSphereDeploymentService class? Or one that does not have the getAppName()?

At the very least try to get a WAS trace to see what is happening in WAS and correlate that to the Jenkins stuff. https://www-01.ibm.com/support/docview.wss?uid=swg21199344

Maybe a classpath problem pointing to the wrong set of classes somewhere? The trace should give some indication as to what is missing.

Upvotes: 0

Related Questions