2016-02-23 46 views
1

我只是有一個簡單的問題。通過遵循設置指南,直到工件更新都是很好的。我複製了所有必需的.jar文件並導入)cacerts_。我可以測試連接Web球體(我正在使用WS 7)。一切工作正常。但是當插件到達檢查安裝在WS上的應用程序的步驟時,我收到以下錯誤:WebSphere 7 + WebSphere Deployer插件

是否有任何想法?

------------------------------------------- 
Connecting to IBM WebSphere Application Server... 
The following artifacts will be deployed in this order... 

------------------------------------------- 
XXX_123.ear 
------------------------------------------- 

Error deploying to IBM WebSphere Application Server: org.jenkinsci.plugins.websphere.services.deployment.DeploymentServiceException: Could not determine if artifact 'XXX' is installed: javax.management.ObjectName cannot be cast to javax.management.ObjectName 
at org.jenkinsci.plugins.websphere.services.deployment.WebSphereDeploymentService.isArtifactInstalled(WebSphereDeploymentService.java:357) 

at org.jenkinsci.plugins.websphere_deployer.WebSphereDeployerPlugin.stopArtifact(WebSphereDeployerPlugin.java:243) 

at org.jenkinsci.plugins.websphere_deployer.WebSphereDeployerPlugin.perform(WebSphereDeployerPlugin.java:198) 

at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45) 

at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:785) 

at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:757) 

at hudson.model.Build$BuildExecution.post2(Build.java:183) 

at 
hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:706) 

at hudson.model.Run.execute(Run.java:1703) 

at hudson.matrix.MatrixRun.run(MatrixRun.java:146) 

at hudson.model.ResourceController.execute(ResourceController.java:88) 

at hudson.model.Executor.run(Executor.java:231) 

Build step 'Deploy To IBM WebSphere Application Server' changed build result to FAILURE 

成品:未能

回答

1

我有同樣的問題。因爲這看起來像一個類加載器問題,所以我在jenkins中爲類加載規範挖了一口氣。

我最終更新了插件中的PluginFirstClassLoader屬性,現在我的部署已成功完成。

要做到這一點變化,編輯文件:

$USER_HOME/.jenkins/plugins/websphere-deployer/META-INF/MANIFEST.MF 

然後替換以下屬性:

PluginFirstClassLoader: true 

通過

PluginFirstClassLoader: false 

我的當前設置:

  • 詹金斯:2.1-1.1
  • WebSphere的部署:1.3.4
+0

太棒了!這對我有效。我的項目使用JDK6,但Jenkins正在JRE8中運行。所以看起來這個設置強制插件也使用JDK6。 – scuro

0

如果你被插件需要IBM罐子從爲7被編譯爲JVM 6:詹金斯使用Java 7(至少我版本),所以我認爲不兼容的java字節碼上升。 我從WAS 8安裝中複製了IBM jar,並且一切正常。 希望這有助於。