Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

TUTORIALVaadin lets you build secure, UX-first PWAs entirely in Java.
Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Calling javascript synchronously by Enver Haase, 3 weeks ago
Chart maven tomcat
Hi All,
Please, I need help with adding Chart to my code.
I added the dependency to the pom file and the repository as well.
<repository>
<id>vaadin-addons</id>
<url>http://maven.vaadin.com/vaadin-addons</url>
</repository>
<dependency>
<groupId>com.vaadin.addon</groupId>
<artifactId>vaadin-charts</artifactId>
<version>3.0.0-alpha8</version>
</dependency>
My code as following :
@WebServlet(value = "/*", asyncSupported = true)
@VaadinServletConfiguration(productionMode = false, ui = MyVaadinUI.class, widgetset = "REWEChallenge.Team5.AppWidgetSet")
public static class Servlet extends VaadinServlet
{
}
@Override
protected void init(VaadinRequest request) {
layoutMain.setMargin(true);
layoutMain.setSpacing(true);
setContent(layoutMain);
Configuration configuration = chart.getConfiguration();
configuration.setTitle("Simple Tutorial");
XAxis xAxis = configuration.getxAxis();
xAxis.setType(AxisType.LINEAR);
final DataSeries listSeries1 = new DataSeries();
listSeries1.setPlotOptions(new PlotOptionsArea());
configuration.addSeries(listSeries1);
layoutMain.addComponent(chart);
int i=0;
for(i=0; i < 100 ; i++)
{
DataSeriesItem item = new DataSeriesItem(i, 1 + (Math.random()*100)*3);
listSeries1.add(item);
}
final int aa = i;
new Timer().scheduleAtFixedRate(new TimerTask()
{
int ff = aa;
public void run()
{
DataSeriesItem item1 = new DataSeriesItem(ff++, 1 + (Math.random()*100)*3);
listSeries1.add(item1, true, true);
getUI().push();
}
}, new Date(), 1000);
}
when I am ruuning the code on tomcat server I got the following error :
Widgetset does not contain implementation for com.vaadin.addon.charts.Chart.
Check its component connector's @Connect mapping, widgetsets GWT module description file and re-compile your widgetset.
In case you have downloaded a vaadin add-on package, you might want to refer to add-on instructions.
SEVERE: Servlet.service() for servlet [REWEChallenge.Team5.MyVaadinUI$Servlet] in context with path [/Team5.Bayreuth] threw exception [com.vaadin.server.ServiceException: java.lang.NullPointerException] with root cause
java.lang.NullPointerException
at org.eclipse.jetty.websocket.WebSocketFactory.upgrade(WebSocketFactory.java:225)
at org.eclipse.jetty.websocket.WebSocketFactory.acceptWebSocket(WebSocketFactory.java:361)
at org.atmosphere.container.JettyWebSocketUtil.doService(JettyWebSocketUtil.java:65)
at org.atmosphere.container.JettyAsyncSupportWithWebSocket.service(JettyAsyncSupportWithWebSocket.java:69)
at org.atmosphere.cpr.AtmosphereFramework.doCometSupport(AtmosphereFramework.java:1448)
at com.vaadin.server.communication.PushRequestHandler.handleRequest(PushRequestHandler.java:109)
at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1371)
at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:238)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:521)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1096)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:674)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
I have the free trial 30 days license and I put it on my home directory.
I appreciate any kind of help.
Thanks in advance,
Last updated on
solved.
Just unhint the the following dependency in pom file :
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-client-compiler</artifactId>
<version>${vaadin.version}</version>
<scope>provided</scope>
</dependency>
Thanks all
Last updated on
You cannot reply to this thread.