2

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.

Cœur
  • 37,241
  • 25
  • 195
  • 267
  • My best guess would be that there is some kind of a mismatch in the thinclient JARs being used (MapJaspiHelper and ApplicationBinding are both internal WebSphere Application Server classes). Are you configuring the Jenkins server with WebSphere JARs? It would probably be helpful to run the Jenkins process with the `-verbose:class` JVM argument to see from which JAR those classes are being loaded. If all else fails, you might need to open a PMR with IBM since the failure is in IBM classes. – Brett Kail May 11 '16 at 21:17

3 Answers3

0

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.

  • I've edited the question to format the log snippet as preformatted text. – Brett Kail May 11 '16 at 21:13
  • there are good news and bad news, the good news that is it working, the bad news that i don't know why and how it started working, i was trying to run jenkins with the -verbose:class argument it didnt work for both classes mentioned above. and also changed logs and trace in the websphere [link](https://www-01.ibm.com/support/docview.wss?uid=swg21199344#show-hide) for some reason the websphere jar files in the jenkins websphere deployer plugin where deleted at some point and i copied them again and build the job again and it connected and deployed successfully. thanks BrettKail and @Alexandre – Joseph Sayegh May 15 '16 at 06:44
0

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

  • if i go to the console and start the app manually it is started successfully. – Joseph Sayegh May 15 '16 at 07:00
  • Try the 1.4.2 beta plugin and see if that fixes your issues. There WAS a pull request the helped to address this issue when deploying an EAR that's generated by the WDP – npn_or_pnp Sep 29 '16 at 23:32
0

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.

npn_or_pnp
  • 407
  • 4
  • 10