我正在尝试使用捆绑版本的 ODWEK 将 AFP 文档加载到 Content Manager On Demand 9.5 中。我试图按照这个例子展示它的用法:
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.trace 中出现的内容:
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