Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DAFFODIL-2327

expresion on all unsignedInt element and variables results in cast exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.6.0
    • 2.7.0
    • Back End
    • None

    Description

      I have a schema with an expression. The expression uses the value of an element of type unsignedInt, and some variables also all of type unsignedInt. The rest of the expression is just add and multiply and subtract.

      I get this exception:

      org.apache.daffodil.exceptions.Abort: Invariant broken. Runtime.scala - Leaked exception: java.lang.ClassCastException: java.math.BigInteger cannot be cast to java.lang.Long
      java.lang.ClassCastException: java.math.BigInteger cannot be cast to java.lang.Long
      	at org.apache.daffodil.infoset.DataValue$.getLong$extension(DataValue.scala:88)
      	at org.apache.daffodil.dpath.UnsignedIntToLong$.computeValue(ConverterOps3.scala:91)
      	at org.apache.daffodil.dpath.UnsignedIntToLong$.computeValue(ConverterOps3.scala:89)
      	at org.apache.daffodil.dpath.Converter.run(DPathRuntime.scala:293)
      	at org.apache.daffodil.dpath.CompiledDPath.run(DPathRuntime.scala:139)
      	at org.apache.daffodil.dpath.NumericOperator.run(DPathRuntime.scala:262)
      

      There is a conversion UnsignedIntToLong being invoked. This just calls a getLong which just calls a v.asInstanceOf[JLong] cast, which fails because v is a java BigInteger.

       

      Attachments

        Activity

          People

            dfthompson Dave Thompson
            mbeckerle Mike Beckerle
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: