使用GitHub通过Jenkins将EAR部署到WAS8.5时获取IncompatibleClassChangeError

时间:2015-05-13 07:15:05

标签: java eclipse github jenkins websphere

我有1.611版本的Jenkins,JDK 1.7和远程WAS8.5在JDK 1.6版本上运行。当我尝试在Github的帮助下部署EAR或WAR文件时(即,我从具有java 7配置的eclipse Luna推送项目),Iam面临以下错误:

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

-------------------------------------------
SpringWSEAR.ear
-------------------------------------------
Error deploying to IBM WebSphere Application Server: org.jenkinsci.plugins.websphere.services.deployment.DeploymentServiceException: 
    at org.jenkinsci.plugins.websphere.services.deployment.WebSphereDeploymentService.getAppName(WebSphereDeploymentService.java:122)
    at org.jenkinsci.plugins.websphere.services.deployment.WebSphereDeploymentService.getAppName(WebSphereDeploymentService.java:98)
    at org.jenkinsci.plugins.websphere_deployer.WebSphereDeployerPlugin.getAppName(WebSphereDeployerPlugin.java:268)
    at org.jenkinsci.plugins.websphere_deployer.WebSphereDeployerPlugin.createArtifact(WebSphereDeployerPlugin.java:226)
    at org.jenkinsci.plugins.websphere_deployer.WebSphereDeployerPlugin.perform(WebSphereDeployerPlugin.java:168)
    at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:764)
    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:724)
    at hudson.model.Build$BuildExecution.post2(Build.java:185)
    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671)
    at hudson.model.Run.execute(Run.java:1769)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:98)
    at hudson.model.Executor.run(Executor.java:374)
Caused by: com.ibm.websphere.management.application.client.AppDeploymentException:  [Root exception is java.lang.IncompatibleClassChangeError: Implementing class]
    at com.ibm.websphere.management.application.AppManagementFactory.handleException(AppManagementFactory.java:672)
    at com.ibm.websphere.management.application.AppManagementFactory.readArchive(AppManagementFactory.java:141)
    at com.ibm.websphere.management.application.AppManagementFactory.readArchive(AppManagementFactory.java:91)
    at com.ibm.websphere.management.application.client.AppDeploymentController.readArchive(AppDeploymentController.java:254)
    at org.jenkinsci.plugins.websphere.services.deployment.WebSphereDeploymentService.getAppName(WebSphereDeploymentService.java:108)
    ... 13 more
Caused by: java.lang.IncompatibleClassChangeError: Implementing class
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at jenkins.util.AntClassLoader.defineClassFromData(AntClassLoader.java:1139)
    at hudson.ClassicPluginStrategy$AntClassLoader2.defineClassFromData(ClassicPluginStrategy.java:799)
    at jenkins.util.AntClassLoader.getClassFromStream(AntClassLoader.java:1310)
    at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1366)
    at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1326)
    at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1079)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at jenkins.util.AntClassLoader.defineClassFromData(AntClassLoader.java:1139)
    at hudson.ClassicPluginStrategy$AntClassLoader2.defineClassFromData(ClassicPluginStrategy.java:799)
    at jenkins.util.AntClassLoader.getClassFromStream(AntClassLoader.java:1310)
    at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1366)
    at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1326)
    at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1079)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.WARFileImpl.getWARFileAnnotationsDetector(WARFileImpl.java:2908)
    at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.WARFileImpl.containsEJBContent(WARFileImpl.java:1975)
    at com.ibm.ws.management.application.client.AppInstallHelper.checkForXmiFiles(AppInstallHelper.java:1372)
    at com.ibm.ws.management.application.client.AppInstallHelper.checkForXmiFiles(AppInstallHelper.java:1331)
    at com.ibm.ws.management.application.client.AppInstallHelper.checkForEE5Restrictions(AppInstallHelper.java:512)
    at com.ibm.ws.management.application.client.AppInstallHelper.checkForEE5Restrictions(AppInstallHelper.java:477)
    at com.ibm.ws.management.application.client.AppInstallHelper.getAppDeploymentInfo(AppInstallHelper.java:563)
    at com.ibm.websphere.management.application.AppManagementFactory.readArchive(AppManagementFactory.java:129)
    ... 16 more

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

eclipse或jenkins或WAS之间是否有任何版本差异? 任何帮助将不胜感激......

2 个答案:

答案 0 :(得分:1)

这是带有WebSphere Deployer插件的known issue,您似乎已在Jenkins问题跟踪器上提交了副本。

该问题上的latest comments表示已经修复,但尚未发布。

答案 1 :(得分:1)

它得到了解决..我一直在使用在JDK 1.7上运行的WAS8.5 jar。我用JDK 1.6罐替换了它们。并成功部署。谢谢..