The context.xml file seems to be broken when building on Netbeans

When building openmrs on Netbeans, I encountered this problem. Build succeed, but Netbeans can’t deploy openmrs on tomcat. Below is the output of Netbeans. Any help is highly appreciated.

NetBeans: Deploying on Apache Tomcat 8.0.27.0 profile mode: false debug mode: false force redeploy: true In-place deployment at /home/nishen/Documents/GitHub/openmrs-core/webapp/target/openmrs Cannot deploy the module. The context.xml file seems to be broken. Check whether it is well-formed and valid.

I tried running on Jetty instread of tomcat. That works fine.