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

Exception in thread "main" java.lang.ClassCastException: org.roda_project.commons_ip2.mets_v1_12.beans.AmdSecType cannot be cast to org.roda_project.commons_ip2.mets_v1_12.beans.MdSecType #213

Closed
dvort1af opened this issue Sep 11, 2023 · 3 comments · Fixed by #217
Assignees
Labels

Comments

@dvort1af
Copy link

dvort1af commented Sep 11, 2023

I try to validate the manually created SIP (attached) and I get the error.

Command: java -jar commons-ip2-cli-2.3.3.jar validate -i sip_0f23a6d3-7b43-4978-9fde-aa5444c368be.zip
Output: Exception in thread "main" java.lang.ClassCastException: org.roda_project.commons_ip2.mets_v1_12.beans.AmdSecType cannot be cast to org.roda_project.commons_ip2.mets_v1_12.beans.MdSecType
at org.roda_project.commons_ip2.validator.component.structuralMapComponent.StructuralMapComponentValidator.validateCSIP91(StructuralMapComponentValidator.java:793)
at org.roda_project.commons_ip2.validator.component.structuralMapComponent.StructuralMapComponentValidator.validate(StructuralMapComponentValidator.java:115)
at org.roda_project.commons_ip2.validator.EARKSIPValidator.validateComponents(EARKSIPValidator.java:183)
at org.roda_project.commons_ip2.validator.EARKSIPValidator.validateSubMets(EARKSIPValidator.java:207)
at org.roda_project.commons_ip2.validator.EARKSIPValidator.validate(EARKSIPValidator.java:157)
at org.roda_project.commons_ip2.validator.CLI.CLIValidator.validate(CLIValidator.java:213)
at org.roda_project.commons_ip2.validator.CLI.CLIValidator.start(CLIValidator.java:157)
at org.roda_project.commons_ip2.validator.CLI.Main.main(Main.java:30)
sip_0f23a6d3-7b43-4978-9fde-aa5444c368be.zip

@luis100
Copy link
Member

luis100 commented Sep 11, 2023

@dvort1af can you share what was the Java version you were using?

@dvort1af
Copy link
Author

I tried java version "1.8.0_361". I also tried the current version commons-ip2-cli-2.4.0.jar with the same error. Validation worked correctly for other SIPs.

@luis100 luis100 added the bug label Sep 12, 2023
@luis100
Copy link
Member

luis100 commented Sep 12, 2023

I confirm the issue, related to the validation of requisite CSIP 91 trying to force amdsec into mdsec data type.

@AntonioG70 AntonioG70 linked a pull request Sep 29, 2023 that will close this issue
@AntonioG70 AntonioG70 self-assigned this Sep 29, 2023
carlosjepard added a commit that referenced this issue Oct 27, 2023
@006627 006627 closed this as completed in 3bf1471 Feb 2, 2024
@github-project-automation github-project-automation bot moved this to Done in E-ARK CSP Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants