Linuxメソッドでは、jarファイルに見つかりません
環境 1: [JBoss 4.0 & Windows で問題なく動作]
環境 2: [JBoss 4.0 & Linuxでの問題]
エラーメッセージ:
重大: >> {==================スタックトレースは====================== == 2012 年 9 月 4 日 5:12:13 PM com.bct.platform.logger.BPMSLogger logString SEVERE: >> com.bpms.core.exception.BPMSRuntimeException: BEACP015: No method available like this->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ジャワ: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;
}
}