BusinessObjects Board

Save pdfDocument

I would like to save to a destination a document(instance BO) already sheduled with pdf format.

here is a part of my code :
while(documentIter.hasNext())
{

		IInfoObject document = (IInfoObject) documentIter.next();
		Integer documentID = new Integer(document.getID());
		
		String instanceQuery = "SELECT SI_CUID, SI_NAME, SI_UPDATE_TS, SI_PROCESSINFO, SI_UNIVERSE, SI_UNIVERSE_INFO, SI_LOGON_INFO, SI_PARENTID, SI_FILES  From CI_INFOOBJECTS "
				+ "WHERE SI_PROGID='CrystalEnterprise.Pdf' AND SI_ID='" + documentID + "'";
		IInfoObjects infoObjectInstance = infostore.query(instanceQuery);
		IPDF pdfPlugin = (IPDF) infoObjectInstance.get(0);
		
		String title = document.getTitle();
		String location = "C:/Archives/"+document.getID()+"_"+title+".pdf";					
		
		try {
			writeBytes(pdfPlugin.getContent(), location);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}

public static void writeBytes(byte[] data, String filename) throws IOException {
	File file = new File(filename); 
	FileOutputStream fstream = new FileOutputStream(file); 
	fstream.write(data); 
	fstream.close();
}

Then i get this error:
detail:Une erreur inattendue s’est produite. L’exception produite était : Les serveurs du CMS xxxx et du cluster @yyyy, de type fileserver et dotés du service FileStoreV2 sont introuvables. Ils se sont peut-être arrêtés ou ont été désactivés par l’administrateur. (FWM 01014) (FWM 08010) Les serveurs du CMS xxxx:6400 et du cluster @yyyy, de type fileserver et dotés du service FileStoreV2 sont introuvables. Ils se sont peut-être arrêtés ou ont été désactivés par l’administrateur. (FWM 01014)
at com.crystaldecisions.sdk.occa.infostore.internal.Files.createCollectionObject(Files.java:1115)
at com.crystaldecisions.sdk.occa.infostore.internal.Files.get(Files.java:547)
at com.crystaldecisions.sdk.occa.infostore.internal.Files.get(Files.java:83)
at com.crystaldecisions.sdk.plugin.desktop.common.internal.AbstractContentObject.getContentHelper(AbstractContentObject.java:184)
at com.crystaldecisions.sdk.plugin.desktop.common.internal.AbstractContentObject.getContent_aroundBody4(AbstractContentObject.java:172)
at com.crystaldecisions.sdk.plugin.desktop.common.internal.AbstractContentObject.getContent_aroundBody5$advice(AbstractContentObject.java:528)
at com.crystaldecisions.sdk.plugin.desktop.common.internal.AbstractContentObject.getContent(AbstractContentObject.java:1)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.crystaldecisions.sdk.plugin.desktop.common.internal.ContentProcessingHandler.invoke(ContentProcessingHandler.java:235)
at com.sun.proxy.$Proxy17.getContent(Unknown Source)

The error is telling you that there are no running (and enabled) Output FRS servers. An OFRS is required in order to receive files associated with scheduled instances.

Are you able to view scheduled instances in Launchpad or do you get a similar error there?