在jar文件中找不到的Linux方法
环境1:[适用于JBoss 4.0& Windows]
环境2:[问题与JBoss 4.0& Linux ]
错误消息:
严重:>> {==================堆叠痕迹========================== 2012年9月4日下午5:12:13 com.bct.platform.logger.BPMSLogger logString 严重:>> com.bpms.core.exception.BPMSRuntimeException:BEACP015:否 方法可用 这 - > uploadDocument(org.apache.commons.fileupload.FileItem的,java.lang.String中,java.lang.String中)com.bpms.engine.workflowprocessor.actions.ActionCallProgram.executeAction(ActionCallProgram.java:571) com.bpms.engine.CommonInterface.executeActions(CommonInterface.java:188)
我们称之为反思
下面是代码示例,我试图在Linux环境中找不到Java时调用saveALDocument。在Windows中它工作正常
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.net.URL;
import java.rmi.RemoteException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.activation.MimetypesFileTypeMap;
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.lang.StringUtils;
public class FileUpdation
{
public String saveALDocument(FileItem filebuff,String fileName,String fileUuid) throws Exception
{
String uuidURLMap = "Retry...";
System.out.println("***************SaveDOCUment Entered *************");
try {
byte[] content = filebuff.get();
String filename = filebuff.getName();
if (filename != null) {
filename = FilenameUtils.getName(filename);
}
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return uuidURLMap;
}
public String _getDocURL(String uuid)
{
String strUrl = null;
try {
.........
}
catch (Exception e) {
e.printStackTrace();
}
return strUrl;
}
public String _getName(String strUUID) {
return fileName;
}
}
答案 0 :(得分:0)
commons-fileupload-1.2.jar和commons-io-1.1.jar,将它们放在lib中