wood burning stoves 2.0*
The moose likes JBoss/WildFly and the fly likes out of memory error occurs while redepolying in jboss 6.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "out of memory error occurs while redepolying in jboss 6.1" Watch "out of memory error occurs while redepolying in jboss 6.1" New topic

out of memory error occurs while redepolying in jboss 6.1

raghu tammina
Ranch Hand

Joined: Jul 11, 2012
Posts: 60
Hi i am new to the jboss,help me how to solve this issue

whenever i redeploying my project(more than once) it gives out of memory error ,after that i stop the server and again starts and then redepolying my project,it consumes a lot of time for me and redepolying and server statrting takes too much time.

my memory settings in run.conf batch file
JAVA_OPTS=-Xms128M -Xmx512M -XX:MaxPermSize=128M.

I was changed MaxPermSize to 256 and 512 also but it not works

Help me how to avoid this issue,and how to reduce the starting and redepolying time?

Siitesh Hind
Ranch Hand

Joined: Sep 06, 2012
Posts: 51
RAM of your desktop?
Jaikiran Pai

Joined: Jul 20, 2005
Posts: 10289

What kind of OutOfMemory? Please post the relevant exception stacktrace.

[My Blog] [JavaRanch Journal]
raghu tammina
Ranch Hand

Joined: Jul 11, 2012
Posts: 60
Here is the Stack trace

java.lang.OutOfMemoryError: PermGen space

vfs:///D:/server/jboss-6.1.0.Final/server/default/deploy/MozartCCNewUI.war -> java.lang.OutOfMemoryError: PermGen space

at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1370) [:2.2.2.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1316) [:2.2.2.GA]
at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:968) [:2.2.2.GA]
at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.checkComplete(MainDeployerPlugin.java:82) [:6.1.0.Final]
at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.checkComplete(ProfileControllerContext.java:138) [:0.2.2]
at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.deploy(HDScanner.java:246) [:0.2.2]
at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.complete(HDScanner.java:192) [:0.2.2]
at org.jboss.profileservice.management.TwoPCActionWrapper.doComplete(TwoPCActionWrapper.java:57) [:0.2.2]
at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.complete(AbstractTwoPhaseModificationAction.java:74) [:0.2.2]
at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.prepare(AbstractTwoPhaseModificationAction.java:95) [:0.2.2]
at org.jboss.profileservice.management.ModificationSession.prepare(ModificationSession.java:87) [:0.2.2]
at org.jboss.profileservice.management.AbstractActionController.internalPerfom(AbstractActionController.java:234) [:0.2.2]
at org.jboss.profileservice.management.AbstractActionController.performWrite(AbstractActionController.java:213) [:0.2.2]
at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:150) [:0.2.2]
at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:135) [:0.2.2]
at org.jboss.profileservice.deployment.hotdeploy.HDScanner.scan(HDScanner.java:146) [:0.2.2]
at org.jboss.profileservice.deployment.hotdeploy.HDScanner.run(HDScanner.java:90) [:0.2.2]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [:1.6.0_13]
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) [:1.6.0_13]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) [:1.6.0_13]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) [:1.6.0_13]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181) [:1.6.0_13]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205) [:1.6.0_13]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_13]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_13]
at java.lang.Thread.run(Thread.java:619) [:1.6.0_13]
raghu tammina
Ranch Hand

Joined: Jul 11, 2012
Posts: 60
RAM of my laptop is 4Gb
Peter Johnson

Joined: May 14, 2008
Posts: 5845

That error means that you ran out of permgen space. But if you increased the size to -XX:MaxPermSize=512M and you are still getting this message, then it mans that something is probably seriously wrong with your application. You should probably monitor the permgen size and try to find out why it keeps on increasing. Running with "-verbose:class" might give some clues.

JBoss In Action
Siitesh Hind
Ranch Hand

Joined: Sep 06, 2012
Posts: 51
Hey Peter

Is JBoss 6.1 a stable version to play with considering the issues popping up?

Raghu can check with 5.1.0 GA which is a stable version unless he is getting the same error there too.

If the error persists, the application deployed will need a relook at as per your post.
raghu tammina
Ranch Hand

Joined: Jul 11, 2012
Posts: 60
How can i run "-verbose:class" ?I dont know how to do this? help me out.
Peter Johnson

Joined: May 14, 2008
Posts: 5845

Add '-verbose:class' to one of the the JAVA_OPTS setting in run.conf.bat. For example:

The option causes the JVM to print out every class loaded and the JAR it came from. Make sure you redirect stdout to a file when you start JBoss AS because you will get a lot of output. For example:

raghu tammina
Ranch Hand

Joined: Jul 11, 2012
Posts: 60
I run the above command and This is my stack trace after starting server

9:18:02,106 INFO [AbstractJBossASServerBase] Server Configuration:

JBOSS_HOME URL: file:/D:/server/jboss-6.1.0.Final/
Bootstrap: $JBOSS_HOME\server/default/conf/bootstrap.xml
Common Base: $JBOSS_HOME\common/
Common Library: $JBOSS_HOME\common/lib/
Server Name: default
Server Base: $JBOSS_HOME\server/
Server Library: $JBOSS_HOME\server/default/lib/
Server Config: $JBOSS_HOME\server/default/conf/
Server Home: $JBOSS_HOME\server/default/
Server Data: $JBOSS_HOME\server/default/data/
Server Log: $JBOSS_HOME\server/default/log/
Server Temp: $JBOSS_HOME\server/default/tmp/

09:18:02,114 INFO [AbstractServer] Starting: JBossAS [6.1.0.Final "Neo"]
09:18:08,165 INFO [ServerInfo] Java version: 1.6.0_13,Sun Microsystems Inc.
09:18:08,166 INFO [ServerInfo] Java Runtime: Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
09:18:08,166 INFO [ServerInfo] Java VM: Java HotSpot(TM) 64-Bit Server VM 11.3-b02,Sun Microsystems Inc.
09:18:08,167 INFO [ServerInfo] OS-System: Windows Vista 6.1,amd64
09:18:08,168 INFO [ServerInfo] VM arguments: -Djboss.home=D:\server\jboss-6.1.0.Final -Djava.library.path=C:\Users\Dell\AppData\Local\Genuitec\Common\binary\com.sun.java.jdk.win32.x86_64_1.6.0.013\bin -Djava.endorsed.dirs=D:\server\jboss-6.1.0.Final\lib\endorsed -Xms128m -Xmx512m -XX:MaxPermSize=256m -Dlogging.configuration=file:logging.properties
09:18:08,286 INFO [JMXKernel] Legacy JMX core initialized
09:18:39,328 INFO [AbstractServerConfig] JBoss Web Services - Stack CXF Server 3.4.1.GA
09:18:42,284 INFO [JSFImplManagementDeployer] Initialized 3 JSF configurations: [Mojarra-1.2, MyFaces-2.0, Mojarra-2.0]
09:19:55,281 WARNING [FileConfigurationParser] AIO wasn't located on this platform, it will fall back to using pure Java NIO. If your platform is Linux, install LibAIO to enable the AIO journal
09:19:55,938 INFO [JMXConnector] starting JMXConnector on host
09:19:57,227 INFO [MailService] Mail Service bound to java:/Mail
09:20:00,385 INFO [HornetQServerImpl] live server is starting with configuration HornetQ Configuration (clustered=false,backup=false,sharedStore=true,journalDirectory=D:\server\jboss-6.1.0.Final\server\default\data/hornetq/journal,bindingsDirectory=D:\server\jboss-6.1.0.Final\server\default\data/hornetq/bindings,largeMessagesDirectory=D:\server\jboss-6.1.0.Final\server\default\data/hornetq/largemessages,pagingDirectory=D:\server\jboss-6.1.0.Final\server\default\data/hornetq/paging)
09:20:00,389 INFO [HornetQServerImpl] Waiting to obtain live lock
09:20:00,777 INFO [JournalStorageManager] Using NIO Journal
09:20:01,035 WARNING [HornetQServerImpl] Security risk! It has been detected that the cluster admin user and password have not been changed from the installation default. Please see the HornetQ user guide, cluster chapter, for instructions on how to do this.
09:20:02,001 INFO [FileLockNodeManager] Waiting to obtain live lock
09:20:02,001 INFO [FileLockNodeManager] Live Server Obtained live lock
09:20:06,507 INFO [NettyAcceptor] Started Netty Acceptor version 3.2.3.Final-r${buildNumber} for CORE protocol
09:20:06,512 INFO [NettyAcceptor] Started Netty Acceptor version 3.2.3.Final-r${buildNumber} for CORE protocol
09:20:06,546 INFO [HornetQServerImpl] Server is now live
09:20:06,548 INFO [HornetQServerImpl] HornetQ Server version 2.2.5.Final (HQ_2_2_5_FINAL_AS7, 121) [e834bade-e821-11e1-975e-78e4001fe13c] started
09:20:06,834 INFO [WebService] Using RMI server codebase:
09:20:07,315 INFO [jbossatx] ARJUNA-32010 JBossTS Recovery Service (tag: JBOSSTS_4_14_0_Final) - JBoss Inc.
09:20:07,331 INFO [arjuna] ARJUNA-12324 Start RecoveryActivators
09:20:07,375 INFO [arjuna] ARJUNA-12296 ExpiredEntryMonitor running at Thu, 25 Oct 2012 09:20:07
09:20:07,766 INFO [arjuna] ARJUNA-12310 Recovery manager listening on endpoint
09:20:07,771 INFO [arjuna] ARJUNA-12344 RecoveryManagerImple is ready on port 4712
09:20:07,782 INFO [jbossatx] ARJUNA-32013 Starting transaction recovery manager
09:20:07,806 INFO [arjuna] ARJUNA-12163 Starting service com.arjuna.ats.arjuna.recovery.ActionStatusService on port 4713
09:20:07,822 INFO [arjuna] ARJUNA-12337 TransactionStatusManagerItem host: port: 4713
09:20:08,071 INFO [arjuna] ARJUNA-12170 TransactionStatusManager started on port 4713 and host with service com.arjuna.ats.arjuna.recovery.ActionStatusService
09:20:08,336 INFO [jbossatx] ARJUNA-32017 JBossTS Transaction Service (JTA version - tag: JBOSSTS_4_14_0_Final) - JBoss Inc.
09:20:08,602 INFO [arjuna] ARJUNA-12202 registering bean jboss.jta:type=ObjectStore.
09:20:10,414 INFO [AprLifecycleListener] The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Users\Dell\AppData\Local\Genuitec\Common\binary\com.sun.java.jdk.win32.x86_64_1.6.0.013\bin
09:20:12,753 INFO [TomcatDeployment] deploy, ctxPath=/invoker
09:20:13,765 INFO [ModClusterService] Initializing mod_cluster 1.1.0.Final
09:20:13,958 INFO [RARDeployment] Required license terms exist, view vfs:/D:/server/jboss-6.1.0.Final/server/default/deploy/jboss-local-jdbc.rar/META-INF/ra.xml
09:20:14,009 INFO [RARDeployment] Required license terms exist, view vfs:/D:/server/jboss-6.1.0.Final/server/default/deploy/jboss-xa-jdbc.rar/META-INF/ra.xml
09:20:14,051 INFO [RARDeployment] Required license terms exist, view vfs:/D:/server/jboss-6.1.0.Final/server/default/deploy/jms-ra.rar/META-INF/ra.xml
09:20:14,094 INFO [HornetQResourceAdapter] HornetQ resource adaptor started
09:20:14,118 INFO [RARDeployment] Required license terms exist, view vfs:/D:/server/jboss-6.1.0.Final/server/default/deploy/mail-ra.rar/META-INF/ra.xml
09:20:14,172 INFO [RARDeployment] Required license terms exist, view vfs:/D:/server/jboss-6.1.0.Final/server/default/deploy/quartz-ra.rar/META-INF/ra.xml
09:20:14,528 INFO [SimpleThreadPool] Job execution threads will use class loader of thread: Thread-2
09:20:14,640 INFO [SchedulerSignalerImpl] Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
09:20:14,641 INFO [QuartzScheduler] Quartz Scheduler v.1.8.3 created.
09:20:14,648 INFO [RAMJobStore] RAMJobStore initialized.
09:20:14,655 INFO [QuartzScheduler] Scheduler meta-data: Quartz Scheduler (v1.8.3) 'JBossQuartzScheduler' with instanceId 'NON_CLUSTERED'
Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
Currently in standby mode.
Number of jobs executed: 0
Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads.
Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.

09:20:14,656 INFO [StdSchedulerFactory] Quartz scheduler 'JBossQuartzScheduler' initialized from an externally opened InputStream.
09:20:14,656 INFO [StdSchedulerFactory] Quartz scheduler version: 1.8.3
09:20:14,657 INFO [QuartzScheduler] Scheduler JBossQuartzScheduler_$_NON_CLUSTERED started.
09:20:15,936 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'javaefaultDS'
09:20:16,651 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
09:20:16,715 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=jdbc/zyomCost' to JNDI name 'java:jdbc/zyomCost'
09:20:16,957 INFO [xnio] XNIO Version 2.1.0.CR2
09:20:16,977 INFO [nio] XNIO NIO Implementation Version 2.1.0.CR2
09:20:17,603 INFO [remoting] JBoss Remoting version 3.1.0.Beta2
09:20:17,924 INFO [TomcatDeployment] deploy, ctxPath=/Example12
09:20:19,125 INFO [TilesPlugin] Tiles definition factory loaded for module ''.
09:20:19,128 INFO [ValidatorPlugIn] Loading validation rules file from '/WEB-INF/validator-rules.xml'
09:20:19,130 INFO [ValidatorPlugIn] Loading validation rules file from '/WEB-INF/validation.xml'
09:20:19,298 INFO [TomcatDeployment] deploy, ctxPath=/ExportData
09:20:19,412 ERROR [STDERR] log4j:WARN No appenders could be found for logger (org.apache.struts.util.PropertyMessageResources).

09:20:20,488 ERROR [STDERR] log4j:WARN Please initialize the log4j system properly.

09:20:20,800 INFO [TomcatDeployment] deploy, ctxPath=/MozartCCNewUI
09:20:20,895 INFO [[/MozartCCNewUI]] No Configuration for this context. Initializing.
09:20:20,896 INFO [[/MozartCCNewUI]] configuring cewolf app..
09:20:20,947 INFO [[/MozartCCNewUI]] using storage class de.laures.cewolf.storage.TransientSessionStorage
09:20:20,947 INFO [[/MozartCCNewUI]] using overlibURL overlib.js
09:20:20,947 INFO [[/MozartCCNewUI]] debugging is turned off
09:20:20,948 INFO [[/MozartCCNewUI]] ...done.
09:20:20,955 ERROR [STDERR] log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester).

09:20:20,955 ERROR [STDERR] log4j:WARN Please initialize the log4j system properly.

09:20:20,955 ERROR [STDERR] log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

09:20:21,687 INFO [TomcatDeployment] deploy, ctxPath=/
09:20:21,766 INFO [HornetQServerImpl] trying to deploy queue jms.queue.ExpiryQueue
09:20:21,846 INFO [HornetQServerImpl] trying to deploy queue jms.queue.DLQ
09:20:22,014 INFO [service] Removing bootstrap log handlers
09:20:22,205 INFO [org.apache.coyote.http11.Http11Protocol] Starting Coyote HTTP/1.1 on http-
09:20:22,223 INFO [org.apache.coyote.ajp.AjpProtocol] Starting Coyote AJP/1.3 on ajp-
09:20:22,228 INFO [org.jboss.bootstrap.impl.base.server.AbstractServer] JBossAS [6.1.0.Final "Neo"] Started in 2m:20s:106ms
raghu tammina
Ranch Hand

Joined: Jul 11, 2012
Posts: 60
i started jboss through run.batch file instead of in myeclipse ,after that i redepolyed my application.It is working fine.But i shutdown the server and then starts server in eclipse i tried again but it is giving out of memory error again...
Peter Johnson

Joined: May 14, 2008
Posts: 5845

So you run into the OOME when running from within Eclipse? Why did you hide this important piece of information? (Of course we would have told you to ignore Eclipse and run from the command line to help debug the problem.)

Eclipse (and MyEclipse) doesn't use the standard startup mechanisms. You need to look into the server definition in MyEclipse and change the Java settings there. In Eclipse you do this by going to the server properties and opening the Launch Configuration dialog box.
raghu tammina
Ranch Hand

Joined: Jul 11, 2012
Posts: 60
How can i add these settings to the server configuration

-Xms512M -Xmx1024M -XX:MaxPermSize=128M

i am getting this exception after adding above arguments to server configuration in myeclipse.
jboss: invalid option -- X

please see the attachemnt

[Thumbnail for screenshot.png]

Peter Johnson

Joined: May 14, 2008
Posts: 5845

You want to set the JVM option, not the Program Options. In Eclipse, I open the Server View, I double-click the server and then click the "Open launch configuration" link. In the resulting dialog box, I go to the "(x)= Arguments" tab and edit the VM Arguments box.
I agree. Here's the link: http://aspose.com/file-tools
subject: out of memory error occurs while redepolying in jboss 6.1