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

I get this error when deploying application WAR files from my ant build through a task that calls weblogic.Deployer . This is on Windows XP, the server is not in Production mode, only 2 other WARs are installed on the server, one of which is only static content (web.xml + png / css / javascript files), no other web logical servers installed On a PC, the server processor never exceeds 25%. JRockit JVM 1.6.0_05-b13. JSP files are precompiled using weblogic.appc and are therefore stored in the war as servlets (.class files). In addition, the WAR file is about 20 M, including jar libs, about 500 classes, and ~ 200 compiled JSP pages.

Solutions:

  • Restarting the web server several times: No effect, still not working
  • The server PC has 2 GB of RAM, so the memory settings for the Weblogic server are increased to -Xms256m -Xmx512m -XX:PermSize=48m -XX:MaxPermSize=256m : No Effect, still not working
  • Deployment through the Weblogic: WAR console expands perfectly, so there’s no mistake in setting up a war
  • Use ant script to deploy to another server: successfully to another server, so it is not a script error

I hope someone has seen this before or have an idea to try something else, I looked at it 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►57: Java returned: 1

+4
source share
3 answers

It looks like the JVM working with weblogic.deployer has run out of memory (not the server itself), and I'm not sure which heap settings you changed.

Try changing the ant script so that the job starting with the WebLogic deployer is assigned more heap space:

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

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

For me, even if the script works with another weblogic instance (is it really the same btw instance? Same version? Etc.), this is your Ant process, which ends the memory, not WebLogic (this explains why restarting WebLogic doesn’t change anything and why deployment through the admin console works).

+3
source

We had a similar problem - in our case, we changed the SDK to Java 1.6 from 1.5, and something in the WLDeploy task caused an infinite loop, which meant that no matter how much we occupy the upper part of the memory, we always got a problem with a bunch of Java .

+1
source

All Articles