I'm write a java program to upload a local .rpt file to the BO server
according to the example in the dev guide, and the thread i found in here
but i still got an exception here:
All the servers with CMS xxx, cluster @xxx:6400 and kind fileserver are down or disabled
at com.crystaldecisions.sdk.exception.SDKException.map(Unknown Source)
at com.crystaldecisions.sdk.occa.filerepository.internal.g.<init>(Unknown Source)
at com.crystaldecisions.sdk.occa.filerepository.internal.FileRepositoryFactory.makeOCCA(Unknown Source)
at com.crystaldecisions.sdk.occa.infostore.internal.h.a(Unknown Source)
at com.crystaldecisions.sdk.occa.infostore.internal.h.if(Unknown Source)
at com.crystaldecisions.sdk.occa.infostore.internal.h.if(Unknown Source)
at com.crystaldecisions.sdk.occa.infostore.internal.h.a(Unknown Source)
at com.crystaldecisions.sdk.occa.infostore.internal.h.addUniqueFile(Unknown Source)
at com.crystaldecisions.sdk.occa.infostore.internal.h.addUniqueFile(Unknown Source)
at com.crystaldecisions.sdk.occa.infostore.internal.h.addUniqueFile(Unknown Source)
at com.crystaldecisions.sdk.plugin.desktop.report.internal.h.addUniqueFile(Unknown Source)
at crystal.report.demo.TestUploadReport.createReportFile(TestUploadReport.java:136)
at crystal.report.demo.TestUploadReport.main(TestUploadReport.java:66)
the source code is something like this:
ISessionMgr sessionMgr = CrystalEnterprise.getSessionMgr();
IEnterpriseSession enterpriseSession = sessionMgr.logon(userID, password, CMS, auth);
//...
String reportFileName = "xxx.rpt";
int parentID = getParentFolderID();
IInfoStore iStore = (IInfoStore) enterpriseSession.getService("InfoStore");
IPluginMgr pluginMgr = iStore.getPluginMgr();
IPluginInfo reportPlugin = pluginMgr.getPluginInfo("CrystalEnterprise.Report");
// add a new report object
IInfoObjects newInfoObjects = iStore.newInfoObjectCollection();
IReport boReport = (IReport) newInfoObjects.add(reportPlugin);
// setting the report's name and location
boReport.setTitle(reportName);
boReport.setParentID(parentID);
// add the local report file
boReport.getFiles()
.addUniqueFile(reportFileName);
// commit the new infoObject collection
iStore.commit(newInfoObjects);
And it throws exception at the line "addUniqueFile(reportFileName)".
Is there something i'm missing or the concept i got confused?
Thanks
Terry