My project compiles in IntelliJ, it is a simple spring -mvc written in scala.
I get this error when I run it using tomcat:
java.lang.NoClassDefFoundError: org/example/houses/SomeClassNameHere
The above is not the exact name of my library.
My controller looks like this:
package com.example.scalacms.web.controllers
import org.springframework.stereotype.Controller
import org.springframework.web.bind.annotation.{ResponseBody, RequestMapping}
import org.example.house
@Controller
class HomeController {
var houses: Houses = _
@RequestMapping(Array("/"))
@ResponseBody
def index: String = {
"hello, world!"
}
}
I am confused because it compiles in IntelliJ, it raises all my classes in intellisense, etc.
Maybe tomcat doesn't have a library in my classpath? I use an exploded artifact.
I do not see the class path anywhere in the output windows, so I cannot confirm.
Update
So, I looked in /out/artifacts/myapp_web_war_exploded/WEB-INF/lib, and I do not see the jar file there. Why is the bank not included in the deployment? What should I do to enable it in intellij?