[英]Ear file installation through jython giving issue in websphere application server startup
嗨,我有以下邏輯將warpath中的war和ear文件安裝到Websphere中。 運行腳本后,它會成功安裝war和ears,但是在服務器分層期間,僅對ear文件會拋出錯誤。 如果我使用相同的commandlogic直接在wsadmin上執行以進行耳文件安裝,那么它可以正常工作,甚至服務器啟動也沒有錯誤,任何人都可以分析腳本中出了什么問題
錯誤: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:否協議: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])
您的部署腳本正常。 但是您對Spring有一個不同的問題:
Could not instantiate bean class [pegasus.integration.framework.HttpClientUrlResource]: Constructor threw exception; nested exception is java.net.MalformedURLException: no protocol: null
我認為您必須為應用程序將類加載器策略設置為PARENT_LAST
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.