Upgrading a jpa server (4.2 -> 5.4) and seeing: java.lang.ClassNotFoundException: org.hl7.fhir.utilities.npm.IPackageCacheManager

172 views
Skip to first unread message

Sean Wcisel

unread,
Jul 27, 2021, 1:22:10 PM7/27/21
to HAPI FHIR
Hello everyone,

I hope this is the right place and format for this question. I've been banging my head against the wall for several days on this issue and could use a hand if someone would be willing. I'm fairly new to the codebase, and my Java isn't what it used to be, but here's the situation as I understand it:

I'm attempting to upgrade a forked version of the hapi-fhir-jpaserver-starter repo from version 4.2.x to 5.4.1. It's possible I haven't ported over the attributes or other configs correctly, but I tried to be very careful. I'm able to get a successful build, but I'm getting a 404 in the browser, and several error messages in the build logs (see below) similar to these:

[INFO] Running ca.uhn.fhir.jpa.starter.ExampleServerR4IT
[ERROR] Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 1.986 s <<< FAILURE! - in ca.uhn.fhir.jpa.starter.ExampleServerR4IT
[ERROR] ca.uhn.fhir.jpa.starter.ExampleServerR4IT.testCreateAndRead  Time elapsed: 0 s  <<< ERROR!
java.lang.IllegalStateException: Failed to load ApplicationContext
Caused by: java.lang.IllegalStateException: Error processing condition on org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration.propertySourcesPlaceholderConfigurer
Caused by: java.lang.IllegalStateException: Failed to introspect Class [ca.uhn.fhir.jpa.starter.FhirServerConfigR4] from ClassLoader [jdk.internal.loader.ClassLoaders$AppClassLoader@3d4eac69]
Caused by: java.lang.NoClassDefFoundError: org/hl7/fhir/utilities/npm/IPackageCacheManager
Caused by: java.lang.ClassNotFoundException: org.hl7.fhir.utilities.npm.IPackageCacheManager


[ERROR] ca.uhn.fhir.jpa.starter.ExampleServerR4IT.testWebsocketSubscription  Time elapsed: 0 s  <<< ERROR!
java.lang.IllegalStateException: Failed to load ApplicationContext
Caused by: java.lang.IllegalStateException: Error processing condition on org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration.propertySourcesPlaceholderConfigurer
Caused by: java.lang.IllegalStateException: Failed to introspect Class [ca.uhn.fhir.jpa.starter.FhirServerConfigR4] from ClassLoader [jdk.internal.loader.ClassLoaders$AppClassLoader@3d4eac69]
Caused by: java.lang.NoClassDefFoundError: org/hl7/fhir/utilities/npm/IPackageCacheManager
Caused by: java.lang.ClassNotFoundException: org.hl7.fhir.utilities.npm.IPackageCacheManager

I'm having trouble understanding the missing IPackageCacheManager dependency (assuming that's the root cause), because it's not referenced directly in the project. I assume I'm missing a dependency in the pom.xml file, but I thought I'd double-checked them pretty thoroughly. I'd greatly appreciate any help I can get. As I said, my research thus far hasn't yielded much. Please let me know if I can provide more details, I'm happy to do the heavy lifting to get this resolved but don't yet have a firm enough grasp to know what might be relevant.

Thank you in advance!
Sean

Reply all
Reply to author
Forward
0 new messages