Posts

Showing posts with the label docker-compose

Running Liferay on Docker Database

  Running Liferay on Docker Database How to connect Liferay to a database in Docker Problem Recently I had to check some functionality for the old 6.2 project and run it locally. And, as it turned out, it was quite tricky just to run it, because I already have MySQL 8 in my environment, and Liferay 6.2 does not support it.  When I tried to run Liferay on my MySQL 8 database, I got some weird exception like this: java.lang.ClassCastException: java.math.BigInteger cannot be cast to java. It seemed to be MySQL driver related. Indeed, the old com.mysql.jdbc.Driver driver is not supported by MySQL 8. So, I tried to change it to a new com.mysql.cj.jdbc.Driver one, replace mysql.jar library with a newer one, and adjust the connection properties. But even after these adjustments there were weird errors that prevented successful start of Liferay 6.2 portal. Finally, I’ve found a quite simple and straightforward solution for this problem - Docker . Why Docker? Docker is pretty fine fo...