Mike Beckerle created DAFFODIL-2327:
---------------------------------------
Summary: expresion on all unsignedInt element and variables
results in cast exception
Key: DAFFODIL-2327
URL: https://issues.apache.org/jira/browse/DAFFODIL-2327
Project: Daffodil
Issue Type: Bug
Components: Back End
Affects Versions: 2.6.0
Reporter: Mike Beckerle
Fix For: 3.0.0
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:
{code:java}
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)
{code}
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.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)