Hello, i try to show data from database in vaadin table, but something i do wrong… I just started to learn it, so please help. Thank you
There is the errors:
Úno 15, 2017 9:05:24 ODP. com.vaadin.server.DefaultErrorHandler doDefault
SEVERE:
java.lang.AbstractMethodError
at com.vaadin.ui.AbstractSelect.setContainerDataSource(AbstractSelect.java:1072)
at com.vaadin.ui.Table.setContainerDataSource(Table.java:2794)
at com.vaadin.ui.Table.setContainerDataSource(Table.java:2739)
at com.vaadin.ui.Table.<init>(Table.java:641)
at vaadinTest3.MyUI.initContainer(MyUI.java:183)
at vaadinTest3.MyUI.init(MyUI.java:122)
at com.vaadin.ui.UI.doInit(UI.java:698)
at com.vaadin.server.communication.UIInitHandler.getBrowserDetailsUI(UIInitHandler.java:214)
at com.vaadin.server.communication.UIInitHandler.synchronizedHandleRequest(UIInitHandler.java:74)
at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:41)
at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1422)
at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:379)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1689)
at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:225)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1676)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
[WARNING]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
javax.servlet.ServletException: com.vaadin.server.ServiceException: java.lang.AbstractMethodError
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:381)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1689)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:225)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1676)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
at org.eclipse.jetty.server.Server.handle(Server.java:524)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
at java.lang.Thread.run(Thread.java:745)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
at org.eclipse.jetty.server.Server.handle(Server.java:524)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.vaadin.server.ServiceException: java.lang.AbstractMethodError
at com.vaadin.server.VaadinService.handleExceptionDuringRequest(VaadinService.java:1474)
at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1434)
at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:379)
... 29 more
Caused by: java.lang.AbstractMethodError
at com.vaadin.ui.AbstractSelect.setContainerDataSource(AbstractSelect.java:1072)
at com.vaadin.ui.Table.setContainerDataSource(Table.java:2794)
at com.vaadin.ui.Table.setContainerDataSource(Table.java:2739)
at com.vaadin.ui.Table.<init>(Table.java:641)
at vaadinTest3.MyUI.initContainer(MyUI.java:183)
at vaadinTest3.MyUI.init(MyUI.java:122)
at com.vaadin.ui.UI.doInit(UI.java:698)
at com.vaadin.server.communication.UIInitHandler.getBrowserDetailsUI(UIInitHandler.java:214)
at com.vaadin.server.communication.UIInitHandler.synchronizedHandleRequest(UIInitHandler.java:74)
at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:41)
at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1422)
... 30 more
There is the code:
private void setUpConnection() {
try {
connectionPool = new SimpleJDBCConnectionPool( "oracle.jdbc.OracleDriver",
".....", "....", "...", 2, 5);
lblInfo.setValue("Info: Success!");
} catch (SQLException ev)
{ ev.printStackTrace();
lblInfo.setValue("Info: Fail..");
}
}
private void initContainer() {
try {
TableQuery tq = new TableQuery("BC_DAY_REPORT", connectionPool, new OracleGenerator());
tq.setVersionColumn("OPTLOCK");
SQLContainer container = new SQLContainer(tq);
dayReport = new Table("BC_DAY_REPORT",container); //Problem is here i think...
layout.addComponent(dayReport);
//dayReport.setContainerDataSource(container);
} catch (SQLException e) {
e.printStackTrace();
}
}