jenkins Websphere deployer插件成功连接但部署失败

时间:2016-05-11 11:08:12

标签: jenkins jenkins-plugins websphere-8 websphere-portal

我有2个Windows Server Nodes的Websphere Portal 8.5.5.2群集。 我有一个单独的Jenkins Build Server(也是windows),我正确配置了插件并单击测试连接返回连接成功。 现在运行build来部署ear文件时,它会返回一个错误:

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

我检查过我可以使用wsadmin部署ear文件,并在插件中配置相同的参数(SOAP端口,单元,节点,服务器......),并且它已成功。

我错过了什么?我尝试搜索类似的错误消息,但没有找到任何东西。 我也尝试搜索ffdc日志,但是即使在运行插件后日志也不会更新,所以我一无所知。

3 个答案:

答案 0 :(得分:0)

阅读你的日志真的很难,因为我不知道哪一行与哪个语句有关。那说......

这里的关键是13以上13:51:31引起:java.lang.NoSuchMethodError: 所以缺少getAppName()吗?

我对Jenkins一无所知,但它看起来像Jenkins WebSphereDeploymentService类的错误版本?或者没有getAppName()?

至少尝试获取WAS跟踪以查看WAS中发生的情况并将其与Jenkins的内容相关联。 https://www-01.ibm.com/support/docview.wss?uid=swg21199344

也许一个类路径问题指向某个错误的类集?跟踪应该给出一些缺失的指示。

答案 1 :(得分:0)

我怀疑问题是我的jar文件是7,同时在websphere deployer插件文件夹中是8.5。现在我只有8.5个jar文件,它正在工作。 但是在成功部署后,它无法启动应用程序。我用2种不同的应用程序测试了它。以下是其中一个应用程序的jenkins日志:

<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>

根据以下内容在jenkins作业中添加timeout参数后: [link](https://issues.jenkins-ci.org/browse/JENKINS-30093)错误已更改:

<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>

我想我必须在发布所有调试步骤之前深入研究这个问题。但仍然感谢帮助。感谢

答案 2 :(得分:0)

正如您所提到的,您不能同时拥有2个不同版本的websphere jar文件。

您正在获取Null指针,因为您必须在配置中指定部署超时!!我建议&#34; 30&#34;群集部署的秒数或更长时间。

<强>更新 我刚刚发布了v1.5.5。您应该考虑使用此插件版本继续前进。