2
votes

I've tried to deploy my application using Wildfly Management Console (wildfly 10.1.0.Final) but unfortunately failed due to the following reason / error :

Cannot upload deployment: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"MyApplication.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"MyApplication.war\".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment \"MyApplication.war\" Caused by: java.lang.OutOfMemoryError: Metaspace"},"WFLYCTL0412: Required services that are not installed:" => ["jboss.deployment.unit.\"MyApplication.war\".POST_MODULE"],"WFLYCTL0180: Services with missing/unavailable dependencies" => undefined}

I used Replace Deployment function provided on the console. I've used the same function to upload my .war application before this and successfully deployed.

I've tested my application locally and it can be deployed and executed without any errors.

2
I've been seeing this outOfMemory error for long time in my wildfly server while replacing the deployment. Everytime this error occurs, I simply restart the wildfly server and everything works again. So I didn't even care to research on this matter as restarting always worked for me :Dbibek shrestha

2 Answers

2
votes

Open the standalone.conf (or standalone.conf.bat if using windows) in a text editor. The file is located in the bin folder of your Wildfly server.

Search for the text -XX:MaxMetaspaceSize. It may have the value `-XX:MaxMetaspaceSize=256m

Increase 256m to 512m. And restart JBoss server. Try to deploy again.

If you are still getting this error, you can increase 512m to 1g but that might be a overkill. `

2
votes

You need to show the content of your standalone.xml or conf file. What is your JAVA_OPTS settings?

From the error log you have given, it looks like Wildfly is throwing OOM exception for the metadata space. Increase the value of the parameter XX:MaxMetaspaceSize.