简体   繁体   English

使用wlst脚本的Weblogic应用程序部署会发出内存不足异常

[英]Weblogic application deployment using wlst script gives out of memory exception

I am deploying an application using wlst script in Weblogic 12.1.2 and JDK 1.7.0.75. 我正在Weblogic 12.1.2和JDK 1.7.0.75中使用wlst脚本部署应用程序。 All the tasks(create domain, cofigure Admin Server, Start Server, connect) written in wlst script works, except for application deployment. 用wlst脚本编写的所有任务(创建域,cofigure管理服务器,启动服务器,连接)都可以工作,但应用程序部署除外。 App Deployment script: 应用部署脚本:

deploy(appName='App1', path='D://Applications//App1', targets='AdminServer', stageMode='nostage', securityModel='DDOnly')

Through console the application is deployed without any memory issues. 通过控制台可以部署应用程序而不会出现任何内存问题。 In console, I have chosen: Target style as "Install this deployment as an application", Security Model as "DD Only: Use only roles and policies that are defined in the deployment descriptors.", Staging Mode/Source Accessibility as "I will make the deployment accessible from the following location" and Plan Staging Mode/Plan Source Accessibility "Use the same accessibility as the application". 在控制台中,我选择:目标样式为“将此部署作为应用程序安装”,安全模型为“仅DD:仅使用部署描述符中定义的角色和策略。”,登台模式/源可访问性为“我将使部署可从以下位置访问”和计划分段模式/计划源可访问性“使用与应用程序相同的可访问性”。

Do I have to set any specific memory settings in wlst script for it to deploy successfully? 我必须在wlst脚本中设置任何特定的内存设置才能成功部署吗? Out of Memory Exception: 内存不足异常:

org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [beans-config.xml]; org.springframework.beans.factory.BeanDefinitionStoreException:从类路径资源[beans-config.xml]解析XML文档的意外异常; nested exception is java.lang.OutOfMemoryError: PermGen space 嵌套异常是java.lang.OutOfMemoryError:PermGen空间

I don't know about wlst script. 我不知道wlst脚本。 But when i happen to see such errors while working with WebLogic, I change the permgen values in the following file: 但是,当我在使用WebLogic时碰巧看到此类错误时,我更改了以下文件中的permgen值:

Oracle\\Middleware\\Oracle_Home\\user_projects\\domains\\mydomain\\bin\\setDomainEnv.cmd Oracle \\ Middleware \\ Oracle_Home \\ user_projects \\ domains \\ mydomain \\ bin \\ setDomainEnv.cmd

(if you are working on UNIX system, see the setDomainEnv.sh file). (如果您正在UNIX系统上工作,请参阅setDomainEnv.sh文件)。 Look for attributes 寻找属性

MEM_MAX_PERM_SIZE_64BIT=-XX:MaxPermSize=1024m
MEM_MAX_PERM_SIZE_32BIT=-XX:MaxPermSize=512m

Based on your Operating System (32 bit or 64 bit), set these values to higher digits. 根据您的操作系统(32位或64位),将这些值设置为更高的数字。 Restart your WebLogic instance. 重新启动您的WebLogic实例。

通过如下所述指定内存参数,在启动服务器后成功部署了应用程序:startServer('AdminServer','my_domain','t3:// localhost:7001','weblogic','password','user_projects / domain / my_domain','true',60000,'false', jvmArgs ='-XX:MaxPermSize = 256m,-Xms512m,-Xmx512m'

As you are deploying a app into domain level, best way is using Administration Console -> deployments -> install and then, change your deploy configure on the UI. 在将应用程序部署到域级别时,最好的方法是使用管理控制台->部署->安装,然后在UI上更改部署配置。 Most situation, it will go through. 在大多数情况下,它将经历。

WSLT be used to deploy app to partition is good reference. WSLT用于将应用程序部署到分区是很好的参考。

Java 8 have much better memory management. Java 8具有更好的内存管理。 Update your JDK version to 8, this problem may go away. 将您的JDK版本更新为8,此问题可能会消失。

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

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