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) #273

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:08

GoogleCodeExporter commented 8 years ago
Suggest you raise this with GAE general issue tracker since will be nothing to 
do with this plugin i.e the server fscked up. There is nothing that can hang in 
PMF creation, other than the java process itself hanging

Original comment by googleco...@yahoo.co.uk on 6 Mar 2012 at 11:46

GoogleCodeExporter commented 8 years ago
I have submitted this issue in googleappengine as

  http://code.google.com/p/googleappengine/issues/detail?id=7077

For my part, this issue can now be closed.

Original comment by IanMarsh...@gmail.com on 6 Mar 2012 at 12:05

GoogleCodeExporter commented 8 years ago
If the GAE general issue comes to something in this plugin then raise new issue 
here with details of what "hung", but closing this

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