Error unmarshalling xml in java-8 “secure-processing org.xml.sax.SAXNotRecognizedException causing java.lang.IllegalStateException”

后端 未结 11 501
时光取名叫无心
时光取名叫无心 2020-12-05 00:21

The following code worked fine in Java 7

import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;

String          


        
11条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-05 01:10

    Both Bernard and Blaise's answers were very helpful. In my case, since I am using JDK 7, the solution was to exclude the xerces subdependency that was being included by one of my dependencies:

    
      org.apache.axis
      axis
      1.4.1-SNAPSHOT
      
        
          xerces
          xercesImpl
        
        
          xerces
          xmlParserAPIs
        
      
    
    

提交回复
热议问题