[appengine-java] Re: After upgrade to GAE SDK 1.5.0 - Cache is not working
I am having the same issue this: CacheFactory factory = net.sf.jsr107cache.CacheManager.getInstance().getCacheFactory(); Throws a CacheException with no stack trace and the message: net.sf.jsr107cache.CacheException: Could not find class: 'com.google.appengine.api.memcache.jsr107cache.GCacheFactory' On May 11, 6:03 pm, Don Schwarz wrote: > What is the NullPointerException that you are getting? > > You shouldn't need to change your GCacheFactory. Nothing changed with that > in 1.5.0, and the new package you are using is not correct. > com.google.appengine.api.memcache.jsr107cache.GCacheFactory is the one you > want. It is in appengine-jsr107cache-1.5.0.jar. > > > > > > > > On Wed, May 11, 2011 at 5:00 PM, luka wrote: > > I have recently upgraded from GAE 1.4.3 to 1.5.0 and the MemCache service I > > work with stop working. > > When I try to reach it, I get NullPointerException > > > I saw that the package of "GCacheFactory" was changed > > to "com.google.appengine.api.memcache.stdimpl" although besides of that I am > > not sure what is wrong. > > > I have a simple cache implementation using Spring beans which worked well > > during the last year: > > > (Please help, my service has customers waiting for solution) > > > import java.util.HashMap; > > import java.util.Map; > > import java.util.logging.Level; > > import java.util.logging.Logger; > > > import com.google.appengine.api.memcache.stdimpl.GCacheFactory; > > > import net.sf.jsr107cache.Cache; > > import net.sf.jsr107cache.CacheException; > > import net.sf.jsr107cache.CacheManager; > > > public class OnLoad { > > private static Logger logger = > > Logger.getLogger("com.lugo.server.utils.OnLoad"); > > > Cache cache; > > /** > > * Create Cache ( MemCache ) > > */ > > public void onStartup(){ > > try { > > Map props = new HashMap(); > > int expire = 3600 * 192 ; // 8 Days > > props.put(GCacheFactory.EXPIRATION_DELTA, expire); > > cache = CacheManager.getInstance().getCacheFactory().createCache(props); > > } catch (CacheException e) { > > logger.log(Level.WARNING,"onStartup()", e); > > } > > } > > public Cache getCache(){ > > return cache; > > } > > > } > > > -- > > 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. -- 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.
[appengine-java] Re: After upgrade to GAE SDK 1.5.0 - Cache is not working
I have found a workaround until a new zip will be released. I have taken the appengine-jsr107cache-1.4.3.jar from a former SDK installation renamed it to appengine-jsr107cache-1.5.0.jar and placed it under C:\Google-Apps\SDK\1.5.0\lib\user I have checked it on local & production environment and it works like a charm On May 12, 1:24 am, Scott wrote: > I am having the same issue this: > > CacheFactory factory = > net.sf.jsr107cache.CacheManager.getInstance().getCacheFactory(); > > Throws a CacheException with no stack trace and the message: > > net.sf.jsr107cache.CacheException: Could not find class: > 'com.google.appengine.api.memcache.jsr107cache.GCacheFactory' > > On May 11, 6:03 pm, Don Schwarz wrote: > > > > > > > > > What is the NullPointerException that you are getting? > > > You shouldn't need to change your GCacheFactory. Nothing changed with that > > in 1.5.0, and the new package you are using is not correct. > > com.google.appengine.api.memcache.jsr107cache.GCacheFactory is the one you > > want. It is in appengine-jsr107cache-1.5.0.jar. > > > On Wed, May 11, 2011 at 5:00 PM, luka wrote: > > > I have recently upgraded from GAE 1.4.3 to 1.5.0 and the MemCache service > > > I > > > work with stop working. > > > When I try to reach it, I get NullPointerException > > > > I saw that the package of "GCacheFactory" was changed > > > to "com.google.appengine.api.memcache.stdimpl" although besides of that I > > > am > > > not sure what is wrong. > > > > I have a simple cache implementation using Spring beans which worked well > > > during the last year: > > > > (Please help, my service has customers waiting for solution) > > > > import java.util.HashMap; > > > import java.util.Map; > > > import java.util.logging.Level; > > > import java.util.logging.Logger; > > > > import com.google.appengine.api.memcache.stdimpl.GCacheFactory; > > > > import net.sf.jsr107cache.Cache; > > > import net.sf.jsr107cache.CacheException; > > > import net.sf.jsr107cache.CacheManager; > > > > public class OnLoad { > > > private static Logger logger = > > > Logger.getLogger("com.lugo.server.utils.OnLoad"); > > > > Cache cache; > > > /** > > > * Create Cache ( MemCache ) > > > */ > > > public void onStartup(){ > > > try { > > > Map props = new HashMap(); > > > int expire = 3600 * 192 ; // 8 Days > > > props.put(GCacheFactory.EXPIRATION_DELTA, expire); > > > cache = CacheManager.getInstance().getCacheFactory().createCache(props); > > > } catch (CacheException e) { > > > logger.log(Level.WARNING,"onStartup()", e); > > > } > > > } > > > public Cache getCache(){ > > > return cache; > > > } > > > > } > > > > -- > > > 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. -- 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.
[appengine-java] Re: After upgrade to GAE SDK 1.5.0 - Cache is not working
I've been programming to the jcache interface that's included in the appengine sdk javax.cache.Cache and that still works in SDK 1.5.0. appengine's service locator (MemcacheService) finds the implementation for the interface. import javax.cache.Cache; import javax.cache.CacheException; import javax.cache.CacheFactory; import javax.cache.CacheManager; CacheFactory cacheFactory = CacheManager.getInstance().getCacheFactory(); cache = cacheFactory.createCache(Collections.emptyMap()); On May 11, 7:03 pm, luka wrote: > I have found a workaround until a new zip will be released. > > I have taken the > > appengine-jsr107cache-1.4.3.jar from a former SDK installation > renamed it to appengine-jsr107cache-1.5.0.jar and placed it under > > C:\Google-Apps\SDK\1.5.0\lib\user > > I have checked it on local & production environment and it works like > a charm > > On May 12, 1:24 am, Scott wrote: > > > > > I am having the same issue this: > > > CacheFactory factory = > > net.sf.jsr107cache.CacheManager.getInstance().getCacheFactory(); > > > Throws a CacheException with no stack trace and the message: > > > net.sf.jsr107cache.CacheException: Could not find class: > > 'com.google.appengine.api.memcache.jsr107cache.GCacheFactory' > > > On May 11, 6:03 pm, Don Schwarz wrote: > > > > What is the NullPointerException that you are getting? > > > > You shouldn't need to change your GCacheFactory. Nothing changed with > > > that > > > in 1.5.0, and the new package you are using is not correct. > > > com.google.appengine.api.memcache.jsr107cache.GCacheFactory is the one > > > you > > > want. It is in appengine-jsr107cache-1.5.0.jar. > > > > On Wed, May 11, 2011 at 5:00 PM, luka wrote: > > > > I have recently upgraded from GAE 1.4.3 to 1.5.0 and the MemCache > > > > service I > > > > work with stop working. > > > > When I try to reach it, I get NullPointerException > > > > > I saw that the package of "GCacheFactory" was changed > > > > to "com.google.appengine.api.memcache.stdimpl" although besides of that > > > > I am > > > > not sure what is wrong. > > > > > I have a simple cache implementation using Spring beans which worked > > > > well > > > > during the last year: > > > > > (Please help, my service has customers waiting for solution) > > > > > import java.util.HashMap; > > > > import java.util.Map; > > > > import java.util.logging.Level; > > > > import java.util.logging.Logger; > > > > > import com.google.appengine.api.memcache.stdimpl.GCacheFactory; > > > > > import net.sf.jsr107cache.Cache; > > > > import net.sf.jsr107cache.CacheException; > > > > import net.sf.jsr107cache.CacheManager; > > > > > public class OnLoad { > > > > private static Logger logger = > > > > Logger.getLogger("com.lugo.server.utils.OnLoad"); > > > > > Cache cache; > > > > /** > > > > * Create Cache ( MemCache ) > > > > */ > > > > public void onStartup(){ > > > > try { > > > > Map props = new HashMap(); > > > > int expire = 3600 * 192 ; // 8 Days > > > > props.put(GCacheFactory.EXPIRATION_DELTA, expire); > > > > cache = > > > > CacheManager.getInstance().getCacheFactory().createCache(props); > > > > } catch (CacheException e) { > > > > logger.log(Level.WARNING,"onStartup()", e); > > > > } > > > > } > > > > public Cache getCache(){ > > > > return cache; > > > > } > > > > > } > > > > > -- > > > > 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. -- 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.
[appengine-java] Re: After upgrade to GAE SDK 1.5.0 - Cache is not working
I have the same issue: Eclipse cannot find: com.google.appengine.api.memcache.jsr107cache.GCacheFactory .. and if I change it to com.google.appengine.api.memcache.stdimpl.GCacheFactory .. then I get the exception. I need the GCacheFactory when I set the expiration: props.put(GCacheFactory.EXPIRATION_DELTA, 3600); -- 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.
[appengine-java] Re: After upgrade to GAE SDK 1.5.0 - Cache is not working
Same issue, will try workaround with jar from previous sdk On May 12, 6:47 pm, DanielP wrote: > I have the same issue: > > Eclipse cannot find: > com.google.appengine.api.memcache.jsr107cache.GCacheFactory > .. and if I change it to > com.google.appengine.api.memcache.stdimpl.GCacheFactory > .. then I get the exception. > > I need the GCacheFactory when I set the expiration: > > props.put(GCacheFactory.EXPIRATION_DELTA, 3600); -- 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.
[appengine-java] Re: After upgrade to GAE SDK 1.5.0 - Cache is not working
Hi, I solved this issue changing the imports to javax.cache package. On 12 mayo, 01:03, luka wrote: > I have found a workaround until a new zip will be released. > > I have taken the > > appengine-jsr107cache-1.4.3.jar from a former SDK installation > renamed it to appengine-jsr107cache-1.5.0.jar and placed it under > > C:\Google-Apps\SDK\1.5.0\lib\user > > I have checked it on local & production environment and it works like > a charm > > On May 12, 1:24 am, Scott wrote: > > > > > > > > > I am having the same issue this: > > > CacheFactory factory = > > net.sf.jsr107cache.CacheManager.getInstance().getCacheFactory(); > > > Throws a CacheException with no stack trace and the message: > > > net.sf.jsr107cache.CacheException: Could not find class: > > 'com.google.appengine.api.memcache.jsr107cache.GCacheFactory' > > > On May 11, 6:03 pm, Don Schwarz wrote: > > > > What is the NullPointerException that you are getting? > > > > You shouldn't need to change your GCacheFactory. Nothing changed with > > > that > > > in 1.5.0, and the new package you are using is not correct. > > > com.google.appengine.api.memcache.jsr107cache.GCacheFactory is the one > > > you > > > want. It is in appengine-jsr107cache-1.5.0.jar. > > > > On Wed, May 11, 2011 at 5:00 PM, luka wrote: > > > > I have recently upgraded from GAE 1.4.3 to 1.5.0 and the MemCache > > > > service I > > > > work with stop working. > > > > When I try to reach it, I get NullPointerException > > > > > I saw that the package of "GCacheFactory" was changed > > > > to "com.google.appengine.api.memcache.stdimpl" although besides of that > > > > I am > > > > not sure what is wrong. > > > > > I have a simple cache implementation using Spring beans which worked > > > > well > > > > during the last year: > > > > > (Please help, my service has customers waiting for solution) > > > > > import java.util.HashMap; > > > > import java.util.Map; > > > > import java.util.logging.Level; > > > > import java.util.logging.Logger; > > > > > import com.google.appengine.api.memcache.stdimpl.GCacheFactory; > > > > > import net.sf.jsr107cache.Cache; > > > > import net.sf.jsr107cache.CacheException; > > > > import net.sf.jsr107cache.CacheManager; > > > > > public class OnLoad { > > > > private static Logger logger = > > > > Logger.getLogger("com.lugo.server.utils.OnLoad"); > > > > > Cache cache; > > > > /** > > > > * Create Cache ( MemCache ) > > > > */ > > > > public void onStartup(){ > > > > try { > > > > Map props = new HashMap(); > > > > int expire = 3600 * 192 ; // 8 Days > > > > props.put(GCacheFactory.EXPIRATION_DELTA, expire); > > > > cache = > > > > CacheManager.getInstance().getCacheFactory().createCache(props); > > > > } catch (CacheException e) { > > > > logger.log(Level.WARNING,"onStartup()", e); > > > > } > > > > } > > > > public Cache getCache(){ > > > > return cache; > > > > } > > > > > } > > > > > -- > > > > 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. -- 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.
[appengine-java] Re: After upgrade to GAE SDK 1.5.0 - Cache is not working
1.5.0.1 was published and fixes this issue. I had to manually download it and override the 1.5.0 package, as the Eclipse 3.6 plugin update does not see this 1.5.0.1 package online yet. Link to download this update: http://code.google.com/p/googleappengine/downloads/detail?name=appengine-java-sdk-1.5.0.1.zip&can=2&q= Hope this helps. Jerome PS: The manual copy of appengine-jsr107cache.jar was working just as well, and was less troubles to deal with though. On May 18, 11:24 am, Max wrote: > Still waiting for the new jar to appear > herehttp://repo1.maven.org/maven2/com/google/appengine/appengine-jsr107ca... -- 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.
Re: [appengine-java] Re: After upgrade to GAE SDK 1.5.0 - Cache is not working
Sorry about this, folks. We'll get a new SDK built that includes the right appengine-jsr107cache.jar file. In the mean time you can use javax.cache or a previous version of appengine-jsr107cache.jar (there were no changes to it in 1.5.0), but I would strongly encourage everyone to move from javax.cache to net.sf.jsr107cache once this problem is fixed. We are no longer making bugfixes to javax.cache and will at some point remove it from the SDK. On Thu, May 12, 2011 at 4:50 AM, david basoko wrote: > Hi, > > I solved this issue changing the imports to javax.cache package. > > > > On 12 mayo, 01:03, luka wrote: > > I have found a workaround until a new zip will be released. > > > > I have taken the > > > > appengine-jsr107cache-1.4.3.jar from a former SDK installation > > renamed it to appengine-jsr107cache-1.5.0.jar and placed it under > > > > C:\Google-Apps\SDK\1.5.0\lib\user > > > > I have checked it on local & production environment and it works like > > a charm > > > > On May 12, 1:24 am, Scott wrote: > > > > > > > > > > > > > > > > > I am having the same issue this: > > > > > CacheFactory factory = > > > net.sf.jsr107cache.CacheManager.getInstance().getCacheFactory(); > > > > > Throws a CacheException with no stack trace and the message: > > > > > net.sf.jsr107cache.CacheException: Could not find class: > > > 'com.google.appengine.api.memcache.jsr107cache.GCacheFactory' > > > > > On May 11, 6:03 pm, Don Schwarz wrote: > > > > > > What is the NullPointerException that you are getting? > > > > > > You shouldn't need to change your GCacheFactory. Nothing changed > with that > > > > in 1.5.0, and the new package you are using is not correct. > > > > com.google.appengine.api.memcache.jsr107cache.GCacheFactory is the > one you > > > > want. It is in appengine-jsr107cache-1.5.0.jar. > > > > > > On Wed, May 11, 2011 at 5:00 PM, luka wrote: > > > > > I have recently upgraded from GAE 1.4.3 to 1.5.0 and the MemCache > service I > > > > > work with stop working. > > > > > When I try to reach it, I get NullPointerException > > > > > > > I saw that the package of "GCacheFactory" was changed > > > > > to "com.google.appengine.api.memcache.stdimpl" although besides of > that I am > > > > > not sure what is wrong. > > > > > > > I have a simple cache implementation using Spring beans which > worked well > > > > > during the last year: > > > > > > > (Please help, my service has customers waiting for solution) > > > > > > > import java.util.HashMap; > > > > > import java.util.Map; > > > > > import java.util.logging.Level; > > > > > import java.util.logging.Logger; > > > > > > > import com.google.appengine.api.memcache.stdimpl.GCacheFactory; > > > > > > > import net.sf.jsr107cache.Cache; > > > > > import net.sf.jsr107cache.CacheException; > > > > > import net.sf.jsr107cache.CacheManager; > > > > > > > public class OnLoad { > > > > > private static Logger logger = > > > > > Logger.getLogger("com.lugo.server.utils.OnLoad"); > > > > > > > Cache cache; > > > > > /** > > > > > * Create Cache ( MemCache ) > > > > > */ > > > > > public void onStartup(){ > > > > > try { > > > > > Map props = new HashMap(); > > > > > int expire = 3600 * 192 ; // 8 Days > > > > > props.put(GCacheFactory.EXPIRATION_DELTA, expire); > > > > > cache = > CacheManager.getInstance().getCacheFactory().createCache(props); > > > > > } catch (CacheException e) { > > > > > logger.log(Level.WARNING,"onStartup()", e); > > > > > } > > > > > } > > > > > public Cache getCache(){ > > > > > return cache; > > > > > } > > > > > > > } > > > > > > > -- > > > > > 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. > > -- > 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. > > -- 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.
Re: [appengine-java] Re: After upgrade to GAE SDK 1.5.0 - Cache is not working
Still waiting for the new jar to appear here http://repo1.maven.org/maven2/com/google/appengine/appengine-jsr107cache/ -- 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.