Reporting Add-On - Error From Installation

I’m having a really hard time getting the Reporting add-on installed correctly.

I’m following the Report Generator Instructions, and have updated the database after installation (which, by the way, really needs to be included in the instructions), and still get errors out of the box.

After installing and updating the database, I run the application, click Reports->Reports, then receive the following error:

SQLSyntaxErrorException: user lacks privilege or object not found: REPORT_REPORT in statement [SELECT LIMIT ? ? t1.ID AS a1, t1.CODE AS a2, t1.DELETE_TS AS a3, t1.DELETED_BY AS a4, t1.DESCRIPTION AS a5, t1.LOCALE_NAMES AS a6, t1.NAME AS a7, t1.REPORT_TYPE AS a8, t1.VERSION AS a9, t1.GROUP_ID AS a10, t0.ID AS a11, t0.DELETE_TS AS a12, t0.DELETED_BY AS a13, t0.LOCALE_NAMES AS a14, t0.TITLE AS a15, t0.VERSION AS a16 FROM REPORT_REPORT t1 LEFT OUTER JOIN REPORT_GROUP t0 ON (t0.ID = t1.GROUP_ID) WHERE (t1.DELETE_TS IS NULL)]

The stack trace is as follows:

java.sql.SQLSyntaxErrorException: user lacks privilege or object not found: REPORT_REPORT in statement [SELECT LIMIT ? ? t1.ID AS a1, t1.CODE AS a2, t1.DELETE_TS AS a3, t1.DELETED_BY AS a4, t1.DESCRIPTION AS a5, t1.LOCALE_NAMES AS a6, t1.NAME AS a7, t1.REPORT_TYPE AS a8, t1.VERSION AS a9, t1.GROUP_ID AS a10, t0.ID AS a11, t0.DELETE_TS AS a12, t0.DELETED_BY AS a13, t0.LOCALE_NAMES AS a14, t0.TITLE AS a15, t0.VERSION AS a16 FROM REPORT_REPORT t1 LEFT OUTER JOIN REPORT_GROUP t0 ON (t0.ID = t1.GROUP_ID) WHERE (t1.DELETE_TS IS NULL)]
at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
at org.hsqldb.jdbc.JDBCPreparedStatement.(Unknown Source)
at org.hsqldb.jdbc.JDBCConnection.prepareStatement(Unknown Source)
at org.apache.tomcat.dbcp.dbcp2.DelegatingConnection.prepareStatement(DelegatingConnection.java:292)
at org.apache.tomcat.dbcp.dbcp2.DelegatingConnection.prepareStatement(DelegatingConnection.java:292)
at com.haulmont.cuba.core.sys.jdbc.ProxyConnection.prepareStatement(ProxyConnection.java:38)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.prepareStatement(DatabaseAccessor.java:1639)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.prepareStatement(DatabaseAccessor.java:1588)
at org.eclipse.persistence.internal.databaseaccess.DatabaseCall.prepareStatement(DatabaseCall.java:806)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:638)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:564)
at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:2093)
at org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:603)
at org.eclipse.persistence.sessions.server.ClientSession.executeCall(ClientSession.java:263)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:275)
at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.executeCall(ExpressionQueryMechanism.java:2897)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:261)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:332)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:728)
at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:2785)
at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRows(ExpressionQueryMechanism.java:2738)
at org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:565)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1221)
at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:914)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1180)
at org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:466)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1268)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:3020)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1892)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1874)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1839)
at org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:262)
at org.eclipse.persistence.internal.jpa.QueryImpl.getResultList(QueryImpl.java:482)
at com.haulmont.cuba.core.sys.QueryImpl.getResultFromCache(QueryImpl.java:764)
at com.haulmont.cuba.core.sys.QueryImpl.getResultList(QueryImpl.java:412)
at com.haulmont.cuba.core.app.RdbmsStore.executeQuery(RdbmsStore.java:841)
at com.haulmont.cuba.core.app.RdbmsStore.getResultList(RdbmsStore.java:749)
at com.haulmont.cuba.core.app.RdbmsStore.loadList(RdbmsStore.java:233)
at com.haulmont.cuba.core.app.DataManagerBean.loadList(DataManagerBean.java:78)
at com.haulmont.cuba.core.app.DataServiceBean.loadList(DataServiceBean.java:54)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88)
at com.haulmont.cuba.core.sys.ServiceInterceptor.aroundInvoke(ServiceInterceptor.java:116)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
at com.sun.proxy.$Proxy203.loadList(Unknown Source)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
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.$Proxy34.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:624)
at com.haulmont.cuba.gui.data.impl.CollectionDatasourceImpl.refresh(CollectionDatasourceImpl.java:165)
at com.haulmont.cuba.gui.data.impl.CollectionDatasourceImpl.refresh(CollectionDatasourceImpl.java:123)
at com.haulmont.cuba.gui.data.impl.GroupDatasourceImpl.setSuspended(GroupDatasourceImpl.java:191)
at com.haulmont.cuba.gui.data.impl.DsContextImpl.resumeSuspended(DsContextImpl.java:84)
at com.haulmont.cuba.web.sys.WebScreens.afterShowWindow(WebScreens.java:595)
at com.haulmont.cuba.web.sys.WebScreens.show(WebScreens.java:471)
at com.haulmont.cuba.web.sys.WebScreens.showFromNavigation(WebScreens.java:543)
at com.haulmont.cuba.gui.config.MenuItemCommands$ScreenCommand.run(MenuItemCommands.java:335)
at com.haulmont.cuba.web.sys.SideMenuBuilder$MenuCommandExecutor.accept(SideMenuBuilder.java:264)
at com.haulmont.cuba.web.sys.SideMenuBuilder$MenuCommandExecutor.accept(SideMenuBuilder.java:249)
at com.haulmont.cuba.web.gui.components.mainwindow.WebSideMenu$MenuItemImpl.menuSelected(WebSideMenu.java:573)
at com.haulmont.cuba.web.widgets.CubaSideMenu$1.menuItemTriggered(CubaSideMenu.java:90)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:153)
at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:115)
at com.vaadin.server.communication.ServerRpcHandler.handleInvocation(ServerRpcHandler.java:431)
at com.vaadin.server.communication.ServerRpcHandler.handleInvocations(ServerRpcHandler.java:396)
at com.vaadin.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:260)
at com.vaadin.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:82)
at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:40)
at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1577)
at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:425)
at com.haulmont.cuba.web.sys.CubaApplicationServlet.serviceAppRequest(CubaApplicationServlet.java:329)
at com.haulmont.cuba.web.sys.CubaApplicationServlet.service(CubaApplicationServlet.java:215)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:107)
at org.springframework.web.filter.CompositeFilter.doFilter(CompositeFilter.java:73)
at com.haulmont.cuba.web.sys.CubaHttpFilter.doFilter(CubaHttpFilter.java:93)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:200)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:836)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1747)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:834)

I don’t know what to do, given that it seems to break immediately. Are there any known resolutions to this issue?

Thanks

By the way, I’m on MacOS. I don’t know if that matters.

Thanks

Hi,

This is a known usability problem and will be fixed in next Studio release.

The error message indicates that reporting tables were not created. Probably the database was not updated for some reason.

I have just tried on a fresh project, and the process is straightforward.

  • Install the add-on in the Add-ons dialog
  • Run CUBA -> Update Database
  • Run (or re-run if it was launched) the application

I’ve tried this multiple times in multiple projects, and the issue keeps happening.

I just uninstalled the add-on and installed it again. It’s strange, because when I uninstalled it and updated the database, it created drop scripts for the tables that don’t exist. But, when I install again and update the database, no update scripts are created, so I’m stuck in the same boat. This is the second application I’ve tried this with, and it just won’t create the report/template tables.

Hi,

There must be something unusual in your environment, because this is the basic case working for everyone.

What CUBA version are you using?

Can you check the log messages in the bottom console when you run Update Database after adding the add-on?
It should be like this:

10:29:24: Executing task 'updateDb'...

> Task :app-core:assembleDbScripts

> Task :app-core:updateDb
No init scripts from 20-reports have been executed, running init scripts
Executing SQL script: .../modules/core/build/db/20-reports/init/hsql/create-db.sql

BUILD SUCCESSFUL in 0s
2 actionable tasks: 2 executed
10:29:25: Task execution finished 'updateDb'.

I assume, you are using HSQL database.

You can connect to it using an SQL client, e.g. DBeaver (https://dbeaver.io/)
and check whether necessary tables are created.

Also check that database connection parameters in the context.xml and build.gradle files are the same, those should reference the same database name.

This is my CUBA Studio version:

04%20PM

I’m trying to get my colleague to post his test results, which were the same as mine.

Hi Alex & Adam,
I had the same error on a fresh project trying out the reporting add on myself on platform 7.1.3 using hsql. Using dbeaver I found that the report tables were not created when I was using the hsql db even though the other app entities were created without issue.

I changed the database from hsql to postgres and the reports table generated for the same app and I as able to access the wizard without error.

Any HSQL specific settings I should check for the reporting add on?

Thanks in advance!

This is the result of my ‘update database’:

03%20PM

I ran the application, connected using DBeaver, and this is the result of HSQL tables:

25%20PM

Note that the REPORT_TEST and REPORT_TYPE are my entities (of my project named ‘report’). The entities were created as ‘Test’ and ‘Type’. Sorry if that adds confusion. I was being vague.

I have no clue as to why this isn’t functioning correctly. Is there anything you could advise?

Thanks in advance, @AlexBudarov!

Hi,

  1. Please attach your build.gradle file, just to ensure that reporting add-on has been added correctly to the project.

  2. If your problem is constantly reproduced, then we can try to obtain debug logs.

  • Create new project
  • Run CUBA -> Create database
  • Add Reporting add-on to the project
  • Open “Terminal” tool window on the bottom of the IDE
  • Run in the command line:

./gradlew -d updateDb > 1.log

It is supposed to update database, creating reporting tables. It will also write large debug log to the “1.log” file.

Then please attach this log file, we will investigate it for possible problems.