cqframework / clinical_quality_language

Clinical Quality Language (CQL) is an HL7 specification for the expression of clinical knowledge that can be used within both the Clinical Decision Support (CDS) and Clinical Quality Measurement (CQM) domains. This repository contains complementary tooling in support of that specification.
https://confluence.hl7.org/display/CDS/Clinical+Quality+Language
Apache License 2.0
251 stars 121 forks source link

Failed to load class "org.slf4j.impl.StaticLoggerBinder" during cql-to-elm-cli #1314

Closed MatthewDynamic closed 5 months ago

MatthewDynamic commented 6 months ago

I am getting a Failed to load class "org.slf4j.impl.StaticLoggerBinder" Here is the command I am running .\cql-to-elm-cli\build\install\cql-to-elm-cli\bin\cql-to-elm-cli --input "..\..\Examples\ChlamydiaScreening_CQM.cql"

The full output is as follows:

================================================================================
TRANSLATE ..\..\Examples\ChlamydiaScreening_CQM.cql
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Translation failed due to errors:
Error:[1:1, 56:5] jakarta.xml.bind.JAXBException: Implementation of Jakarta XML Binding-API has not been found on module path or classpath.
 - with linked exception:
[java.lang.ClassNotFoundException: org.glassfish.jaxb.runtime.v2.ContextFactory]
Error:[5:1, 5:69] Could not resolve model name System
Error:[6:1, 6:91] Could not resolve model name System
Error:[7:1, 7:69] Could not resolve model name System
Error:[8:1, 8:98] Could not resolve model name System
Error:[9:1, 9:106] Could not resolve model name System
Error:[10:1, 10:64] Could not resolve model name System
Error:[11:1, 11:58] Could not resolve model name System
Error:[12:1, 12:63] Could not resolve model name System
Error:[13:1, 13:112] Could not resolve model name System
Error:[14:1, 14:69] Could not resolve model name System
Error:[15:1, 15:63] Could not resolve model name System
Error:[16:1, 16:81] Could not resolve model name System
Error:[17:1, 17:100] Could not resolve model name System
Error:[18:1, 18:74] Could not resolve model name System
Error:[20:55, 20:58] Could not resolve model name System
Error:[20:61, 20:61] Could not resolve model name System
Error:[20:64, 20:64] Could not resolve model name System
Error:[20:67, 20:67] Could not resolve model name System
Error:[20:70, 20:70] Could not resolve model name System
Error:[20:73, 20:73] Could not resolve model name System
Error:[20:76, 20:76] Could not resolve model name System
Error:[20:46, 20:77] Could not determine signature for invocation of operator DateTime.
Error:[20:89, 20:92] Could not resolve model name System
Error:[20:95, 20:95] Could not resolve model name System
Error:[20:98, 20:98] Could not resolve model name System
Error:[20:101, 20:101] Could not resolve model name System
Error:[20:104, 20:104] Could not resolve model name System
Error:[20:107, 20:107] Could not resolve model name System
Error:[20:110, 20:110] Could not resolve model name System
Error:[20:80, 20:111] Could not determine signature for invocation of operator DateTime.
Error:[20:37, 20:112] Internal translator error.
Error:[20:1, 20:112] Could not determine parameter type for parameter MeasurementPeriod.
Error:[22:1, 22:15] Internal translator error.
Error:[25:24, 25:40] Could not resolve identifier MeasurementPeriod in the current library.
Error:[29:10, 29:62] Could not resolve type name Condition.
Error:[43:2, 43:16] Could not validate reference to expression InDemographic because its definition contains errors.
Error:[46:2, 46:5] Could not resolve model name System
Error:[49:10, 49:52] Could not resolve type name DiagnosticReport.
Error:[51:1, 51:18] Internal translator error.
Error:[53:31, 53:37] Could not resolve identifier Patient in the current library.

I am new to this code and unsure whether the example files should actually work or not. But I cannot get any of my own CQL files to convert either.

Before this against the last code from master branch I was able to run gradlew build which only failed to build task :cql-to-elm:test and gradlew installDist which executed successfully.

Any advice appreciated, Matthew Dugal

MatthewDynamic commented 6 months ago

On second thought, maybe this is the actual error.

jakarta.xml.bind.JAXBException: Implementation of Jakarta XML Binding-API has not been found on module path or classpath.
 - with linked exception:
[java.lang.ClassNotFoundException: org.glassfish.jaxb.runtime.v2.ContextFactory]

I have to ask though. Since I have been struggling to compile this code for multiple weeks now, is my approach incorrect? I am trying to follow the instructions at Src/java/README.md. Am I following the wrong path? Are there different resources I can use to get this stuff running?

Thank you Matthew Dugal

JPercival commented 6 months ago

Thanks for the report! The slf4j and jaxb errors are fixed in this PR which should be reviewed and merged shortly: https://github.com/cqframework/clinical_quality_language/pull/1319

I took a look at the CQL examples and they are quite out of date, written for an earlier version of the spec. We'll have to go through and update those. That said, this should run cleanly for you now: ./cql-to-elm-cli/build/install/cql-to-elm-cli/bin/cql-to-elm-cli --input ../../Examples/CMS135_QDM.cql

It's a different example than you were using previously.

JPercival commented 6 months ago

See #462 for examples being out of date.

JPercival commented 5 months ago

That changed has been merged to master. Try the following:

gradlew build ./cql-to-elm-cli/build/install/cql-to-elm-cli/bin/cql-to-elm-cli --input ../../Examples/CMS135_QDM.cql