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

NoSuchMethod 'void org.hl7.fhir.validation.instance.InstanceValidator.<init> ? #1822

Closed
lasred opened this issue Nov 21, 2024 · 5 comments
Closed

Comments

@lasred
Copy link

lasred commented Nov 21, 2024

Hi team,

This is how we're initiating our FhirInstanceValidator - following documentation - https://hapifhir.io/hapi-fhir/docs/v/6.10.5/validation/instance_validator.html


   FhirContext context = FhirContext.forR4();
  context.getCtx().newValidator();
   final FhirInstanceValidator instanceValidator = new FhirInstanceValidator(context.getCtx());
   validator.registerValidatorModule(instanceValidator);

However we get this error

NoSuchMethod 'void org.hl7.fhir.validation.instance.InstanceValidator.<init>(org.hl7.fhir.r5.context.IWorkerContext, org.hl7.fhir.r5.fhirpath.FHIRPathEngine$IEvaluationContext, org.hl7.fhir.r5.utils.XVerExtensionManager)' ?

when we try to call validator.validateWithResult

We're on 6.4.3

  <dependency>
        <groupId>ca.uhn.hapi.fhir</groupId>
        <artifactId>org.hl7.fhir.validation</artifactId>
        <version>6.4.3</version>
      </dependency>

Has anyone encountered this issue before?

@lasred lasred changed the title NoSuchMethod 'void org.hl7.fhir.validation.instance.InstanceValidator.<init>(org.hl7.fhir.r5.context.IWorkerContext, org.hl7.fhir.r5.fhirpath.FHIRPathEngine$IEvaluationContext, org.hl7.fhir.r5.utils.XVerExtensionManager)' ? NoSuchMethod 'void org.hl7.fhir.validation.instance.InstanceValidator.<init> ? Nov 21, 2024
@grahamegrieve
Copy link
Collaborator

this is some version mismatch between HAPI and HAPI-core, so you need to provide a lot more information about your maven set up

@lasred
Copy link
Author

lasred commented Nov 21, 2024

That makes sense. We are currently upgrading hapi to 7.4.5

    <dependency>
        <groupId>ca.uhn.hapi.fhir</groupId>
        <artifactId>hapi-fhir-base</artifactId>
        <version>7.4.5</version>
      </dependency>

Is 7.4.5 hapi compatible with hapi-core 6.4.3 ?

Let me know if there's any other information I can provide (I can include what versions our other dependencies are set at)

@dotasek
Copy link
Collaborator

dotasek commented Nov 21, 2024

@lasred 7.4.5 uses version 6.3.23 of the core library.

It will not be compatible with version 6.4.3 of the core library.

The release of HAPI that is scheduled for November 22nd 2024 will contain an update to 6.4.0 of core.

If you need to specifically update 7.4.5, see this PR and branch, which you can build yourself: hapifhir/hapi-fhir#6459 There is no present plan to merge and release this branch, and it has not been QA tested.

@lasred
Copy link
Author

lasred commented Nov 21, 2024

That makes sense

If I'm understanding right, - the release of hapi core for tomorrow of 6.4.x (November 22nd) will be compatible with hapi 7.4.5?

@dotasek
Copy link
Collaborator

dotasek commented Nov 21, 2024

No, the release of HAPI (https://github.com/hapifhir/hapi-fhir) tomorrow will use version 6.4.0 of this library (https://github.com/hapifhir/org.hl7.fhir.core).

@dotasek dotasek closed this as completed Nov 21, 2024
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

3 participants