You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "Mike Beckerle (Jira)" <ji...@apache.org> on 2020/04/21 15:13:00 UTC
[jira] [Commented] (DAFFODIL-2327) expresion on all unsignedInt
element and variables results in cast exception
[ https://issues.apache.org/jira/browse/DAFFODIL-2327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17088774#comment-17088774 ]
Mike Beckerle commented on DAFFODIL-2327:
-----------------------------------------
This bug comes up in the link16Subset schema and relategenerator. If you have access to that, then search there for DAFFODIL-2327 and FIXME to update once this is fixed.
> 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
> Priority: Major
> 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)