LoginSignup
0
0

More than 5 years have passed since last update.

junit-addonsを入れるとJAXBが悲鳴をあげる

Posted at

[JUnit-addons]:(http://sourceforge.net/projects/junit-addons/) を入れると、JAXBのunmarshalを呼んでいるところでこんな例外が発生します。

java.lang.IllegalStateException: org.xml.sax.SAXNotRecognizedException: Feature 'http://javax.xml.XMLConstants/feature/secure-processing' is not recognized.
    at org.apache.xerces.parsers.AbstractSAXParser.setFeature(Unknown Source)
    at org.apache.xerces.jaxp.SAXParserImpl.setFeatures(Unknown Source)
    at org.apache.xerces.jaxp.SAXParserImpl.<init>(Unknown Source)
    at org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParserImpl(Unknown Source)
    at org.apache.xerces.jaxp.SAXParserFactoryImpl.setFeature(Unknown Source)
    at com.sun.xml.bind.v2.util.XmlFactory.createParserFactory(XmlFactory.java:128)
    at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.getXMLReader(UnmarshallerImpl.java:154)
    at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:291)
    at javax.xml.bind.JAXB.unmarshal(JAXB.java:186)

いきなり大半のテストが動かなくなったんで、びっくりこきました。

環境

  • Java 1.8
  • JUnit 4.11
  • JUnit-addons 1.4
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0