简体   繁体   English

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

[英]Ear file installation through jython giving issue in websphere application server startup

hi i have a below logic to install both war and ear files being in warpath into websphere. 嗨,我有以下逻辑将warpath中的war和ear文件安装到Websphere中。 after running the script it installs both war and ears successfully but during server stratup its throwing error only for ear file. 运行脚本后,它会成功安装war和ears,但是在服务器分层期间,仅对ear文件会抛出错误。 if i use same commandlogic to execute directly on wsadmin for ear file installation it works fine and even server comes up without error,can any one analyse whats going wrong in the script 如果我使用相同的commandlogic直接在wsadmin上执行以进行耳文件安装,那么它可以正常工作,甚至服务器启动也没有错误,任何人都可以分析脚本中出了什么问题

ERROR:org.springframework.beans.factory.access.BootstrapException: Unable to initialize group definition. 错误:org.springframework.beans.factory.access.BootstrapException:无法初始化组定义。 Group resource name [classpath*:beanRefContext.xml], factory key [netbanksrv.context]; 组资源名称[classpath *:beanRefContext.xml],工厂密钥[netbanksrv.context]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'netbanksrv.context' defined in URL [wsjar:file:/D:/IBM/WebSphere8/AppServer/Profiles/AppSrv12/installedApps/BLRVSWASBFT01Node10Cell/netbanksrv-ear.ear/lib/netbanksrv-core-5.4.3.jar!/beanRefContext.xml]: Instantiation of bean failed; 嵌套的异常是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失败; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [pegasus.framework.spring.context.MethodCachingClassPathXmlApplicationContext]: Constructor threw exception; 嵌套的异常是org.springframework.beans.BeanInstantiationException:无法实例化bean类[pegasus.framework.spring.context.MethodCachingClassPathXmlApplicationContext]:构造方法引发了异常。 nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'genAccountServices.WSDLResource' defined in URL [wsjar:file:/D:/IBM/WebSphere8/AppServer/Profiles/AppSrv12/installedApps/BLRVSWASBFT01Node10Cell/netbanksrv-ear.ear/lib/integration-1.3.0.jar!/META-INF/spring/AccountServices-ws-springintegration.xml]: Instantiation of bean failed; 嵌套的异常是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实例化失败; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [pegasus.integration.framework.HttpClientUrlResource]: Constructor threw exception; 嵌套的异常是org.springframework.beans.BeanInstantiationException:无法实例化bean类[pegasus.integration.framework.HttpClientUrlResource]:构造方法抛出了异常; nested exception is java.net.MalformedURLException: no protocol: null 嵌套的异常为java.net.MalformedURLException:否协议:null

my logic: 我的逻辑:

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])

Your deploy script is OK. 您的部署脚本正常。 But you have a different issue with Spring: 但是您对Spring有一个不同的问题:

 Could not instantiate bean class [pegasus.integration.framework.HttpClientUrlResource]: Constructor threw exception; nested exception is java.net.MalformedURLException: no protocol: null

I think you have to set class loader policy to PARENT_LAST for your application. 我认为您必须为应用程序将类加载器策略设置为PARENT_LAST

WAS Classloader Best Practices WAS Classloader最佳实践

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

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