An internal error occurred during: "Extracting archetypes:". Heap of Java space when creating a new Maven project

I am starting to learn Spring, so I am creating a new Maven project in eclipse.

When I try to create a new Maven project, it tries to fetch the archetype and gives an error

"An internal error occurred during: "Retrieving archetypes:"
Java heap space

      

Error window when creating maven project

Steps I followed: Create -> Maven Project -> use default workspace location (checked) and click Next -> awaiting archetype and error getting.

I installed the screenshot for reference.

Note. I have been trying to resolve this for hours, searched google and exchange stack, resized -Xmx to 1024m from 512m in elclipse.ini file and tried to restart eclipse, but this time eclipse refused to start. Also "Window -> Preferences -> Maven -> Download index of repository updates on startup" is NOT enabled in my eclpise as suggested in another answer to a similar question on stackoverflow to disable it.

Please help me with this.

+4


source to share


4 answers


As suggested by Jorge Campos in the comments above, I have increased the eclipse bud space. On eclipse ini add these options: -XX: PermSize = 512M -XX: MaxPermSize = 6144M and tested.



Now it works.

+6


source


Switching the workspace fixed that for me. File | Switch workspace



+1


source


Just clear the data in the folder with the copy of eclipse.ini below the code into it as your default memory is less than it needs it cannot get archetype

----------------------- eclipse.ini --------------------- --- ---

-startup
../Eclipse/plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar
--launcher.library
../Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.300.v20150602-1417
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.7
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
-XX:MaxPermSize=512m
-Xms512m
-Xmx6144m
-Xdock:icon=../Resources/Eclipse.icns
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts  

      


0


source


Your workspace is damaged somehow.

If you switch your workspace and try to create a new maven project, the problem goes away.

Just in case: you can switch your workspace from File> Switchworkspace> ... enter image description here

0


source







All Articles