This issue was verified against WildFly 10.1.0.Final, which contains Hibernate 5.0.10.Final. To reproduce:
- unzip WildFly 10.1.0.Final
- in bin\standalone.conf.bat, overwrite the line with memory options with: the following line:
set "JAVA_OPTS=-Xms64M -Xmx256M -XX:MetaspaceSize=64M -XX:MaxMetaspaceSize=112m -XX:+HeapDumpOnOutOfMemoryError"
- launch WildFly through bin\standalone.bat
- unzip the attached User-WS.zip
- run "mvn clean install"
repeat the following 2 steps until you get an OOME:
- run "mvn wildfly:deploy"
- access the application. I did this through Swagger: open http://petstore.swagger.io and Explore http://localhost:8080/user-ws/swagger.json
When looking at the heap dump, JavaTypeDescriptorRegistry still has a reference to one of the application classes, which prevents the ModuleClassLoader from being GC'ed. PS: I can't seem to set the "Affects version" |