I build a Jersey App using the buildpack provided by heroku and maven project and following this blog : https://blog.dejavu.sk/running-jersey-2-applications-on-heroku/?fbclid=IwAR2gc9YoPI8irEa4DVD68PheLCx5pFjdWuc5dKbZmJA5d_D-wjt_-wPTlLo
In my code, I use the type "LocalDate" from the java.time package to work with dates, all was working well in localhost but when I tried to deploy with "git heroku push master" I got into troubles :
Now I had the same with a previous build because I'm using Genson to serialize and deserialize objects and to resolve this I added the dependency via the Maven tool in eclipse and all went well.
I thought I simply had to do the same for this java.time but I can't find the maven dependency install or even the .jar .
Since it's Java, I assumed it was build-in ... I tried using another library for Time like "Joda-time" but if it's possible to avoid this so I don't have to rewrite every piece of code with LocalDate I'd be interested.
Any ideas ?
Thank you
Without more details I can just guess:
- Check the import statements in User
and UserPersiatance
.
- Check if you configured the right java version (defined in the maven compiler plugin).
java.time.LocalDate
only exists since java version 1.8 .