5

I have this type of problem:

I've configured Artifactory to use as Internal proxy repository and everything works fine except that now i can't create new projects with m2Eclipse wizard.

I've modified settings.xml in this way:

<proxies>
 <proxy>
   <id>optional</id>
   <active>true</active>
   <protocol>http</protocol>
   <username></username>
   <password></password>
   <host>myproxymachine.mycompany.com</host>
   <port>8080</port>
   <nonProxyHosts>*.mycompany.com|127.0.0.1</nonProxyHosts>
 </proxy>
</proxies>

<servers>
 <server>
  <username>user</username>
  <password>pwd</password>
  <id>central</id>
</server>
<server>
  <username>user</username>
  <password>pwd</password>
  <id>snapshots</id>
</server>

<profile>
  <repositories>
    <repository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>central</id>
      <name>libs-release</name>
      <url>http://srvmmaven.mycompany.com:8081/artifactory/libs-release</url>
    </repository>
    <repository>
      <snapshots />
      <id>snapshots</id>
      <name>libs-snapshot</name>
      <url>http://srvmmaven.mycompany.com:8081/artifactory/libs-snapshot</url>
    </repository>
  </repositories>
  <pluginRepositories>
    <pluginRepository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>central</id>
      <name>repo</name>
      <url>http://srvmmaven.mycompany.com:8081/artifactory/repo</url>
    </pluginRepository>
    <pluginRepository>
      <snapshots />
      <id>snapshots</id>
      <name>repo</name>
      <url>http://srvmmaven.mycompany.com:8081/artifactory/repo</url>
    </pluginRepository>
  </pluginRepositories>
  <id>artifactory</id>
</profile>

<activeProfiles>
 <activeProfile>artifactory</activeProfile>
</activeProfiles>

When i try to create a new project, Eclipse crashes when it tries to load Nexus catalog.

This is the stacktrace:

!ENTRY org.eclipse.core.jobs 4 2 2013-03-27 10:16:19.803
!MESSAGE An internal error occurred during: "Retrieving archetypes:".
!STACK 0
java.lang.OutOfMemoryError: GC overhead limit exceeded
at java.util.Arrays.copyOfRange(Unknown Source)
at java.lang.String.<init>(Unknown Source)
at org.apache.lucene.index.TermBuffer.toTerm(TermBuffer.java:122)
at org.apache.lucene.index.SegmentTermEnum.term(SegmentTermEnum.java:167)
at org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:251)
at org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:218)
at org.apache.lucene.index.SegmentTermDocs.seek(SegmentTermDocs.java:55)
at org.apache.lucene.index.MultiSegmentReader$MultiTermDocs.termDocs(MultiSegmentReader.java:608)
at org.apache.lucene.index.MultiSegmentReader$MultiTermDocs.next(MultiSegmentReader.java:559)
at org.apache.lucene.search.FieldCacheImpl$10.createValue(FieldCacheImpl.java:384)
at org.apache.lucene.search.FieldCacheImpl$Cache.get(FieldCacheImpl.java:71)
at org.apache.lucene.search.FieldCacheImpl.getStringIndex(FieldCacheImpl.java:351)
at org.apache.lucene.search.FieldSortedHitQueue.comparatorString(FieldSortedHitQueue.java:415)
at org.apache.lucene.search.FieldSortedHitQueue$1.createValue(FieldSortedHitQueue.java:206)
at org.apache.lucene.search.FieldCacheImpl$Cache.get(FieldCacheImpl.java:71)
at org.apache.lucene.search.FieldSortedHitQueue.getCachedComparator(FieldSortedHitQueue.java:167)
at org.apache.lucene.search.FieldSortedHitQueue.<init>(FieldSortedHitQueue.java:55)
at org.apache.lucene.search.TopFieldDocCollector.<init>(TopFieldDocCollector.java:43)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:121)
at org.apache.lucene.search.Hits.getMoreDocs(Hits.java:113)
at org.apache.lucene.search.Hits.<init>(Hits.java:90)
at org.apache.lucene.search.Searcher.search(Searcher.java:61)
at org.apache.maven.index.DefaultSearchEngine.searchFlat(DefaultSearchEngine.java:191)
at org.apache.maven.index.DefaultSearchEngine.searchFlatPaged(DefaultSearchEngine.java:111)
at org.apache.maven.index.DefaultSearchEngine.searchFlatPaged(DefaultSearchEngine.java:89)
at org.apache.maven.index.DefaultNexusIndexer.searchFlat(DefaultNexusIndexer.java:404)
at org.apache.maven.index.archetype.NexusArchetypeDataSource.getArchetypeCatalog(NexusArchetypeDataSource.java:67)
at org.eclipse.m2e.core.internal.archetype.ArchetypeCatalogFactory$NexusIndexerCatalogFactory.getArchetypeCatalog(ArchetypeCatalogFactory.java:87)
at org.eclipse.m2e.core.ui.internal.wizards.MavenProjectWizardArchetypePage.getArchetypesForCatalog(MavenProjectWizardArchetypePage.java:519)
at org.eclipse.m2e.core.ui.internal.wizards.MavenProjectWizardArchetypePage$15.run(MavenProjectWizardArchetypePage.java:557)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

Everything works fine if i create a new project using Maven from the command line.

I'm using Eclipse Indigo SR2 and m2Eclipse plugin version 1.3.1.20130219-1424

Thanks.

betelgeuse
  • 160
  • 1
  • 2
  • 8
  • 4
    Since it shows us as `java.lang.OutOfMemoryError: GC overhead limit exceeded`. You may try to set `Eclipse VM Arguments` by increasing the `Xmx` and `Xms` as mentioning at http://wiki.eclipse.org/Eclipse.ini. Please also consider the http://stackoverflow.com/questions/5839359/java-lang-outofmemoryerror-gc-overhead-limit-exceeded as well. – Charlee Chitsuk Mar 27 '13 at 10:44
  • Thanks Charlee, your suggestion solved my problem! – betelgeuse Mar 27 '13 at 11:09

1 Answers1

5

For the sake of keeping Q&A in order, I'll copy @charlee-chitsuk answer:

Since it shows us as java.lang.OutOfMemoryError: GC overhead limit exceeded. You may try to set Eclipse VM Arguments by increasing the Xmx and Xms as mentioning at wiki.eclipse.org/Eclipse.ini.

JBaruch
  • 21,462
  • 4
  • 56
  • 89