1

Java Spring-WS-Application サーバーを作成し、maven を使用してコマンド ラインからデプロイしようとしています。ただし、「mvn clean package」を実行しようとすると、ヒープ領域が不足しているため Java 仮想マシンを作成できなかったと表示されます。私のコンピューターには 4GB の RAM しかなく、悲しいことに 32 ビットの Windows を実行しています。-DskipTests を含める限り、展開は成功します。

このプロジェクトは、私のチームが作成した他のプロジェクトに依存しており、「mvn clean install」を使用して問題なく展開できます。他のサーバーも問題なくデプロイできるので、私の Java バージョンが壊れているとは思いません。さらに、私の開発チームの他のメンバーは、このサーバーを自分のマシンに正常に展開することができました。

また、すべての @Test アノテーションを調べてコメントアウトして、障害のあるテストを見つけようとしましたが、実行するテストがない場合でもこのエラーが発生します。

なぜこれが起こっているのかについて何か考えはありますか?

Java のバージョン:

java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
Java HotSpot(TM) Client VM (build 23.21-b01, mixed mode, sharing)

「mvn clean package:」の結果

   C:\workspace\My-Project>mvn clean package
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building My Project Spring-WS Application 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ my-project ---
[INFO] Deleting C:\workspace\My-Project\target
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ my-project ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\workspace\My-Project\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.0:compile (default-compile) @ my-project ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 49 source files to C:\workspace\My-Project\target\classes
[WARNING] Note: C:\workspace\My-Project\src\main\java\my\package\of\doom\impl\classImpl.java uses or overrides a 
deprecated API.
[WARNING] Note: Recompile with -Xlint:deprecation for details.
[INFO]
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ my-project ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.0:testCompile (default-testCompile) @ my-project ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 25 source files to C:\workspace\My-Project\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.14:test (default-test) @ my-project ---
[INFO] Surefire report directory: C:\workspace\My-Project\target\surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Error occurred during initialization of VM
Could not create the Java virtual machine.
Could not reserve enough space for object heap

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.783s
[INFO] Finished at: Thu Jun 13 09:01:15 EDT 2013
[INFO] Final Memory: 14M/54M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.14:test (default-test) on project my-pro
ject: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.14:test failed: The fo
rked VM terminated without saying properly goodbye. VM crash or System.exit called ?
[ERROR] Command wascmd.exe /X /C "C:\Oracle2\Middleware\jdk160_24\jre\bin\java -Xms512m -Xmx1024m -XX:MaxPermSize=512m -
jar C:\workspace\My-Project\target\surefire\surefirebooter4008500116671254841.jar C:\workspace\My-Project\target\surefir
e\surefire8598565507069545685tmp C:\workspace\My-Project\target\surefire\surefire_07977292658698847040tmp"
[ERROR] ->     [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR]     [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

Eclipse.ini:

-vm
C:/Oracle2/Middleware/jdk160_24/bin/javaw
-startup
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20110502
-showsplash
org.eclipse.platform
--launcher.defaultAction
openFile
-vmargs
-Xms512m
-Xmx1024m
-XX:MaxPermSize=512m
-Dsun.lang.ClassLoader.allowArraySyntax=true
4

1 に答える 1