1.war包需要删除
org.apache.xerces-2.9.0.jar
org.apache.xml.serializer-2.7.1.jar
stax-api-1.0.1.jar
xercesImpl-2.9.1.jar
xml-apis-1.3.04.jar
xml-apis-ext-1.3.04.jar
xmlbeans-2.6.0.jar
Saxon-HE-9.9.1-4.jar
2.应用程序启动时报错
Caused by: java.lang.RuntimeException: XPathFactory#newInstance() failed to create an XPathFactory for the default object model: http://java.sun.com/jaxp/xpath/dom with the XPathFactoryConfigurationException: javax.xml.xpath.XPathFactoryConfigurationException: No XPathFctory implementation found for the object model: http://java.sun.com/jaxp/xpath/dom
需要将Saxon-HE-9.9.1-5.jar更新为最新版本
3.流程模板部署报错
类路径lib下删除stax-api-1.0.1.jar、xercesImpl-2.9.1.jar,保证共享库中也没有,虽然可能没有关联到应用程序的类加载器。
另外一个错:ObjectMapper使用了父类加载器加载的类,所以把应用程序的改成父类加载器后加载即可。
4.文档上传失败:
java.io.IOException: java.io.FileNotFoundException: /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/temp/localhostNode01/server1/xcrms10211_war/xcrms10211.war/home/software/tomcat/tomcatgh/word/20191017中行投前子系统客户沟通反馈问题20191022043059356.docx (没有那个文件或目录)
不能调用file.transferTo(dest)
直接用BufferedOutputStream
private void uploadFileFromTemp(MultipartFile file, File dest){
BufferedInputStream in = null;
BufferedOutputStream out = null;
try {
in = new BufferedInputStream(file.getInputStream());
out = new BufferedOutputStream(new FileOutputStream(dest));
IOUtils.copy(in, out);
out.close();
} catch (IOException e) {
e.printStackTrace();
throw new XcrmsException("上传文件出错", e);
} finally {
IOUtils.closeQuietly(in);
IOUtils.closeQuietly(out);
}
}