JVM configurations set through Windows service 'service.bat' file seems to override configurations from 'standalone.conf.bat' file

Solution Verified - Updated -

Issue

  • When deploying an application on Red Hat JBoss EAP 6.2.0, where the server was started using command prompt (i.e. standalone.bat script) it is working fine. But when users try to start server using Windows service approach , it throws the following exception.
...
06:16:03,966 WARN  [org.jboss.modules] (DeploymentScanner-threads - 2) Failed to define class org.jboss.as.server.deployment.scanner.ZipCompletionScanner in Module "org.jboss.as.deployment-scanner:main" from local module loader @735c3f7b (finder: local module finder @2d4bdf68 (roots: C:\jboss-eap-6.2.0\modules,C:\jboss-eap-6.2.0\modules\system\layers\base)): java.lang.OutOfMemoryError: PermGen space
...
  • Users also tried increasing the Heap and PermGen memory in standalone.conf.bat file just like the following way, but users are still getting the same OutOfMemoryError in server.log file while running EAP 6 server as window service but using command prompt to start the server it is running fine without any error. Presently memory configuration in the standalone.conf.bat file is shown as below.
...
set "JAVA_OPTS=-Xms2G -Xmx4G -XX:MaxPermSize=1G"
...
  • Interestingly the service.bat file for the Windows service also seems to set the JAVA_OPTS property exclusively like the following way.
set JAVA_OPTS=-Xrs
  • Why is it still throwing the OutOfMemoryError on PermGen space even after the PermGen space has been increased through appropriate JVM parameter through standalone.conf.bat file ?
  • We are facing issue where if we start the JBOSS from command line it is picking up the JVM setting defined in "standalone.conf.bat" but it doesn't pick the same if we start it from windows Services.

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.2.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content