Vaadin QuickTickets Dashboard部署错误

时间:2014-01-23 18:27:21

标签: java eclipse tomcat servlets vaadin7

我试图编译并运行vaadin演示应用程序,但是我收到以下错误。我错过了什么吗?

我从github https://github.com/vaadin/dashboard-demo下载了试用

的代码
  

mvn install

     

然后部署到Tomcatserver 7.0.47但我继续得到以下内容   错误。

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

输入例外报告

     

消息com.vaadin.server.ServiceException:   java.lang.ArrayIndexOutOfBoundsException:-1

     

description服务器遇到阻止它的内部错误   完成此请求。

     

例外

     

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)   根本原因

     

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)   根本原因

     

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(本机方法)     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注意Apache中提供了根本原因的完整堆栈跟踪   Tomcat / 7.0.47日志。

     

Apache Tomcat / 7.0.47

和另一个错误

    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.<init>(DataProvider.java:53)
    com.vaadin.demo.dashboard.DashboardUI.<init>(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

我也用eclipse尝试过它也会返回相同的错误。

1 个答案:

答案 0 :(得分:0)

当您尝试运行此演示时,这是常见的例外。您必须在DataProvider.class中修复apiKey。在仪表板示例中,使用http://developer.rottentomatoes.com API获取电影列表。最简单的方法 - 在该网站中创建帐户。它简单而且免费。