{Resolved} The type com.google.common.reflect.TypeToken cannot be resolved

Hey, i’ve been trying to explore the openmrs fhir2 module which i cloned and on running mvn clean install in the terminal, all builds are successful :white_check_mark:. However, when i import the folder into eclipse, the api-2.2 seems to be throwing an exception here, when i open declaration i find the exception reading as The type com.google.common.reflect.TypeToken cannot be resolved. It is indirectly referenced from required .class files. And the quick fix provided is configure build path ,What could i be missing? maybe a plugin i didn’t add?

see image below: Screenshot from 2022-06-05 15-06-32

cc: @ibacher @kdaud @sharif @jnsereko

Have tried out invalid cache option.

@mherman22 try to clean the project and then rebuild :slightly_smiling_face:

done did that a couple of times dont seem to be the solution

i have cleared the cache , still not the solution

I’ve made an update to FHIR2 that maybe fixes this. Seems Eclipse disagrees with Maven about how Maven dependency scopes work…

1 Like

The fix solves the problem and also exposes some of the files with unimplemented methods. For example FhirConditionServiceImpl_2_2 class is missing implementation of getDeo() and getTranslator()

We use Lombok extensively in the FHIR2 module. You need to have the appropriate plugin installed in your IDE.

1 Like

it fixes the issue, thanks.

like @ibacher has said, those two are coming up because of @getter which your IDE cant recognize because the lombok plugin is missing. So you need to add the Lombok plugin to your IDE e.g for eclipse, the steps are here → Eclipse, Spring Tool Suite, (Red Hat) JBoss Developer Studio, MyEclipse

1 Like