How to solve “com.ibm.etools.rmic.RMICException” when do serviceDeploy

    Today, when I perform the serviceDeploy on our mediation project I encountered a strange problem.I could serviceDeploy successfully manually, but not able to do it by hudson. When I used hudson to generate ear package automatically, I got deployment failed from the console, then I tried to find more details, after hours and hours later, I found there was an parameter I could used to trace the problem like the parameter of serviceDeploy.bat has.(The parameter was 'keep' ).  After  I turned on this switch, I found "com.ibm.etools.rmic.RMICException", the whole stacktrace were:

————————————————-
com.ibm.etools.rmic.RMICException: RMIC command failed on project: Med_RitPushEJB with message:

error: Class com.ibm.wsspi.sca.webservice.ejb.EJSRemoteStatelessexport_RitPushSOAP_c94fc2e4 not found.
error: Class com.ibm.wsspi.sca.webservice.ejb.EJSRemoteStatelessexport_RitPushSOAPHome_c94fc2e4 not found.
2 errors
Further details have  been recorded in the .log file in /var/lib/hudson/jobs/Med_RitPush/workspace/Med_RitPush_Ear/target/was6-maven-plugin/13128ac7dda/.metadata
        at com.ibm.etools.rmic.RMICClassLoader.runCompile(RMICClassLoader.java:442)
        at com.ibm.etools.rmic.RMICOperation.invokeRMICInJVM(RMICOperation.java:865)
        at com.ibm.etools.rmic.RMICOperation.rmic(RMICOperation.java:999)
        at com.ibm.etools.rmic.RMICOperation.generateStubs(RMICOperation.java:331)
        at com.ibm.etools.rmic.RMICOperation.run(RMICOperation.java:1080)
        at com.ibm.etools.ejbdeploy.EJBDeployer.visit(EJBDeployer.java:112)
        at com.ibm.etools.ejbdeploy.EJBDeployer.visit(EJBDeployer.java:173)
        at com.ibm.etools.ejbdeploy.EJBDeployer.doExecute(EJBDeployer.java:328)
        at com.ibm.etools.ejbdeploy.EJBDeployer.execute(EJBDeployer.java:298)
        at org.eclipse.jst.j2ee.internal.deploy.J2EEDeployOperation.deploy(J2EEDeployOperation.java:146)
        at org.eclipse.jst.j2ee.internal.deploy.J2EEDeployOperation.execute(J2EEDeployOperation.java:110)
        at com.ibm.ws.sca.rapiddeploy.headless.applications.ServiceDeployApplication.deploy(ServiceDeployApplication.java:1273)
        at com.ibm.ws.sca.rapiddeploy.headless.applications.ServiceDeployApplication.run(ServiceDeployApplication.java:310)
        at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:618)
        at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
        at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
        at org.eclipse.core.launcher.Main.run(Main.java:977)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:618)
        at com.ibm.ws.sca.rapiddeploy.headless.main.ServiceDeployLauncher.startup(ServiceDeployLauncher.java:178)
        at com.ibm.ws.sca.rapiddeploy.headless.main.ServiceDeployMain.startup(ServiceDeployMain.java:76)
        at com.ibm.ws.sca.rapiddeploy.headless.main.ServiceDeployMain.execute(ServiceDeployMain.java:52)
        at com.ibm.ws.sca.rapiddeploy.headless.main.ServiceDeployMain.main(ServiceDeployMain.java:121)
————————————————-

    Then I investigated it on the internet, after an hours later, I found the solution. It seems another defect of WAS…. (Shit, so many defect!!!! waste me so much time.)
OK, let me continue to write down the cause and solution. The problem was caused by JDK(IBM) incompatibility between WPS and WAS during a RMIC call. We can add  -DEJBDEPLOY_SYSTEM_CALL_RMIC=true to the serviceDeploy runtime jvm arguments. To me I add this arguments to setupCmdLine.sh. Then the problem solved.

Leave a Reply

Your email address will not be published. Required fields are marked *

You must enable javascript to see captcha here!