title: NoClassDefFoundError: Appears on runtime in sbt multi-project, The error appear when I hit any URL after running my project
body: <p>I am working on a multi-sbt project, which has projects like invoices-and-orders, order-dtos.
  We use internally made libraries in our organization.</p>
  
  <p>The error appears at runtime after I hit any resource, I have researched a bit on how classLoader, etc work in loading classes at runtime in java, but I don't understand the root cause of this issue.</p>
  
  <p>I would be thankful if someone could provide insights on this issue.</p>
  
  <p>Full Stack Trace is as follows</p>
  
  <pre><code>
  play.api.UnexpectedException: Unexpected exception[NoClassDefFoundError: order/dtos/internal/DPQSRepresentations$DPQSStrategy]
      at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(DevServerStart.scala:184)
      at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(DevServerStart.scala:131)
      at scala.Option.map(Option.scala:146)
      at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1.apply(DevServerStart.scala:131)
      at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1.apply(DevServerStart.scala:129)
      at scala.util.Success.flatMap(Try.scala:231)
      at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1.apply(DevServerStart.scala:129)
      at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1.apply(DevServerStart.scala:121)
      at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24)
      at scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24)
  Caused by: java.lang.NoClassDefFoundError: order/dtos/internal/DPQSRepresentations$DPQSStrategy
      at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
      at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3137)
      at java.base/java.lang.Class.getDeclaredConstructors(Class.java:2357)
      at com.google.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.java:245)
      at com.google.inject.internal.ConstructorBindingImpl.create(ConstructorBindingImpl.java:115)
      at com.google.inject.internal.InjectorImpl.createUninitializedBinding(InjectorImpl.java:706)
      at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:929)
      at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:852)
      at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:291)
      at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:222)
  Caused by: java.lang.ClassNotFoundException: order.dtos.internal.DPQSRepresentations$DPQSStrategy
      at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
      at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
      at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
      at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
      at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3137)
      at java.base/java.lang.Class.getDeclaredConstructors(Class.java:2357)
      at com.google.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.java:245)
      at com.google.inject.internal.ConstructorBindingImpl.create(ConstructorBindingImpl.java:115)
      at com.google.inject.internal.InjectorImpl.createUninitializedBinding(InjectorImpl.java:706)
      at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:929)
  </code></pre>
  
  <p>order/dtos/internal/DPQSRepresentations is the class object in order-dtos project</p>