Precautions when running apps including Jackson on Glassfish 4.1

When running the app on Glassfish, the Jackson referenced by the library I'm using is very old.

From that point, I was wondering why it didn't work, so I made a note.

Conclusion

Apparently there is a Jackson jar in the Glassfish modules and its version is old. And even if you specify the dependency in Maven's POM to use the Jackson-dependent library, Because the Jackson library on Glassfish is loaded first by the class loader, The older library seems to take precedence.

counter-measure

I have already upgraded the library directly. There was an article that wrote the same thing in Tomcat, so refer to that and refer to that. Update the library (please do it at your own risk)

Target file

For the time being, it is recommended to back up the original file before executing it.

I wanted to try the Line bot, so I've included Jackson's 2.8.10, but other versions also There may be no problem if all the related library versions are available.

Recommended Posts

Precautions when running apps including Jackson on Glassfish 4.1
Relative path when running tomcat on eclipse
Error when running git push heroku master on Heroku
Internal commands when running Kotlin on IntelliJ IDEA
Introducing New Relic to Java apps running on Heroku
Ruby on Rails Tutorial Troublesome notes when running on Windows