I have several .war sharing about 80% of common dependencies. I noticed that, when booting up the jboss (I'm using wildfly 12), the above error arises if the .war number goes up to 4 and more.
I think it's because each .war individually loads a lot of classes so, what would happen if I created a module containing the common .jars? Due to the isolation nothing would do or, maybe, the individual classloaders would take the common dependencies from the jboss classloader thus solving my problem?
I don't think raising the default MaxMetaspace JVM parameter would fix this problem, at the best it would delay it as I'm expecting the number of .war growing up steadily in the time and, from my understing of the metaspace, this space is not garbage collected like the heap, right?