How to deploy IBM WAS ear with Python?

时间:2019-04-16 23:03:28

标签: python-2.7 ant subprocess websphere

I have a python script that's running bat file which then runs ant to deploy WAS ear. I'm getting Java class not found error.

Here's the python script I'm running:

configdir = "D:/MSCM/MSCM1/config"
status = subprocess.call("installmscm.bat", cwd=configdir, shell=True)

Here's the installmscm.bat:

setlocal
set ANT_HOME=.\..\ant
set PATH=.\..\ant\bin;%PATH%
ant -f build.xml deploy.dist.ear

Here's the deploy.dist.ear from build.xml

<target name="deploy.dist.ear" depends="replace.default.user.sched.period,eval.server,eval.jboss,start.server.prompt">
    <antcall target="deploy.dist.ear.was" />
    <antcall target="deploy.dist.ear.jboss" />
</target>

Here's the Java error I'm getting (it's huge but had to cut it down):

deploy.dist.ear:

[echo] BUILD_ENV = ${env.BUILD_ENV}

deploy.dist.ear.was: [echo] BUILD_ENV = ${env.BUILD_ENV}

[wsadmin] The IBM Class Sharing Adaptor will not work in this configuration.
[wsadmin] You are not running on a J9 Java VM.
[wsadmin] org.eclipse.core.runtime.CoreException: Plug-in "com.ibm.ws.admin.services" was unable to instantiate class "com.ibm.ws.scripting.WasxShell".

[wsadmin] Caused by: java.lang.ClassNotFoundException: com.ibm.CORBA.iiop.ORB
[wsadmin]     at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:506)


BUILD FAILED
D:\MSCM\MSCM1\config\build.xml:1660: The following error occurred while executing this line:
D:\MSCM\MSCM1\config\build.xml:1699: Java returned: -1

0 个答案:

没有答案