Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClassCastException in SBMLReader #263

Open
danv61 opened this issue Oct 29, 2024 · 1 comment
Open

ClassCastException in SBMLReader #263

danv61 opened this issue Oct 29, 2024 · 1 comment

Comments

@danv61
Copy link

danv61 commented Oct 29, 2024

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

@Schmoho
Copy link

Schmoho commented Dec 11, 2024

Hi! I just looked into the file and it seems to be the same issue as the related #264

Unfortunately without deeper understanding of your use case it is pretty hard to say what the correct course of action for you would be here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants