0
我試圖使用捆綁版本的ODWEK將AFP文檔加載到Content Manager On Demand 9.5中。我想按照這個例子顯示出它的用途:使用ODWEK按需將文件加載到內容管理器時出錯
http://www-01.ibm.com/support/docview.wss?uid=swg21686382
我的代碼是目前:
ODServer odServer;
ODConfig odConfig;
System.setProperty("java.library.path", "/opt/ibm/ondemand/V9.5/www");
odConfig = new ODConfig
(ODConstant.PLUGIN,
ODConstant.APPLET,
null,
200,
"/applets",
"ENU",
"/home/pete",
"/home/pete",
4);
odServer = new ODServer(odConfig);
odServer.initialize("Logon.java");
odServer.setPort(1445);
odServer.logon("server.hostname", "user", "password");
File file = new File("insure.afp");
Hashtable<String,String> idxs = new Hashtable<>();
idxs.put("CardNumber", "6969696969696969");
idxs.put("CustomerName", "CMOD is cool");
idxs.put("StatementDate", "2012-01-01");
idxs.put("StatementType", "S");
odServer.loadInit();
odServer.loadAddDoc(1, idxs, file);
odServer.loadCommit("GoldCardsAG", "GoldCardsAafp");
odServer.logoff();
odServer.terminate();
我已經證實,GoldCardsAG是正確的應用程序組,GoldCardsAafp是正確的APPLNAME 。
我得到的錯誤是:
Exception in thread "main" com.ibm.edms.od.ODException: Failed to commit Load. Please consult the System Log for additional information.
RC = 2096
Message = The server failed while storing a document
at com.ibm.edms.od.ODServer.loadCommit(ODServer.java:3230)
at Logon.putFileBatch(Logon.java:47)
at Logon.main(Logon.java:34)
上面說的例外是在發生該生產線是:
odServer.loadCommit("GoldCardsAG", "GoldCardsAafp");
我已經啓用完整跟蹤,這裏是在arswww出現什麼。跟蹤:
10844:140062709262080 07/06/2016 13:07:56:926797 FLOW arscsvdc.c(2633)CsvAddStoreDoc:Return csv_rc=9,CSV_RC_MISC_ERROR csv_msgid=15,CSV_MSG_SERVER_FAILED_DOC_STO
10844:140062709262080 07/06/2016 13:07:56:926811 FLOW ars3wapi.C(515)apiP_setReturnCodeAndMessage:Enter
10844:140062709262080 07/06/2016 13:07:56:926833 FLOW ars3wcom.C(1174)CmGuiGetString:Enter
10844:140062709262080 07/06/2016 13:07:56:926858 ERROR ars3wapi.C(7807)Java_com_ibm_edms_od_ArsWWWInterface_apiStoreDoc:Current state rtn.RC=9 extId=2096 pMsg=The server failed while storing a document
10844:140062709262080 07/06/2016 13:07:56:926863 FLOW ars3wapi.C(591)apiP_setReturnCodeAndMessage:Return
10844:140062709262080 07/06/2016 13:07:56:926878 FLOW ars3wapi.C(7856)Java_com_ibm_edms_od_ArsWWWInterface_apiStoreDoc:Return session id=140062577532816 (rc)=1