Uploaded image for project: 'Chemistry (Retired)'
  1. Chemistry (Retired)
  2. CMIS-751

"Input String was not in a correct format" exception while trying to get a document from Alfresco

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Not A Problem
    • DotCMIS 0.6
    • None
    • dotcmis
    • Alfresco 4.2

    Description

      Accessing Alfresco repository through CMIS using the .Net DotCMIS library, a "Input String was not in a correct format" is thrown when it is tried to get a document by its documentID.

      This behavior happens on Alfresco 4.2, but not happens on 4.0.2.

      Analysing the network traffic generated by the communication of the DotCMIS library with the Alfresco server, it has been noted that the following data is sent by Alfresco:

      <cmis:propertyDecimalDefinition>
      <cmis:id>sf_afi:vlr_total</cmis:id>
      <cmis:localName>vlr_total</cmis:localName>
      <cmis:localNamespace>sf_afi.model.procergs.rs.gov.br</cmis:localNamespace>
      <cmis:displayName>Valor Total do Auto de Lanamento</cmis:displayName>
      <cmis:queryName>sf_afi:vlr_total</cmis:queryName>
      <cmis:description>Valor Total do Auto de Lanamento</cmis:description>
      <cmis:propertyType>decimal</cmis:propertyType>
      <cmis:cardinality>single</cmis:cardinality>
      <cmis:updatability>readwrite</cmis:updatability>
      <cmis:inherited>false</cmis:inherited>
      <cmis:required>false</cmis:required>
      <cmis:queryable>true</cmis:queryable>
      <cmis:orderable>true</cmis:orderable>
      <cmis:maxValue>1.7976931348623157E+308</cmis:maxValue>
      <cmis:minValue>4.9E-324</cmis:minValue>
      </cmis:propertyDecimalDefinition>

      The DotCMIS library tries to convert the minValue and maxValue constraints from its String representation to a Decimal data type. This is where the exception happens, the value 1.7976931348623157E+308 cannot be converted to a Decimal by the .Net Framework.

      Analysing the same communication with Alfresco 4.0.2 server, it has been noted that Alfresco 4.0.2 doesn't send the minValue and maxValue constraints to the client, therefore, there is no errors.

      The concerned property is defined as a d:double. We beleave that the problem comes from the conversion from double to decimal.

      Attachments

        Activity

          People

            fmui Florian Müller
            sergio.dl Sergio Lemos
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: