【发布时间】:2014-08-03 14:14:34
【问题描述】:
嗨,我有一个以下逻辑将战争和耳朵文件安装到 websphere 中。 运行脚本后,它成功安装了war和ears,但在服务器stratup期间,它仅对ear文件抛出错误。 如果我使用相同的命令逻辑直接在 wsadmin 上执行 ear 文件安装,它工作正常,甚至服务器也没有错误出现,任何人都可以分析脚本中出了什么问题
错误:org.springframework.beans.factory.access.BootstrapException:无法初始化组定义。组资源名称[classpath*:beanRefContext.xml],工厂键[netbanksrv.context];嵌套异常是 org.springframework.beans.factory.BeanCreationException:在 URL [wsjar:file:/D:/IBM/WebSphere8/AppServer/Profiles/AppSrv12/installedApps/BLRVSWASBFT01Node10Cell/netbanksrv 中定义名称为“netbanksrv.context”的 bean 创建错误-ear.ear/lib/netbanksrv-core-5.4.3.jar!/beanRefContext.xml]:bean 的实例化失败;嵌套异常是 org.springframework.beans.BeanInstantiationException:无法实例化 bean 类 [pegasus.framework.spring.context.MethodCachingClassPathXmlApplicationContext]:构造函数抛出异常;嵌套异常是 org.springframework.beans.factory.BeanCreationException:在 URL [wsjar:file:/D:/IBM/WebSphere8/AppServer/Profiles/AppSrv12/installedApps/BLRVSWASBFT01Node10Cell/netbanksrv 中定义的名称为“genAccountServices.WSDLResource”的 bean 创建时出错-ear.ear/lib/integration-1.3.0.jar!/META-INF/spring/AccountServices-ws-springintegration.xml]:bean 实例化失败;嵌套异常是 org.springframework.beans.BeanInstantiationException:无法实例化 bean 类 [pegasus.integration.framework.HttpClientUrlResource]:构造函数抛出异常;嵌套异常是 java.net.MalformedURLException: no protocol: null
我的逻辑:
for fname in os.listdir(warPath):
if fname.endswith(".ear") or fname.endswith(".war"):
file_list.append(fname)
for i in range(len(file_list)):
earFile=file_list[i]
letter=earFile[0]
if (letter == "a"):
applicationName="admin-guiwar"
installApp(cellName, nodeName, serverName, earFile, applicationName);
classldr(applicationName)
if (letter == "i"):
applicationName="internetbank-guiwar"
installApp(cellName, nodeName, serverName, earFile, applicationName);
classldr(applicationName)
if (letter == "m"):
applicationName="mobilegateway"
installApp(cellName, nodeName, serverName, earFile, applicationName);
classldr(applicationName)
if (letter == "n"):
applicationName="netbanksrv-ear"
installApp(cellName, nodeName, serverName, earFile, applicationName);
classldr(applicationName)
def installApp (cellName, nodeName, serverName, warFileName, applicationName):
fullPath = warPath+"/"+warFileName
node = "-node "+nodeName
cell = "-cell "+cellName
svr = "-server "+serverName
appName = "-appname "+applicationName
AdminApp.install(fullPath, [node, cell, svr, appName])
【问题讨论】: