My application loads Java source file by Scripting interface.
It’s working well if app launched by Idea, but throws exception if run by UberJar, saying cannot find package and class and symbols etc.
Something wrong with classloader? Or I missed to configure something?
Here’s a project could reproduce the issue.
Steps:
Modify cuba.confDir setting in both app.properties and build.gradle, to “/conf” Another question: why cuba.confDir in app.properties doesn’t work for UberJar?
Launch the application by Idea, no issue.
Build UberJar, and run by command line, then error happens
java -Dapp.home=./app-home -jar ./app.jar
Unfortunately, hot deploy of classes does not work for UberJar because of the class loading mechanism in that case. I’ve created an issue to investigate that problem. Property cuba.confDir from app.properties does not work for UberJar because application properties for UberJar should be defined separately by appProperties task parameter.