ClickDao should be retrieved via a managed bean, with a scope of "ApplicationScoped". Convert persistence.xml to PersistenceUnitInfo Use this Implement transaction management using CDI. https://www.baeldung.com/liquibase-refactor-schema-of-java-app