MountainClimb / datanucleus-appengine

Automatically exported from code.google.com/p/datanucleus-appengine
0 stars 0 forks source link

GAE/J development server hangs when calling getPersistenceManagerFactory(String name) #274

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
WHAT STEPS WILL REPRODUCE THE PROBLEM?
--------------------------------------
With relevant code extract:

  import java.util.logging.Level;
  import java.util.logging.Logger;
  import javax.jdo.JDOHelper;
  import javax.jdo.PersistenceManagerFactory;

  private static final Logger g_logger = Logger.getLogger(
   DataExchange.class.getName());
  private static String g_sDatabaseMode = null;
  private static volatile PersistenceManagerFactory g_pmf = null;

my DataExchange class code calls:

  public static PersistenceManagerFactory getPersistenceManagerFactory()
  {
    [...]

    String sMsg = String.format(
     "Creating the singleton PersistenceManagerFactory instance"
     + " using the database mode string \"%s\"...", g_sDatabaseMode);
    g_logger.log(Level.FINE, sMsg);

    g_pmf = JDOHelper.getPersistenceManagerFactory(g_sDatabaseMode);

    sMsg = "The singleton PersistenceManagerFactory instance"
     + " has been created.";
    g_logger.log(Level.FINE, sMsg);

    [...]
  }

WHAT IS THE EXPECTED OUTPUT? WHAT DO YOU SEE INSTEAD?
-----------------------------------------------------
Expected (and usually seen):
  06-Mar-2012 10:37:10 com.google.appengine.tools.development.DevAppServerImpl
  start
  INFO: The admin console is running at http://localhost:8080/_ah/admin

  [...]

  06-Mar-2012 10:37:21 [...].DataExchange getPersistenceManagerFactory
  FINE: Creating the singleton PersistenceManagerFactory instance using the
  database mode string "big-table"...

  06-Mar-2012 10:37:25 [...].DataExchange getPersistenceManagerFactory
  FINE: The singleton PersistenceManagerFactory instance has been created.

  [...]

Seen instead:
  06-Mar-2012 10:44:41 com.google.appengine.tools.development.DevAppServerImpl
  start
  INFO: The server is running at http://localhost:8080/

  [...]

  06-Mar-2012 10:44:50 [...].DataExchange getPersistenceManagerFactory
  FINE: Creating the singleton PersistenceManagerFactory instance using the
  database mode string "big-table"...

  [GAE/J dev server hangs.]

WHAT VERSION OF THE PRODUCT ARE YOU USING? ON WHAT OPERATING SYSTEM?
--------------------------------------------------------------------
GAE/J SDK:        1.6.3.1
Java:             1.6.0_31; Java HotSpot(TM) Client VM 20.6-b01
Operating system: Microsoft Windows XP Home Edition version 2002 SP3
                  (Windows XP version 5.1 running on x86)
Web browser:      Mozilla Firefox 10.0.2

ADDITIONAL INFORMATION
----------------------
The GAE/J development server used to hang occasionally on the call to construct 
the application's (singleton) PersistenceManagerFactory (PMF) instance.

For me, the frequency of occurrence of this issue has increased with the GAE/J 
SDK 1.6.2.1, and further still with 1.6.3.1.

My work-around is to stop the development server and launch again repeatedly 
until PMF construction is successful.

Original issue reported on code.google.com by IanMarsh...@gmail.com on 6 Mar 2012 at 11:58

GoogleCodeExporter commented 8 years ago
Submitted in error to the wrong tracker. Sorry. Please delete it.

Original comment by IanMarsh...@gmail.com on 6 Mar 2012 at 11:59

GoogleCodeExporter commented 8 years ago

Original comment by googleco...@yahoo.co.uk on 6 Mar 2012 at 1:19