Hard to tell what’s going on without code, but is it possible that allocated VM resources aren’t enough to run that Java app (also: 1, 2)? Try scaling up, if you haven’t already, to see if things then run as expected?
# 1G RAM
fly scale vm memory 1024 -a <app-name>
Additionally, you may also want to give existing JVM flags a cursory look.