views:

1083

answers:

2

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> \
               <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

+3  A: 

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>
jarnbjo
The memory opts were for the server, not for ant, re-trying it now, thanks fro the idea!
Ed Griebel
This did the trick, maxmemory="256m" did it. Why Java still insists on 64m as the default is beyond me.... Thanks again!
Ed Griebel
+1  A: 

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).

Pascal Thivent
The memory opts were for the server, not for ant, re-trying it now.The different server is the same WL10.3 version (same install EXE) and WinXP, but it's possible that some of the thousands of WL config options are different. Thanks for the ideas!
Ed Griebel