Hie here is the code I am using: package vik.sakshum.sakshumweb.jsp.model.jdo;
import javax.jdo.JDOHelper; import javax.jdo.PersistenceManagerFactory; import org.compass.core.Compass; import org.compass.core.config.CompassConfiguration; import org.compass.core.config.CompassEnvironment; import org.compass.gps.CompassGps; import org.compass.gps.device.jdo.Jdo2GpsDevice; import org.compass.gps.impl.SingleCompassGps; public final class PMF { private static final PersistenceManagerFactory pmfInstance = JDOHelper.getPersistenceManagerFactory("transactions-optional"); private static final Compass compass; private static final CompassGps compassGps; static { compass = new CompassConfiguration().setConnection("gae://index") .setSetting(CompassEnvironment.ExecutorManager.EXECUTOR_MANAGER_TYPE, "disabled") .addScan("vik.sakshum.sakshumweb.jsp.model.jdo") .buildCompass(); compassGps = new SingleCompassGps(compass); compassGps.addGpsDevice(new Jdo2GpsDevice("appenine", pmfInstance)); compassGps.start(); compassGps.index(); } private PMF() {} public static PersistenceManagerFactory get() { return pmfInstance; } public static Compass getCompass(){ return compass; } } any clues? Thankx and Regards Vik Founder www.sakshum.com www.sakshum.blogspot.com On Wed, Sep 2, 2009 at 12:34 AM, Toby Reyelts <to...@google.com> wrote: > Vik, > > Do you have some sample code to reproduce this? By default, we throw an > exception if you try to create more than one PersistenceManagerFactory. Are > you using a singleton class to prevent more than one from being created? If > so, are you maybe loading that singleton class in different classloaders? > (Try logging the classloader object reference that tries to create the > PersistenceManagerFactory). > > Lastly, you can disable the exception if you want (details should be in the > exception message), but it will be a performance problem for you if you're > creating more than a few PersistenceManagerFactory's. > > > On Tue, Sep 1, 2009 at 1:51 PM, Vik <vik....@gmail.com> wrote: > >> anyone any updates on this please? >> Thankx and Regards >> >> Vik >> Founder >> www.sakshum.com >> www.sakshum.blogspot.com >> >> >> On Sun, Aug 30, 2009 at 8:51 PM, Vik <vik....@gmail.com> wrote: >> >>> Hie >>> Any one using compass on his GAE app? >>> >>> I am frequently getting error cannot initialize PMF where there is static >>> code to initialize compass apis. >>> Any idea how to resolve? >>> >>> Thankx and Regards >>> >>> Vik >>> Founder >>> www.sakshum.com >>> www.sakshum.blogspot.com >>> >> >> >> >> > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~----------~----~----~----~------~----~------~--~---