Constraint Violation Exception when creating custom menus in ContentBox 6

Hi,
I run into the following Constraint Violation Exception when creating a new custom menu on a fresh install of ContentBox6 :

{
"data":{},
"error":true,"
pagination":{"totalPages":1,"maxRows":0,"offset":0,"page":1,"totalRecords":0},
"messages":["An exception ocurred: org.hibernate.exception.ConstraintViolationException: could not execute statement"]}

Steps to reproduce are the following

  1. Open the Menu Manager in The admin
  2. Click ‘Create Menu’ Button
  3. Give the menu a title in the right hand sidebar
  4. Add a menu item of type ‘Content’
  5. Input a ‘Item Content’ name and a ‘Content Item’ (In my case, the content Item is another page)
  6. Click ‘Save’.

Expected result : ContentBox creates a new menu with one menu item in it

Actual Result : ContentBox creates the menu, but fails to create the menu item due to a constraint Violation Exception In the logs I have ERROR org.hibernate.engine.jdbc.spi.SqlExceptionHelper -- Column 'FK_parentID' cannot be null

The error appears on both my prod site (Ubuntu Linux) and my test install (Mac OS).
Is it a bug or am I missing something?

My setup :

  • OS : Ubuntu 22.04 (prod) / MacOS Sonoma 14.2.1 (test)
  • Java : openjdk version “11.0.21” 2023-10-17
  • ContentBox. :6.0.2
  • Engine : Lucee 6
  • ORM : Ortus ORM extension 6.4.0
  • Database : MariaDB 10.6.16

Thanks for your help…

Hi Damien,
Could you share the entire stack trace from the logs? Or is that all there is?

ERROR org.hibernate.engine.jdbc.spi.SqlExceptionHelper -- Column 'FK_parentID' cannot be null

It’s not much to go on, though admittedly I’m not much of a ContentBox dev.

Thanks for your answer @MichaelBorn

You’ll find the complete stacktrace below.
Note that, in the meantime, I have solved my problem (although I still do not completely understand what caused it).
To solve it, I did the following:

  1. Dump the ‘menuitems’ table of an existing and working contentbox instance
  2. Tweak the generated .sql file so that foreign keys reference the ID of an existing menu in the ‘menu’ table and of an existing site.
  3. Import the resulting .sql in the database of the problematic Contentbos instance.

When the ‘menuitem’ table was no longer empty, the admin started working like a charm, and I was able to modify my custom menus with no issue. So it seems like this error only fires when the ‘menuitems’ table is empty.

Thanks for looking into it.
Damien


[INFO ] 11:32:11.948 [XNIO-1 task-1] ERROR org.hibernate.engine.jdbc.spi.SqlExceptionHelper -- Column 'FK_parentID' cannot be null
[ERROR] 2024-02-05 10:32:12 modules.contentbox.modules.contentbox-admin.handlers.menus Error calling contentbox-admin:menus.save: org.hibernate.exception.ConstraintViolationException: could not execute statement | ExtraInfo: {
        "_stacktrace":"lucee.runtime.exp.NativeException: org.hibernate.exception.ConstraintViolationException: could not execute statement\n\tat org.hibernate.internal.ExceptionConverterImpl.convert(
        ExceptionConverterImpl.java:154)
        \n\tat org.hibernate.internal.ExceptionConverterImpl.convert(
        ExceptionConverterImpl.java:181)
        \n\tat org.hibernate.internal.ExceptionConverterImpl.convert(
        ExceptionConverterImpl.java:188)
        \n\tat org.hibernate.internal.SessionImpl.doFlush(
        SessionImpl.java:1411)
        \n\tat org.hibernate.internal.SessionImpl.flush(
        SessionImpl.java:1394)
        \n\tat ortus.extension.orm.HibernateORMTransaction.end(
        HibernateORMTransaction.java:95)
        \n\tat lucee.runtime.orm.ORMConnection.setAutoCommit(
        ORMConnection.java:216)
        \n\tat lucee.runtime.orm.ORMDatasourceConnection.setAutoCommit(
        ORMDatasourceConnection.java:338)
        \n\tat lucee.runtime.db.DatasourceManagerImpl.end(
        DatasourceManagerImpl.java:416)
        \n\tat lucee.runtime.db.DatasourceManagerImpl.end(
        DatasourceManagerImpl.java:397)
        \n\tat lucee.runtime.tag.Transaction.doFinally(
        Transaction.java:173)
        \n\tat models.baseormservice_cfc$cf$3y.udfCall8(
        /cborm/models/BaseORMService.cfc:1987)
        \n\tat models.baseormservice_cfc$cf$3y.udfCall(
        /cborm/models/BaseORMService.cfc)
        \n\tat lucee.runtime.type.UDFImpl.implementation(
        UDFImpl.java:112)
        \n\tat lucee.runtime.type.UDFImpl._call(
        UDFImpl.java:356)
        \n\tat lucee.runtime.type.UDFImpl.call(
        UDFImpl.java:223)
        \n\tat lucee.runtime.type.scope.UndefinedImpl.call(
        UndefinedImpl.java:787)
        \n\tat lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(
        VariableUtilImpl.java:787)
        \n\tat lucee.runtime.PageContextImpl.getFunction(
        PageContextImpl.java:1777)
        \n\tat models.baseormservice_cfc$cf$3y.udfCall6(
        /cborm/models/BaseORMService.cfc:1555)
        \n\tat models.baseormservice_cfc$cf$3y.udfCall(
        /cborm/models/BaseORMService.cfc)
        \n\tat lucee.runtime.type.UDFImpl.implementation(
        UDFImpl.java:112)
        \n\tat lucee.runtime.type.UDFImpl._call(
        UDFImpl.java:356)
        \n\tat lucee.runtime.type.UDFImpl.call(
        UDFImpl.java:223)
        \n\tat lucee.runtime.ComponentImpl._call(
        ComponentImpl.java:701)
        \n\tat lucee.runtime.ComponentImpl._call(
        ComponentImpl.java:597)
        \n\tat lucee.runtime.SuperComponent.call(
        SuperComponent.java:83)
        \n\tat lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(
        VariableUtilImpl.java:787)
        \n\tat lucee.runtime.PageContextImpl.getFunction(
        PageContextImpl.java:1777)
        \n\tat models.menu.menuservice_cfc$cf$4l.udfCall1(
        /contentbox/models/menu/MenuService.cfc:37)
        \n\tat models.menu.menuservice_cfc$cf$4l.udfCall(
        /contentbox/models/menu/MenuService.cfc)
        \n\tat lucee.runtime.type.UDFImpl.implementation(
        UDFImpl.java:112)
        \n\tat lucee.runtime.type.UDFImpl._call(
        UDFImpl.java:356)
        \n\tat lucee.runtime.type.UDFImpl.call(
        UDFImpl.java:223)
        \n\tat lucee.runtime.ComponentImpl._call(
        ComponentImpl.java:701)
        \n\tat lucee.runtime.ComponentImpl._call(
        ComponentImpl.java:589)
        \n\tat lucee.runtime.ComponentImpl.call(
        ComponentImpl.java:1993)
        \n\tat lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(
        VariableUtilImpl.java:787)
        \n\tat lucee.runtime.PageContextImpl.getFunction(
        PageContextImpl.java:1777)
        \n\tat modules.contentbox.modules.contentbox_admin495.handlers.menus_cfc$cf.udfCall1(
        /modules/contentbox/modules/contentbox-admin/handlers/menus.cfc:206)
        \n\tat modules.contentbox.modules.contentbox_admin495.handlers.menus_cfc$cf.udfCall(
        /modules/contentbox/modules/contentbox-admin/handlers/menus.cfc)
        \n\tat lucee.runtime.type.UDFImpl.implementation(
        UDFImpl.java:112)
        \n\tat lucee.runtime.type.UDFImpl._call(
        UDFImpl.java:356)
        \n\tat lucee.runtime.type.UDFImpl.callWithNamedValues(
        UDFImpl.java:213)
        \n\tat lucee.runtime.type.scope.ArgumentImpl.callWithNamedValues(
        ArgumentImpl.java:529)
        \n\tat lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(
        VariableUtilImpl.java:866)
        \n\tat lucee.runtime.PageContextImpl.getFunctionWithNamedValues(
        PageContextImpl.java:1796)
        \n\tat system.resthandler_cfc$cf.udfCall1(
        /coldbox/system/RestHandler.cfc:58)
        \n\tat system.resthandler_cfc$cf.udfCall(
        /coldbox/system/RestHandler.cfc)
        \n\tat lucee.runtime.type.UDFImpl.implementation(
        UDFImpl.java:112)
        \n\tat lucee.runtime.type.UDFImpl._call(
        UDFImpl.java:356)
        \n\tat lucee.runtime.type.UDFImpl.callWithNamedValues(
        UDFImpl.java:213)
        \n\tat lucee.runtime.ComponentImpl._call(
        ComponentImpl.java:702)
        \n\tat lucee.runtime.ComponentImpl._call(
        ComponentImpl.java:589)
        \n\tat lucee.runtime.ComponentImpl.callWithNamedValues(
        ComponentImpl.java:2012)
        \n\tat lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(
        VariableUtilImpl.java:866)
        \n\tat lucee.runtime.PageContextImpl.getFunctionWithNamedValues(
        PageContextImpl.java:1796)
        \n\tat system.web.controller_cfc$cf.udfCall3(
        /coldbox/system/web/Controller.cfc:998)
        \n\tat system.web.controller_cfc$cf.udfCall(
        /coldbox/system/web/Controller.cfc)
        \n\tat lucee.runtime.type.UDFImpl.implementation(
        UDFImpl.java:112)
        \n\tat lucee.runtime.type.UDFImpl._call(
        UDFImpl.java:356)
        \n\tat lucee.runtime.type.UDFImpl.callWithNamedValues(
        UDFImpl.java:213)
        \n\tat lucee.runtime.type.scope.UndefinedImpl.callWithNamedValues(
        UndefinedImpl.java:805)
        \n\tat lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(
        VariableUtilImpl.java:866)
        \n\tat lucee.runtime.PageContextImpl.getFunctionWithNamedValues(
        PageContextImpl.java:1796)
        \n\tat system.web.controller_cfc$cf.udfCall3(
        /coldbox/system/web/Controller.cfc:713)
        \n\tat system.web.controller_cfc$cf.udfCall(
        /coldbox/system/web/Controller.cfc)
        \n\tat lucee.runtime.type.UDFImpl.implementation(
        UDFImpl.java:112)
        \n\tat lucee.runtime.type.UDFImpl._call(
        UDFImpl.java:356)
        \n\tat lucee.runtime.type.UDFImpl.callWithNamedValues(
        UDFImpl.java:213)
        \n\tat lucee.runtime.ComponentImpl._call(
        ComponentImpl.java:702)
        \n\tat lucee.runtime.ComponentImpl._call(
        ComponentImpl.java:589)
        \n\tat lucee.runtime.ComponentImpl.callWithNamedValues(
        ComponentImpl.java:2012)
        \n\tat lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(
        VariableUtilImpl.java:866)
        \n\tat lucee.runtime.PageContextImpl.getFunctionWithNamedValues(
        PageContextImpl.java:1796)
        \n\tat coldbox.system.bootstrap_cfc$cf.udfCall1(
        /coldbox/system/Bootstrap.cfc:290)
        \n\tat coldbox.system.bootstrap_cfc$cf.udfCall(
        /coldbox/system/Bootstrap.cfc)
        \n\tat lucee.runtime.type.UDFImpl.implementation(
        UDFImpl.java:112)
        \n\tat lucee.runtime.type.UDFImpl._call(
        UDFImpl.java:356)
        \n\tat lucee.runtime.type.UDFImpl.call(
        UDFImpl.java:223)
        \n\tat lucee.runtime.type.scope.UndefinedImpl.call(
        UndefinedImpl.java:787)
        \n\tat lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(
        VariableUtilImpl.java:787)
        \n\tat lucee.runtime.PageContextImpl.getFunction(
        PageContextImpl.java:1777)
        \n\tat coldbox.system.bootstrap_cfc$cf.udfCall1(
        /coldbox/system/Bootstrap.cfc:506)
        \n\tat coldbox.system.bootstrap_cfc$cf.udfCall(
        /coldbox/system/Bootstrap.cfc)
        \n\tat lucee.runtime.type.UDFImpl.implementation(
        UDFImpl.java:112)
        \n\tat lucee.runtime.type.UDFImpl._call(
        UDFImpl.java:356)
        \n\tat lucee.runtime.type.UDFImpl.call(
        UDFImpl.java:223)
        \n\tat lucee.runtime.ComponentImpl._call(
        ComponentImpl.java:701)
        \n\tat lucee.runtime.ComponentImpl._call(
        ComponentImpl.java:589)
        \n\tat lucee.runtime.ComponentImpl.call(
        ComponentImpl.java:1993)
        \n\tat lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(
        VariableUtilImpl.java:787)
        \n\tat lucee.runtime.PageContextImpl.getFunction(
        PageContextImpl.java:1777)
        \n\tat application_cfc$cf.udfCall(
        /Application.cfc:179)
        \n\tat lucee.runtime.type.UDFImpl.implementation(
        UDFImpl.java:112)
        \n\tat lucee.runtime.t
[ERROR] ype.UDFImpl._call(
        UDFImpl.java:356)
        \n\tat lucee.runtime.type.UDFImpl.call(
        UDFImpl.java:223)
        \n\tat lucee.runtime.ComponentImpl._call(
        ComponentImpl.java:701)
        \n\tat lucee.runtime.ComponentImpl._call(
        ComponentImpl.java:589)
        \n\tat lucee.runtime.ComponentImpl.call(
        ComponentImpl.java:1993)
        \n\tat lucee.runtime.listener.ModernAppListener.call(
        ModernAppListener.java:446)
        \n\tat lucee.runtime.listener.ModernAppListener._onRequest(
        ModernAppListener.java:137)
        \n\tat lucee.runtime.listener.MixedAppListener.onRequest(
        MixedAppListener.java:44)
        \n\tat lucee.runtime.PageContextImpl.execute(
        PageContextImpl.java:2494)
        \n\tat lucee.runtime.PageContextImpl._execute(
        PageContextImpl.java:2480)
        \n\tat lucee.runtime.PageContextImpl.executeCFML(
        PageContextImpl.java:2451)
        \n\tat lucee.runtime.engine.Request.exe(
        Request.java:45)
        \n\tat lucee.runtime.engine.CFMLEngineImpl._service(
        CFMLEngineImpl.java:1219)
        \n\tat lucee.runtime.engine.CFMLEngineImpl.serviceCFML(
        CFMLEngineImpl.java:1165)
        \n\tat lucee.loader.engine.CFMLEngineWrapper.serviceCFML(
        CFMLEngineWrapper.java:97)
        \n\tat lucee.loader.servlet.CFMLServlet.service(
        CFMLServlet.java:51)
        \n\tat javax.servlet.http.HttpServlet.service(
        HttpServlet.java:590)
        \n\tat io.undertow.servlet.handlers.ServletHandler.handleRequest(
        ServletHandler.java:74)
        \n\tat io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(
        FilterHandler.java:129)
        \n\tat org.cfmlprojects.regexpathinfofilter.RegexPathInfoFilter.doFilter(
        RegexPathInfoFilter.java:47)
        \n\tat io.undertow.servlet.core.ManagedFilter.doFilter(
        ManagedFilter.java:67)
        \n\tat io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(
        FilterHandler.java:131)
        \n\tat io.undertow.servlet.handlers.FilterHandler.handleRequest(
        FilterHandler.java:84)
        \n\tat io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(
        ServletSecurityRoleHandler.java:62)
        \n\tat io.undertow.servlet.handlers.ServletChain$1.handleRequest(
        ServletChain.java:68)
        \n\tat io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(
        ServletDispatchingHandler.java:36)
        \n\tat runwar.undertow.SSLClientCertHeaderHandler.handleRequest(
        SSLClientCertHeaderHandler.java:144)
        \n\tat io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(
        RedirectDirHandler.java:68)
        \n\tat io.undertow.server.handlers.PredicateHandler.handleRequest(
        PredicateHandler.java:43)
        \n\tat io.undertow.server.handlers.PredicateHandler.handleRequest(
        PredicateHandler.java:43)
        \n\tat io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(
        ServletInitialHandler.java:257)
        \n\tat io.undertow.servlet.handlers.ServletInitialHandler.dispatchToPath(
        ServletInitialHandler.java:182)
        \n\tat io.undertow.servlet.spec.RequestDispatcherImpl.forwardImpl(
        RequestDispatcherImpl.java:188)
        \n\tat io.undertow.servlet.spec.RequestDispatcherImpl.forwardImplSetup(
        RequestDispatcherImpl.java:136)
        \n\tat io.undertow.servlet.spec.RequestDispatcherImpl.forward(
        RequestDispatcherImpl.java:99)
        \n\tat org.cfmlprojects.regexpathinfofilter.RegexPathInfoFilter.doFilter(
        RegexPathInfoFilter.java:45)
        \n\tat io.undertow.servlet.core.ManagedFilter.doFilter(
        ManagedFilter.java:67)
        \n\tat io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(
        FilterHandler.java:131)
        \n\tat io.undertow.servlet.handlers.FilterHandler.handleRequest(
        FilterHandler.java:84)
        \n\tat io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(
        ServletSecurityRoleHandler.java:62)
        \n\tat io.undertow.servlet.handlers.ServletChain$1.handleRequest(
        ServletChain.java:68)
        \n\tat io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(
        ServletDispatchingHandler.java:36)
        \n\tat runwar.undertow.SSLClientCertHeaderHandler.handleRequest(
        SSLClientCertHeaderHandler.java:144)
        \n\tat io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(
        RedirectDirHandler.java:68)
        \n\tat io.undertow.server.handlers.PredicateHandler.handleRequest(
        PredicateHandler.java:43)
        \n\tat io.undertow.server.handlers.PredicateHandler.handleRequest(
        PredicateHandler.java:43)
        \n\tat io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(
        ServletInitialHandler.java:257)
        \n\tat io.undertow.servlet.handlers.ServletInitialHandler.dispatchToPath(
        ServletInitialHandler.java:182)
        \n\tat io.undertow.servlet.spec.RequestDispatcherImpl.forwardImpl(
        RequestDispatcherImpl.java:188)
        \n\tat io.undertow.servlet.spec.RequestDispatcherImpl.forwardImplSetup(
        RequestDispatcherImpl.java:136)
        \n\tat io.undertow.servlet.spec.RequestDispatcherImpl.forward(
        RequestDispatcherImpl.java:99)
        \n\tat org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(
        NormalRewrittenUrl.java:215)
        \n\tat org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(
        RuleChain.java:171)
        \n\tat org.tuckey.web.filters.urlrewrite.RuleChain.doRules(
        RuleChain.java:145)
        \n\tat org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(
        UrlRewriter.java:92)
        \n\tat org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(
        UrlRewriteFilter.java:405)
        \n\tat io.undertow.servlet.core.ManagedFilter.doFilter(
        ManagedFilter.java:67)
        \n\tat io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(
        FilterHandler.java:131)
        \n\tat io.undertow.servlet.handlers.FilterHandler.handleRequest(
        FilterHandler.java:84)
        \n\tat io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(
        ServletSecurityRoleHandler.java:62)
        \n\tat io.undertow.servlet.handlers.ServletChain$1.handleRequest(
        ServletChain.java:68)
        \n\tat io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(
        ServletDispatchingHandler.java:36)
        \n\tat runwar.undertow.SSLClientCertHeaderHandler.handleRequest(
        SSLClientCertHeaderHandler.java:144)
        \n\tat io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(
        RedirectDirHandler.java:68)
        \n\tat io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(
        SSLInformationAssociationHandler.java:117)
        \n\tat io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(
        ServletAuthenticationCallHandler.java:57)
        \n\tat io.undertow.server.handlers.PredicateHandler.handleRequest(
        PredicateHandler.java:43)
        \n\tat io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(
        AbstractConfidentialityHandler.java:46)
        \n\tat io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(
        ServletConfidentialityConstraintHandler.java:64)
        \n\tat io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(
        AuthenticationMechanismsHandler.java:60)
        \n\tat io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(
        CachedAuthenticatedSessionHandler.java:77)
        \n\tat io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(
        AbstractSecurityContextAssociationHandler.java:43)
        \n\tat io.undertow.server.handlers.PredicateHandler.handleRequest(
        PredicateHandler.java:43)
        \n\tat io.undertow.servlet.handlers.SendErrorPageHandler.handleRequest(
        SendErrorPageHandler.java:52)
        \n\tat io.undertow.server.handlers.PredicateHandler.handleRequest(
        PredicateHandler.java:43)
        \n\tat io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(
        ServletInitialHandler.java:275)
        \n\tat io.undertow.servlet.handlers.ServletInitialHandler.access$100(
        ServletInitialHandler.java:79)
        \n\tat io.undertow.servlet.handlers.ServletInitialHandler$2.call(
        ServletInitialHandler.java:134)
        \n\tat io.undertow.servlet.handlers.ServletInitialHandler$2.call(
        ServletInitialHandler.java:131)
        \n\tat io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(
        ServletRequestContextThreadSetupAction.java:48)
        \n\tat io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(
        ContextClassLoaderSetupAction.java:43)
        \n\tat io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(
[ERROR]         LegacyThreadSetupActionWrapper.java:44)
        \n\tat io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(
        ServletInitialHandler.java:255)
        \n\tat io.undertow.servlet.handlers.ServletInitialHandler.access$000(
        ServletInitialHandler.java:79)
        \n\tat io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(
        ServletInitialHandler.java:100)
        \n\tat io.undertow.server.Connectors.executeRootHandler(
        Connectors.java:393)
        \n\tat io.undertow.server.HttpServerExchange$1.run(
        HttpServerExchange.java:852)
        \n\tat org.jboss.threads.ContextClassLoaderSavingRunnable.run(
        ContextClassLoaderSavingRunnable.java:35)
        \n\tat org.jboss.threads.EnhancedQueueExecutor.safeRun(
        EnhancedQueueExecutor.java:2019)
        \n\tat org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(
        EnhancedQueueExecutor.java:1558)
        \n\tat org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(
        EnhancedQueueExecutor.java:1449)
        \n\tat org.xnio.XnioWorker$WorkerThreadFactory$1$1.run(
        XnioWorker.java:1282)
        \n\tat java.base/java.lang.Thread.run(
        Thread.java:829)
        \nCaused by: javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not execute statement\n\t... 188 more\nCaused by: org.hibernate.exception.ConstraintViolationException: could not execute statement\n\tat org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(
        SQLExceptionTypeDelegate.java:59)
        \n\tat org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(
        StandardSQLExceptionConverter.java:37)
        \n\tat org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(
        SqlExceptionHelper.java:113)
        \n\tat org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(
        SqlExceptionHelper.java:99)
        \n\tat org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(
        ResultSetReturnImpl.java:200)
        \n\tat org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(
        NonBatchingBatch.java:46)
        \n\tat org.hibernate.persister.entity.AbstractEntityPersister.insert(
        AbstractEntityPersister.java:3375)
        \n\tat org.hibernate.persister.entity.AbstractEntityPersister.insert(
        AbstractEntityPersister.java:3937)
        \n\tat org.hibernate.action.internal.EntityInsertAction.execute(
        EntityInsertAction.java:107)
        \n\tat org.hibernate.engine.spi.ActionQueue.executeActions(
        ActionQueue.java:604)
        \n\tat org.hibernate.engine.spi.ActionQueue.lambda$executeActions$1(
        ActionQueue.java:478)
        \n\tat java.base/java.util.LinkedHashMap.forEach(
        LinkedHashMap.java:684)
        \n\tat org.hibernate.engine.spi.ActionQueue.executeActions(
        ActionQueue.java:475)
        \n\tat org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(
        AbstractFlushingEventListener.java:344)
        \n\tat org.hibernate.event.internal.DefaultFlushEventListener.onFlush(
        DefaultFlushEventListener.java:40)
        \n\tat org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(
        EventListenerGroupImpl.java:107)
        \n\tat org.hibernate.internal.SessionImpl.doFlush(
        SessionImpl.java:1407)
        \n\t... 184 more\nCaused by: java.sql.SQLIntegrityConstraintViolationException: Column 'FK_parentID' cannot be null\n\tat com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(
        SQLError.java:117)
        \n\tat com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(
        SQLExceptionsMapping.java:122)
        \n\tat com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(
        ClientPreparedStatement.java:953)
        \n\tat com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(
        ClientPreparedStatement.java:1092)
        \n\tat com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(
        ClientPreparedStatement.java:1040)
        \n\tat com.mysql.cj.jdbc.ClientPreparedStatement.executeLargeUpdate(
        ClientPreparedStatement.java:1348)
        \n\tat com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdate(
        ClientPreparedStatement.java:1025)
        \n\tat org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(
        ResultSetReturnImpl.java:197)
        \n\t... 196 more\n",
        "httpData":{
                "headers":{
                        "Origin":"http://127.0.0.1:54160",
                        "Upgrade-Insecure-Requests":"1",
                        "sec-ch-ua-platform":"\"macOS\"",
                        "User-Agent":"Mozilla/5.0 (
                        Macintosh; Intel Mac OS X 10_15_7)
                        AppleWebKit/537.36 (
                                KHTML,
                        like Gecko)
                        Chrome/121.0.0.0 Safari/537.36",
                        "Content-Length":"622",
                        "sec-ch-ua-mobile":"?0",
                        "Sec-Fetch-Dest":"document",
                        "Cookie":"cfid=14ffb955-f269-4e2c-86c3-188d1a0fd47e; cftoken=0; CBSTORAGE_CURRENTLOCALE=%22en_US%22; CBSTORAGE_FILEBROWSERPREFS=%22%7B%5C%22LISTTYPE%5C%22%3A%5C%22listing%5C%22%2C%5C%22SORTING%5C%22%3A%5C%22name%5C%22%2C%5C%22LISTFOLDER%5C%22%3A%5C%22all%5C%22%7D%22; LUCEE_ADMIN_LANG=en; LUCEE_ADMIN_LASTPAGE=overview; navgoco=%7B%220%22%3A%7B%220%22%3A1%7D%7D",
                        "Sec-GPC":"1",
                        "Accept-Language":"en-GB,
                        en",
                        "Host":"127.0.0.1:54160",
                        "Sec-Fetch-Mode":"navigate",
                        "Accept":"text/html,
                        application/xhtml+xml,
                        application/xml;q=0.9,
                        image/avif,
                        image/webp,
                        image/apng,
                        */*;q=0.8",
                        "Sec-Fetch-User":"?1",
                        "Referer":"http://127.0.0.1:54160/cbadmin/menus/editor/menuID/ff8080818d744144018d744278260002",
                        "Content-Type":"application/x-www-form-urlencoded",
                        "Cache-Control":"max-age=0",
                        "Accept-Encoding":"gzip,
                        deflate,
                        br",
                        "Connection":"keep-alive",
                        "sec-ch-ua":"\"Not A(
                                Brand\";v=\"99\",
                                \"Brave\";v=\"121\",
                                \"Chromium\";v=\"121\"",
                                "Sec-Fetch-Site":"same-origin"
                        },
                        "protocol":"HTTP/1.1",
                        "method":"POST"
                }
        }

Thanks for reporting this. I will try to replicate it.

I have not been able to replicate this. I will try with a different migration and report back.