Weird error saving diagram to SVG

Hi,


I am trying to save a diagram as SVG, I receive the following error using some stencils to create the diagram:

com.aspose.diagram.b.a.b.b.g cannot be cast to com.aspose.diagram.b.a.b.a

Can you tell me what that means?

Stack:

java.lang.ClassCastException: com.aspose.diagram.b.a.b.b.g cannot be cast to com.aspose.diagram.b.a.b.a
at com.aspose.diagram.ac.a(Unknown Source)
at com.aspose.diagram.ac.a(Unknown Source)
at com.aspose.diagram.ac.a(Unknown Source)
at com.aspose.diagram.ac.a(Unknown Source)
at com.aspose.diagram.ac.a(Unknown Source)
at com.aspose.diagram.ac.a(Unknown Source)
at com.aspose.diagram.kb.a(Unknown Source)
at com.aspose.diagram.Diagram.a(Unknown Source)
at com.aspose.diagram.Diagram.save(Unknown Source)
at controllers.VisioHandler.uploadStencil(VisioHandler.java:114)

I can’t purchase until I can get past this, it’s a total blocker. The diagram is newly created, the Hashmap I’m walking through is a set of all the master names and id’s I pulled from the stencil which is in file. The error occurs on the diagram.save call:



Diagram diagram = new Diagram();
for (Map.Entry<Integer, String> master : masters.entrySet()) {
try {
Logger.debug(master.getValue() + “added”);
diagram.addMaster(file.getAbsolutePath(), master.getValue());
diagram.addShape(1, 1, master.getValue(), 0);
} catch (Exception e) {
throw new GoException(e.getMessage());
}
}
Logger.debug(“all images added”);

try {
diagram.save(filename + “.svg”, SaveFileFormat.SVG);
} catch (Exception e) {
throw new GoException(e.getMessage());
}

Hi Keith,


Thank you for contacting support. It looks not a general issue. I’ve tried to reproduce the issue on my side but no success. Please provide us the stencil file, master entries that you have mapped. We’ll look into the matter and guide you accordingly.

attached is the stencil. I am running this from Play Framework on Windows. It does not happen to all stencils, but this one reliably fails, as to a great many others.

Attached is another stencil that I got from Microsoft. When I try to apply these shapes I receive the following:

Cannot invoke the action, eventually got an error: util.GoException: java.lang.NumberFormatException: Infinite or NaN
at java.math.BigDecimal.(Unknown Source)
at java.math.BigDecimal.(Unknown Source)
at com.aspose.diagram.b.a.m.b(Unknown Source)
at com.aspose.diagram.b.a.q.a(Unknown Source)
at com.aspose.diagram.OperatorsKeeper.getMaxPriority(Unknown Source)
at com.aspose.diagram.hs.a(Unknown Source)
at com.aspose.diagram.hs.c(Unknown Source)
at com.aspose.diagram.hs.a(Unknown Source)
at com.aspose.diagram.ic.c(Unknown Source)
at com.aspose.diagram.Page.a(Unknown Source)
at com.aspose.diagram.Page.a(Unknown Source)
at com.aspose.diagram.Page.a(Unknown Source)
at com.aspose.diagram.Page.addShape(Unknown Source)
at com.aspose.diagram.Page.addShape(Unknown Source)
at com.aspose.diagram.Page.addShape(Unknown Source)
at com.aspose.diagram.Diagram.addShape(Unknown Source)

Hi Keith,


Thank you for contacting support. We managed to replicate the error messages said. We have logged these issues as follows:

File Name: Dell-Compellent.vss
DIAGRAMJAVA-50043 - Can’t cast error message while saving diagram to SVG format
File Name: Equations.vss
DIAGRAMJAVA-50044 - NumberFormatException message while saving to the SVG format

Your request has also been linked to these issues. We’ll keep you informed regarding any available updates. We’re sorry for your inconvenience.

The issues you have found earlier (filed as DIAGRAMJAVA-50044) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
Hi Keith,

Thank you for being patient. We have a good news for you that the issue id DIAGRAMJAVA-50043 has now been resolved. If there is no issue in the QA phase, then this fix will be included in the next version of Aspose.Diagram for Java 5.0.0. We'll inform you via this forum thread as soon as the new release is published.

The issues you have found earlier (filed as DIAGRAMJAVA-50043) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

The issues you have found earlier (filed as ) have been fixed in this Aspose.Words for JasperReports 18.3 update.