2015년 8월 31일 월요일

This parser does not support specification "null" version "null" 에러발생시 처리방법

Struts2 showcase를 실행해보려고 했는데 에러가 발생하였다.

This parser does not support specification "null" version "null" 구글링 검색결과 톰캣7버전을 사용할 경우, 그리고 classpath에 2개이상의 parser가 있을경우 잘못된 버전을 사용하기 때문이라고 한다. 톰캣 옵션에 다음과 같은 옵션을 추가하면 에러없이 구동이 된다.

















[원문]
If you start Tomcat 7 and got the error: java.lang.UnsupportedOperationException: This parser does not support specification "null" version "null"

Just put the parameter below and restart Tomcat:
-Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl


This happens because you have two parsers in your classpath, and the Tomcat is getting a error loading the wrong version.
*This happened to me when I use Paypal SDK in Tomcat 7 and MyFaces.

출처 : http://softwareisart.blogspot.kr/2012/09/this-parser-does-not-support.html