Dashboard add-ons: Creating a WidgetSet

I’m very pleased to see the Dashboard add-on released today! Awesome drag-n-drop of layout, widgets etc. Very well done, congratulations team!!

When I have added this add-on to my project and click the button create WidgetSet Template, or dashboard, getting the following exception. Thanks for helping.

java.lang.IllegalArgumentException: InputStream cannot be null
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:117)
at com.haulmont.addon.dashboard.web.repository.WidgetRepositoryImpl.init(WidgetRepositoryImpl.java:105)
at com.haulmont.addon.dashboard.web.repository.WidgetRepositoryImpl.checkInitialized(WidgetRepositoryImpl.java:89)
at com.haulmont.addon.dashboard.web.repository.WidgetRepositoryImpl.getWidgetTypesInfo(WidgetRepositoryImpl.java:76)
at com.haulmont.addon.dashboard.web.dashboard.tools.WidgetUtils.getWidgetCaptions(WidgetUtils.java:40)
at com.haulmont.addon.dashboard.web.widgettemplate.WidgetTemplateEdit.generateWidgetTypeField(WidgetTemplateEdit.java:115)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.haulmont.cuba.gui.xml.DeclarativeFieldGenerator.generateField(DeclarativeFieldGenerator.java:53)
at com.haulmont.cuba.gui.xml.layout.loaders.FieldGroupLoader.lambda$loadComponent$0(FieldGroupLoader.java:183)
at com.haulmont.cuba.gui.xml.layout.loaders.ComponentLoaderContext$PostWrapTaskExecutor.run(ComponentLoaderContext.java:256)
at com.haulmont.cuba.gui.xml.layout.loaders.ComponentLoaderContext.executePostWrapTasks(ComponentLoaderContext.java:138)
at com.haulmont.cuba.gui.WindowManager.initWrapperFrame(WindowManager.java:1234)
at com.haulmont.cuba.gui.WindowManager.createWindow(WindowManager.java:581)
at com.haulmont.cuba.gui.WindowManager.openEditor(WindowManager.java:874)
at com.haulmont.cuba.web.WebWindowManager.openEditor(WebWindowManager.java:178)
at com.haulmont.cuba.gui.components.WindowDelegate.openEditor(WindowDelegate.java:260)
at com.haulmont.cuba.web.gui.WebWindow.openEditor(WebWindow.java:497)
at com.haulmont.cuba.gui.components.actions.CreateAction.internalOpenEditor(CreateAction.java:294)
at com.haulmont.cuba.gui.components.actions.CreateAction.actionPerform(CreateAction.java:254)
at com.haulmont.cuba.web.gui.components.WebButton.performAction(WebButton.java:46)
at com.haulmont.cuba.web.gui.components.WebButton.lambda$new$61446b05$1(WebButton.java:38)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:510)
at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:200)
at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:163)
at com.vaadin.server.AbstractClientConnector.fireEvent(AbstractClientConnector.java:1037)
at com.vaadin.ui.Button.fireClick(Button.java:377)
at com.haulmont.cuba.web.toolkit.ui.CubaButton.fireClick(CubaButton.java:69)
at com.vaadin.ui.Button$1.click(Button.java:54)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:158)
at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:119)
at com.vaadin.server.communication.ServerRpcHandler.handleInvocation(ServerRpcHandler.java:444)
at com.vaadin.server.communication.ServerRpcHandler.handleInvocations(ServerRpcHandler.java:409)
at com.vaadin.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:274)
at com.vaadin.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:90)
at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:41)
at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1435)
at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:361)
at com.haulmont.cuba.web.sys.CubaApplicationServlet.serviceAppRequest(CubaApplicationServlet.java:312)
at com.haulmont.cuba.web.sys.CubaApplicationServlet.service(CubaApplicationServlet.java:203)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
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:52)
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:107)
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:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:800)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)

Hi,

Please check that your widget frame contains configured controller class and annotated with @DashboardWidget annotation

Hi @evgeny.zaharchenko
Thanks. Now I have added the following annotation in the controller:

@DashboardWidget(name = "Sales")

public class SalesWidget extends AbstractFrame {
}

Still have the same error when click on the create Dashboard or Widgetset template. I might be missing still something !

Please try to debug following line

and find on which CUBA screen id this code fails

Hi @evgeny.zaharchenko
It appears that the error is coming from here:
com.haulmont.addon.dashboard.web.dashboard.frames.editor.DashboardEdit.postInit(DashboardEdit.java:148)
which is from add-on.

Hi,

Are you able to send me your project or other test project where I can catch the same error?

the project I am working on is a very large one! If i send you the log files, will that be ok?

Please provide me your screens.xml file

Hi @evgeny.zaharchenko

Here is the contents of screens.xml

<?xml version="1.0" encoding="UTF-8" standalone="no"?> <screen-config xmlns="http://schemas.haulmont.com/cuba/screens.xsd"> <screen id="sec$User.edit" template="com/company/erp/gui/extuser/ext-user-edit.xml"/> </screen-config>

I have attached the contents of web-screens.xml web-screens.xml (620.7 KB)

Hi,

Please try to use dashboards 2.0.1 version

Hi @evgeny.zaharchenko
After I have added this new version, i got the following error:

20:50:45.134] Exception has been thrown by com.haulmont.studio.backend.BaseSources@5c0e4602: [20:50:45.134] Artifact com.haulmont.addon.dashboard:dashboard-gui:2.0.1 not found in the repositories:[https://dl.bintray.com/cuba-platform/main, https://cuba-platform.bintray.com/premium] See studio.log file for more details

Hi,

looks like not all artifacts were correctly uploaded to bintray. We have fixed the issue, please try to build your project again

Thank you Evgeny. It works now.