简体   繁体   中英

NoSuchMethodException/SAXParseException while deploying application on Tomcat

My project is using Java, Jersey, MyfacesCODI, primefaces, Hibernate. In this environment when I am deploying my project in Tomcat, it is getting an error saying

java.lang.NoSuchMethodException: 
    org.apache.catalina.deploy.WebXml addResourceEnvRef

and

org.xml.sax.SAXParseException; 
systemId: jndi:/localhost/School/WEB-INF/web.xml;
lineNumber: 13;
columnNumber: 22;
Error at (13, 22) :
   org.apache.catalina.deploy.WebXml addResourceEnvRef

What may be the issue? Any environment related issues? Thanks

normally you can simply add

<WatchedResource>your project/target/classes</WatchedResource>

to your tomcat server context.xml file to solve this problem. however it will not always work for some reason. So another solution here:

then add <Loader delegate="true" /> to your tomcat server context.xml can probably solve this problem too.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM