wood burning stoves 2.0*
The moose likes JBoss/WildFly and the fly likes OutOfMemoryError: java heap size while starting jboss4.2.2 in solaris Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "OutOfMemoryError: java heap size while starting jboss4.2.2 in solaris" Watch "OutOfMemoryError: java heap size while starting jboss4.2.2 in solaris" New topic
Author

OutOfMemoryError: java heap size while starting jboss4.2.2 in solaris

Ganeshkumar cheekati
Ranch Hand

Joined: Oct 13, 2008
Posts: 362
Hi all,
while starting jboss4.2.2 server in solaris i am getting the following error OutOfMemoryError: java heap size

16:04:07,649 INFO [Server] Server Name: default
16:04:07,649 INFO [Server] Server Home Dir: /export/home/703065029/JBOSS/jboss- 4.2.2.GA/server/default
16:04:07,650 INFO [Server] Server Home URL: file:/export/home/703065029/JBOSS/jboss-4.2.2.GA/server/default/
16:04:07,651 INFO [Server] Server Log Dir: /export/home/703065029/JBOSS/jboss-4.2.2.GA/server/default/log
16:04:07,659 INFO [Server] Server Temp Dir: /export/home/703065029/JBOSS/jboss-4.2.2.GA/server/default/tmp
16:04:07,661 INFO [Server] Root Deployment Filename: jboss-service.xml
16:04:09,090 INFO [ServerInfo] Java version: 1.5.0_12,Sun Microsystems Inc.
16:04:09,091 INFO [ServerInfo] Java VM: Java HotSpot(TM) Server VM 1.5.0_12-b04,Sun Microsystems Inc.
16:04:09,092 INFO [ServerInfo] OS-System: SunOS 5.10,sparc
16:04:10,824 INFO [Server] Core system initialized
16:04:21,301 INFO [WebService] Using RMI server codebase: http://3.205.136.125:8083/
16:04:21,310 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:jboss-log4j.xml
16:04:24,519 INFO [TransactionManagerService] JBossTS Transaction Service (JTA version) - JBoss Inc.
16:04:24,520 INFO [TransactionManagerService] Setting up property manager MBean and JMX layer
16:04:25,450 INFO [TransactionManagerService] Starting recovery manager
16:04:26,335 ERROR [STDERR] Exception in thread "Thread-5"
16:04:26,336 ERROR [STDERR] java.lang.OutOfMemoryError: Java heap space
16:04:26,338 ERROR [STDERR] at com.arjuna.ats.arjuna.state.InputBuffer.unpackString(InputBuffer.java:401)
16:04:26,338 ERROR [STDERR] at com.arjuna.ats.internal.arjuna.recovery.Trans actionStatusManagerItem.restore_state(TransactionStatusManagerItem.java:229)
16:04:26,339 ERROR [STDERR] at com.arjuna.ats.internal.arjuna.recovery.Trans actionStatusManagerItem.restoreThis(TransactionStatusManagerItem.java:201)
16:04:26,339 ERROR [STDERR] at com.arjuna.ats.internal.arjuna.recovery.Trans actionStatusManagerItem.recreate(TransactionStatusManagerItem.java:147)
16:04:26,340 ERROR [STDERR] at com.arjuna.ats.internal.arjuna.recovery.Expir edTransactionStatusManagerScanner.scan(ExpiredTransactionStatusManagerScanner.java:120)
16:04:26,340 ERROR [STDERR] at com.arjuna.ats.internal.arjuna.recovery.Expir edEntryMonitor.run(ExpiredEntryMonitor.java:212)
16:04:26,596 INFO [TransactionManagerService] Recovery manager started
16:04:26,596 INFO [TransactionManagerService] Binding TransactionManager JNDI Reference
16:04:39,216 INFO [EJB3Deployer] Starting java:comp multiplexer
16:04:40,614 INFO [STDOUT] no object for null
16:04:40,629 INFO [STDOUT] no object for null
16:04:40,747 INFO [STDOUT] no object for null
16:04:40,868 INFO [STDOUT] no object for {urn:jboss:bean-deployer}supplyType
16:04:40,924 INFO [STDOUT] no object for {urn:jboss:bean-deployer}dependsType
16:04:51,029 INFO [NativeServerConfig] JBoss Web Services - Native
16:04:51,029 INFO [NativeServerConfig] jbossws-native-2.0.1.SP2 (build=200710210837)
16:04:55,269 INFO [Embedded] Catalina naming disabled
16:04:56,019 INFO [AprLifecycleListener] The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/jdk/instances/jdk1.5.0/jre/lib/sparc/server:/usr/jdk/instances/jdk1.5.0/jre/lib/sparc:/usr/jdk/instances/jdk1.5.0/jre/../lib/sparc:/usr/lib
16:04:56,427 INFO [Http11Protocol] Initializing Coyote HTTP/1.1 on http-3.205.136.125-9090
16:04:56,430 INFO [AjpProtocol] Initializing Coyote AJP/1.3 on ajp-3.205.136.125-7009
16:04:56,431 INFO [Catalina] Initialization processed in 1161 ms
16:04:56,431 INFO [StandardService] Starting service jboss.web
16:04:56,441 INFO [StandardEngine] Starting Servlet Engine: JBossWeb/2.0.1.GA
16:04:56,733 INFO [Catalina] Server startup in 302 ms
16:04:57,166 INFO [TomcatDeployer] deploy, ctxPath=/IOPENSKE, warUrl=.../deploy/jboss-web.deployer/IOPENSKE.war/
16:05:00,293 ERROR [STDERR] log4j:WARN No such property [maxFileSize] in org.apache.log4j.DailyRollingFileAppender.
16:05:00,294 ERROR [STDERR] log4j:WARN No such property [maxBackupIndex] in org.apache.log4j.DailyRollingFileAppender.
16:05:06,377 INFO [TomcatDeployer] deploy, ctxPath=/, warUrl=.../deploy/jboss-web.deployer/ROOT.war/
16:05:06,924 INFO [TomcatDeployer] deploy, ctxPath=/invoker, warUrl=.../deploy/http-invoker.sar/invoker.war/
16:05:07,651 INFO [TomcatDeployer] deploy, ctxPath=/jbossws, warUrl=.../deploy/jbossws.sar/jbossws-context.war/
16:05:08,145 INFO [TomcatDeployer] deploy, ctxPath=/jbossmq-httpil, warUrl=.../deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/
16:05:11,631 INFO [TomcatDeployer] deploy, ctxPath=/web-console, warUrl=.../deploy/management/console-mgr.sar/web-console.war/
16:05:13,747 INFO [MailService] Mail Service bound to java:/Mail
16:05:14,404 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-local-jdbc.rar
16:05:14,581 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-xa-jdbc.rar
16:05:14,714 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-local-jdbc.rar
16:05:14,851 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-xa-jdbc.rar
16:05:15,144 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jms/jms-ra.rar
16:05:15,291 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/mail-ra.rar
16:05:15,467 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/quartz-ra.rar
16:05:15,505 INFO [QuartzResourceAdapter] start quartz!!!
16:05:15,869 INFO [SimpleThreadPool] Job execution threads will use class loader of thread: main
16:05:15,990 INFO [QuartzScheduler] Quartz Scheduler v.1.5.2 created.
16:05:16,007 INFO [RAMJobStore] RAMJobStore initialized.
16:05:16,009 INFO [StdSchedulerFactory] Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
16:05:16,009 INFO [StdSchedulerFactory] Quartz scheduler version: 1.5.2
16:05:16,010 INFO [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
16:05:18,743 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'javaefaultDS'
16:05:19,946 INFO [A] Bound to JNDI name: queue/A
16:05:19,953 INFO [B] Bound to JNDI name: queue/B
16:05:19,959 INFO [C] Bound to JNDI name: queue/C
16:05:19,966 INFO [D] Bound to JNDI name: queue/D
16:05:19,973 INFO [ex] Bound to JNDI name: queue/ex
16:05:20,066 INFO [testTopic] Bound to JNDI name: topic/testTopic
16:05:20,075 INFO [securedTopic] Bound to JNDI name: topic/securedTopic
16:05:20,082 INFO [testDurableTopic] Bound to JNDI name: topic/testDurableTopic
16:05:20,096 INFO [testQueue] Bound to JNDI name: queue/testQueue
16:05:20,296 INFO [UILServerILService] JBossMQ UIL service available at : /3.205.136.125:8093
16:05:20,476 INFO [DLQ] Bound to JNDI name: queue/DLQ
16:05:21,044 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
16:05:21,163 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
16:05:22,049 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-3.205.136.125-9090
16:05:22,154 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-3.205.136.125-7009
16:05:22,222 INFO [Server] JBoss (MX MicroKernel) [4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)] Started in 1m:14s:549ms


and current JAVA_OPTS are

if [ "x$JAVA_OPTS" = "x" ]; then
JAVA_OPTS="-Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000" -----------------in run.conf

&

JAVA_OPTS="-Xms512m -Xmx1024m" --------------------in run.sh


can anyone tell me how to solve this?

Thanks in Advance
Ganesh Kumar CH


SCJP5 and SCWCD1.5
Think Twice Act Wise...
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

When run.sh is run, it echoes some variable settings. Verify that the heap settings you made are echoed there as part of JAVA_OPTS.


JBoss In Action
Ganeshkumar cheekati
Ranch Hand

Joined: Oct 13, 2008
Posts: 362
i had given like JAVA_OPTS="-Xms512m -Xmx1024m"
in run.sh and
if [ "x$JAVA_OPTS" = "x" ]; then
JAVA_OPTS="-Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000"
# JAVA_OPTS="-server -Xms512m -Xmx1024m -XX:PermSize=64m -XX:MaxPermSize=128M -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000"
fi

in run.conf

even if i change the values of JAVA_OPTS its showing me the error
could please guide me ?
Harish Tam
Ranch Hand

Joined: Feb 17, 2005
Posts: 71

hello,

try changing -XX:PermSize=256m -XX:MaxPermSize=256M

from run.bat/sh file and test if the error comes up again i think this will resolve the issue.

Do let me know about this

Thanks


SCJP 1.4, SCWCD 1.4
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

@Harish: setting MaxPermSize higher would help if the error message was about the permanent generation, but the error was about the heap.

@Ganeshkumar: Add these options to JAVA_OPTS: "-verbose:gc -Xloggc:gc.txt"
These options will record the garbage collector behavior. Start JBoss AS again and attach the gc.txt to this post.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10069
    
163

To me it looks like you have commented out the JAVA_OPTS section:

# JAVA_OPTS="-server -Xms512m -Xmx1024m -XX:PermSize=64m -XX:MaxPermSize=128M -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000"


And you haven't yet shown us the echo statement output that you see on the console when you start the server.

[My Blog] [JavaRanch Journal]
Ganeshkumar cheekati
Ranch Hand

Joined: Oct 13, 2008
Posts: 362
Hi peter,

this is the content in gc.txt

Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

Was this from a run where you got the OOME? I suspect not because the gc log shows that you used at most 200MB or the 950MB heap.
Ganeshkumar cheekati
Ranch Hand

Joined: Oct 13, 2008
Posts: 362
yeah i have added in run.sh

DIRNAME=`dirname $0`
PROGNAME=`basename $0`
GREP="grep"
JAVA_OPTS="-Xms512m -Xmx1024m -verbose:gc -Xloggc:gc.txt"

then i got content in gc.txt after restarting the server...
Ganeshkumar cheekati
Ranch Hand

Joined: Oct 13, 2008
Posts: 362
Can anybody give me the solution to demolish the problem?
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

At this point I am at a loss. You claim that you are getting an OOME, but the the gc log shows NO evidence of that (and yes it will show evidence - a gc will happen immediately before the JVM throws am OOME, and the gc data will make it obvious that the JVM ran out of heap space). Therefore since you have not provided sufficient data to diagnose the problem, I cannot help you. You need to provide the gc log from a run in which the OOME occurs.

Now, if you claim that the OOME did occur for the gc data that you posted, do this:
a) Remove the "-Xloggc:gc.txt" setting from JAVA_OPTS. Doing so will cause the gc data to be placed in stdout (along with the console log info).
b) Run again, but this time redirecting stdout (and stderr) to a file:

./run.sh ... &> output.txt

c) Then attach the file to your reply.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: OutOfMemoryError: java heap size while starting jboss4.2.2 in solaris