我使用Vaadin 8.3的Spring Boot版本2.0.0。我的eclipse中的所有内容都运行良好,但是当我创建WAR文件并将其部署到我的tomcat 8.5.29服务器中时,Vaadin UI会抛出NullPointerException。除了Vaadin Components之外的所有其他功能都正常。请帮帮我!
详细例外如下:
类型:异常报告
消息:com.vaadin.server.ServiceException: 显示java.lang.NullPointerException
描述:服务器遇到意外情况 阻止它履行请求。
异常
javax.servlet.ServletException:com.vaadin.server.ServiceException: 显示java.lang.NullPointerException com.vaadin.server.VaadinServlet.service(VaadinServlet.java:447) javax.servlet.http.HttpServlet.service(HttpServlet.java:742) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) org.springframework.boot.web.servlet.support.ErrorPageFilter.forwardToErrorPage(ErrorPageFilter.java:183) org.springframework.boot.web.servlet.support.ErrorPageFilter.handleException(ErrorPageFilter.java:166) org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:130) org.springframework.boot.web.servlet.support.ErrorPageFilter.access $ 000(ErrorPageFilter.java:59) org.springframework.boot.web.servlet.support.ErrorPageFilter $ 1.doFilterInternal(ErrorPageFilter.java:90) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:108) org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) 根本原因
com.vaadin.server.ServiceException:java.lang.NullPointerException com.vaadin.server.VaadinService.handleExceptionDuringRequest(VaadinService.java:1653) com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1613) com.vaadin.server.VaadinServlet.service(VaadinServlet.java:445) javax.servlet.http.HttpServlet.service(HttpServlet.java:742) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) org.springframework.boot.web.servlet.support.ErrorPageFilter.forwardToErrorPage(ErrorPageFilter.java:183) org.springframework.boot.web.servlet.support.ErrorPageFilter.handleException(ErrorPageFilter.java:166) org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:130) org.springframework.boot.web.servlet.support.ErrorPageFilter.access $ 000(ErrorPageFilter.java:59) org.springframework.boot.web.servlet.support.ErrorPageFilter $ 1.doFilterInternal(ErrorPageFilter.java:90) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:108) org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) 根本原因
显示java.lang.NullPointerException com.vaadin.server.AbstractClientConnector.getAllChildrenIterable(AbstractClientConnector.java:516) com.vaadin.ui.ConnectorTracker.markConnectorsDirtyRecursively(ConnectorTracker.java:617) com.vaadin.ui.ConnectorTracker.markConnectorsDirtyRecursively(ConnectorTracker.java:618) com.vaadin.ui.ConnectorTracker.markConnectorsDirtyRecursively(ConnectorTracker.java:618) com.vaadin.ui.ConnectorTracker.markAllConnectorsDirty(ConnectorTracker.java:592) com.vaadin.server.LegacyCommunicationManager.repaintAll(LegacyCommunicationManager.java:439) com.vaadin.server.communication.UIInitHandler.synchronizedHandleRequest(UIInitHandler.java:78) com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:40) com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1601) com.vaadin.server.VaadinServlet.service(VaadinServlet.java:445) javax.servlet.http.HttpServlet.service(HttpServlet.java:742) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) org.springframework.boot.web.servlet.support.ErrorPageFilter.forwardToErrorPage(ErrorPageFilter.java:183) org.springframework.boot.web.servlet.support.ErrorPageFilter.handleException(ErrorPageFilter.java:166) org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:130) org.springframework.boot.web.servlet.support.ErrorPageFilter.access $ 000(ErrorPageFilter.java:59) org.springframework.boot.web.servlet.support.ErrorPageFilter $ 1.doFilterInternal(ErrorPageFilter.java:90) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:108) org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)