Working on multiproject on STS/eclipse. Getting java.lang.NoClassDefFoundError on eclipse

I have simple multiproject setup on STS. A persistence and a ui project. When I start up the UI project, it complains java.lang.NoClassDefFoundError with the entity I have implemented in the persistence project. I have already setup the dependency on the ui project as – compile project(":persistence"). And I see the .war file has the persistence.jar file. I suspect this is related to eclipse. Anyone run into similar issue and how did you solve it?

do you see a project dependency in your ui project to the persistence project in the eclipse setup?

In the ui Gradle Dependencies. I see a folder call cruiser-persistence but it is empty