更换数据库引起的一个问题

image

更换数据库之前,都是正常的,更换数据库后,开始打开页面时是正常的,但是点击“修改”后就出现上面的错误;下面是日志信息;请各位大佬指教

2019-10-30 10:51:47.936 ERROR [http-nio-8765-exec-10/app/admin] com.haulmont.cuba.web.log.AppLog - Exception:
java.lang.RuntimeException: Push failed
	at com.vaadin.server.communication.AtmospherePushConnection.push(AtmospherePushConnection.java:177) ~[vaadin-server-7.7.15.cuba.9.jar:7.7.15.cuba.9]
	at com.vaadin.server.communication.AtmospherePushConnection.push(AtmospherePushConnection.java:152) ~[vaadin-server-7.7.15.cuba.9.jar:7.7.15.cuba.9]
	at com.vaadin.ui.UI.push(UI.java:1562) ~[vaadin-server-7.7.15.cuba.9.jar:7.7.15.cuba.9]
	at com.vaadin.server.VaadinSession.unlock(VaadinSession.java:1004) ~[vaadin-server-7.7.15.cuba.9.jar:7.7.15.cuba.9]
	at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:43) ~[vaadin-server-7.7.15.cuba.9.jar:7.7.15.cuba.9]
	at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1435) ~[vaadin-server-7.7.15.cuba.9.jar:7.7.15.cuba.9]
	at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:361) ~[vaadin-server-7.7.15.cuba.9.jar:7.7.15.cuba.9]
	at com.haulmont.cuba.web.sys.CubaApplicationServlet.serviceAppRequest(CubaApplicationServlet.java:324) ~[cuba-web-6.10.9.jar:6.10.9]
	at com.haulmont.cuba.web.sys.CubaApplicationServlet.service(CubaApplicationServlet.java:210) ~[cuba-web-6.10.9.jar:6.10.9]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) ~[servlet-api.jar:na]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[catalina.jar:8.5.33]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[catalina.jar:8.5.33]
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) ~[tomcat-websocket.jar:8.5.33]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[catalina.jar:8.5.33]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[catalina.jar:8.5.33]
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:107) ~[spring-web-4.3.18.RELEASE.jar:4.3.18.RELEASE]
	at org.springframework.web.filter.CompositeFilter.doFilter(CompositeFilter.java:73) ~[spring-web-4.3.18.RELEASE.jar:4.3.18.RELEASE]
	at com.haulmont.cuba.web.sys.CubaHttpFilter.doFilter(CubaHttpFilter.java:107) ~[cuba-web-6.10.9.jar:6.10.9]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[catalina.jar:8.5.33]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[catalina.jar:8.5.33]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) ~[catalina.jar:8.5.33]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) ~[catalina.jar:8.5.33]
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493) ~[catalina.jar:8.5.33]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) ~[catalina.jar:8.5.33]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) ~[catalina.jar:8.5.33]
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650) ~[catalina.jar:8.5.33]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) ~[catalina.jar:8.5.33]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) ~[catalina.jar:8.5.33]
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:800) ~[tomcat-coyote.jar:8.5.33]
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) ~[tomcat-coyote.jar:8.5.33]
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806) ~[tomcat-coyote.jar:8.5.33]
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498) ~[tomcat-coyote.jar:8.5.33]
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-coyote.jar:8.5.33]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_191]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_191]
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-util.jar:8.5.33]
	at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_191]
Caused by: java.lang.NullPointerException: Parameters must be non-null strings
	at com.vaadin.server.JsonPaintTarget.addAttribute(JsonPaintTarget.java:382) ~[vaadin-server-7.7.15.cuba.9.jar:7.7.15.cuba.9]
	at com.vaadin.ui.ComboBox.paintContent(ComboBox.java:309) ~[vaadin-server-7.7.15.cuba.9.jar:7.7.15.cuba.9]
	at com.haulmont.cuba.web.toolkit.ui.CubaComboBox.paintContent(CubaComboBox.java:127) ~[cuba-web-6.10.9.jar:6.10.9]
	at com.vaadin.server.LegacyPaint.paint(LegacyPaint.java:65) ~[vaadin-server-7.7.15.cuba.9.jar:7.7.15.cuba.9]
	at com.vaadin.server.communication.LegacyUidlWriter.write(LegacyUidlWriter.java:82) ~[vaadin-server-7.7.15.cuba.9.jar:7.7.15.cuba.9]
	at com.vaadin.server.communication.UidlWriter.write(UidlWriter.java:131) ~[vaadin-server-7.7.15.cuba.9.jar:7.7.15.cuba.9]
	at com.vaadin.server.communication.AtmospherePushConnection.push(AtmospherePushConnection.java:174) ~[vaadin-server-7.7.15.cuba.9.jar:7.7.15.cuba.9]
	... 36 common frames omitted
2019-10-30 10:51:47.950 ERROR [http-nio-8765-exec-70/app/admin] com.haulmont.cuba.web.log.AppLog - Exception: 
java.lang.RuntimeException: Push failed
	at com.vaadin.server.communication.AtmospherePushConnection.push(AtmospherePushConnection.java:177) ~[vaadin-server-7.7.15.cuba.9.jar:7.7.15.cuba.9]
	at com.vaadin.server.communication.AtmospherePushConnection.push(AtmospherePushConnection.java:152) ~[vaadin-server-7.7.15.cuba.9.jar:7.7.15.cuba.9]
	at com.vaadin.ui.UI.push(UI.java:1562) ~[vaadin-server-7.7.15.cuba.9.jar:7.7.15.cuba.9]
	at com.vaadin.server.VaadinSession.unlock(VaadinSession.java:1004) ~[vaadin-server-7.7.15.cuba.9.jar:7.7.15.cuba.9]
	at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:43) ~[vaadin-server-7.7.15.cuba.9.jar:7.7.15.cuba.9]
	at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1435) ~[vaadin-server-7.7.15.cuba.9.jar:7.7.15.cuba.9]
	at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:361) ~[vaadin-server-7.7.15.cuba.9.jar:7.7.15.cuba.9]
	at com.haulmont.cuba.web.sys.CubaApplicationServlet.serviceAppRequest(CubaApplicationServlet.java:324) ~[cuba-web-6.10.9.jar:6.10.9]
	at com.haulmont.cuba.web.sys.CubaApplicationServlet.service(CubaApplicationServlet.java:210) ~[cuba-web-6.10.9.jar:6.10.9]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) ~[servlet-api.jar:na]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[catalina.jar:8.5.33]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[catalina.jar:8.5.33]
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) ~[tomcat-websocket.jar:8.5.33]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[catalina.jar:8.5.33]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[catalina.jar:8.5.33]
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:107) ~[spring-web-4.3.18.RELEASE.jar:4.3.18.RELEASE]
	at org.springframework.web.filter.CompositeFilter.doFilter(CompositeFilter.java:73) ~[spring-web-4.3.18.RELEASE.jar:4.3.18.RELEASE]
	at com.haulmont.cuba.web.sys.CubaHttpFilter.doFilter(CubaHttpFilter.java:107) ~[cuba-web-6.10.9.jar:6.10.9]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[catalina.jar:8.5.33]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[catalina.jar:8.5.33]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) ~[catalina.jar:8.5.33]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) ~[catalina.jar:8.5.33]
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493) ~[catalina.jar:8.5.33]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) ~[catalina.jar:8.5.33]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) ~[catalina.jar:8.5.33]
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650) ~[catalina.jar:8.5.33]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) ~[catalina.jar:8.5.33]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) ~[catalina.jar:8.5.33]
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:800) ~[tomcat-coyote.jar:8.5.33]
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) ~[tomcat-coyote.jar:8.5.33]
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806) ~[tomcat-coyote.jar:8.5.33]
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498) ~[tomcat-coyote.jar:8.5.33]
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-coyote.jar:8.5.33]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_191]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_191]
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-util.jar:8.5.33]
	at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_191]
Caused by: java.lang.NullPointerException: Parameters must be non-null strings
	at com.vaadin.server.JsonPaintTarget.addAttribute(JsonPaintTarget.java:382) ~[vaadin-server-7.7.15.cuba.9.jar:7.7.15.cuba.9]
	at com.vaadin.ui.ComboBox.paintContent(ComboBox.java:309) ~[vaadin-server-7.7.15.cuba.9.jar:7.7.15.cuba.9]
	at com.haulmont.cuba.web.toolkit.ui.CubaComboBox.paintContent(CubaComboBox.java:127) ~[cuba-web-6.10.9.jar:6.10.9]
	at com.vaadin.server.LegacyPaint.paint(LegacyPaint.java:65) ~[vaadin-server-7.7.15.cuba.9.jar:7.7.15.cuba.9]
	at com.vaadin.server.communication.LegacyUidlWriter.write(LegacyUidlWriter.java:82) ~[vaadin-server-7.7.15.cuba.9.jar:7.7.15.cuba.9]
	at com.vaadin.server.communication.UidlWriter.write(UidlWriter.java:131) ~[vaadin-server-7.7.15.cuba.9.jar:7.7.15.cuba.9]
	at com.vaadin.server.communication.AtmospherePushConnection.push(AtmospherePushConnection.java:174) ~[vaadin-server-7.7.15.cuba.9.jar:7.7.15.cuba.9]
	... 36 common frames omitted

看看日志文件,这个错误之前有没有其它错误

ComboBox.java 309行附近是这样:
image
出错的原因是你的 caption 是 null,检查一下是不是数据的问题?

好像不是这个原因,我换成之前的数据库,一切都是正常的,但是更换数据库之后就出现这个问题

打断点跟一下。你这里的错误堆栈还是比较清晰的,看这里 caption 的值是什么。也许新的数据库数据有问题?

image
这里的数据采用的gridLayout往里面塞组件,默认塞的是label组件,点击“修改”后,塞得是lookupFiled组件,这两个组件都没有设置caption值,lookupFiled中塞一个list,并默认展示一个数据源的值。
用之前的数据库是是没有问题的,换了数据库之后就出现错误,但是这两个数据库的数据表名都是一样的:joy:

因为报错的堆栈很清晰,建议加断点使用新旧数据库分别跟踪一下。看看是否数据有不一致的地方。我们也没有办法在你的数据库上帮忙调试,只能你自己试试了。

1 个赞

嗯嗯,好的,谢谢:smiley: