使用poi类库解析word文档报这个错:
[2018-11-29 11:15:30,934] SG-UAP :ERROR ServletRegistration:178 - 处理Servlet:/upload/rest/clubaffiliated/fileUpload抛出Servlet异常
程序一请求这个方法就报
如下代码:
public int getWordNum(String pkVal) {
String sql = "SELECT ATT_NAME,ATT_PATH FROM t_mx_attachment WHERE PK_VAL = ?";
List list = hibernateDao.executeSqlQuery(sql, new Object[] { pkVal });
String path = "";
for (int i = 0; i < list.size(); i++) {
Object[] obj = (Object[]) list.get(i);
path = obj[1] + "" + obj[0];
}
System.out.println(path);
int wordNum = 0 ;
try {
InputStream is = new FileInputStream(new File(path));
WordExtractor ex = new WordExtractor(is);
String buffer = ex.g