繁体   English   中英

通过jython安装Ear文件,从而在Websphere Application Server启动中产生问题

[英]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

WAS Classloader最佳实践

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM