代码拉取完成,页面将自动刷新
254
【轻量级 PR】:#I5N0GI 升级积木报表中依赖的xercesImpl版本到2.12.0,解决工作流定义中分配规则报的validator异常。
已合并
issue#I5N0GI
#I5N0GI:工作流模型中分配规则时,报错。异常提示java.lang.IllegalArgumentException: Source parameter of type 'javax.xml.transform.stax.StAXSource' is not accepted by this validator
问题描述
xercesImpl:2.9.1中有一个ValidatorImpl继承了 javax.xml.validation.Validator。
jdk本身有一个com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl继承了javax.xml.validation.Validator。
异常信息
Caused by: java.lang.IllegalArgumentException: Source parameter of type 'javax.xml.transform.stax.StAXSource' is not accepted by this validator.
at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown Source)
at java.xml/javax.xml.validation.Validator.validate(Validator.java:124)
at org.flowable.bpmn.converter.BpmnXMLConverter.validateModel(BpmnXMLConverter.java:230)
at org.flowable.bpmn.converter.BpmnXMLConverter.convertToBpmnModel(BpmnXMLConverter.java:274)
... 195 common frames omitted
解决方案
升级依赖 /ruoyi-vue-pro/yudao-dependencies/pom.xml
<xercesImpl.version>2.12.0</xercesImpl.version>
...
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>${xercesImpl.version}</version>
</dependency>
/ruoyi-vue-pro/yudao-module-visualization/yudao-module-visualization-biz/pom.xml
<!-- 单独依赖升级版本,解决低版本validator失败问题 -->
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
</dependency>