Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Liferay 7.3 cannot startup
hi
i just try install Lifery 7.3.5 GA6(boundle tomcat) with MySQL 8 on Windows Server 2019
when i try startup the server, i got exception as follow
2021-05-07 11:17:52.417 INFO [main][LoggingTimer:83] Starting com.liferay.portal.events.StartupHelperUtil#initResourceActions
2021-05-07 11:17:52.590 ERROR [main][JDBCExceptionReporter:234] Duplicate entry '3' for key 'resourceaction.PRIMARY'
2021-05-07 11:17:52.590 INFO [main][LoggingTimer:44] Completed com.liferay.portal.events.StartupHelperUtil#initResourceActions in 173 ms
07-May-2021 11:17:52.590 SEVERE [main] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class [com.liferay.portal.spring.context.PortalContextLoaderListener]
java.lang.RuntimeException: org.springframework.dao.DataIntegrityViolationException: Could not execute JDBC batch update; SQL [insert into ResourceAction (mvccVersion, name, actionId, bitwiseValue, resourceActionId) values (?, ?, ?, ?, ?)]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
at com.liferay.portal.spring.context.PortalContextLoaderListener.contextInitialized(PortalContextLoaderListener.java:373)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4678)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5139)
the database is just create with sql from liferay-ce-portal-sql-7.3.5-ga6\create\create-mysql.sql, and i am very sure the database is just created and clean.
and everytime i tried restart the server, the duplicate kay will add 1 or 2, for exception, the sceond time i startup the server, the exception will shows:
2021-05-07 11:17:52.590 ERROR [main][JDBCExceptionReporter:234] Duplicate entry '11' for key 'resourceaction.PRIMARY'
and i do not know how to fix this issue, i also try on my pc(win 10) and MySQL 5.7, it works well.
is that dut to MySQL version?
thank you
i found the answer.
i should not use any property in portal-ext.properites in first time.
after server run in first time, and then i config the db info, save and restart server, it work.
Powered by Liferay™