Vaadin QuickTickets Dashboard deploy error

when i try the Vaadin QuickTickets Dashboard using 1st “mvn install” and depoy it to tomcat server or building and running using eclipse i always get the following two errors. hwo do i fix this?

1st one is

HTTP Status 500 - com.vaadin.server.ServiceException: java.lang.ArrayIndexOutOfBoundsException: -1

type Exception report

message com.vaadin.server.ServiceException: java.lang.ArrayIndexOutOfBoundsException: -1

description The server encountered an internal error that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: com.vaadin.server.ServiceException: java.lang.ArrayIndexOutOfBoundsException: -1
com.vaadin.server.VaadinServlet.service(VaadinServlet.java:240)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
root cause

com.vaadin.server.ServiceException: java.lang.ArrayIndexOutOfBoundsException: -1
com.vaadin.server.VaadinService.handleExceptionDuringRequest(VaadinService.java:1440)
com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1394)
com.vaadin.server.VaadinServlet.service(VaadinServlet.java:238)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
root cause

java.lang.ArrayIndexOutOfBoundsException: -1
java.util.ArrayList.elementData(ArrayList.java:400)
java.util.ArrayList.get(ArrayList.java:413)
com.vaadin.demo.dashboard.data.DataProvider.createTransaction(DataProvider.java:406)
com.vaadin.demo.dashboard.data.DataProvider.generateTransactionsData(DataProvider.java:345)
com.vaadin.demo.dashboard.data.DataProvider.(DataProvider.java:53)
com.vaadin.demo.dashboard.DashboardUI.(DashboardUI.java:62)
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
java.lang.reflect.Constructor.newInstance(Constructor.java:526)
java.lang.Class.newInstance(Class.java:374)
com.vaadin.server.UIProvider.createInstance(UIProvider.java:36)
com.vaadin.server.communication.UIInitHandler.getBrowserDetailsUI(UIInitHandler.java:200)
com.vaadin.server.communication.UIInitHandler.synchronizedHandleRequest(UIInitHandler.java:73)
com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:37)
com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1382)
com.vaadin.server.VaadinServlet.service(VaadinServlet.java:238)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.47 logs.

Apache Tomcat/7.0.47


and Second one is

HTTP Status 500 - com.vaadin.server.ServiceException: java.lang.ArrayIndexOutOfBoundsException

type Exception report

message com.vaadin.server.ServiceException: java.lang.ArrayIndexOutOfBoundsException

description The server encountered an internal error that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: com.vaadin.server.ServiceException: java.lang.ArrayIndexOutOfBoundsException
com.vaadin.server.VaadinServlet.service(VaadinServlet.java:240)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
root cause

com.vaadin.server.ServiceException: java.lang.ArrayIndexOutOfBoundsException
com.vaadin.server.VaadinService.handleExceptionDuringRequest(VaadinService.java:1440)
com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1394)
com.vaadin.server.VaadinServlet.service(VaadinServlet.java:238)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
root cause

java.lang.ArrayIndexOutOfBoundsException
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.47 logs.

Apache Tomcat/7.0.47


find the

com.vaadin.demo.dashboard.data.DataProvider.java

and update the aipKey.

// Get an API key from http://developer.rottentomatoes.com String apiKey = "xxxxxxxxxxxxxxxxxxx"; [color=#FF0000] [b] apiKey = "85ustfhetauu236gcg3uf6b7";// using this apiKey [/b] [/color] json = readJsonFromUrl("http://api.rottentomatoes.com/api/public/v1.0/lists/movies/in_theaters.json?page_limit=30&apikey=" + apiKey); // Store in cache FileWriter fileWriter = new FileWriter(cache); fileWriter.write(json.toString()); [b]

[/b]

Thanks, It is working nown!!