Posts

Showing posts from 2024

Liferay Objects and Forms

Image
Liferay Objects and Forms How to use Objects with Forms or Form Containers Introduction Liferay Objects is a cool no-code feature that allows us to define full-featured entities - integrated with all Liferay Frameworks and providing auto-generated Headless API for accessing and updating objects information. Liferay Forms is a powerful Liferay tool, providing a lot of possibilities for building and configuring custom forms with advanced rules builder and field configuration options, workflow, notifications and personalization options. Even though Forms are becoming deprecated in favor of Objects, they still can be used for building user experiences, even in combination with Objects. Finally, Form Containers is a modern tool for rendering forms based on Objects with a possibility to map Form Fragments to object fields and an easy way for user interface customization. In this blog we’ll review each of these features, and how they can be used together. Sample Application Overview We will b

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 for the cas