Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-2485

IllegalArgumentException in TypeMapping.instanciateSimpleProperty

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.0.0
    • XmpBox
    • None

    Description

      I get this with the attached file:

      004144.pdf preflight fail: java.lang.IllegalArgumentException: Failed to instanciate property
      	at org.apache.xmpbox.type.TypeMapping.instanciateSimpleProperty(TypeMapping.java:204)
      	at org.apache.xmpbox.xml.DomXmpParser.manageSimpleType(DomXmpParser.java:399)
      	at org.apache.xmpbox.xml.DomXmpParser.createProperty(DomXmpParser.java:338)
      	at org.apache.xmpbox.xml.DomXmpParser.parseDescriptionRoot(DomXmpParser.java:292)
      	at org.apache.xmpbox.xml.DomXmpParser.parse(DomXmpParser.java:206)
      	at org.apache.xmpbox.xml.DomXmpParser.parse(DomXmpParser.java:114)
      	at org.apache.pdfbox.preflight.process.MetadataValidationProcess.validate(MetadataValidationProcess.java:67)
      	at org.apache.pdfbox.preflight.utils.ContextHelper.callValidation(ContextHelper.java:73)
      	at org.apache.pdfbox.preflight.utils.ContextHelper.validateElement(ContextHelper.java:88)
      	at org.apache.pdfbox.preflight.PreflightDocument.validate(PreflightDocument.java:168)
      	at pdfboxpageimageextraction.PreflightTest.main(PreflightTest.java:41)
      Caused by: java.lang.reflect.InvocationTargetException
      	at sun.reflect.GeneratedConstructorAccessor23.newInstance(Unknown Source)
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
      	at org.apache.xmpbox.type.TypeMapping.instanciateSimpleProperty(TypeMapping.java:184)
      	... 10 more
      Caused by: java.lang.IllegalArgumentException: Value given is not allowed for the Date type : class java.lang.String
      	at org.apache.xmpbox.type.DateType.setValue(DateType.java:110)
      	at org.apache.xmpbox.type.AbstractSimpleProperty.<init>(AbstractSimpleProperty.java:50)
      	at org.apache.xmpbox.type.DateType.<init>(DateType.java:50)
      	... 14 more
      

      The cause is this line in the XMP:

      <xap:CreateDate>0-01-01T00:00:00Z</xap:CreateDate>
      

      The cause is the "Z".

      Attachments

        1. 004144_unc.pdf
          27 kB
          Tilman Hausherr
        2. 009272.pdf
          26 kB
          Tilman Hausherr

        Activity

          People

            tilman Tilman Hausherr
            tilman Tilman Hausherr
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: