Skip to content

ClassCastException in cql-to-elm-cli when using modelinfo #1803

Description

@dehall

What happened?

Running cql-to-elm-cli while specifying a ModelInfo with --model always results in a ClassCastException:

Exception in thread "main" java.lang.ClassCastException: class org.cqframework.cql.cql2elm.cli.Main$$Lambda$13/0x000000700101f340 cannot be cast to class org.hl7.cql.model.ModelInfoProvider (org.cqframework.cql.cql2elm.cli.Main$$Lambda$13/0x000000700101f340 and org.hl7.cql.model.ModelInfoProvider are in unnamed module of loader 'app')
 	at org.cqframework.cql.cql2elm.cli.Main.getModelInfoProvider(Main.kt:46)
 	at org.cqframework.cql.cql2elm.cli.Main.main(Main.kt:330)

What did you expect to happen?

Translation should succeed (assuming otherwise valid inputs)

How can we reproduce it?

Run the cql-to-elm CLI with any input and any valid modelinfo file. For an example with resources already in this repo:

cd Src/java
./gradlew :cql-to-elm-cli:installDist
./cql-to-elm-cli/build/install/cql-to-elm-cli/bin/cql-to-elm-cli --input ../../Examples/2zc_VTE3.cql --model ./quick/src/main/resources/org/hl7/fhir/fhir-modelinfo-4.0.1.xml

Environment

  • Version / commit: latest on main as of today 313da315
  • OS / runtime: macOS 26.5, JDK 17.0.14

Anything else?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions