So I have this app, that runs like a charm locally, but not on Heroku.
When I look in the log-file after deploying and running, I get the following error:
2019-02-11T20:19:53.000000+00:00 app[api]: Build succeeded
2019-02-11T20:19:56.249701+00:00 heroku[web.1]: Starting process with command `java $JAVA_OPTS -cp target/classes:target/dependency/* com.name.app.Main`
2019-02-11T20:19:57.813257+00:00 app[web.1]: Setting JAVA_TOOL_OPTIONS defaults based on dyno size. Custom settings will override them.
2019-02-11T20:19:57.816510+00:00 app[web.1]: Picked up JAVA_TOOL_OPTIONS: -Xmx300m -Xss512k -XX:CICompilerCount=2 -Dfile.encoding=UTF-8
2019-02-11T20:20:12.984296+00:00 heroku[web.1]: State changed from starting to crashed
2019-02-11T20:20:12.906580+00:00 app[web.1]: Exception in thread "Thread-0" java.lang.NoClassDefFoundError: com/name/my-library/utils/NetworkUtils
2019-02-11T20:20:12.906761+00:00 app[web.1]: at com.name.app.UpdateThread.update(UpdateThread.java:35)
2019-02-11T20:20:12.906837+00:00 app[web.1]: at com.name.app.UpdateThread.run(UpdateThread.java:25)
2019-02-11T20:20:12.906974+00:00 app[web.1]: Caused by: java.lang.ClassNotFoundException: com.name.my-library.utils.NetworkUtils
2019-02-11T20:20:12.907044+00:00 app[web.1]: at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
2019-02-11T20:20:12.907114+00:00 app[web.1]: at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
2019-02-11T20:20:12.907183+00:00 app[web.1]: at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
2019-02-11T20:20:12.907312+00:00 app[web.1]: at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
2019-02-11T20:20:12.907318+00:00 app[web.1]: ... 2 more
2019-02-11T20:20:12.968687+00:00 heroku[web.1]: Process exited with status 0
It is clear that it cannot find a class that is being used. Now this class is present, not in the app itself, but in a library that I have released on GitHub. I am using Maven to include the dependency. As I said, the projects runs fine, locally, also using the library on GitHub.
EDIT: Just to let you know. The deployment process is working (in that case I do not get an error concerning the library dependency).