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

Java Error on Jhove CLI by json formatter class java.lang.Double cannot be cast to class java.lang.String #890

Open
orgabor opened this issue Oct 25, 2023 · 0 comments
Assignees
Labels
bug A product defect that needs fixing
Milestone

Comments

@orgabor
Copy link

orgabor commented Oct 25, 2023

If I run the cli with the -h option, the json output runs on the following error message.

SEVERE: class java.lang.Double cannot be cast to class java.lang.String (java.lang.Double and java.lang.String are in module java.base of loader 'bootstrap')
java.lang.ClassCastException: class java.lang.Double cannot be cast to class java.lang.String (java.lang.Double and java.lang.String are in module java.base of loader 'bootstrap')
at edu.harvard.hul.ois.jhove.handler.JsonHandler.showScalarProperty(JsonHandler.java:726)
at edu.harvard.hul.ois.jhove.handler.JsonHandler.showProperty(JsonHandler.java:658)
at edu.harvard.hul.ois.jhove.handler.JsonHandler.showListProperty(JsonHandler.java:790)
at edu.harvard.hul.ois.jhove.handler.JsonHandler.showProperty(JsonHandler.java:662)
at edu.harvard.hul.ois.jhove.handler.JsonHandler.showListProperty(JsonHandler.java:790)
at edu.harvard.hul.ois.jhove.handler.JsonHandler.showProperty(JsonHandler.java:662)
at edu.harvard.hul.ois.jhove.handler.JsonHandler.show(JsonHandler.java:439)
at edu.harvard.hul.ois.jhove.RepInfo.show(RepInfo.java:563)
at edu.harvard.hul.ois.jhove.JhoveBase.process(JhoveBase.java:649)
at edu.harvard.hul.ois.jhove.JhoveBase.process(JhoveBase.java:576)
at edu.harvard.hul.ois.jhove.JhoveBase.process(JhoveBase.java:576)
at edu.harvard.hul.ois.jhove.JhoveBase.process(JhoveBase.java:576)
at edu.harvard.hul.ois.jhove.JhoveBase.process(JhoveBase.java:576)
at edu.harvard.hul.ois.jhove.JhoveBase.dispatch(JhoveBase.java:479)
at edu.harvard.hul.ois.jhove.Jhove.main(Jhove.java:265)

XML output works, but looks a bit damaged:

<x:xmpmeta xmlns:x="adobe:ns:meta/"> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description xmlns:pdfaid="http://www.aiim.org/pdfa/ns/id/" rdf:about=""> <pdfaid:part>3</pdfaid:part> <pdfaid:conformance>B</pdfaid:conformance> </rdf:Description> <rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" rdf:about=""> <dc:title> <rdf:Alt> <rdf:li lang="x-default"/> </rdf:Alt> </dc:title> </rdf:Description> <rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" rdf:about=""> <xmp:CreatorTool>Konik Library</xmp:CreatorTool> <xmp:CreateDate>2021-11-12T10:11:11+01:00</xmp:CreateDate> </rdf:Description> <rdf:Description xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about=""> <pdf:Producer>Konik Library</pdf:Producer> </rdf:Description> </rdf:RDF> </x:xmpmeta>
@carlwilson carlwilson self-assigned this Aug 22, 2024
@carlwilson carlwilson added the bug A product defect that needs fixing label Aug 22, 2024
@carlwilson carlwilson added this to the JHOVE 1.34 milestone Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A product defect that needs fixing
Projects
None yet
Development

No branches or pull requests

2 participants