title: Undeployed application at context path with netbeans while using listener
body: <p>There is the error i got on the run console (that's not my project, my one is in french, i found an other on a forum) :</p>
  
  <pre><code>FAIL - Deployed application at context path /SupMark but context failed to start
  /media/Hhai/users/SupMark/nbproject/build-impl.xml:563: The module has not been deployed.
  BUILD FAILED (total time: 0 seconds)
  </code></pre>
  
  <p>On the apache TomCat log, i've got like said in the first post, but with the listenerStop problem too :</p>
  
  <pre><code>16 déc. 2011 18:46:29 org.apache.catalina.core.StandardContext listenerStop
  GRAVE: Exception lors de l'envoi de l'évènement contexte détruit (context destroyed) à l'instance de classe d'écoute com.supinfo.supmark.listener.ConnectionListener
  java.lang.UnsupportedOperationException: Not supported yet.
  </code></pre>
  
  <p>So, before posting there, i'd search by myself a solution, which i didn't, but i've at least know where the problem is : It's cause of the listener i add !</p>
  
  <pre><code>@WebListener()
  public class ConnectionListener implements ServletContextListener {
  
  @Override
  public void contextInitialized(ServletContextEvent sce) {
      PersistenceManager.createEntityManagerFactory();
  }
  
  @Override
  public void contextDestroyed(ServletContextEvent sce) {
      PersistenceManager.closeEntityManagerFactory();
  }
  }
  </code></pre>
  
  <p>I didn't note the import, don't think it's necessary ! Cause of the error message, i add the throw exception, same problem ! Then i delete my listener and create a new one, but let him by default, like this :</p>
  
  <pre><code>@WebListener()
  public class ConnectionListener implements ServletContextListener {
  @Override
  public void contextInitialized(ServletContextEvent sce) {
      throw new UnsupportedOperationException("Not supported yet.");
  }
  
  @Override
  public void contextDestroyed(ServletContextEvent sce) {
      throw new UnsupportedOperationException("Not supported yet.");
  }
  }
  </code></pre>
  
  <p>And once again :</p>
  
  <pre><code>ECHEC - Application déployée pour le chemin de contexte /SupMark mais le démarrage du contexte a échoué
  </code></pre>
  
  <p>So if you need more informations, or if someone already dealt with a problem like mine ... PS : That works fine on eclipse , but i need to use NetBeans for derby ...</p>
  
  <p>Thanks.</p>