Error using _refresh.sh script with 3.8.0
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 38/100
Research direction
Reproduce the failure by running sushi and then _refresh.sh with the -rp option in the linked implementation guide. Start with IOUtils.writeCqlToFile at line 202 and PackageMeasure.output at line 139, following the stack trace. Done means the first refresh after sushi completes without the NullPointerException, while retaining the successful second-run behavior.
Written by the indexing model from the issue text.
Description
Describe the bug
When running the _refresh.sh script in an implementation guide, I get this error:
[main] INFO org.opencds.cqf.tooling.packaging.r4.PackageMeasure - Packaging Measure IMMZIND05...
[main] WARN org.opencds.cqf.tooling.utilities.IOUtils - Unable to initialize directory at /home/publisher/ig/bundles/measure/IMMZIND05
[main] WARN org.opencds.cqf.tooling.utilities.IOUtils - Unable to initialize directory at /home/publisher/ig/bundles/measure/IMMZIND05/IMMZIND05-files
[main] INFO org.opencds.cqf.tooling.packaging.r4.PackageMeasure - Packaging Dependencies...
[main] INFO org.opencds.cqf.tooling.packaging.r4.PackageMeasure - Packaging Terminology...
Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:115)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
Caused by: java.lang.NullPointerException: Cannot invoke "String.getBytes(java.nio.charset.Charset)" because "cql" is null
at org.opencds.cqf.tooling.utilities.IOUtils.writeCqlToFile(IOUtils.java:202)
at org.opencds.cqf.tooling.packaging.r4.PackageMeasure.output(PackageMeasure.java:139)
at org.opencds.cqf.tooling.packaging.Package.packageArtifact(Package.java:75)
at org.opencds.cqf.tooling.packaging.PackageMeasures.lambda$new$0(PackageMeasures.java:16)
at java.base/java.lang.Iterable.forEach(Iterable.java:75)
at org.opencds.cqf.tooling.packaging.PackageMeasures.(PackageMeasures.java:14)
at org.opencds.cqf.tooling.processor.IGBundleProcessor.bundleIg(IGBundleProcessor.java:41)
at org.opencds.cqf.tooling.processor.IGProcessor.publishIG(IGProcessor.java:102)
at org.opencds.cqf.tooling.operation.RefreshIGOperation.execute(RefreshIGOperation.java:38)
at org.opencds.cqf.tooling.cli.Main.main(Main.java:322)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
... 5 more
To Reproduce
This is from: https://github.com/WorldHealthOrganization/smart-immunizations/
refresh is using -rp to process the fsh-regenerated resources.
Run sushi, then _refresh.sh
Expected behavior
No error
Desktop (please complete the following information):
- OS: Linux
- Java Version: openjdk 21.0.6 2025-01-21 LTS
Additional context
This error doesn't happen in 3.7.0, although the packaging fails there.
This error only happens the first time running it after running sushi. It works on the second run.
- Dominant language
- Java
- Stars
- 22
- Forks
- 26
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from cqframework/cqf-tooling
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
cqframework/cqf-tooling#602 ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
cqframework/cqf-tooling#575 · 1 comment ·
-
Updated RefreshIG to utilize HttpClientUtils, and restore multithreading and verbose console loggingOpen
Difficulty 5/5 Over a week Newbie friendliness 25/100
cqframework/cqf-tooling#564 · 1 comment ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
cqframework/cqf-tooling#540 · 2 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
cqframework/cqf-tooling#532 ·
All issues in cqframework/cqf-tooling
Similar issues
-
triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
eclipse-edc/IdentityHub#1296 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
cloudfoundry/uaa#4194 ·
Maintainers usually reply within 1 day
-
area: ui priority: medium
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
tetsuji16/microProject#1721 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days
-
The engine's "loaded, but had errors" message leaves out which library and line each error is inOpen
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
cqframework/clinical_quality_language#1980 ·
Maintainers usually reply within 3 days