I have a java client application that load reports from Crystal Reports Server XI into a java viewer. The load of the report works fine but occurs an error when the user try to export to PDF from the menu of the viewer. The message says:

Cannot connect to server...
com.businessobjects.crystalreports.viewer.core.rs.b$e cannot be cast to com.crystaldecisions.xml.serialization.IXMLSerializable


The snippet code to set the managed report to call is the next:
private void setManagedReportDocument(){
try{
IInfoObjects oInfoObjects = (IInfoObjects)infoStore.query("SELECT TOP 1 * " +
"FROM CI_INFOOBJECTS " +
"WHERE SI_PROGID = 'CrystalEnterprise.Report' AND SI_INSTANCE=0 AND SI_NAME='" + reportName + "'" );
if (oInfoObjects.size() > 0) {
//Retrieve the latest instance of the report
IInfoObject oInfoObject = (IInfoObject) oInfoObjects.get(0);
//Use the App report factory to obtain a report source that will be processed on the Page Server.
//El servicio 'RASReportFactory' utiliza el Report Application Server para obtener los reportes
//El servicio 'PSReportFactory' utiliza el Page Server para obtener los reportes
//El Page Server se debe usar para ver los reportes
//El RAS solo debe ser utilizado si se va a modificar los reportes, sin embargo
//se utiliza el RAS porque la API para utilizar el PS esta diseñada para una
//aplicación web y no se integra facilmente con Swing.
IReportAppFactory reportAppFactory = (IReportAppFactory) enterpriseSession.getService("","RASReportFactory");
managedAuxDoc = reportAppFactory.openDocument(oInfoObject,0,new java.util.Locale("es","SV"));
}catch(Exception e){
logger.error("Error en la recuperación del reporte.", e);
JOptionPane.showMessageDialog(this, "Error en la recuperación del reporte.");
}

Any idea how to solve this problem?
Thanks in advance.

Julio