• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 'java:DefaultDS'
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

 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ganeshkumar cheekati
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ?
 
Ranch Hand
Posts: 71
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@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.
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ganeshkumar cheekati
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi peter,

this is the content in gc.txt

 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 362
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 362
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can anybody give me the solution to demolish the problem?
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
reply
    Bookmark Topic Watch Topic
  • New Topic