Debug FHIR Server with Tomcat

37 views
Skip to first unread message

Search Again

unread,
May 6, 2021, 10:14:10 AM5/6/21
to HAPI FHIR
Hi All,

I am a newbie to the FHIR server and JPA web apps. I am trying to debug the FHIR server in IntelliJ IDEA with the Smart Tomcat plugin and facing issues with it.

Setup: 
I am trying to debug the FHIR server in the IntelliJ IDEA Community version with the Smart Tomcat plugin. 

Problem:
When I run the application with the smart tomcat configuration in IntelliJ, I get the ClassNotFound error for TesterConfig.
I have hapi-fhir-testpage-overlay this dependency in my pom.xml and I can also see this class under dependencies -> jar.


Error trace:

Caused by: java.lang.NoClassDefFoundError: ca/uhn/fhir/to/TesterConfig at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) at java.lang.Class.getDeclaredMethods(Class.java:1975) at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:463) ... 52 common frames omitted Caused by: java.lang.ClassNotFoundException: ca.uhn.fhir.to.TesterConfig at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1372) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1195) ... 56 common frames omitted

Please refer to this issue for the details: https://github.com/hapifhir/hapi-fhir/issues/2638

Reference

Hunch: 
Since this dependency has provided scope so it seems like the smart tomcat is not providing/including this dependency as expected.
I tried various ways to fix it but no luck.

Could anyone please help me with this? I would be grateful to you.

Thanks,
Java Dev



Reply all
Reply to author
Forward
0 new messages