jhove icon indicating copy to clipboard operation
jhove copied to clipboard

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

Open orgabor opened this issue 1 year ago • 0 comments

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>

orgabor avatar Oct 25 '23 12:10 orgabor