Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated publisher to use the latest CQL translator, 3.20.0 #1020

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

brynrhodes
Copy link
Contributor

Tested with sample-ig, cql-ig, and ecqm-content-qicore-2025

Copy link
Collaborator

@dotasek dotasek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This introduces new errors when building the following IG:

https://github.com/FHIR/sample-ig.git

Original

Translating CQL source                                                                               (00:00.037 / 00:28.064, 359Mb)
Translating CQL source in folder /Users/david.otasek/IdeaFhirCoreLibraries/sample-ig-testing/sample-ig/input/cql (00:00.000 / 00:28.064, 359Mb)
Translating CQL source in file /Users/david.otasek/IdeaFhirCoreLibraries/sample-ig-testing/sample-ig/input/cql/notincluded.cql (00:00.026 / 00:28.090, 361Mb)
CQL translation completed successfully.                                                              (00:00.591 / 00:28.682, 463Mb)
Translating CQL source in file /Users/david.otasek/IdeaFhirCoreLibraries/sample-ig-testing/sample-ig/input/cql/example.cql (00:00.000 / 00:28.683, 463Mb)
CQL translation completed successfully.                                                              (00:00.468 / 00:29.151, 401Mb)
...
Errors: 23, Warnings: 23, Info: 7, Broken Links: 0 (00:00.913 / 02:16.979, 1Gb)

Updated

Translating CQL source                                                                               (00:00.030 / 00:24.265, 419Mb)
Translating CQL source in folder /Users/david.otasek/IdeaFhirCoreLibraries/sample-ig-testing/sample-ig/input/cql (00:00.000 / 00:24.265, 419Mb)
Translating CQL source in file /Users/david.otasek/IdeaFhirCoreLibraries/sample-ig-testing/sample-ig/input/cql/notincluded.cql (00:00.025 / 00:24.291, 420Mb)
Translation failed with (1) errors; see the error log for more information.                          (00:00.253 / 00:24.544, 454Mb)
Translating CQL source in file /Users/david.otasek/IdeaFhirCoreLibraries/sample-ig-testing/sample-ig/input/cql/example.cql (00:00.000 / 00:24.545, 454Mb)
Translation failed with (605) errors; see the error log for more information.                        (00:00.310 / 00:24.855, 375Mb)
...
Errors: 627, Warnings: 20, Info: 7, Broken Links: 0 (00:03.194 / 02:15.616, 993Mb)

I think this indicates that the update would break some existing IGs. Are the errors here because sample-ig has bad CQL, or because it relies on the previous version?

@dotasek
Copy link
Collaborator

dotasek commented Jan 20, 2025

Some additional details regarding the failure above.

There is a simple command-line based replication.

  1. First, build the project: mvn clean install -DskipTests (fast and thorough enough)
  2. Then, run the jar with the built-in exec goal: mvn org.codehaus.mojo:exec-maven-plugin:exec@target-ig-cli -pl org.hl7.fhir.publisher.cli -Dpublisher.cli.exec.target-ig=/path/to/the/sample-ig

This will run, but the command line log will show errors involving CQL:

...
Translating CQL source in file /Users/david.otasek/IdeaFhirCoreLibraries/sample-ig-testing/sample-ig/input/cql/example.cql (00:00.000 / 00:24.545, 454Mb)
Translation failed with (605) errors; see the error log for more information.
...

There will also be details in sample-ig/output/qa.txt regarding these errors, which indicate a classpath issue:

...
ERROR: jakarta.xml.bind.JAXBException: ClassCastException: attempting to cast jar:file:/Users/david.otasek/IdeaFhirCoreLibraries/fhir-ig-publisher/org.hl7.fhir.publisher.cli/target/org.hl7.fhir.publisher.cli-1.8.9-SNAPSHOT.jar!/jakarta/xml/bind/JAXBContext.class to jar:file:/Users/david.otasek/IdeaFhirCoreLibraries/fhir-ig-publisher/org.hl7.fhir.publisher.cli/target/org.hl7.fhir.publisher.cli-1.8.9-SNAPSHOT.jar!/jakarta/xml/bind/JAXBContext.class.  Please make sure that you are specifying the proper ClassLoader.    
ERROR: jakarta.xml.bind.JAXBException: ClassCastException: attempting to cast jar:file:/Users/david.otasek/IdeaFhirCoreLibraries/fhir-ig-publisher/org.hl7.fhir.publisher.cli/target/org.hl7.fhir.publisher.cli-1.8.9-SNAPSHOT.jar!/jakarta/xml/bind/JAXBContext.class to jar:file:/Users/david.otasek/IdeaFhirCoreLibraries/fhir-ig-publisher/org.hl7.fhir.publisher.cli/target/org.hl7.fhir.publisher.cli-1.8.9-SNAPSHOT.jar!/jakarta/xml/bind/JAXBContext.class.  Please make sure that you are specifying the proper ClassLoader.    
ERROR: FHIRHelpers: Could not resolve model with namespace http://hl7.org/fhir
ERROR: FHIRHelpers: class org.hl7.elm.r1.Null cannot be cast to class org.hl7.elm.r1.TypeSpecifier (org.hl7.elm.r1.Null and org.hl7.elm.r1.TypeSpecifier are in unnamed module of loader 'app')
ERROR: FHIRHelpers: Could not resolve model name System
...

Dependency analysis seems to find version conflicts involving jakarta.xml.bind in a number of dependencies, such as archie and even the org.hl7.fhir.core libraries, but I can't find a combination of exclusions and explicit dependency inclusions that allows the above to complete without error.

I am experimenting with updated versions of the maven-dependency-plugin and maven-shade-plugin, on the theory that maybe these are more aware of jaxb, but no success to report yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

2 participants