Can't load the whole Quarkus project in IntelliJ anymore?

397 views
Skip to first unread message

Jaikiran Pai

unread,
Mar 29, 2021, 10:20:24 AM3/29/21
to Quarkus Development mailing list
Until recently I used to be able to load the entire quarkus Maven
project into IntelliJ (all modules including integration tests).
However, this week I haven't been able to load the existing project nor
reimport the whole project afresh, into IntelliJ. It keeps giving
OutOfMemory - Heap space (I even increased the max heap to 4GB for
IntelliJ). Looks like we now have 870+ Maven modules in the project.

Is anyone here able to load the whole project into IntelliJ. Basically
creating the project afresh and pointing IntelliJ to load from the root
of the Quarkus Maven project? How much heap have you set for IntelliJ?
If loading the whole project isn't going to work anymore, is there some
specific set of modules you all load? So far I had found that loading
the whole set was very benefial in quick debugging and fixing of issues
within Quarkus, but looks like that's not going to work anymore given
the ever increasing number of modules.

-Jaikiran


Ivan St. Ivanov

unread,
Mar 29, 2021, 10:25:56 AM3/29/21
to jai.for...@gmail.com, Quarkus Development mailing list
I had the same problem as well. And was able to fix it with the following settings:

Help -> Change memory settings -> set to 4096
File -> Settings -> Build, Execution, Deployment -> Build Tools -> Maven -> Importing -> VM options for importer -> set to -Xmx4g -Xms1g

Hope this helps!

--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/db9f5e08-def8-a4d8-efe8-7f10a9c190c3%40gmail.com.

Roberto Cortez

unread,
Mar 29, 2021, 10:28:05 AM3/29/21
to ivan.st...@gmail.com, jai.for...@gmail.com, Quarkus Development mailing list
Was about to write what Ivan send. Thanks Ivan :)

Yes, in IDEA there are 2 memory settings, one for the IDE and another one for the Maven importer. I had the same issue in the past and I setting the memory for the Maven importer did the trick.

Cheers,
Roberto

Jaikiran Pai

unread,
Mar 29, 2021, 10:44:59 AM3/29/21
to Roberto Cortez, ivan.st...@gmail.com, Quarkus Development mailing list

Setting the Maven VM importer options did the trick and I can now load the whole project again. Thank you Ivan and Roberto :)

-Jaikiran

Paul Robinson

unread,
Mar 29, 2021, 11:22:54 AM3/29/21
to jai.for...@gmail.com, Roberto Cortez, ivan.st...@gmail.com, Quarkus Development mailing list
Thanks Ivan and Roberto, this helped me too.

Is there any benefit for setting it even higher? I seem to recall in the old days, that having too-high memory settings resulted in long GCs. I'm about to upgrade my Mac Mini to 64GB, so I want to make the most of the extra capacity if I can. 

(64GB is probably overkill (for my needs), but it's also a hassle to do the upgrade and I don't want to have to do it again!)

Paul.



--

Max Rydahl Andersen

unread,
Mar 29, 2021, 11:43:26 AM3/29/21
to Jaikiran Pai, Roberto Cortez, ivan.st...@gmail.com, Quarkus Development mailing list
On 29 Mar 2021, at 16:44, Jaikiran Pai wrote:

> Setting the Maven VM importer options did the trick and I can now load
> the whole project again. Thank you Ivan and Roberto :)

I fix it by using eclipse or just importing subparts :)

Can one of you who torture yourself by importing everything update
https://github.com/quarkusio/quarkus/blob/main/CONTRIBUTING.md
so we have this at least documented for others?

/max

> -Jaikiran
>
> On 29/03/21 7:57 pm, Roberto Cortez wrote:
>> Was about to write what Ivan send. Thanks Ivan :)
>>
>> Yes, in IDEA there are 2 memory settings, one for the IDE and another
>> one for the Maven importer. I had the same issue in the past and I
>> setting the memory for the Maven importer did the trick.
>>
>> Cheers,
>> Roberto
>>
>>> On 29 Mar 2021, at 15:25, Ivan St. Ivanov <ivan.st...@gmail.com
>>> <mailto:quarkus-dev%2Bunsu...@googlegroups.com> .
>>> <https://groups.google.com/d/msgid/quarkus-dev/db9f5e08-def8-a4d8-efe8-7f10a9c190c3%40gmail.com>
>>> .
>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Quarkus Development mailing list" group.
>>> To unsubscribe from this group and stop receiving emails from it,
>>> send an email to quarkus-dev...@googlegroups.com
>>> <mailto:quarkus-dev...@googlegroups.com> .
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/quarkus-dev/CACYLA9G5%3DsLWzceZ4X-Ui44ME8Hk0ArGv3ZkFLZa-ESqF8C0Jw%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/quarkus-dev/CACYLA9G5%3DsLWzceZ4X-Ui44ME8Hk0ArGv3ZkFLZa-ESqF8C0Jw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Quarkus Development mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to quarkus-dev...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/quarkus-dev/4bf38e42-c98d-c131-21f1-8b2c0e52fe31%40gmail.com.


/max
https://xam.dk/about

Erin Schnabel

unread,
Mar 30, 2021, 9:47:43 AM3/30/21
to Max Rydahl Andersen, Jaikiran Pai, Roberto Cortez, Ivan St. Ivanov, Quarkus Development mailing list
It is already in there. I missed it, too.. and felt pretty silly when I figured out the maven importer settings and went to update the CONTRIBUTING.md file myself to find it was already there..

Sanne Grinovero

unread,
Mar 30, 2021, 10:15:00 AM3/30/21
to ebul...@redhat.com, Max Rydahl Andersen, Jaikiran Pai, Roberto Cortez, Ivan St. Ivanov, Quarkus Development mailing list
On Tue, 30 Mar 2021 at 14:47, Erin Schnabel <ebul...@redhat.com> wrote:
It is already in there. I missed it, too.. and felt pretty silly when I figured out the maven importer settings and went to update the CONTRIBUTING.md file myself to find it was already there..

Right. I've had to point contributors to it several times, and now I see most of you didn't know either.

Clearly that's not where people look for it.

Yoann Rodiere

unread,
Mar 30, 2021, 10:24:50 AM3/30/21
to Sanne Grinovero, ebul...@redhat.com, Max Rydahl Andersen, Jaikiran Pai, Roberto Cortez, Ivan St. Ivanov, Quarkus Development mailing list
FWIW I added these specific instructions about heap size just a few weeks ago (Feb. 16th), so anyone reading the guide before that wouldn't have seen them.

Yoann Rodière
Hibernate Team


--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.

Max Rydahl Andersen

unread,
Mar 30, 2021, 10:47:24 AM3/30/21
to Yoann Rodiere, Sanne Grinovero, ebul...@redhat.com, Jaikiran Pai, Roberto Cortez, Ivan St. Ivanov, Quarkus Development mailing list

damn - I read that section yesterday and completely missed it ...:/

/max

Ivan St. Ivanov

unread,
Mar 31, 2021, 5:46:06 AM3/31/21
to Max Rydahl Andersen, Yoann Rodiere, Sanne Grinovero, Erin Schnabel, Jaikiran Pai, Roberto Cortez, Quarkus Development mailing list
Maybe I should open a new thread for this, but I'll try here.

After loading the whole project in IntelliJ IDEA, are you able to build it with Build -> Build Project (Ctrl + F9)? This is run automatically by the IDE upon running any unit test.

Because I get this:

image.png

And if I try to switch off building the project from the run configuration, then I get:

java.lang.NoClassDefFoundError: io/quarkus/arc/Arc

at io.quarkus.arc.runtime.context.ArcContextProvider.currentContext(ArcContextProvider.java:34)
at io.smallrye.context.impl.ThreadContextProviderPlan.takeThreadContextSnapshots(ThreadContextProviderPlan.java:72)
at io.smallrye.context.impl.SlowCapturedContextState.<init>(SlowCapturedContextState.java:25)
at io.smallrye.context.SmallRyeThreadContext.captureContext(SmallRyeThreadContext.java:729)
at io.smallrye.context.SmallRyeThreadContext.contextualConsumer(SmallRyeThreadContext.java:629)
at io.smallrye.mutiny.context.BaseContextPropagationInterceptor.decorate(BaseContextPropagationInterceptor.java:36)
at io.smallrye.mutiny.infrastructure.Infrastructure.decorate(Infrastructure.java:132)

Thanks!
Ivan

Sanne Grinovero

unread,
Apr 7, 2021, 5:43:00 AM4/7/21
to Yoann Rodiere, ebul...@redhat.com, Max Rydahl Andersen, Jaikiran Pai, Roberto Cortez, Ivan St. Ivanov, Quarkus Development mailing list
On Tue, 30 Mar 2021 at 15:24, Yoann Rodiere <yo...@hibernate.org> wrote:
FWIW I added these specific instructions about heap size just a few weeks ago (Feb. 16th), so anyone reading the guide before that wouldn't have seen them.

I remember being puzzled by Yoann's comment ^ as I did point to similar instructions long before Feb. 16th, and finally figured it out: there are two sections in the same file now.

Fixing it [1], but this just confirms what I said in my previous email: people don't read it all

In this PR I also make use of the .mvn/jvm.config file in the project, as I've just learned that the Maven importer in IDEA will take that into account; it actually takes that into account  better than its own explicit settings, which is why so many contributors were in trouble recently [2].

I think that's ideal as people will no longer have to read (they didn't anyway..) but I hope we won't get in trouble with the defaults I've proposed, e.g. 8G might be too much for CI to handle?

Having a low Xms and generous Xmx should get us a long way I hope but this might need a little refining, and it would certainly help if we could lower the requirements.


Thanks



Jaikiran Pai

unread,
Apr 7, 2021, 9:27:07 AM4/7/21
to Ivan St. Ivanov, Max Rydahl Andersen, Yoann Rodiere, Sanne Grinovero, Erin Schnabel, Roberto Cortez, Quarkus Development mailing list

I had bunch of errors (after sorting out the OOM issues) which were similar to what you describe here. Basically, the IntelliJ IDE was unusable for me this past week and I didn't have time to investigate more. Today they released 2021.1 version of IntelliJ and I just upgraded to it and I no longer see these errors/ClassNotFound/NoClassDefError anymore. I think it's worth to just upgrade to this version and see if it fixes these issues.

-Jaikiran

Reply all
Reply to author
Forward
0 new messages