title: __NSAutoreleaseNoPool Thrown in SWING Application
body: <p>I'm really dumbfounded here (or maybe just "dumb").  I'm building a simple Java Swing application on my relatively new Mac using the JRE System Library (JVM Contents (MacOS X Default), Hibernate 3.0, and MigLayout with in Eclipse Helios.  Things were going well until I started seeing the following error messages that prevents the GUI from even rendering.</p>
  
  <pre><code>2011-02-12 09:40:27.842 java[809:903] [Java CocoaComponent compatibility mode]: Enabled
  2011-02-12 09:40:27.843 java[809:903] [Java CocoaComponent compatibility mode]: Setting timeout for SWT to 0.100000
  2011-02-12 09:41:08.355 java[809:903] *** __NSAutoreleaseNoPool(): Object 0x1001575c0 of class NSConcreteMapTableValueEnumerator autoreleased with no pool in place - just leaking
  </code></pre>
  
  <p>The first two lines are thrown when I instantiate a JButton using this simple code: </p>
  
  <pre><code> private JButton button = new JButton();
  </code></pre>
  
  <p>The last line is thrown at the conclusion of calling my Controller constructor in Main().</p>
  
  <pre><code>public static void main(String[] args) {
  
           // Creates a model of the system logic.
      LeapsAndBoundsModel model = new LeapsAndBoundsModel();
  
          // Creaties a view for the system logic.
      LeapsAndBoundsView leapsAndBoundsView = new LeapsAndBoundsView();
  
          // Creates a controller that links the two.
      LeapsAndBoundsController controller = new LeapsAndBoundsController(model, leapsAndBoundsView);
        }
  </code></pre>
  
  <p>I've Googled this issue and found lots of people that are having the same problem, but nearly all of them are coding using the CocoaComponent for iPhone application.  This is a simple GUI that uses Hibernate to persist information to a localized Derby database. </p>
  
  <p>I've tried both the following suggestions without success:</p>
  
  <pre><code>//Set the CocoaComponent CompatibilityMode to "False"
  System.setProperty( "com.apple.eawt.CocoaComponent.CompatibilityMode", "false" );
  
  // Use the "invokeLater" method within Main() construct
          SwingUtilities.invokeLater( new Runnable() {
  
              public void run() {
                   doIt();
              }       
          });
  </code></pre>
  
  <p>Any help would be greatly appreciated.</p>