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

Error: 'Input is not in the .gz format' when using loadPackageFromClasspath in NpmPackageValidationSupport #6067

Open
aditibj opened this issue Jul 1, 2024 · 0 comments

Comments

@aditibj
Copy link

aditibj commented Jul 1, 2024

NOTE: Before filing a ticket, please see the following URL:
https://github.com/hapifhir/hapi-fhir/wiki/Getting-Help

Describe the issue
I am currently attempting to utilize the loadPackageFromClasspath function from the NpmPackageValidationSupport in order to perform validation using that package. However, I keep encountering an error message stating "Input is not in the .gz format."

The NPM package I am trying to load is in the .tgz format, which, based on my understanding, should be compatible. I have also attempted to load a few other NPM files that I know should work, but they yielded the same error.

Environment (please complete the following information):

  • HAPI FHIR Version 4.0.1
  • OS: Windows
    • Browser [e.g. chrome, safari]

Additional context
`Caused by: java.io.IOException: Error reading package: Input is not in the .gz format
at org.hl7.fhir.utilities.npm.NpmPackage.readStream(NpmPackage.java:379)
at org.hl7.fhir.utilities.npm.NpmPackage.fromPackage(NpmPackage.java:370)
at org.hl7.fhir.utilities.npm.NpmPackage.fromPackage(NpmPackage.java:361)
at org.hl7.fhir.common.hapi.validation.support.NpmPackageValidationSupport.loadPackageFromClasspath(NpmPackageValidationSupport.java:39)
at au.gov.digitalhealth.integration.b2b.out.rest.validation.CDRConfigurations.fhirValidator(CDRConfigurations.java:46)
at au.gov.digitalhealth.integration.b2b.out.rest.validation.CDRConfigurations$$EnhancerBySpringCGLIB$$a1292de4.CGLIB$fhirValidator$2()
at au.gov.digitalhealth.integration.b2b.out.rest.validation.CDRConfigurations$$EnhancerBySpringCGLIB$$a1292de4$$FastClassBySpringCGLIB$$a9ae8e08.invoke()
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331)
at au.gov.digitalhealth.integration.b2b.out.rest.validation.CDRConfigurations$$EnhancerBySpringCGLIB$$a1292de4.fhirValidator()
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
... 25 more
Caused by: java.io.IOException: Input is not in the .gz format
at org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream.init(GzipCompressorInputStream.java:193)
at org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream.(GzipCompressorInputStream.java:167)
at org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream.(GzipCompressorInputStream.java:131)
at org.hl7.fhir.utilities.npm.NpmPackage.readStream(NpmPackage.java:377)
... 39 more

Process finished with exit code 1

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

No branches or pull requests

1 participant