cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to create custom behaviour

saikrishnatavva
Champ in-the-making
Champ in-the-making
Hi friends, I am new to alfresco, following the development tutorial I found in this link : http://ecmarchitect.com/alfresco-developer-series-tutorials/content/tutorial/tutorial.html#part-1-im....

I was able to create the alfresco project structure by writing the command mvn archetype:generate -Dfilter=org.alfresco:

After the creation of the while creating the custom behaviour & testing it by writing the command mvn install. I am getting the following error:


[INFO] Scanning for projects…
[INFO]                                                                        
[INFO] ————————————————————————
[INFO] Building content-tutorial-repo Repository AMP project 1.0-SNAPSHOT
[INFO] ————————————————————————
[INFO]
[INFO] — alfresco-maven-plugin:2.0.0:set-version (default-set-version) @ content-tutorial-repo —
[INFO] Removed -SNAPSHOT suffix from version - 1.0
[INFO] Added timestamp to version - 1.0.1505282159
[INFO]
[INFO] — build-helper-maven-plugin:1.9.1:add-test-resource (add-env-test-properties) @ content-tutorial-repo —
[INFO]
[INFO] — maven-resources-plugin:2.7:resources (default-resources) @ content-tutorial-repo —
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory D:\Yellow folder\$Tutorial_home\content-tutorial-repo\src\main\resources
[INFO] Copying 12 resources to ../content-tutorial-repo
[INFO]
[INFO] — maven-compiler-plugin:3.2:compile (default-compile) @ content-tutorial-repo —
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] — maven-resources-plugin:2.7:testResources (default-testResources) @ content-tutorial-repo —
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] Copying 1 resource
[INFO]
[INFO] — maven-resources-plugin:2.7:copy-resources (add-module-properties-to-test-classpath) @ content-tutorial-repo —
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource to alfresco/module/content-tutorial-repo
[INFO]
[INFO] — maven-resources-plugin:2.7:copy-resources (add-module-config-to-test-classpath) @ content-tutorial-repo —
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 7 resources
[INFO]
[INFO] — maven-compiler-plugin:3.2:testCompile (default-testCompile) @ content-tutorial-repo —
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] — maven-surefire-plugin:2.18:test (default-test) @ content-tutorial-repo —
[INFO] Surefire report directory: D:\Yellow folder\$Tutorial_home\content-tutorial-repo\target\surefire-reports

——————————————————-
T E S T S
——————————————————-
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Results :




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

[INFO] ————————————————————————
[INFO] BUILD FAILURE
[INFO] ————————————————————————
[INFO] Total time: 2.681s
[INFO] Finished at: Thu May 28 21:59:45 IST 2015
[INFO] Final Memory: 14M/35M
[INFO] ————————————————————————
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18:test (default-test) on project content-tutorial-repo: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.18:test failed: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
[ERROR] Command was cmd.exe /X /C ""C:\Program Files\Java\jdk1.7.0_51\jre\bin\java" -Xms256m -Xmx1524m -XX:MaxPermSize=256m -Duser.language=en -jar "D:\Yellow folder\$Tutorial_home\content-tutorial-repo\target\surefire\surefirebooter2807640877389208098.jar" "D:\Yellow folder\$Tutorial_home\content-tutorial-repo\target\surefire\surefire3216835983768699156tmp" "D:\Yellow folder\$Tutorial_home\content-tutorial-repo\target\surefire\surefire_08409771235685041123tmp""
[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





I didnt understand the where i went wrong.
For more information
alfresco version is 5.0.d
JAVA_OPTS variable :-Xms16m -Xmx16m
OS: windows xp (32 bit)

can Any one help me to find what is the error.

Thanks & Regards,
Sai Krishna

2 REPLIES 2

mrogers
Star Contributor
Star Contributor
The relevant part of your posting is :

Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

mitpatoliya
Star Collaborator
Star Collaborator
You are having issue with your JVM tuning. You are trying to allocate space more then capacity of your hardware.
Try changing
-Xms256m -Xmx1524m

to

-Xms256m -Xmx512m

Also you may need to use 64 bit machine as you could see link following link
https://wiki.alfresco.com/wiki/JVM_Tuning