NPE in com.vaadin.server.AbstractClientConnector.detach

Hi,

before reading on: Note, that I am a complete novice. It is likely that I missed truely basic things. It might also happen, that I am looking at the completely wong point.

I am trying to get my first application running with Vaadin 7.1.11 (to be honest, so far it is more of an HelloWorld application.) I mastered the first hurdles (like locating the bootstrap.js, or the default widgetset) by adding the appropriate jar files and fixing the web.xml (at least, I believe, I fixed it). However, when I invoke my application in the browser now, I get this error message in Tomcats log:

Any ideas what might be wrong?

Thanks very much,

Jochen

java.lang.NullPointerException
    at com.vaadin.server.AbstractClientConnector.detach(AbstractClientConnector.java:603)
    at com.vaadin.ui.AbstractComponent.detach(AbstractComponent.java:589)
    at com.vaadin.server.AbstractClientConnector.detach(AbstractClientConnector.java:598)
    at com.vaadin.ui.AbstractComponent.detach(AbstractComponent.java:589)
    at com.vaadin.ui.AbstractComponent.setParent(AbstractComponent.java:471)
    at com.vaadin.ui.AbstractComponentContainer.addComponent(AbstractComponentContainer.java:215)
    at com.vaadin.ui.TabSheet.addTab(TabSheet.java:314)
    at com.vaadin.ui.TabSheet.addTab(TabSheet.java:271)
    at com.vaadin.ui.TabSheet.addTab(TabSheet.java:247)
    at com.softwareag.de.s.wmx.appinstaller.web.app.AppComposerUI.build(AppComposerUI.java:25)
    at com.softwareag.de.s.wmx.appinstaller.web.app.AppComposerUI.init(AppComposerUI.java:33)
    at com.vaadin.ui.UI.doInit(UI.java:614)
    at com.vaadin.server.communication.UIInitHandler.getBrowserDetailsUI(UIInitHandler.java:223)
    at com.vaadin.server.communication.UIInitHandler.synchronizedHandleRequest(UIInitHandler.java:73)
    at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:37)
    at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1382)
    at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:238)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)

Never mind, and excuse the noise.

I found the solution almost immediately after posting this: I was adding components to a component before addding the latter to a tabsheet, I was going to build. Everything works, if I create the tabs first and start adding components then.