开发者

"Java heap space" error when deploying WAR with ant on Weblogic 10.3

I'm getting this error when deploying application WAR files from my ant build via a task that calls weblogic.Deployer. This is on Windows XP, server is not in Production mode, there are only 2 other WARs installed on the server, one being just static content (web.xml + png/css/javascript files), no other weblogic servers installed on the PC. The server CPU never goes above 25%. JRockit JVM 1.6.0_05-b13. JSP files are pre-compiled with weblogic.appc and so stored in the war as servlets (.class files). Also, WAR file is about 20M, including jar libs, around 500 classes, and ~200 compiled JSP pages.

Solutions attempted:

  • Rebooting the weblogic server multiple times: No Effect, still fails
  • Server PC has 2GB ram, so increased the memory params for the Weblogic server to -Xms256m -Xmx512m -XX:PermSize=48m -XX:MaxPermSize=256m: No Effect, still fails
  • Deploy through Weblogic console: WAR deploys fine, so not a bug in setup of war
  • Use ant script to deploy to another server: successful to another server, so it's not a bug in the script

I hope someone has seen this before or has an idea of something else to try, I've been looking at this for hours!

deploy-war:
     [echo] Deploying application...
     [echo] Deploying application
     [java] weblogic.Deployer invoked with options:  -adminurl t3://corpitdev50ddh11:7001 \
               -username weblogic -name 401k_clt-antdeploy -stage \
               -upload /opt/appl/hrsapps/401k/client/dist/app/401k_clt.war \
               -targets AdminServer -verbose -deploy
     [java] <Jan 13, 2010 10:41:22 AM EST> <Info> <J2EE Deployment SPI> <BEA-260121> \
   开发者_StackOverflow            <Initiating deploy operation for application, 401k_clt-antdeploy \
               [archive: /opt/appl/hrsapps/401k/client/dist/app/401k_clt.war], to AdminServer .>
     [java] Java heap space

BUILD FAILED
/opt/appl/hrsapps/401k/build-macros.xml:601: The following error occurred while executing this line:
/opt/appl/hrsapps/401k/build-macros.xml:557: Java returned: 1


It looks as if the JVM running the weblogic.deployer is running out of memory (not the server itself) and I'm not sure which heap params you've changed.

Try to modify the ant script, so that the task starting the WebLogic deployer is assigned more heap space:

<java ... fork="true" maxmemory="512m" (or more if required)>
    ...
</java>


Can you confirm that you tried to change the memory settings at the Ant level (for example by setting the ANT_OPTS environment variable, something like that ANT_OPTS=-Xmx1024m).

For me, even if the script works with another weblogic instance (is it really the same instance btw? same version? etc), it's the your Ant process that is running out of memory, not WebLogic (this explains why restarting WebLogic doesn't change anything and why deploying through the admin console works).


We had a similar problem - in our case we had changed the SDK to Java 1.6 from 1.5 and something in the WLDeploy task caused an infinite loop which meant no matter how much we upper the memory we always received an Java heap space issue.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜