반응형
Notice
Recent Posts
Recent Comments
Link
«   2025/02   »
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28
Tags
more
Archives
Today
Total
관리 메뉴

스터디 용 블로그

WorkBookFactory.create(InputStream or File)과 Tomcat 5 호환 문제 본문

카테고리 없음

WorkBookFactory.create(InputStream or File)과 Tomcat 5 호환 문제

워후 2015. 1. 28. 23:33
반응형


This is the error from running a webapp deployed to appserver:

1
java.lang.NoSuchMethodError: javax.xml.parsers.DocumentBuilderFactory.newInstance(Ljava/lang/String;Ljava/lang/ClassLoader;)Ljavax/xml/parsers/DocumentBuilderFactory;
The cause: there is an xml-apis.jar under JBOSS_HOME/lib/endorsed directory, and so javax.xml.* classes in xml-apis.jar override those same class from JDK. In particular, DocumentBuilderFactory class in xml-apis.jar is of old version and only has newInstance() method, but not newInstance(String, ClassLoader) method. DocumentBuilderFactory.newInstance(String factoryClassName, ClassLoader) is introduced in Java 6. 

The fix is to remove xml-apis.jar from JBOSS_HOME/lib/endorsed directory. XML parser has been in Java proper for a long time, and there is no need for xml-apis.jar in most modern applications.


tomcat5의 xml-apis.jar와 poi 2014년 최신 버전의 xmlbeans-2.6.0.jar 이 충돌해서 xml-apis.jar이 있는 was에서는 사용이 어려움.

반응형
Comments