Skip to content

ClassCastException in SBMLReader #263

@danv61

Description

@danv61

The attached xml file triggers the following exception:

java.lang.ClassCastException: class org.sbml.jsbml.xml.XMLNode cannot be cast to class org.sbml.jsbml.Annotation (org.sbml.jsbml.xml.XMLNode and org.sbml.jsbml.Annotation are in unnamed module of loader 'app')

at org.sbml.jsbml.xml.stax.SBMLReader.readXMLFromXMLEventReader(SBMLReader.java:851)

The following warning was also generated:
WARN (SBMLReader.java:735) - Starting to read a new annotation element while the previous annotation element is not finished.

Here is the code line in question:
annoReader.processAnnotation((SBase) ((Annotation) lastElement).getParent()); // or take the second element in the stack ??

I checked the file with the online SBML validator and it is valid.
Ota2015_GDI-integrated.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions