was爬坑录

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);
	}
}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值