I’m facing this problem below, in DEBUG it works but in production I get this error, could anyone help me?
Thanks
2024-12-16T13:21:32.632-03:00 ERROR 67384 --- [NewLite] [nio-8070-exec-3] c.v.flow.component.internal.UIInternals : The component class com.storedobject.chart.SOChart includes './so/chart/chart.js' but this file was not included when creating the production bundle. The component will not work properly. Check that you have a reference to the component and that you are not using it only through reflection. If needed add a @Uses(SOChart.class) where it is used.
I added @Uses(SOChart.class), but it gives me a second error in addition to the first
Code:
@Uses(SOChart.class)
public class ViewHomeCentral extends GHPagedTabs { ...
Error:
2024-12-16T15:01:55.664-03:00 ERROR 70589 --- [NewLite] [nio-8070-exec-8] c.v.flow.component.internal.UIInternals : The component class com.storedobject.chart.SOChart includes './so/chart/chart.js' but this file was not included when creating the production bundle. The component will not work properly. Check that you have a reference to the component and that you are not using it only through reflection. If needed add a @Uses(SOChart.class) where it is used.
2024-12-16T15:01:55.665-03:00 ERROR 70589 --- [NewLite] [nio-8070-exec-8] c.v.flow.component.internal.UIInternals : The component class com.nss.NewCliex.view.ViewHomeCentral includes './so/chart/chart.js' but this file was not included when creating the production bundle. The component will not work properly. Check that you have a reference to the component and that you are not using it only through reflection. If needed add a @Uses(ViewHomeCentral.class) where it is used.
Not sure if adding the package of the component to the vaadin.allowed-packages is relevant for the production build, when @Uses is used, but it might be worth a try.
Vaadin scans the entry points of the application (@Route annotated classes) and finds all classes reachable from there. The message you are getting tells that the SOChart class is not reachable this way and ViewHomeCentral is not either. You need to add @Uses on a class that is reachable