在用junit做单元测试,读applicationContext.xml取数据源的时候经常出现:
at gnu.xml.pipeline.ValidationConsumer$ChildrenRecognizer.patchNext(ValidationConsumer.java(Compiled Code))的异常,接着就是堆栈溢出异常了:nested exception is java.lang.StackOverflowError: null
罪魁祸首:gnujaxp.jar,只要把这个jar包从classpath中删掉就可以了。