Hi i want to deploy my application on Tomcat with Maven 2.0. I think my pom.xml is correct.
When i enter "mvn tomcat:deploy" in the console, the deployment starts but i get an Java Heap Space. view plaincopy to clipboardprint? 1. 2. [INFO] Scanning for projects... 3. [INFO] ------------------------------------------------------------------------ 4. [INFO] Building routes 5. [INFO] task-segment: [tomcat:deploy] 6. [INFO] ------------------------------------------------------------------------ 7. [INFO] Preparing tomcat:deploy 8. [INFO] [resources:resources] 9. [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! 10. [INFO] Copying 165 resources 11. [INFO] [compiler:compile] 12. [INFO] Nothing to compile - all classes are up to date 13. [INFO] [jspc:compile {execution: jspc}] 14. [INFO] [resources:testResources] 15. [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! 16. [INFO] skip non existing resourceDirectory /home/tboss/workspace_routenspecial/route_special/src/test/resources 17. [INFO] [compiler:testCompile] 18. [INFO] No sources to compile 19. [INFO] [surefire:test] 20. [INFO] No tests to run. 21. [INFO] [war:war] 22. [INFO] Exploding webapp... 23. [INFO] Copy webapp webResources to /home/tboss/workspace_routenspecial/route_special/target/bmw-routes_maven 24. [INFO] Copy webapp webResources to /home/tboss/workspace_routenspecial/route_special/target/bmw-routes_maven 25. [INFO] Assembling webapp route_special in /home/tboss/workspace_routenspecial/route_special/target/bmw-routes_maven 26. [INFO] Generating war /home/tboss/workspace_routenspecial/route_special/target/bmw-routes_maven.war 27. [INFO] Building war: /home/tboss/workspace_routenspecial/route_special/target/bmw-routes_maven.war 28. [INFO] [tomcat:deploy] 29. [INFO] Deploying war to http://localhost:8080/bmw-routes_maven 30. [INFO] ------------------------------------------------------------------------ 31. [ERROR] FATAL ERROR 32. [INFO] ------------------------------------------------------------------------ 33. [INFO] Java heap space 34. [INFO] ------------------------------------------------------------------------ 35. [INFO] Trace 36. java.lang.OutOfMemoryError: Java heap space 37. at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:95) 38. at sun.net.www.http.PosterOutputStream.write(PosterOutputStream.java:61) 39. at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65) 40. at java.io.BufferedOutputStream.write(BufferedOutputStream.java:109) 41. at org.codehaus.mojo.tomcat.TomcatManager.pipe(TomcatManager.java:718) 42. at org.codehaus.mojo.tomcat.TomcatManager.invoke(TomcatManager.java:616) 43. at org.codehaus.mojo.tomcat.TomcatManager.deployImpl(TomcatManager.java:680) 44. at org.codehaus.mojo.tomcat.TomcatManager.deploy(TomcatManager.java:302) 45. at org.codehaus.mojo.tomcat.DeployMojo.deployWar(DeployMojo.java:84) 46. at org.codehaus.mojo.tomcat.AbstractDeployMojo.invokeManager(AbstractDeployMojo.java:83) 47. at org.codehaus.mojo.tomcat.AbstractCatalinaMojo.execute(AbstractCatalinaMojo.java:132) 48. at org.codehaus.mojo.tomcat.AbstractWarCatalinaMojo.execute(AbstractWarCatalinaMojo.java:59) 49. at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483) 50. at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:678) 51. at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:553) 52. at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:523) 53. at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371) 54. at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:332) 55. at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181) 56. at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356) 57. at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137) 58. at org.apache.maven.cli.MavenCli.main(MavenCli.java:356) 59. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 60. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 61. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 62. at java.lang.reflect.Method.invoke(Method.java:592) 63. at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) 64. at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) 65. at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) 66. at org.codehaus.classworlds.Launcher.main(Launcher.java:375) 67. [INFO] ------------------------------------------------------------------------ 68. [INFO] Total time: 33 seconds 69. [INFO] Finished at: Tue Jan 12 10:48:45 GMT+01:00 2010 70. [INFO] Final Memory: 11M/509M 71. [INFO] ------------------------------------------------------------------------ 72. [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Building routes [INFO] task-segment: [tomcat:deploy] [INFO] ------------------------------------------------------------------------ [INFO] Preparing tomcat:deploy [INFO] [resources:resources] [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 165 resources [INFO] [compiler:compile] [INFO] Nothing to compile - all classes are up to date [INFO] [jspc:compile {execution: jspc}] [INFO] [resources:testResources] [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory /home/tboss/workspace_routenspecial/route_special/src/test/resources [INFO] [compiler:testCompile] [INFO] No sources to compile [INFO] [surefire:test] [INFO] No tests to run. [INFO] [war:war] [INFO] Exploding webapp... [INFO] Copy webapp webResources to /home/tboss/workspace_routenspecial/route_special/target/bmw-routes_maven [INFO] Copy webapp webResources to /home/tboss/workspace_routenspecial/route_special/target/bmw-routes_maven [INFO] Assembling webapp route_special in /home/tboss/workspace_routenspecial/route_special/target/bmw-routes_maven [INFO] Generating war /home/tboss/workspace_routenspecial/route_special/target/bmw-routes_maven.war [INFO] Building war: /home/tboss/workspace_routenspecial/route_special/target/bmw-routes_maven.war [INFO] [tomcat:deploy] [INFO] Deploying war to http://localhost:8080/bmw-routes_maven [INFO] ------------------------------------------------------------------------ [ERROR] FATAL ERROR [INFO] ------------------------------------------------------------------------ [INFO] Java heap space [INFO] ------------------------------------------------------------------------ [INFO] Trace java.lang.OutOfMemoryError: Java heap space at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:95) at sun.net.www.http.PosterOutputStream.write(PosterOutputStream.java:61) at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65) at java.io.BufferedOutputStream.write(BufferedOutputStream.java:109) at org.codehaus.mojo.tomcat.TomcatManager.pipe(TomcatManager.java:718) at org.codehaus.mojo.tomcat.TomcatManager.invoke(TomcatManager.java:616) at org.codehaus.mojo.tomcat.TomcatManager.deployImpl(TomcatManager.java:680) at org.codehaus.mojo.tomcat.TomcatManager.deploy(TomcatManager.java:302) at org.codehaus.mojo.tomcat.DeployMojo.deployWar(DeployMojo.java:84) at org.codehaus.mojo.tomcat.AbstractDeployMojo.invokeManager(AbstractDeployMojo.java:83) at org.codehaus.mojo.tomcat.AbstractCatalinaMojo.execute(AbstractCatalinaMojo.java:132) at org.codehaus.mojo.tomcat.AbstractWarCatalinaMojo.execute(AbstractWarCatalinaMojo.java:59) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:678) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:553) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:523) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:332) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137) at org.apache.maven.cli.MavenCli.main(MavenCli.java:356) 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:592) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) [INFO] ------------------------------------------------------------------------ [INFO] Total time: 33 seconds [INFO] Finished at: Tue Jan 12 10:48:45 GMT+01:00 2010 [INFO] Final Memory: 11M/509M [INFO] ------------------------------------------------------------------------ I set the following variables in home/.bashrc: export MAVEN_OPTS=-Xmx512m export CATALINA_OPTS=-Xmx512m export JAVA_OPTS=-Xmx512m and in apache-tomcat-6.0.20/bin/catalina.sh and apache-tomcat-6.0.20/bin/startup.sh: MAVEN_OPTS="-Xmx512m" CATALINA_OPTS="-Xmx512m" JAVA_OPTS="-Xmx512m" The problem is still there. Has anyone an idea? -- View this message in context: http://old.nabble.com/Maven-Depolyment-Tomcat-Java-Heap-Space-tp27125609p27125609.html Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org