gpt4 book ai didi

eclipse - 如何在 Eclipse 中增加 WebSphere Application Server V8.5 Liberty Profile 的堆大小?

转载 作者:行者123 更新时间:2023-12-02 18:27:04 24 4
gpt4 key购买 nike

我在 eclipse 中有一个 WebSphere Application Server V8.5 Liberty Profile。我的 web 应用程序一直给出 java.lang.OutOfMemoryError,因此我需要增加堆大小。

thisthis帖子建议我通过添加 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 将其显示为无效标签,并出现以下错误:

cvc-complex-type.2.4.a: Invalid content was found starting with element 'jvmEntries'. One of '{include, variable, trustAssociation, applicationMonitor, application, classloading, basicRegistry, bundleRepository, osgiApplication, authentication, authCache, jaasLoginModule, jaasLoginContextEntry, cdiContainer, channelfw, tcpOptions, library, collectiveMember, hostAuthInfo, managedExecutorService, connectionManager, contextService, distributedMap, enterpriseApplication, webApplication, httpDispatcher, mimeTypes, httpEncoding, virtualHost, httpOptions, httpAccessLogging, httpEndpoint, authData, dataSource, jdbcDriver, jndiEntry, jpa, jspEngine, fileset, executor, featureManager, config, customLdapFilterProperties, edirectoryLdapFilterProperties, domino50LdapFilterProperties, netscapeLdapFilterProperties, ldapRegistry, securewayLdapFilterProperties, iplanetLdapFilterProperties, idsLdapFilterProperties, activedLdapFilterProperties, logging, ltpa, ejbContainer, monitor, oauthProvider, oauth-roles, remoteFileAccess, administrator-role,
quickStartSecurity, pluginConfiguration, webContainer, httpSession, httpSessionDatabase, sslDefault, keyStore, ssl, sslOptions, timedOperation, transaction, webAppSecurity, federatedRepository, zosLogging, authorization-roles}' is expected.

那么我应该如何增加堆大小?

最佳答案

正确的方法是在服务器目录中创建 jvm.options 文件,其中包含以下内容,例如:

-Xms512m
-Xmx1024m

检查此链接 Customizing the Liberty profile environment

在 Eclipse 中,在 Servers View 中,您可以右键单击服务器,然后选择 New > Server Environment File > jvm.options

关于eclipse - 如何在 Eclipse 中增加 WebSphere Application Server V8.5 Liberty Profile 的堆大小?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28563098/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com