title: com.vaadin.event.ListenerMethod$MethodException
body: <p>I have two classes DocumentManagertwoApplication.java and DocumentEditor.java (code is below). I need some help figuring out this error I get when I click on the 'Edit' button </p>
  
  <p>com.vaadin.event.ListenerMethod$MethodException: Invocation of method buttonClick in com.example.documentmanagertwo.DocumentmanagertwoApplication$1 failed.
      at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:532)
      at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:164)
      at com.vaadin.ui.AbstractComponent.fireEvent(AbstractComponent.java:1219)
      at com.vaadin.ui.Button.fireClick(Button.java:550)
      at com.vaadin.ui.Button.changeVariables(Button.java:217)
      at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.changeVariables(AbstractCommunicationManager.java:1455)
      at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariableBurst(AbstractCommunicationManager.java:1399)
      at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariables(AbstractCommunicationManager.java:1318)
      at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest(AbstractCommunicationManager.java:763)
      at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(CommunicationManager.java:296)
      at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:501)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
      at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      at java.lang.Thread.run(Thread.java:722)
  Caused by: java.lang.NoClassDefFoundError: com/example/documentmanagertwo/DocumentEditor
      at com.example.documentmanagertwo.DocumentmanagertwoApplication$1.buttonClick(DocumentmanagertwoApplication.java:46)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:601)
      at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:512)
      ... 27 more
  Caused by: java.lang.ClassNotFoundException: com.example.documentmanagertwo.DocumentEditor
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1711)
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556)
      ... 33 more</p>
  
  <p>///////////////////////////////////////////////////////////////////////////////////////////
  DocumentManagertwoApplication code below:</p>
  
  <pre><code>FilesystemContainer docs = new FilesystemContainer (new File("C:\\Users\\MYRA\\Desktop\\Docx4java\\docs"));
  Table selector = new Table (null, docs);
  Label viewer = new Label ("Select a doc", Label.CONTENT_RAW);
  Button edit = new Button ("edit");
  
  
  @Override
  public void init() {
      final Window mainWindow = new Window("Documentmanagertwo Application", new VerticalSplitPanel());
      VerticalLayout lo = new VerticalLayout();
      Label label = new Label("Hello Vaadin user");
      mainWindow.addComponent(label);
      mainWindow.addComponent(selector);
      lo.addComponent(viewer);
      lo.addComponent(edit);
      mainWindow.addComponent(lo);
      setMainWindow(mainWindow);
  
      edit.addListener(new Button.ClickListener (){
  
  
          private static final long serialVersionUID = -3024072268109652498L;
  
          public void buttonClick(ClickEvent event ) {
  
              Window dialog = new Window ("Edit Selected", 
                      new DocumentEditor(viewer.getPropertyDataSource()));
              dialog.setModal(true);
              mainWindow.addWindow (dialog);
  
          }
  
  
      });
  
      selector.setImmediate(true);
      selector.setSizeFull();
      selector.setSelectable(true);
      selector.addListener(new Property.ValueChangeListener()  {
  
          /**
           * 
           */
          private static final long serialVersionUID = 1L;
  
          public void valueChange(ValueChangeEvent event) {
              viewer.setPropertyDataSource(new TextFileProperty((File) selector.getValue()));
          }
  
      });
  }
  </code></pre>
  
  <p>}</p>
  
  <p>//////////////////////////////////////////////////////////////////////////////////////////
  DocumentEditor.java code below:
  ////////////////////////////////////////////////////////////////////////////////////</p>
  
  <pre><code>@AutoGenerated
  private AbsoluteLayout mainLayout;
  
  @AutoGenerated
  private Button button_1;
  
  @AutoGenerated
  private RichTextArea richTextArea_1;
  
  /*- VaadinEditorProperties={"grid":"RegularGrid,20","showGrid":true,"snapToGrid":true,"snapToObject":true,"movingGuides":false,"snappingDistance":10} */
  
  
  
  /*- VaadinEditorProperties={"grid":"RegularGrid,20","showGrid":true,"snapToGrid":true,"snapToObject":true,"movingGuides":false,"snappingDistance":10} */
  
  /**
   * 
   */
  private static final long serialVersionUID = 2788446877665474591L;
  /**
   * The constructor should first build the main layout, set the
   * composition root and then do any custom initialization.
   *
   * The constructor will not be automatically regenerated by the
   * visual editor.
   */
  public DocumentEditor(Property document) {
      buildMainLayout();
      setCompositionRoot(mainLayout);
  
      // TODO add user code here
      richTextArea_1.setPropertyDataSource(document);
      richTextArea_1.setWriteThrough(false);
  
      button_1.addListener(new Button.ClickListener()  {
  
  
          private static final long serialVersionUID = 1L;
  
          public void buttonClick(ClickEvent event ) {
              richTextArea_1.commit();
              getApplication().getMainWindow().removeWindow(getWindow());
          }
      });
  
  }
  
  @AutoGenerated
  private AbsoluteLayout buildMainLayout() {
      // common part: create layout
      mainLayout = new AbsoluteLayout();
      mainLayout.setImmediate(false);
      mainLayout.setWidth("100%");
      mainLayout.setHeight("100%");
      mainLayout.setMargin(false);
  
      // top-level component properties
      setWidth("100.0%");
      setHeight("100.0%");
  
      // richTextArea_1
      richTextArea_1 = new RichTextArea();
      richTextArea_1.setImmediate(false);
      richTextArea_1.setWidth("572px");
      richTextArea_1.setHeight("360px");
      mainLayout.addComponent(richTextArea_1, "top:0.0px;left:-2.0px;");
  
      // button_1
      button_1 = new Button();
      button_1.setCaption("Save");
      button_1.setImmediate(false);
      button_1.setWidth("-1px");
      button_1.setHeight("-1px");
      mainLayout.addComponent(button_1, "top:360.0px;left:500.0px;");
  
      return mainLayout;
  }
  </code></pre>
  
  <p>}</p>