我有一个WebSphere应用服务器V8.5自由配置文件在eclipse。我的webapp给了java.lang.OutOfMemoryError,因此我需要增加堆的大小。
正如这和这文章所建议的那样,我通过添加jvmEntries标记(以前没有)来更改server.xml:
<server description="new server">
<!-- Enable features -->
<featureManager>
<feature>jsp-2.2</feature>
<feature>localConnector-1.0</feature>
<feature>jpa-2.0</feature>
</featureManager>
<!-- To access this server from a remote client add a host attribute to
the following element, e.g. host="*" -->
<httpEndpoint httpPort="9080" httpsPort="9443" id="defaultHttpEndpoint" />
<jvmEntries initialHeapSize="1024" maximumHeapSize="2048" />
<applicationMonitor updateTrigger="mbean" />
<webApplication id="app" location="app.war"
name="app" />
</server>但eclipse将其显示为无效标记,并有以下错误:
2.4.a:找到了以元素'jvmEntries‘开头的无效内容。{{包括、变量、trustAssociation、applicationMonitor、应用程序、类加载、basicRegistry、bundleRepository、osgiApplication、身份验证、authCache、jaasLoginModule、jaasLoginContextEntry、cdiContainer、channelfw、en29、库、collectiveMember、hostAuthInfo、managedExecutorService、connectionManager、contextService、distributedMap、enterpriseApplication、contextService、、#en24、#en25、#en26、jpa、#en29、文件集、执行器、、配置、、#en32、#en33、#en34、#en35、#en36、37、38、#en39、#len39、#en40、#len40、#en40、oauthProvider,oauth-角色,remoteFileAccess,管理员角色, 需要quickStartSecurity、pluginConfiguration、webContainer、httpSession、httpSessionDatabase、sslDefault、keyStore、ssl、sslOptions、timedOperation、事务、webAppSecurity、federatedRepository、zosLogging、授权-角色}‘。
那么我应该如何增加堆的大小呢?
发布于 2015-02-17 17:55:29
正确的方法是在服务器目录中创建具有以下内容的jvm.options文件,例如:
-Xms512m
-Xmx1024m检查这个链接自定义自由配置文件环境
在Eclipse中,可以在Servers视图中右键单击服务器,然后选择New > Server Environment File > jvm.options。
发布于 2015-02-17 17:56:24
自由配置文件与常规的WebSphere配置文件略有不同。您需要根据以下说明配置一个jvm.options文件:
在WebSphere应用服务器V8.5自由配置文件中设置通用JVM参数
自定义自由配置文件环境
https://stackoverflow.com/questions/28563098
复制相似问题