Hi there,
I`m using Cuba Studio 6.10.7 with a MySQL 8 database. After downloading the Email Template addon, I encountered the following issue when clicking on ‘Email templates’ in the Administration section:
MySQLSyntaxErrorException: Unknown column 't1.DTYPE' in 'field list'
Here’s the complete stacktrace:
com.haulmont.cuba.core.global.RemoteException:
---
javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.2.cuba24): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 't1.DTYPE' in 'field list'
Error Code: 1054
Call: SELECT t1.ID AS a1, t1.DTYPE AS a2, t1.BCC AS a3, t1.CC AS a4, t1.CODE AS a5, t1.DELETE_TS AS a6, t1.DELETED_BY AS a7, t1.FROM_ AS a8, t1.NAME AS a9, t1.SUBJECT AS a10, t1.TO_ AS a11, t1.TYPE_ AS a12, t1.USE_REPORT_SUBJECT AS a13, t1.VERSION AS a14, t1.GROUP_ID AS a15, t0.ID AS a16, t0.DELETE_TS AS a17, t0.DELETED_BY AS a18, t0.NAME AS a19, t0.VERSION AS a20 FROM EMAILTEMPLATES_EMAIL_TEMPLATE t1 LEFT OUTER JOIN EMAILTEMPLATES_TEMPLATE_GROUP t0 ON (t0.ID = t1.GROUP_ID) WHERE (t1.DELETE_TS IS NULL) LIMIT ?, ?
bind => [0, 50]
Query: ReadAllQuery(referenceClass=EmailTemplate sql="SELECT t1.ID AS a1, t1.DTYPE AS a2, t1.BCC AS a3, t1.CC AS a4, t1.CODE AS a5, t1.DELETE_TS AS a6, t1.DELETED_BY AS a7, t1.FROM_ AS a8, t1.NAME AS a9, t1.SUBJECT AS a10, t1.TO_ AS a11, t1.TYPE_ AS a12, t1.USE_REPORT_SUBJECT AS a13, t1.VERSION AS a14, t1.GROUP_ID AS a15, t0.ID AS a16, t0.DELETE_TS AS a17, t0.DELETED_BY AS a18, t0.NAME AS a19, t0.VERSION AS a20 FROM EMAILTEMPLATES_EMAIL_TEMPLATE t1 LEFT OUTER JOIN EMAILTEMPLATES_TEMPLATE_GROUP t0 ON (t0.ID = t1.GROUP_ID) WHERE (t1.DELETE_TS IS NULL) LIMIT ?, ?")
FetchGroup(){cc, bcc, code, useReportSubject, subject, type, attachedTemplateReports => {class java.lang.Object=FetchGroup(attachedTemplateReports){deleteTs, updatedBy, createdBy, emailTemplate => {class java.lang.Object=FetchGroup(emailTemplate){cc, bcc, code, useReportSubject, subject, name, from, to, id, type, version}}, name, report => {class java.lang.Object=FetchGroup(report){reportType, deleteTs, localeNames, code, xml, defaultTemplate => {class java.lang.Object=FetchGroup(defaultTemplate){deleteTs, reportOutputType, id, version, deletedBy}}, name, description, id, version, deletedBy, group => {class java.lang.Object=FetchGroup(group){deleteTs, localeNames, id, title, version, deletedBy}}}}, createTs, id, updateTs, version, deletedBy, parameterValues => {class java.lang.Object=FetchGroup(parameterValues){deleteTs, parameterType, defaultValue, templateParameters => {class java.lang.Object=FetchGroup(templateParameters){name, id, version}}, alias, id, version, deletedBy}}}}, version, deletedBy, deleteTs, name, from, to, id, group => {class java.lang.Object=FetchGroup(group){deleteTs, name, id, version, deletedBy}}}
---
org.eclipse.persistence.exceptions.DatabaseException:
Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 't1.DTYPE' in 'field list'
Error Code: 1054
Call: SELECT t1.ID AS a1, t1.DTYPE AS a2, t1.BCC AS a3, t1.CC AS a4, t1.CODE AS a5, t1.DELETE_TS AS a6, t1.DELETED_BY AS a7, t1.FROM_ AS a8, t1.NAME AS a9, t1.SUBJECT AS a10, t1.TO_ AS a11, t1.TYPE_ AS a12, t1.USE_REPORT_SUBJECT AS a13, t1.VERSION AS a14, t1.GROUP_ID AS a15, t0.ID AS a16, t0.DELETE_TS AS a17, t0.DELETED_BY AS a18, t0.NAME AS a19, t0.VERSION AS a20 FROM EMAILTEMPLATES_EMAIL_TEMPLATE t1 LEFT OUTER JOIN EMAILTEMPLATES_TEMPLATE_GROUP t0 ON (t0.ID = t1.GROUP_ID) WHERE (t1.DELETE_TS IS NULL) LIMIT ?, ?
bind => [0, 50]
Query: ReadAllQuery(referenceClass=EmailTemplate sql="SELECT t1.ID AS a1, t1.DTYPE AS a2, t1.BCC AS a3, t1.CC AS a4, t1.CODE AS a5, t1.DELETE_TS AS a6, t1.DELETED_BY AS a7, t1.FROM_ AS a8, t1.NAME AS a9, t1.SUBJECT AS a10, t1.TO_ AS a11, t1.TYPE_ AS a12, t1.USE_REPORT_SUBJECT AS a13, t1.VERSION AS a14, t1.GROUP_ID AS a15, t0.ID AS a16, t0.DELETE_TS AS a17, t0.DELETED_BY AS a18, t0.NAME AS a19, t0.VERSION AS a20 FROM EMAILTEMPLATES_EMAIL_TEMPLATE t1 LEFT OUTER JOIN EMAILTEMPLATES_TEMPLATE_GROUP t0 ON (t0.ID = t1.GROUP_ID) WHERE (t1.DELETE_TS IS NULL) LIMIT ?, ?")
FetchGroup(){cc, bcc, code, useReportSubject, subject, type, attachedTemplateReports => {class java.lang.Object=FetchGroup(attachedTemplateReports){deleteTs, updatedBy, createdBy, emailTemplate => {class java.lang.Object=FetchGroup(emailTemplate){cc, bcc, code, useReportSubject, subject, name, from, to, id, type, version}}, name, report => {class java.lang.Object=FetchGroup(report){reportType, deleteTs, localeNames, code, xml, defaultTemplate => {class java.lang.Object=FetchGroup(defaultTemplate){deleteTs, reportOutputType, id, version, deletedBy}}, name, description, id, version, deletedBy, group => {class java.lang.Object=FetchGroup(group){deleteTs, localeNames, id, title, version, deletedBy}}}}, createTs, id, updateTs, version, deletedBy, parameterValues => {class java.lang.Object=FetchGroup(parameterValues){deleteTs, parameterType, defaultValue, templateParameters => {class java.lang.Object=FetchGroup(templateParameters){name, id, version}}, alias, id, version, deletedBy}}}}, version, deletedBy, deleteTs, name, from, to, id, group => {class java.lang.Object=FetchGroup(group){deleteTs, name, id, version, deletedBy}}}
---
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 't1.DTYPE' in 'field list'
at com.haulmont.cuba.core.sys.ServiceInterceptor.aroundInvoke(ServiceInterceptor.java:129)
at sun.reflect.GeneratedMethodAccessor142.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:627)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:616)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
at com.sun.proxy.$Proxy249.loadList(Unknown Source)
at sun.reflect.GeneratedMethodAccessor266.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.haulmont.cuba.core.sys.remoting.LocalServiceInvokerImpl.invoke(LocalServiceInvokerImpl.java:94)
at com.haulmont.cuba.web.sys.remoting.LocalServiceProxy$LocalServiceInvocationHandler.invoke(LocalServiceProxy.java:154)
at com.sun.proxy.$Proxy33.loadList(Unknown Source)
at com.haulmont.cuba.client.sys.DataManagerClientImpl.loadList(DataManagerClientImpl.java:57)
at com.haulmont.cuba.gui.data.impl.GenericDataSupplier.loadList(GenericDataSupplier.java:117)
at com.haulmont.cuba.gui.data.impl.CollectionDatasourceImpl.loadData(CollectionDatasourceImpl.java:614)
at com.haulmont.cuba.gui.data.impl.CollectionDatasourceImpl.refresh(CollectionDatasourceImpl.java:161)
at com.haulmont.cuba.gui.data.impl.CollectionDatasourceImpl.refresh(CollectionDatasourceImpl.java:119)
at com.haulmont.cuba.gui.data.impl.GroupDatasourceImpl.setSuspended(GroupDatasourceImpl.java:191)
at com.haulmont.cuba.gui.data.impl.DsContextImpl.resumeSuspended(DsContextImpl.java:85)
at com.haulmont.cuba.gui.WindowManager.afterShowWindow(WindowManager.java:1164)
at com.haulmont.cuba.web.WebWindowManager.showWindow(WebWindowManager.java:422)
at com.haulmont.cuba.web.WebWindowManager.lambda$showWindow$1(WebWindowManager.java:382)
at com.haulmont.cuba.web.gui.WebWindow.close(WebWindow.java:1211)
at com.haulmont.cuba.web.gui.WebWindow.closeAndRun(WebWindow.java:1120)
at com.haulmont.cuba.gui.components.AbstractWindow.closeAndRun(AbstractWindow.java:306)
at com.haulmont.cuba.web.WebWindowManager.showWindow(WebWindowManager.java:381)
at com.haulmont.cuba.gui.WindowManager.openWindow(WindowManager.java:756)
at com.haulmont.cuba.web.WebWindowManager.openWindow(WebWindowManager.java:158)
at com.haulmont.cuba.gui.config.MenuCommand$ScreenCommand.run(MenuCommand.java:181)
at com.haulmont.cuba.gui.config.MenuCommand.execute(MenuCommand.java:76)
at com.haulmont.cuba.web.sys.SideMenuBuilder.lambda$createMenuCommandExecutor$0(SideMenuBuilder.java:182)
at com.haulmont.cuba.web.gui.components.mainwindow.WebSideMenu$MenuItemImpl.lambda$setCommand$0(WebSideMenu.java:481)
at com.haulmont.cuba.web.toolkit.ui.CubaSideMenu$1.menuItemTriggered(CubaSideMenu.java:92)
The database scripts that had to be run after downloading the addon were executed successfully.
Do you have any suggestions on what to do?
Thank you very much.
Best regards,
Markus