<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic NumberFormatException in writing Binary Metadata in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/numberformatexception-in-writing-binary-metadata/m-p/327934#M14935</link>
    <description>&lt;OL&gt;
&lt;LI&gt;&lt;A href="https://jira.nuxeo.com/browse/NXP"&gt;Nuxeo Platform&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://jira.nuxeo.com/browse/NXP-19881"&gt;NXP-19881&lt;/A&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;H1&gt;Be less strict when getting BinaryMetadata fails for a field&lt;/H1&gt;
&lt;P&gt;this Issue is still not fixed in Version 10.10 .I am getting NumberFormatException if EXIF:XResoultion is in Decimal having value 71.983.&lt;/P&gt;
&lt;P&gt;I am attaching the image file for which this error is occuring&lt;/P&gt;
&lt;P&gt;LongProperty.java&lt;/P&gt;
&lt;P&gt;public Serializable normalize(Object value) throws PropertyConversionException {
if (isNormalized(value)) {
return (Serializable) value;
}
if (value.getClass() == String.class) {
String string = (String) value;
if (string.length() == 0) {
return null;
}
** return Long.valueOf(value.toString());** //Getting Error here Long.valueOf("71.983")
}
if (value instanceof Number) {
return ((Number) value).longValue();
}
throw new PropertyConversionException(value.getClass(), Long.class);
}&lt;/P&gt;
&lt;P&gt;this error will not redirect to BinaryMetadataServiceImpl.java&lt;/P&gt;
&lt;P&gt;doc.setPropertyValue(property, (Serializable) metadataValue);
} catch (PropertyException e) {
log.warn(String.format(
"Failed to set property '%s' to value %s from metadata '%s' in '%s' in document '%s' ('%s')",
property, metadataValue, metadata, mappingDescriptor.getBlobXPath(), doc.getId(),
doc.getPath()));
}&lt;/P&gt;
&lt;P&gt;Getting Below Error in server Logs:-&lt;/P&gt;
&lt;P&gt;2020-04-17T17:51:19,543 ERROR [http-nio-0.0.0.0-8081-exec-14] [org.nuxeo.ecm.core.event.impl.EventServiceImpl] Exception during binaryMetadataSyncListener sync listener execution, other listeners will be ignored
java.lang.NumberFormatException: For input string: "71.983"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:1.8.0_242]
at java.lang.Long.parseLong(Long.java:589) ~[?:1.8.0_242]
at java.lang.Long.valueOf(Long.java:803) ~[?:1.8.0_242]
at org.nuxeo.ecm.core.api.model.impl.primitives.LongProperty.normalize(LongProperty.java:58) ~[nuxeo-core-api-10.10.jar:?]
at org.nuxeo.ecm.core.api.model.impl.AbstractProperty.setValue(AbstractProperty.java:387) ~[nuxeo-core-api-10.10.jar:?]
at org.nuxeo.ecm.core.api.impl.DocumentModelImpl.setPropertyValue(DocumentModelImpl.java:1280) ~[nuxeo-core-api-10.10.jar:?]
at org.nuxeo.binary.metadata.internals.BinaryMetadataServiceImpl.writeMetadata(BinaryMetadataServiceImpl.java:226) ~[nuxeo-binary-metadata-10.10.jar:?]
at org.nuxeo.binary.metadata.internals.BinaryMetadataServiceImpl.writeMetadata(BinaryMetadataServiceImpl.java:169) ~[nuxeo-binary-metadata-10.10.jar:?]
at org.nuxeo.binary.metadata.internals.listeners.BinaryMetadataSyncListener.handleEvent(BinaryMetadataSyncListener.java:56) ~[nuxeo-binary-metadata-10.10.jar:?]
at org.nuxeo.ecm.core.event.impl.EventServiceImpl.fireEvent(EventServiceImpl.java:242) [nuxeo-core-event-10.10.jar:?]
at org.nuxeo.ecm.core.api.AbstractSession.notifyEvent(AbstractSession.java:265) [nuxeo-core-10.10.jar:?]
at org.nuxeo.ecm.core.api.AbstractSession.createDocument(AbstractSession.java:686) [nuxeo-core-10.10.jar:?]&lt;/P&gt;</description>
    <pubDate>Fri, 17 Apr 2020 12:36:04 GMT</pubDate>
    <dc:creator>Rahul_Mittal</dc:creator>
    <dc:date>2020-04-17T12:36:04Z</dc:date>
    <item>
      <title>NumberFormatException in writing Binary Metadata</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/numberformatexception-in-writing-binary-metadata/m-p/327934#M14935</link>
      <description>&lt;OL&gt;
&lt;LI&gt;&lt;A href="https://jira.nuxeo.com/browse/NXP"&gt;Nuxeo Platform&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://jira.nuxeo.com/browse/NXP-19881"&gt;NXP-19881&lt;/A&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;H1&gt;Be less strict when getting BinaryMetadata fails for a field&lt;/H1&gt;
&lt;P&gt;this Issue is still not fixed in Version 10.10 .I am getting NumberFormatException if EXIF:XResoultion is in Decimal having value 71.983.&lt;/P&gt;
&lt;P&gt;I am attaching the image file for which this error is occuring&lt;/P&gt;
&lt;P&gt;LongProperty.java&lt;/P&gt;
&lt;P&gt;public Serializable normalize(Object value) throws PropertyConversionException {
if (isNormalized(value)) {
return (Serializable) value;
}
if (value.getClass() == String.class) {
String string = (String) value;
if (string.length() == 0) {
return null;
}
** return Long.valueOf(value.toString());** //Getting Error here Long.valueOf("71.983")
}
if (value instanceof Number) {
return ((Number) value).longValue();
}
throw new PropertyConversionException(value.getClass(), Long.class);
}&lt;/P&gt;
&lt;P&gt;this error will not redirect to BinaryMetadataServiceImpl.java&lt;/P&gt;
&lt;P&gt;doc.setPropertyValue(property, (Serializable) metadataValue);
} catch (PropertyException e) {
log.warn(String.format(
"Failed to set property '%s' to value %s from metadata '%s' in '%s' in document '%s' ('%s')",
property, metadataValue, metadata, mappingDescriptor.getBlobXPath(), doc.getId(),
doc.getPath()));
}&lt;/P&gt;
&lt;P&gt;Getting Below Error in server Logs:-&lt;/P&gt;
&lt;P&gt;2020-04-17T17:51:19,543 ERROR [http-nio-0.0.0.0-8081-exec-14] [org.nuxeo.ecm.core.event.impl.EventServiceImpl] Exception during binaryMetadataSyncListener sync listener execution, other listeners will be ignored
java.lang.NumberFormatException: For input string: "71.983"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:1.8.0_242]
at java.lang.Long.parseLong(Long.java:589) ~[?:1.8.0_242]
at java.lang.Long.valueOf(Long.java:803) ~[?:1.8.0_242]
at org.nuxeo.ecm.core.api.model.impl.primitives.LongProperty.normalize(LongProperty.java:58) ~[nuxeo-core-api-10.10.jar:?]
at org.nuxeo.ecm.core.api.model.impl.AbstractProperty.setValue(AbstractProperty.java:387) ~[nuxeo-core-api-10.10.jar:?]
at org.nuxeo.ecm.core.api.impl.DocumentModelImpl.setPropertyValue(DocumentModelImpl.java:1280) ~[nuxeo-core-api-10.10.jar:?]
at org.nuxeo.binary.metadata.internals.BinaryMetadataServiceImpl.writeMetadata(BinaryMetadataServiceImpl.java:226) ~[nuxeo-binary-metadata-10.10.jar:?]
at org.nuxeo.binary.metadata.internals.BinaryMetadataServiceImpl.writeMetadata(BinaryMetadataServiceImpl.java:169) ~[nuxeo-binary-metadata-10.10.jar:?]
at org.nuxeo.binary.metadata.internals.listeners.BinaryMetadataSyncListener.handleEvent(BinaryMetadataSyncListener.java:56) ~[nuxeo-binary-metadata-10.10.jar:?]
at org.nuxeo.ecm.core.event.impl.EventServiceImpl.fireEvent(EventServiceImpl.java:242) [nuxeo-core-event-10.10.jar:?]
at org.nuxeo.ecm.core.api.AbstractSession.notifyEvent(AbstractSession.java:265) [nuxeo-core-10.10.jar:?]
at org.nuxeo.ecm.core.api.AbstractSession.createDocument(AbstractSession.java:686) [nuxeo-core-10.10.jar:?]&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2020 12:36:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/numberformatexception-in-writing-binary-metadata/m-p/327934#M14935</guid>
      <dc:creator>Rahul_Mittal</dc:creator>
      <dc:date>2020-04-17T12:36:04Z</dc:date>
    </item>
  </channel>
</rss>

