You'll should be pleased you have tomcat running on linux :
http://www.theserverside.com/discussions/thread.tss?thread_id=38377&utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+techtarget%2Ftsscom%2Fhome+%28TheServerSide.com%3A+Your+Enterprise+Java+Community%29&utm_content=Google+Reader
;)
James Elsey
It was Ant by the look of things. In the end I added:Hi
> On Sun, Apr 4, 2010 at 10:47 AM, James Elsey <james.elsey@gmail.com> wrote:
>> From this forum post[1] you should just be able to modify the catalina
>> startup script,
>>
>> Gotta go out so I don't have time to try it myself, but good luck!
>>
>> [1]
>> http://www.coderanch.com/t/421341/Tomcat/change-JVM-setting-Xms-Xmx#1858331
>
> I've managed to increase the memory by adding:
>
> export CATALINA_OPTS="-XmX2048 -Xms2048"
>
> to /etc/init.d/tomcat. However, it hasn't fixed my deployment problem:
>
>
> deploy-webapp:
>
> BUILD FAILED
> java.lang.OutOfMemoryError: Java heap space
> at java.util.Arrays.copyOf(Arrays.java:2786)
> at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:94)
> at sun.net.www.http.PosterOutputStream.write(PosterOutputStream.java:61)
> at java.io.BufferedOutputStream.write(BufferedOutputStream.java:105)
> at org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalinaTask.java:215)
> at org.apache.catalina.ant.DeployTask.execute(DeployTask.java:201)
> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
> at org.apache.tools.ant.Task.perform(Task.java:348)
> at org.apache.tools.ant.Target.execute(Target.java:357)
> at org.apache.tools.ant.Target.performTasks(Target.java:385)
> at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
> at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
> at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
> at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
> at org.apache.tools.ant.Main.runBuild(Main.java:758)
> at org.apache.tools.ant.Main.startAnt(Main.java:217)
> at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
> at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
>
> And now I look at the stack trace a bit closer, I wonder if it's Ant
> that's running out of space.
ANT_OPTS="-Xmx1024m -Xms1024m"
export ANT_OPTS
to /usr/share/ant/bin/ant and it appears to have fixed the problem.
_______________________________________________
main@lists.alug.org.uk
http://www.alug.org.uk/
http://lists.alug.org.uk/mailman/listinfo/main
Unsubscribe? See message headers or the web site above!