[appengine-java] new in 1.2.8: "relationship fields of type . This is not yet supported."
I've got some classes that extend a base class. This base class implements some simple functions (like hashCode() and equals() ect.) in a generic way so I don't have to keep writing those methods over... and over... and over again. It also is the central place for entities "id" field: @Inheritance(customStrategy = "complete-table") @PersistenceCapable(identityType=IdentityType.APPLICATION) public class BaseBean implements IsSerializable, Serializable, Identifiable { private static final long serialVersionUID = 1L; @NotPersistent private Integer hash; @PrimaryKey @Persistent(valueStrategy=IdGeneratorStrategy.IDENTITY) private Key id; @Override @SuppressWarnings("unchecked") public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } boolean equal = false; if (getClass().equals(obj.getClass())) { BaseBean that = (BaseBean) obj; Object thisId = this.getId(); Object thatId = that.getId(); if (thisId != null && thatId != null) { equal = thisId.equals(thatId); } } return equal; } @Override public int hashCode() { if (hash == null) { hash = getId() == null ? super.hashCode() : getClass().getName ().hashCode() ^ getId().hashCode(); } return hash; } getters/setters... } pretty much every entity class in my model extends this class. I didn't have to have the jdo annotations on this class in 1.2.6, however, right after upgrading to 1.2.8, I had to make this class PersistenceCapable otherwise datanucleus started to complain that it wasn't enhanced (which, was never a problem before) In fact, this class isn't persisted, there's never a case where the runtime of a persisted bean is ever BaseBean (it's always an instance of a sub- class). So, I added the above annotations, and things were working fine, until later on in my tests, I had a class with multiple relationships. I.E. this class has a one-to-one relationship with class A and a one-to-many relationship with instances of class B (both of which extend BaseBean, but otherwise share no inheritence attributes): @PersistenceCapable(identityType=IdentityType.APPLICATION) public class ActivityReservation extends BaseBean implements Comparable { @Embedded( members={ @Persistent(name="key", column="activityKey"), @Persistent(name="name", column="name"), @Persistent(name="pricingModel", column="pricingModel") } ) @Persistent(defaultFetchGroup="true") private ActivityFK activity; @Embedded @Persistent(defaultFetchGroup="true") private ActivityLaunchFK launch; @Persistent private RatePlan ratePlan; @Persistent private BigDecimal totalCost; @Persistent private List guests = new ArrayList(); getters/setters... } @PersistenceCapable(identityType=IdentityType.APPLICATION) public class RatePlan extends BaseBean { @Persistent private String name; @Persistent private BigDecimal adultPrice; @Persistent private BigDecimal youthPrice; @Persistent private BigDecimal unitPrice; @Persistent private PricingModel pricingModel; @Persistent private boolean active = true; . } simple enum: public enum PricingModel implements IsSerializable, Serializable { PER_GUEST("Per Guest"), PER_UNIT("Per Unit"), BOTH("Both"); private final String label; private PricingModel(String label) { this.label = label; } public String getLabel() { return label; } public String toString() { return getLabel(); } } embedded classes (these don't extend BaseBean): @PersistenceCapable(identityType=IdentityType.NONDURABLE) public class ActivityFK { @Persistent private Key key; @Persistent private String name; @Persistent private PricingModel pricingModel; } @PersistenceCapable(identityType=IdentityType.NONDURABLE) public class ActivityLaunchFK extends AbstractKeyReference { @Persistent private Key key; @Persistent private Date startDate; @Persistent
[appengine-java] Re: new in 1.2.8: "relationship fields of type . This is not yet supported."
> It also is the central place for entities "id" field: DataNucleus, the project (as opposed to the Google plugin), only "insists" that something is enhanced if you are using its fields/ properties as persistent. If this class has an "id" field and you expect that field to be persisted then ***JDO*** (or JPA for that matter too) requires that this class is persistable. If instead you have a field "id" in that class yet you define a (persistent) property (getId()/setId()) in the persistable subclasses as then that superclass doesn't have to be persistable ... i.e as per the JDO/JPA specs -- 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-j...@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: new in 1.2.8: "relationship fields of type . This is not yet supported."
well, I should clarify: BaseBean used to just hold the field id: private Key id; public Key getId() { return id; } public void setId(Key id) { this.id = id; } and subclasses would override this method and put the appropriate JDO annotations in. I was doing this because inheritance of this type wasn't supported when I stared writing my app: public class SomeSubClass extends BaseBean { @Override @PrimaryKey @Persistent(valueStrategy=IdGeneratorStrategy.IDENTITY) public Key getId() { return super.getId(); } public void setId(Key id) { super.setKey(id); } ... } now, again, I was only doing this as a fill-gap because I knew that subclassing and persisting a super class's fields would be supported in a future release of the sdk. so, when I first updated to 1.2.8, I didn't change anything about any class. i.e. BaseBean was still a simple POJO with no annotations, and simply had a field/property in common with it's persistable sub-classes. I'm not sure why JDO would feel the need to have BaseBean persisted in this case, given that the only fields on that class are clearly overriden in it's subclasses. However, that aside, it still seems like a problem if you have 2 relationships, one of type one-to-one and another of type one-to-many that are completely different (both at compile time and at runtime) that *happen* to share a common ancestor (which is never persisted) and your persistence wrapper thinks they are realationships of the same data type. not sure if I'm making that clear, sorry I left out that detail in the first place, but my main point is independent of it: the relationships are different, with different comple and runtime types. They shouldn't ever be considered the same type. I mean, everythings an Object but you don't get this error when that happens. On Mon, Dec 7, 2009 at 1:28 AM, datanucleus wrote: >> It also is the central place for entities "id" field: > > DataNucleus, the project (as opposed to the Google plugin), only > "insists" that something is enhanced if you are using its fields/ > properties as persistent. If this class has an "id" field and you > expect that field to be persisted then ***JDO*** (or JPA for that > matter too) requires that this class is persistable. If instead you > have a field "id" in that class yet you define a (persistent) property > (getId()/setId()) in the persistable subclasses as then that > superclass doesn't have to be persistable ... i.e as per the JDO/JPA > specs > > -- > > 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-j...@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-j...@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] Now available: JDO/JPA preview release with inheritance support
> You can find information on using inheritance in JDO here: > http://www.datanucleus.org/products/accessplatform_1_1/jdo/orm/inheritance.html > Note that app engine _only_ supports the 4th option, "complete-table." According to that link, this should work to query subclasses: tx.begin(); Extent e = pm.getExtent(com.mydomain.samples.store.Product.class, true); Query q = pm.newQuery(e); Collection c=(Collection)q.execute(); tx.commit(); Is this supported or not. I can't get it to work using @PersistenceCapable(identityType = IdentityType.APPLICATION) @Inheritance(customStrategy = "complete-table") public abstract class TestDN { ... @PersistenceCapable(identityType = IdentityType.APPLICATION) public static class TestSubDN extends TestDN { ... } } It's persisting fine and I can retrieve it if I use for example pm.getObjectById(TestDN.TestSubDN.class, key); pm.getObjectById(TestDN.class, key); fails though. this is under 1.2.8 Shawn -- 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-j...@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: new in 1.2.8: "relationship fields of type . This is not yet supported."
oh, forgot to mention: if "according to the JDO specs" a non-persistent super class can have a field that is overridden by it's persistent sub-classes, then it seems like a bug that I was getting runtime errors saying that BaseBean isn't persistable when trying to persist a subclass of BaseBean that was persistable: Persistent class "Class com.resmark.client.model.BaseBean does not seem to have been enhanced. You may want to rerun the enhancer and check for errors in the output." has no table in the database, but the operation requires it. Please check the specification of the MetaData for this class. at org.datanucleus.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:375) at org.datanucleus.jdo.JDOPersistenceManager.jdoMakePersistent(JDOPersistenceManager.java:674) at org.datanucleus.jdo.JDOPersistenceManager.makePersistent(JDOPersistenceManager.java:694) at com.resmark.server.model.service.BaseDataService.create(BaseDataService.java:227) at com.resmark.server.SetupServiceImpl.updateOrCreate(SetupServiceImpl.java:123) at com.resmark.server.SetupServiceImpl.updateOrCreateActivity(SetupServiceImpl.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.appengine.tools.development.agent.runtime.Runtime.invoke(Runtime.java:100) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:527) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:166) at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:86) at javax.servlet.http.HttpServlet.service(HttpServlet.java:713) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:121) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:70) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:352) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:313) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:844) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442) that stack trace comes from this model: public abstract class BaseBean implements IsSerializable, Serializable, Identifiable { private static final long serialVersionUID = 1L; private Integer hash; @Override @SuppressWarnings("unchecked") public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } boolean equal = false; if (getClass().equals(obj.getClass())) { BaseBean that = (BaseBean) obj; Object thisId = this.getId(); Object thatId = that.getId();
[appengine-java] Re: new in 1.2.8: "relationship fields of type . This is not yet supported."
Let's be clear here, if you have public class Base { private long id; public long getId() { return id; } public void setId(long id) { this.id = id; } } @PersistenceCapable public class Sub extends Base { @PrimaryKey @Persistent public long getId() { return super.getId(); } public void setId(long id) { super.setId(id); } } and persist a Sub, then ***DataNucleus*** will *not* insist that the superclass is persistable. This is based on all DN datastore plugins except GAE/J. If GAE/J does cause this then it is a bug in that plugin and raise a bug on them, with stack trace and exception etc etc. Also to be clear, the JDO and JPA specs do *not* allow magical persistence of a field of a non-persistable superclass, unless you do an override in a subclass like what you did there (to make it a persistable property). You will *always* need that override. -- 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-j...@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: new in 1.2.8: "relationship fields of type . This is not yet supported."
right, we're certainly on the same page on what should/shouldn't be persisted. I have that override on every single class that subclasses BaseBean. I would never expect JDO/datanucleus or any other framework for that matter to "magically" persist a field in a non-peristable super class. That's why I override it in every subclass. Again, I had it in there as a place holder until GAE supported persisting super class fields in subclasses. in the release notes of 1.2.8 of GAE, it indicates such functionality is available, so I removed my overrides, made BaseBean persistable and started testing. Once I saw the error in my original message, I reverted everything back to a state where BaseBean is not persistable, and in fact, it is abstract and I removed the implementation of the "id" field and property getter/setters and migrated that all down to each subclassing bean. So, given my code above, no one should be requiring BaseBean to be persistable or even enhanced. Good tip on the point that a plugin may be causing this, here is the stack trace I posted earlier: Persistent class "Class com.resmark.client.model.BaseBean does not seem to have been enhanced. You may want to rerun the enhancer and check for errors in the output." has no table in the database, but the operation requires it. Please check the specification of the MetaData for this class. at org.datanucleus.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:375) at org.datanucleus.jdo.JDOPersistenceManager.jdoMakePersistent(JDOPersistenceManager.java:674) at org.datanucleus.jdo.JDOPersistenceManager.makePersistent(JDOPersistenceManager.java:694) at com.resmark.server.model.service.BaseDataService.create(BaseDataService.java:227) at com.resmark.server.SetupServiceImpl.updateOrCreate(SetupServiceImpl.java:123) at com.resmark.server.SetupServiceImpl.updateOrCreateActivity(SetupServiceImpl.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.appengine.tools.development.agent.runtime.Runtime.invoke(Runtime.java:100) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:527) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:166) at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:86) at javax.servlet.http.HttpServlet.service(HttpServlet.java:713) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:121) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:70) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:352) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:313) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:844) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442) and I guess I glanced over it before, but here's the nested stack trace: Persistent class "Class com.resmark.client.model.BaseBean doe
[appengine-java] Re: Datastore Statistics vs. Quota
Hello Eric, thank you for your update. In fact I was suspecting the index or other management data. But it is hard to believe that it leads to such a big overhead. I mean it is enormous to have an index that is 10 times more than the actual data, don't you think so? Furthermore in the datastore statistics they already list so called "Metadata". It is consuming about 44% of the space. I think that this is the index, is it not? Maybe you are right an we got to wait. The statistics are already a great new feature to better understand things. Cheers, Tobias On Dec 5, 7:05 pm, Eric Rannaud wrote: > On Sat, Dec 5, 2009 at 9:29 AM, Toby wrote: > > I know that they are updated at least once a day. In my case the data > > volume has not changed for quite some time. And the discrepancy is > > really huge. I mean 50MB to 500MB. So maybe my datastore contains > > stuff that does not apear in thestatistics. Or thestatisticsare > > wrong. I wonder if other people find the same ratio. Is there any > > other way to get details on the data consumption of the datastore. Do > > e.g. log-files count into it or other data? > > The difference is likely coming from the indexes, both implicit > indexes that Google builds systematically, and indexes that you have > requested explicitly. > > When asked about the lack of visibility into indexes disk usage, > during the IRC office hours, the Google people said they were working > on improving that, and the admin console will likely give you more > details about where that extra space is going. It will be very useful, > as you can mark properties to be non-indexable, and thus save space. > > They also talked about an article they will publish soon that gives > enough details on how indexes are built that you can at least predict > the size of your indexes. -- 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-j...@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] NCDFE after upgrading to sdk 1.2.8. works fine in 1.2.5
Hi, I just upgraded to sdk 1.2.8 from 1.2.5 and am now getting the following errors when the first request to the datastore is made: [java] Caused by: java.lang.NoClassDefFoundError: javax/persistence/ InheritanceType [java] at org.datanucleus.store.appengine.DatastoreManager. (DatastoreManager.java:146) [java] at sun.reflect.NativeConstructorAccessorImpl.newInstance0 (Native Method) [java] at sun.reflect.NativeConstructorAccessorImpl.newInstance (NativeConstructorAccessorImpl.java:39) [java] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance (DelegatingConstructorAccessorImpl.java:27) [java] at java.lang.reflect.Constructor.newInstance (Constructor.java:513) [java] at com.google.appengine.tools.development.agent.runtime.Runtime.newInstance_ (Runtime.java:112) Rolling back to 1.2.5 fixed this problem. Any ideas why this is occurring? Cheers, Nick -- 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-j...@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: NCDFE after upgrading to sdk 1.2.8. works fine in 1.2.5
> Any ideas why this is occurring? For some reason the GAE/J DN plugin is referring to JPA classes yet should only ever refer to DataNucleus internal classes. Raise a bug in http://code.google.com/p/datanucleus-appengine/issues/list Dependence only on DN internal classes means that people can use JDO without having to have persistence-api.jar in the CLASSPATH (and vice- versa). Workaround is to put persistence-api.jar in your CLASSPATH -- 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-j...@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: Failed to startup after ver 1.2.8 update
Hi shwan I'm in Nagoya I could fix this problem by using following post http://groups.google.com/group/google-appengine-java/browse_thread/thread/df660675d21c64f0/725edfd2ecb0d188?lnk=gst&q=1.2.6#725edfd2ecb0d188 The Last Larry Cable's Post is the to show how to fix this problem. Thank you Larry! I updated by using Eclipse Help => Software Update function. usually this is OK but this time Eclipse VM configuration is not changed automatically. -- 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-j...@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: Failed to startup after ver 1.2.8 update
Hi shwan I'm in Nagoya and thank you for your follow. I could fix this problem by using following post http://groups.google.com/group/google-appengine-java/browse_thread/thread/df660675d21c64f0/725edfd2ecb0d188?lnk=gst&q=1.2.6#725edfd2ecb0d188 The Last Larry Cable's Post is the one to fix this problem. Thanks Larry I updated by using Eclipse Help => Software Update function. usually this is OK but this time Eclipse VM configuration is not changed automatically not sure why. -- 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-j...@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] local google app engine server in Netbeans
Hi Newbie question. I'm running a local google app engine server with my netbeans (6.7) and I am having some problems with redeploying. I always get runserver: [java] 2009-dec-07 13:54:15 com.google.apphosting.utils.jetty.JettyLogger warn [java] VARNING: failed selectchannelconnec...@localhost:8082 [java] java.net.BindException: Address already in use: bind when I do "deploy" on my project. I seems that the server tries to restart, but it has not closed down, I can see alot of java.exe processes in the activity manager. When I kill them and deploy everything works fine. Any ideas? /A -- 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-j...@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] possible to split web.xml ?
Hi, I have some (eclipse) projects which extend a main project, in other words, a project is sharing its source with all other projects (using junctions). Hence, projects can use main project's source as if it belong to itself. The advantage is that I can update main project's source in any project and it gets updated in all apps, but not everything, if I add a new servlet I need to manually append that servlet's mapping to each project's web.xml . Is any way, like, I keep one web.xml for my main project and one web.xml for child project (i.e. splitting web.xml into two files) and while in deploying project App Engine use both web.xml files to build servlet mappings ? Thanks. -- 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-j...@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: /a/domain.com/ Logic
I'd suggest that you add your single app to your customer's apps account under a dedicated alias. E.g. if your customer's domain is customer1.com you would add the app as yourapp.customer1.com. You repeat this for every customer's google apps domain. Then in your application you can identify which customer's domain is used by calling javax.servlet.ServletRequest.getServerName() Best regards, Stephan 2009/12/6 patrick > > Hello > > I'm trying to build an application wich can be deployed to diffrent > google apps custmer, and each of them shoud have there own enviorment, > like gmail, docs, ... > But i don't like to deploy it to each customer app engine. Is there > such a funtion? > > > On 14 Okt., 22:24, "Jason (Google)" wrote: > > What are you trying to do exactly? Are you just looking to segment your > > application for various domains/clients? > > - Jason > > > > On Mon, Oct 12, 2009 at 12:37 PM, patrick >wrote: > > > > > > > > > > > > > Is there a API or a Function at Google to use this /a/domain.com/ > > > Logic. How Google use it for his APPS applikations? > > > > > If ther isn't such a function, how is the best way to implement it? > > > Dose someone have experience? > > -- > > 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-j...@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-j...@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] possible to split web.xml ?
No, this is not currently possible. I believe Servlet 3.0 adds support for web.xml fragments, which is likely what you want. On Mon, Dec 7, 2009 at 8:03 AM, Prashant wrote: > Hi, > > I have some (eclipse) projects which extend a main project, in other words, > a project is sharing its source with all other projects (using junctions). > Hence, projects can use main project's source as if it belong to itself. The > advantage is that I can update main project's source in any project and it > gets updated in all apps, but not everything, if I add a new servlet I need > to manually append that servlet's mapping to each project's web.xml . Is any > way, like, I keep one web.xml for my main project and one web.xml for child > project (i.e. splitting web.xml into two files) and while in deploying > project App Engine use both web.xml files to build servlet mappings ? > > Thanks. > > -- > 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-j...@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-j...@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] possible to split web.xml ?
ok, thanks anyway. -- 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-j...@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: Datastore Statistics vs. Quota
On Mon, Dec 7, 2009 at 2:20 AM, Toby wrote: > thank you for your update. In fact I was suspecting the index or other > management data. But it is hard to believe that it leads to such a big > overhead. I mean it is enormous to have an index that is 10 times more > than the actual data, don't you think so? If you look at the article, it doesn't seem that out of place. Remember that by default, two indexes are built for every property, EntitiesByProperty ASC and EntitiesByProperty DESC. If you look at the number of fields in the corresponding tables (see article), and if your entity has 5-10 fields, I would not be surprised by such an overhead. Marking properties as non-indexable, if you don't need the systematic indexing that Google does, will help save a lot of space. > Furthermore in the datastore statistics they already list so called > "Metadata". It is consuming about 44% of the space. I think that this > is the index, is it not? I don't think it is, no. I believe it refers to other kinds of metadata (see article linked earlier in the thread). Index disk space usage is, I believe, nowhere explicit. Eric. -- 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-j...@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] possible to split web.xml ?
You might try leveraging one of the MVC frameworks which supports inheritance for its action mapping files. Xdoclet may be another alternative worth investigating for a lower level build time composition of web.xml (although I haven't used it in the GAE / Eclipse context). It was a great ant tool for generating EJB descriptors back in the olden days. On Dec 7, 2009 11:23 AM, "Prashant" wrote: ok, thanks anyway. -- You received this message because you are subscribed to the Google Groups "Google App Engine f... -- 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-j...@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] Critical issue with INDEX
Jason: I need your help. Before I create the index,My app works fine,and I use the query below,I can get 1 row. SELECT FROM StockBase where code = '600175' and season = '3' and year = '2009' However,after create the index,and status of index is "serving".I use the query above,then can not get anything.But I sure the data stored on the server.Because when I remove the "and year = '2009'".I can also get the rows. My application id is canslimbot. Pls tell me the reason about it,thank u! -- 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-j...@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] How to use jmsn on GAE?
I have trying to deploy a web MSN Messenger app to GAE and the following error appears. java.lang.NoClassDefFoundError: rath.msnm.MSNMessenger is a restricted class. Please see the Google App Engine developer's guide for more details. The app used an external jar includes rath.msnm.MSNMessenger class. Does GAE support external jars? Thank you! Leon -- 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-j...@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] reverse index on __key__?!
Hi, I'm using the Java low-level Datastore API, in a local unit test (as described here: http://code.google.com/appengine/docs/java/howto/unittesting.htm): I'm trying to run a prefix search on __key__ (which I generated in the first place), as per the usual range-query hack: q.addFilter(Entity.KEY_RESERVED_PROPERTY, Query.FilterOperator.GREATER_THAN_OR_EQUAL, prefix); q.addFilter(Entity.KEY_RESERVED_PROPERTY, Query.FilterOperator.LESS_THAN, prefix + '\ufffd'); This fails to return any results. Note, that this technique works for all other properties, just not __key__. It's my impression that __key__ does not have a descending index by default. So, I've tried adding this to datastore-index.xml: But this had no impact. In fact, based on a quick trace, I've seen no evidence that the GAE code invoked during the unit test even tries to open this file. I believe this might be a bug in the AppEngine implementation (shouldn't an exception be thrown if there's no index on the queried field)? Or at least something that was overlooked... Is there a workaround? Thanks, Viktor -- 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-j...@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] Weird datastore bugs "update the same entity twice" and "operate on multiple entity groups"
I have written a unit test for appengine 1.2.8 with JDO and eclipse 3.5. You can see them at the bottom of the message. Here is my model: Class A <---One to many bidi---> B ---One to many--- > C ---One to One---> D 1- My first test generates a "can't update the same entity twice in a transaction or operation" although I don't do several updates. Strangely, it works if I don't update the email field of object A, or if I change the private member variable "_expList" in object A by "_aList"... 2- Test 2 fails with "can't operate on multiple entity groups in a single transaction." although I *should* have a single entity group where C is an indirect child of A. It seems to work if I use a List of C instead of a Set of C within class B. It also works if I manually set the Key of object C or if I don't insert object A first in database. 3- Fails because when I use loadByKEy, my list of B is not filled (whereas the object returned by update() is filled). In the same way, I can't get a request working, all are returning null. However a fetch plan with a depth of 3 and defaultFetchGroups are defined. This was working in appengine 1.2.1. Links to the eclipse project (just need to import it) and another with just the source: http://www.mediafire.com/file/eeu0ldvzwll/TestGAE_full.zip http://www.mediafire.com/file/zzjyuhdwzzy/TestGAE_src.zip Extract: private final A initAinDatabase(String pFirstName, String pLastName, String pEmail) throws DaoException { A a = new A(pFirstName, pEmail); A newA = _aDao.create(a); assertAEquals(newA, a); return a; } public final void testBug() throws DaoException { A a = initAinDatabase("Dupont", "Pierre", "dupont.pie...@valtech.fr"); D skill = new D(); C skillUpdate = new C(skill, 3);// Works if i write new C (null, 3) B experience = new B(); experience.addCUpdate(skillUpdate); a.setEmail("");// Works if I write setFirstName(""); a.addB(experience); _aDao.update(a); // FIXME Here I get a // org.springframework.orm.jdo.JdoSystemException: can't update the same // entity twice in a transaction or operation; nested exception is // javax.jdo.JDOException: can't update the same entity twice in a // transaction or operation } public final void testBug2() throws DaoException { // If I create the object A instead on inserting it in database, it also works A a = initAinDatabase("Dupont", "Pierre", "dupont.pie...@valtech.fr"); B experience = new B(); a.setEmail(""); a.addB(experience); a = _aDao.update(a); D skill = new D(); C skillUpdate = new C(skill, 3); a.getBList().get(0).addCUpdate(skillUpdate); a = _aDao.update(a); // FIXME Here I get a // DaoException: javax.jdo.JDOFatalUserException: Illegal argument // NestedThrowables: // java.lang.IllegalArgumentException: can't operate on multiple entity // groups in a single transaction. found both Element { // type: "A" // id: 1 // } // and Element { // type: "C" // id: 3 // } } public final void testBug3() throws DaoException { A a = initAinDatabase("Dupont", "Pierre", "dupont.pie...@valtech.fr"); B experience = new B(); experience.setString("Tooto"); a.addB(experience); A a2 = _aDao.update(a); a = _aDao.loadByKey(a.getKey()); D skill = new D(); C skillUpdate = new C(skill, 3); // FIXME Here I have an IndexOutOFBoundException / Index 0 Size 0 a.getBList().get(0).addCUpdate(skillUpdate); a = _aDao.update(a); } @PersistenceCapable(identityType = IdentityType.APPLICATION, detachable="true") public class A { private static final long serialVersionUID = 7061281232540895192L; @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key _key; @Persistent private String _firstName; @Persistent private String _email; @Persistent(mappedBy="_parent", defaultFetchGroup="true") private List _expList; ... @PersistenceCapable(identityType = IdentityType.APPLICATION, detachable="true") public class B { private static final long serialVersionUID = 829289483086117887L; @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key _key; @Persistent private String _string; @Persistent(defaultFetchGroup="true") private A _parent; @Persistent(defaultFetchGroup="true") private Set _cUpdates; ... @PersistenceCapable(identityType = IdentityType.APPLICATION, detacha
[appengine-java] Re: Unable to update: com.google.appengine.tools.admin.JspCompilationException: Failed to compile the generated JSP java files.
Can anybody reply to me on this, I am still facing this issue. Thanks, Muhammad Umair On Dec 3, 5:32 pm, umair wrote: > Does anybody have a solution to this problem, an immediate reply will > be highly appreciated. > > Thanks, > Muhammad Umair > > On Dec 3, 2:29 am, umair wrote: > > > I am getting this error when deploying theyoutubedirectapplication > > to google app engine. > > > Unable to update: > > com.google.appengine.tools.admin.JspCompilationException: Failed to > > compile the generatedJSPjava files. > > > Some forum suggested me to do these steps > > > 1. Copy tools.jar into the AppEngine lib/shared directory. > > 2. Modify appcfg.cmd so it fully-qualifies the reference to java.exe > > in the JDK/bin directory. > > > I did them but still no luck. > > > Any suggestion will be welcomed. > > > Thanks, > > Muhammad Umair -- 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-j...@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] What's the right way to use PersistenceManager?
Hi, I'm new in JDO, so I think this problem may sounds stupid... I'm working on my application on App-engine, and feel really confused about how to use the PersistenceManager in my app... 1) At the very beginning I tried to maintain only one static pm instance in my app, but I found that when I try to update the entities in datastore, it does not write back, since I do not close the pm. 2) Then, I tried to get a new pm in every request, and after the request I close it. But I still store the pm as a static field in a DaoBase class. the code looks like: PersistenceManager pm = PFM.get().getPersistenceManager(); DaoBase.setPm(pm); do the request... DaoBase.getPm().close(); DaoBase.setPm(null); But when multiple requests come concurrently, things becomes messy and sometimes the DaoBase.getPm() will returns null during a request. 3) Use new pm each time when reading the datastore, then detach the object from pm, close the pm. Then during update time, use a new pm to update it. But the problem here is when there is some owned relationship between datastore entities, a detatched object will not fetch the data automatically, like: / class Address { } class Employee { private List addressList; public List getAddressList() { return addressList; } } /// the getAddressList() will always return null. So...What is the right way to use PersistenceManager? -- 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-j...@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] problem storing email or phone number
Hi, I'm trying to store email and phone number in one of my tables. I'm using the PhoneNumber and Email objects to store these values. These tables work fine in my dev environment. However when I create them in production I cannot read them from Data Viewer in the App Engine console. Whenever I go to either of these tables (once I put a phone or email in them) I get Server Error A server error has occurred. Return to Applications screen » I have no ability to delete any of these records now from the App Engine interface. Is there something I can do to either delete these tables or use them with PhoneNumber and Email objects? -- 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-j...@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] Copy production datastore to local_db.bin?
Is it possible? I am new, but based on my research the answer is no. How about connecting my development code to the hosted datastore? -- 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-j...@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: eclipse plugin and maven?
Rusty, Currently the Google Plugin works with a hardcoded path to the webapp- directory. An issue has already been filles (http://code.google.com/p/ googleappengine/issues/detail?id=1515) and accepted, so I guess it will be fixed anytime soon. I still use Eclipse to write my application, build the project with Maven, and upload to GAE with the command-line. A little work around, but doable. Cheers, MArco On Dec 5, 7:45 pm, Rusty Wright wrote: > Is it possible to use the GAE Eclipse plugin if you're using Maven? Maven > uses a different directory structure so I'm guessing that's why the GAE > plugin doesn't recognize the project as a GAE web app. -- 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-j...@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] How to Go through updated version 1.2.8 in eclipse
Just Take backup of your application, then create new application and update src and war file manually. refresh eclipse project. enjoy -- 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-j...@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] JDO bug (entity groups and double update)
Hi everybody, My model contains a Class A <---Bidi one to many---> B ---one to many---> C ---one to one---> D. I wrote 3 unit tests with appengine 1.2.8 and JDO on eclipse 3.5 which generate an error. It looks like a bug in JDO to me but I may be wrong: 1- org.springframework.orm.jdo.JdoSystemException: can't update the same entity twice in a transaction or operation; nested exception is javax.jdo.JDOException: can't update the same entity twice in a transaction or operation NestedThrowables: java.lang.IllegalArgumentException: can't update the same entity twice in a transaction or operation at org.springframework.orm.jdo.PersistenceManagerFactoryUtils.convertJdoAccessException (PersistenceManagerFactoryUtils.java:247) at org.springframework.orm.jdo.DefaultJdoDialect.translateException (DefaultJdoDialect.java:230) at org.springframework.orm.jdo.JdoTransactionManager.convertJdoAccessException (JdoTransactionManager.java:503) at org.springframework.orm.jdo.JdoTransactionManager.doCommit (JdoTransactionManager.java:427) However (see the code below), when I change the member variable expList of class A then it works. An other way is not to call setEmail of class A (but if I set the firstName which is also a String then it works)... This look like a JDO bug or bug to me. 2- com.testgae.xp.server.dao.DaoException: javax.jdo.JDOFatalUserException: Illegal argument NestedThrowables: java.lang.IllegalArgumentException: can't operate on multiple entity groups in a single transaction. found both Element { type: "A" id: 1 } and Element { type: "C" id: 3 } Here I don't understand because A and C should be in the same group. There are only owned relationship between them. If I create the hierarchy A->B->C->D all at once it works. But not if I do A->B and then ->C->D like in my second test. Is it a bug in my code or a JDO bug again? If I set manually the key of class C (as a child of B) then that works... Another way to make it works is to change the Set of C to a List of C in class B. Isn't it a bug in JDO or something? 3- my "childs" are never loaded. But if I used the updated object returned by my DAO instead of loading it from the datastore, then that works. All my requests return null. I can't understand why because this was working in appengine 1.2.1. This is likely something about my code is missing or wrong but I can't see what. You can find my source code below and also a full packed eclipse project ready to import :D: http://www.mediafire.com/file/0rwmfnfjtqg/TestGAE_src.zip http://www.mediafire.com/file/tmknjaaoxwn/TestGAE_full.zip Thanks a lot for your help! Here is an extract of my code: @PersistenceCapable(identityType = IdentityType.APPLICATION, detachable="true") public class A { private static final long serialVersionUID = 7061281232540895192L; @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key _key; @Persistent private String _firstName; @Persistent private String _email; @Persistent(mappedBy="_parent", defaultFetchGroup="true") / // If I rename _expList in _aList, then test1 works / private List _expList; ... @PersistenceCapable(identityType = IdentityType.APPLICATION, detachable="true") public class B { private static final long serialVersionUID = 829289483086117887L; @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key _key; @Persistent private String _string; @Persistent(defaultFetchGroup="true") private A _parent; @Persistent(defaultFetchGroup="true") / // If I change this to List, then test2 works / private Set _cUpdates; ... @PersistenceCapable(identityType = IdentityType.APPLICATION, detachable="true") public class C { private static final long serialVersionUID = -5806378892487300728L; @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key _key; @Persistent private int _level; @Persistent(defaultFetchGroup="true") private D _sList; ... @PersistenceCapable(identityType = IdentityType.APPLICATION, detachable="true") public class D { private static final long serialVersionUID = -6630402708475167158L; @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key _key; @Persistent @Unique private String _name; ... private final A initAinDatabase(String pFirstName, String pLastName, String pEmail) throws DaoException { A a = new A(pFirstName, pEmail);
[appengine-java] Nearly doubled CPU usage since december 3rd
Hi, Our appengine instance is seeing nearly double the CPU usage since december 3rd compared to before, without an increase in number of requests. We have been trying to debug this, but it's hard to make sense of the numbers provided by appengine. A typical request that we do has numbers like this: Request Time/Latency: 76ms Milliseconds of CPU Time Consumed: 210cpu_ms 113api_cpu_ms We always used to have ~100ms api cpu_ms, but cpu_ms used to be more like 50ms or so. We added logging on the time of entry and exit of doGet() and there was 58 ms difference in this case. How is it possible to have 210cpu_ms, which is ~100ms more than the api usage, while the request only lasted 58 ms (or 76 ms according to the appengine number)? Best regards, Mathijs / SCM Software -- 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-j...@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: reverse index on __key__?!
To answer my own question: If you search for Keys rather than Strings, it works properly. However, this is still a small defect IMO. Recorded here, with a test-case attached: http://code.google.com/p/googleappengine/issues/detail?id=2471 Regards, Viktor On Sat, Dec 5, 2009 at 11:36 PM, phraktle wrote: > Hi, > > I'm using the Java low-level Datastore API, in a local unit test (as > described here: > http://code.google.com/appengine/docs/java/howto/unittesting.htm): > > I'm trying to run a prefix search on __key__ (which I generated in the > first place), as per the usual range-query hack: > > q.addFilter(Entity.KEY_RESERVED_PROPERTY, > Query.FilterOperator.GREATER_THAN_OR_EQUAL, prefix); > q.addFilter(Entity.KEY_RESERVED_PROPERTY, > Query.FilterOperator.LESS_THAN, prefix + '\ufffd'); > > This fails to return any results. Note, that this technique works for > all other properties, just not __key__. > > It's my impression that __key__ does not have a descending index by > default. So, I've tried adding this to datastore-index.xml: > > > > > > But this had no impact. In fact, based on a quick trace, I've seen no > evidence that the GAE code invoked during the unit test even tries to > open this file. > > I believe this might be a bug in the AppEngine implementation > (shouldn't an exception be thrown if there's no index on the queried > field)? Or at least something that was overlooked... > > Is there a workaround? > > Thanks, > Viktor > -- 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-j...@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] Youtube Direct Application deployment time JSP Compilation Error
I am getting this error when deploying the youtube direct application to google app engine. Unable to update: com.google.appengine.tools.admin.JspCompilationException: Failed to compile the generated JSP java files. Some forum suggested me to do these steps 1. Copy tools.jar into the AppEngine lib/shared directory. 2. Modify appcfg.cmd so it fully-qualifies the reference to java.exe in the JDK/bin directory. I did them but still no luck. Any suggestion will be welcomed. Thanks, Muhammad Umair -- 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-j...@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: java.lang.IllegalAccessException: Private fields can not be set on JRE classes.
you cuold edit the app-engine plugin: C:\Documents and Settings\pm\.grails\1.1.1\projects\grails-gae\plugins \app-engine-0.8.5\scripts\_Events.groovy inside element add: it work for me. hope helpfull. On Nov 10, 3:27 am, Toby Reyelts wrote: > I don't know about Config.groovy, but you can do this in your > appengine-web.xml: > > > > > > > > On Sun, Nov 8, 2009 at 12:34 AM, Dary wrote: > > > Like this in Config.groovy? > > > grails.stringchararrayaccessor.disabled=true > > > Sorry, relative n00b here. > > > Dary > > > On Oct 18, 8:20 am, Toby Reyelts wrote: > > > Groovy is trying to use reflection to set the private > > > fields< > >http://www.google.com/codesearch/p?hl=en&sa=N&cd=1&ct=rc#BExOlTNH8oU/.. > > .>of > > > java.lang.String as an optimization. This only works if Groovy is > > > granted > > > unsafe JVM reflection permissions, which we don't do in GAE. When this > > > fails, Groovy automatically reverts to the safe, normal way of creating a > > > string, which works just fine. > > > You're seeing this error in dev_appserver in 1.2.6, because we've done a > > lot > > > of work to make the dev_appserver more closely mirror the security > > > restrictions in prod. If you want to prevent Groovy from even attempting > > to > > > try this, you can set the System > > > property, "stringchararrayaccessor.disabled" to true. > > > > On Sun, Oct 18, 2009 at 4:41 AM, aldrinm wrote: > > > > > Hi, > > > > > What does this exception indicate? "Unable to use direct char[] access > > > > of java.lang.String. Disabling this method. > > > > [java] java.lang.IllegalAccessException: Private fields can not > > > > be set on JRE classes." > > > > This has started occurring after updating the GAE SDK to the latest > > > > (ver 1.2.7 - 2009-10-15). Tried googling but absolutely nothing! I'm > > > > using grails and do not understand what the framework is doing. Though > > > > the app continues to work irrespective of this error, am curious abt > > > > this. Here is a part of the stack trace. > > > > > [java] Unable to use direct char[] access of java.lang.String. > > > > Disabling this method. > > > > [java] java.lang.IllegalAccessException: Private fields can not > > > > be set on JRE classes. > > > > [java] at > > > com.google.appengine.tools.development.agent.runtime.Runtime.verifyWritable > > > > (Runtime.java:81) > > > > [java] at > > > com.google.appengine.tools.development.agent.runtime.Runtime.verifyAndRun > > > > (Runtime.java:335) > > > > [java] at > > > > com.google.appengine.tools.development.agent.runtime.Runtime.set > > > > (Runtime.java:229) > > > > [java] at > > > org.codehaus.groovy.grails.web.util.StringCharArrayAccessor.createString > > > > (StringCharArrayAccessor.java:168) > > > > [java] at > > > > org.codehaus.groovy.grails.web.util.StreamCharBuffer.readAsString > > > > (StreamCharBuffer.java:294) > > > > [java] at > > > > org.codehaus.groovy.grails.web.util.StreamCharBuffer.toString > > > > (StreamCharBuffer.java:312) > > > > [java] at > > > > org.codehaus.groovy.grails.web.pages.FastStringWriter.toString > > > > (FastStringWriter.java:47) > > > > [java] at > > > > org.codehaus.groovy.grails.web.taglib.GroovyPageTagWriter.getValue > > > > (GroovyPageTagWriter.java:36) > > > > [java] at > > > > org.codehaus.groovy.grails.web.pages.GroovyPage.captureTagOutput > > > > (GroovyPage.java:351) > > > > [java] at org.codehaus.groovy.grails.web.pages.GroovyPage > > > > $captureTagOutput.call(Unknown Source) > > > > [java] at > > > > org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall > > > > (CallSiteArray.java:40) > > > > [java] at > > > > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call > > > > (AbstractCallSite.java:117) > > > > [java] at > > > > org.codehaus.groovy.grails.web.plugins.support.WebMetaUtils > > > > $_registerMethodMissingForTags_closure13.doCall(WebMetaUtils.groovy: > > > > 128) > > > > [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native > > > > Method) > > > > > Thanks, > > > > Aldrin -- 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-j...@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] Querying "parent" side of unowned relationship
What is the most efficient way of querying the "many" side of an unowned relationship. E.g., assuming the standard JDO annotations are applied: class Person { Set foods; } class Food { Key key; String name; // unique } Given the name of a Food, how can I best get the list of Person objects that reference it in it's food Set? -- 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-j...@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] Error: Server Error
Hi all, I got the following error from app server. I only define a servlet in web.xml and do nothing in servlet. Any one has idea about this issue? Thanks. Web.xml postURL org.liko.servlet.postURL postURL /postURL.do Here is the log: Failed startup of context com.google.apphosting.utils.jetty.runtimeappenginewebappcont...@b113c7 {/,/base/data/home/apps/go2ppp/2.338276405331081395} java.security.AccessControlException: access denied (java.io.FilePermission /base/data/home/apps/go2ppp/2.338276405331081395/WEB-INF/work write) at java.security.AccessControlContext.checkPermission(AccessControlContext.java:355) at java.security.AccessController.checkPermission(AccessController.java:567) at java.lang.SecurityManager.checkPermission(Unknown Source) at com.google.apphosting.runtime.security.CustomSecurityManager.checkPermission(CustomSecurityManager.java:45) at java.lang.SecurityManager.checkWrite(Unknown Source) at java.io.File.canWrite(File.java:767) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1205) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.java:191) at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.getHandler(AppVersionHandlerMap.java:168) at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:127) at com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:239) at com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:5235) at com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:5233) at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java:24) at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:363) at com.google.net.rpc.impl.Server$2.run(Server.java:838) at com.google.tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java:56) at com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan(LocalTraceSpanBuilder.java:536) at com.google.net.rpc.impl.Server.startRpc(Server.java:793) at com.google.net.rpc.impl.Server.processRequest(Server.java:368) at com.google.net.rpc.impl.ServerConnection.messageReceived(ServerConnection.java:448) at com.google.net.rpc.impl.RpcConnection.parseMessages(RpcConnection.java:319) at com.google.net.rpc.impl.RpcConnection.dataReceived(RpcConnection.java:290) at com.google.net.async.Connection.handleReadEvent(Connection.java:466) at com.google.net.async.EventDispatcher.processNetworkEvents(EventDispatcher.java:759) at com.google.net.async.EventDispatcher.internalLoop(EventDispatcher.java:205) at com.google.net.async.EventDispatcher.loop(EventDispatcher.java:101) at com.google.net.rpc.RpcService.runUntilServerShutdown(RpcService.java:251) at com.google.apphosting.runtime.JavaRuntime$RpcRunnable.run(JavaRuntime.java:396) at java.lang.Thread.run(Unknown Source) -- Burning Shining Life -- 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-j...@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] Running queries in the Data Viewer of the Datastore
Is it possible to run update/insert queries in the data viewer? I have tried a few different variations of them and can't seem to get it to work. -- 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-j...@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] Repeated "Request was aborted" errors
Hi, I am getting errors on every other request like this: Request was aborted after waiting too long to attempt to service your request. Most likely, this indicates that you have reached your simultaneous dynamic request limit. This is almost always due to excessively high latency in your app. Please see http://code.google.com/appengine/docs/quotas.html for more details. which are then followed by a restart of the container and then the next request will give the error again. As the container is restarting and only one request is processes I think something else must be causing the error apart from too many connections. Any ideas? Thanks, John -- 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-j...@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] not detecting event for blips submitted...
Hi, I have to develop an application, but before that I reserved one ID for testing purposes and deployed one succesfully, but its not receiving events and not showing capabilities.xml file for my deployed application..its showing that link is broken. what could be the problem, though I am using updated eclipse, SDK and other plugins, so I dont think version mismatch coule be an issue. Kindly guide me pertaining it. .. jyotasana -- 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-j...@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] Charity Fundraiisng management database
We are considering to redevelop our existing MS Access based application. We are planning to have one back-end database connected with the website as well as the off-line (office based) data entry. Option we are considering are; a) Google Apps Engine based application; b) asp.Net SQL based application; or c) salesforce.com. The application currently stores 500,000 potential donors/donors records and 150,000 donations - credit card, cheque, cash etc. Is integrated with our in-house developed payment gateway that processes crads through Barclays ePDQ MPI. The system will also be processing email broadcasting; direc debit processing; etc. Could someone with in-depth experience advice and may be help us move. -- 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-j...@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] Repeated "Request was aborted" errors
What's your app id? On Sun, Dec 6, 2009 at 10:19 AM, jd wrote: > Hi, > > I am getting errors on every other request like this: > > Request was aborted after waiting too long to attempt to service your > request. Most likely, this indicates that you have reached your > simultaneous dynamic request limit. This is almost always due to > excessively high latency in your app. Please see > http://code.google.com/appengine/docs/quotas.html for more details. > > which are then followed by a restart of the container and then the > next request will give the error again. > > As the container is restarting and only one request is processes I > think something else must be causing the error apart from too many > connections. > > Any ideas? > > Thanks, > > John > > -- > > 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-j...@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-j...@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: What's the right way to use PersistenceManager?
I am not sure it/there is a "right" way, but in my application I am injecting (via Spring) a (singleton) PMF into my Controller(s) (which are singletons) and instantiating a PM for each (concurrent) query/request... On Dec 4, 11:30 pm, Fan Lin wrote: > Hi, I'm new in JDO, so I think this problem may sounds stupid... > I'm working on my application on App-engine, and feel really confused > about how to use the PersistenceManager in my app... > > 1) At the very beginning I tried to maintain only one static pm > instance in my app, but I found that when I try to update the entities > in datastore, it does not write back, since I do not close the pm. > > 2) Then, I tried to get a new pm in every request, and after the > request I close it. But I still store the pm as a static field in a > DaoBase class. the code looks like: > > PersistenceManager pm = PFM.get().getPersistenceManager(); > DaoBase.setPm(pm); > > do the request... > > DaoBase.getPm().close(); > DaoBase.setPm(null); > > But when multiple requests come concurrently, things becomes messy and > sometimes the DaoBase.getPm() will returns null during a request. > > 3) Use new pm each time when reading the datastore, then detach the > object from pm, close the pm. Then during update time, use a new pm to > update it. But the problem here is when there is some owned > relationship between datastore entities, a detatched object will not > fetch the data automatically, like: > > / > class Address { > > > } > > class Employee { > private List addressList; > > public List getAddressList() { > return addressList; > }} > > /// > the getAddressList() will always return null. > > So...What is the right way to use PersistenceManager? -- 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-j...@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] Nearly doubled CPU usage since december 3rd
On Mon, Dec 7, 2009 at 5:42 AM, SCMSoft wrote: > We always used to have ~100ms api cpu_ms, but cpu_ms used to be more > like 50ms or so. We added logging on the time of entry and exit of > doGet() and there was 58 ms difference in this case. How is it > possible to have 210cpu_ms, which is ~100ms more than the api usage, > while the request only lasted 58 ms (or 76 ms according to the > appengine number)? I cannot tell you why your CPU time seems to have increased, but know that cpu_ms and api_cpu_ms are not using wall-clock milliseconds, but "virtual" milliseconds, defined for the purpose of billing. They more or less correspond to milliseconds on an old-ish machine (some kind of Intel 1.2GHz, IIRC) -- and they depend on the type of request. They are essentially an abstract unit. The app engine documentation gives more detail: http://code.google.com/appengine/docs/quotas.html Google might have been better inspired to not label this unit "millisecond". "Disney dollars" are meant to confuse you -- that might not have been a good example to follow. P.S. Turns out, Disney dollars are convertible and pegged to the USD. Linden dollars, then. -- 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-j...@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: 1.2.8 SDK Prerelease - help us verify!
Hi Dom, We definitely should have updated our unit-testing documentation to include more information for testing with queues. I'll make sure this gets addressed. In the meantime, I believe this should do what you want: QueueFactory.getDefaultQueue().add(TaskOptions.Builder.taskName("task29")); ApiProxyLocalImpl proxy = new ApiProxyLocalImpl(new File(".")){}; LocalTaskQueue ltq = (LocalTaskQueue) proxy.getService(LocalTaskQueue.PACKAGE); ltq.flushQueue(QueueFactory.getDefaultQueue().getQueueName()); QueueFactory.getDefaultQueue().add(TaskOptions.Builder.taskName("task29")); You can use LocalTaskQueue.getQueueStateInfo() to inspect and assert on the state of your queues: LocalTaskQueue ltq = (LocalTaskQueue) proxy.getService(LocalTaskQueue.PACKAGE); for (QueueStateInfo qsi : ltq.getQueueStateInfo().values()) { for (QueueStateInfo.TaskStateInfo ti : qsi.getTaskInfo()) { System.out.println(ti.getTaskName()); } } Hope this helps, Max On Sat, Dec 5, 2009 at 9:12 PM, Dom Derrien wrote: > Max, > > I've an issue probably related to my tests that recreate an > environement at each step (as unit tests usually does ;). The issue is > related to the re-creation of a Queue with the same name (the default > one). > > Here is the exception with part of the stack trace: > com.google.appengine.api.labs.taskqueue.TaskAlreadyExistsException: > Task name already exists : >at > com.google.appengine.api.labs.taskqueue.QueueApiHelper.translateError > (QueueApiHelper.java:76) >at > com.google.appengine.api.labs.taskqueue.QueueApiHelper.makeSyncCall > (QueueApiHelper.java:32) >at com.google.appengine.api.labs.taskqueue.QueueImpl.add > (QueueImpl.java:235) >at com.google.appengine.api.labs.taskqueue.QueueImpl.add > (QueueImpl.java:225) >at twetailer.task.LocationValidator.process(LocationValidator.java: > 119) > > Here is the code with cause the error: >Queue queue = QueueFactory.getDefaultQueue(); >queue.add( >url(ApplicationSettings.get().getServletApiPath() + "/ > maezel/processCommand"). >param(Command.KEY, commandKey.toString()). >method(Method.GET) >); > > I can understand you want to avoid the duplication but this is a > regression... > > Do you have a workaround for this issue too? Something to reset the > factory... > > At the same time, can you tell me how, from the code of the test, if > we can verify that tasks have been added to the queue as expected? For > now, I've to rely on yet another mock class ;) > > Thanks, > A+, Dom > -- > Any way to > > On Dec 5, 11:05 pm, Dom Derrien wrote: > > Hi Max, > > > > To be able cover my code with unit tests, I created a mock class for > > the App Engine environment (http://github.com/DomDerrien/two-tiers- > > utils/blob/master/src/Java/com/google/apphosting/api/ > > MockAppEngineEnvironment.java). As reported in my recent blog post > > (http://domderrien.blogspot.com/2009/11/unit-tests-mock-objects-and- > > app-engine.html), it's inspired from your documentation and from a > > post of App Engine fan. > > > > FYI, it seems to me that the official SDK still requires the > > workaround. Thanks to your suggestion, the updated mock let the tests > > passing as before ;) > > > > private class MockApiProxyEnvironment implements > > ApiProxy.Environment { > > // ... > > public Map getAttributes() { > > Map out = new HashMap(); > > > > // Only necessary for tasks that are added when there is > > no "live" request > > // See: > http://groups.google.com/group/google-appengine-java/msg/8f5872b05214... > > out.put("com.google.appengine.server_url_key", "http:// > > localhost:8080"); > > > > return out; > > } > > }; > > > > A+, Dom > > -- > > On Dec 3, 7:01 pm, "Max Ross (Google)" > > > > > > wrote: > > > > > Vince, > > > > > We added a last minute fix for this in the SDK that just went out. > Could > > > you please try your code with the official SDK download? > > > > > Thanks, > > > Max > > > > > On Thu, Dec 3, 2009 at 12:15 PM, Max Ross (Google) < > > > > > maxr+appeng...@google.com < > maxr%2bappeng...@google.com >> wrote: > > > > Sure, sorry for the trouble, and thanks for trying out the > prerelease! > > > > > > Max > > > > > > On Thu, Dec 3, 2009 at 12:12 PM, Vince Bonfanti >wrote: > > > > > >> That fixed it. Thanks. > > > > > >> Vince > > > > > >> On Thu, Dec 3, 2009 at 2:24 PM, Max Ross (Google) < > > > >> maxr+appeng...@google.com < > maxr%2bappeng...@google.com >> wrote: > > > > > >>> Vince, > > > > > >>> As a workaround, try setting the missing environment attribute > explicitly > > > >>> before you add the task to the queue: > > > > > >>> > ApiProxy.getCurrentEnvironment().getAttributes().put("com.google.appengine.server_url_key", > > > >>> "http://localhost:8080";); > > > > > >>> This should only be necessary for tasks that are added when there > is no > >
Re: [appengine-java] local google app engine server in Netbeans
You'll have to stop the server when you redeploy. If you run in "debug" mode, the JVM will reload classes that you recompile so you would only need to redeploy when you change configurations (web.xml, appengine-web.xml, etc). I'm not familiar with the NetBeans plugin, so I can't comment on why this may be happening, but when I use the IntelliJ plugin, it will ask me whether I want to kill the existing JVM, detach or cancel. If you really want to restart the process, you would want to "kill" so the process doesn't detach and take up the port you need. On Mon, Dec 7, 2009 at 6:00 AM, Andreas Blomqvist < blomqvist.andr...@gmail.com> wrote: > Hi > > Newbie question. I'm running a local google app engine server with my > netbeans (6.7) and I am having some problems with redeploying. > I always get > > runserver: > [java] 2009-dec-07 13:54:15 > com.google.apphosting.utils.jetty.JettyLogger warn > [java] VARNING: failed selectchannelconnec...@localhost:8082 > [java] java.net.BindException: Address already in use: bind > > > when I do "deploy" on my project. I seems that the server tries to restart, > but it has not closed down, I can see alot of java.exe processes in the > activity manager. When I kill them and deploy everything works fine. Any > ideas? > > /A > > > -- > 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-j...@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. > -- Ikai Lan Developer Programs Engineer, Google App Engine -- 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-j...@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: Datastore Statistics vs. Quota
Toby, There's another thing to be aware of: sessions are backed with the datastore. If you have sessions enabled, you may want to write a scheduled task that clears session data. On Mon, Dec 7, 2009 at 9:00 AM, Eric Rannaud wrote: > On Mon, Dec 7, 2009 at 2:20 AM, Toby wrote: > > thank you for your update. In fact I was suspecting the index or other > > management data. But it is hard to believe that it leads to such a big > > overhead. I mean it is enormous to have an index that is 10 times more > > than the actual data, don't you think so? > > If you look at the article, it doesn't seem that out of place. > Remember that by default, two indexes are built for every property, > EntitiesByProperty ASC and EntitiesByProperty DESC. If you look at the > number of fields in the corresponding tables (see article), and if > your entity has 5-10 fields, I would not be surprised by such an > overhead. > > Marking properties as non-indexable, if you don't need the systematic > indexing that Google does, will help save a lot of space. > > > Furthermore in the datastore statistics they already list so called > > "Metadata". It is consuming about 44% of the space. I think that this > > is the index, is it not? > > I don't think it is, no. I believe it refers to other kinds of > metadata (see article linked earlier in the thread). Index disk space > usage is, I believe, nowhere explicit. > > Eric. > > -- > > 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-j...@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. > > > -- Ikai Lan Developer Programs Engineer, Google App Engine -- 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-j...@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] How to use jmsn on GAE?
Yes, App Engine suggests external JARs. What is likely happening is that the library is using a class that is not on the whitelist. Since it is an MSN Messenger app, this likely has to do with classes that require socket communication, which we do not allow. Have you looked into the XMPP service? On Mon, Dec 7, 2009 at 2:19 AM, Leon wrote: > I have trying to deploy a web MSN Messenger app to GAE and the > following error appears. > > java.lang.NoClassDefFoundError: rath.msnm.MSNMessenger is a restricted > class. Please see the Google App Engine developer's guide for more > details. > > The app used an external jar includes rath.msnm.MSNMessenger class. > Does GAE support external jars? > > > Thank you! > > Leon > > -- > > 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-j...@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. > > > -- Ikai Lan Developer Programs Engineer, Google App Engine -- 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-j...@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: problems with SDK 1.2.8 and (local) task queues timing out...
Local task execution is using the local UrlFetchService implementation with its default timeout: 5 seconds. So, if the url that your task hits takes more than 5 seconds to respond you'll see this exception. However, this exception is from the client of the task url, not the task execution itself. The client will timeout after 5 seconds but the task should still execute to completion - we don't interrupt it. Please let me know if that's not the case. Now, 5 seconds is clearly not enough time since the request limit for apps is 30 seconds. This is a bug, and it's already fixed. It should go out with the next SDK. In the meantime just try to ignore the timeouts. As for retries, this is a known limitation: http://code.google.com/appengine/docs/java/taskqueue/overview.html#Task_Queues_and_the_Development_Server We'll get this brought in line with production shortly. Thanks, and sorry for the trouble. Max On Sun, Dec 6, 2009 at 9:57 PM, Tristan wrote: > I've seen this as well. I've also noticed that if I purposefully make > a task fail (by returning any HTTP status code outside of the range > 200-299), it doesn't get added back to queue for retrying. This used > to work in 1.2.6. > > -Tristan > > On Dec 6, 4:18 pm, Larry Cable wrote: > > I just updated from 1.2.6 to 1.2.8 and my application code has started > > failing locally. > > > > I am using task queue's in order to process uploaded files, this > > worked in 1.2.6 (although you had > > to manually fire the task queue from the _ah admin console) > > > > Now, it is failing under 1.2.8 (as it seems as though it is now > > automatically starting the queue) > > with the following exception: > > > > Dec 7, 2009 12:08:57 AM org.quartz.core.JobRunShell run > > SEVERE: Job default.a7f0abc6-ed81-4fa4-96f1-c09048a99883 threw an > > unhandled Exception: > > com.google.apphosting.api.ApiProxy$ApplicationException: > > ApplicationError: 5: http method POST against > URLhttp://localhost:8080/admin/gae-tasks/upload/csv/irs/processor.task > > timed out. > > at > com.google.appengine.api.urlfetch.dev.LocalURLFetchService.fetch > > (LocalURLFetchService.java:214) > > at > com.google.appengine.api.labs.taskqueue.dev.UrlFetchJob.execute > > (UrlFetchJob.java:53) > > at > com.google.appengine.api.labs.taskqueue.dev.UrlFetchJob.execute > > (UrlFetchJob.java:46) > > at org.quartz.core.JobRunShell.run(JobRunShell.java:195) > > at org.quartz.simpl.SimpleThreadPool$WorkerThread.run > > (SimpleThreadPool.java:520) > > Dec 7, 2009 12:08:57 AM org.quartz.core.ErrorLogger schedulerError > > SEVERE: Job (default.a7f0abc6-ed81-4fa4-96f1-c09048a99883 threw an > > exception. > > org.quartz.SchedulerException: Job threw an unhandled exception. [See > > nested exception: com.google.apphosting.api.ApiProxy > > $ApplicationException: ApplicationError: 5: http method POST against > > URLhttp://localhost:8080/admin/gae-tasks/upload/csv/irs/processor.task > > timed out.] > > at org.quartz.core.JobRunShell.run(JobRunShell.java:206) > > at org.quartz.simpl.SimpleThreadPool$WorkerThread.run > > (SimpleThreadPool.java:520) > > * Nested Exception (Underlying Cause) --- > > com.google.apphosting.api.ApiProxy$ApplicationException: > > ApplicationError: 5: http method POST against > URLhttp://localhost:8080/admin/gae-tasks/upload/csv/irs/processor.task > > timed out. > > at > com.google.appengine.api.urlfetch.dev.LocalURLFetchService.fetch > > (LocalURLFetchService.java:214) > > at > com.google.appengine.api.labs.taskqueue.dev.UrlFetchJob.execute > > (UrlFetchJob.java:53) > > at > com.google.appengine.api.labs.taskqueue.dev.UrlFetchJob.execute > > (UrlFetchJob.java:46) > > at org.quartz.core.JobRunShell.run(JobRunShell.java:195) > > at org.quartz.simpl.SimpleThreadPool$WorkerThread.run > > (SimpleThreadPool.java:520) > > > > it implies that there is some form of timeout occuring ... since the > > app code has not changed and is not > > apparently getting invoked at all, I am somewhat at loss to know how > > to resolve this! > > > > Has anyone else seen these problems? > > -- > > 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-j...@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-j...@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: new in 1.2.8: "relationship fields of type . This is not yet supported."
I need to investigate the requirement that BaseBean be PersistenceCapable, but the relationship exception you're getting is most likely the result of a separate bug. Here's a thread with the workaround: https://groups.google.com/group/google-appengine-java/browse_thread/thread/241f366dde05f9f3# Max On Mon, Dec 7, 2009 at 1:41 AM, bryce cottam wrote: > right, we're certainly on the same page on what should/shouldn't be > persisted. I have that override on every single class that subclasses > BaseBean. I would never expect JDO/datanucleus or any other framework > for that matter to "magically" persist a field in a non-peristable > super class. That's why I override it in every subclass. Again, I > had it in there as a place holder until GAE supported persisting super > class fields in subclasses. in the release notes of 1.2.8 of GAE, it > indicates such functionality is available, so I removed my overrides, > made BaseBean persistable and started testing. Once I saw the error > in my original message, I reverted everything back to a state where > BaseBean is not persistable, and in fact, it is abstract and I removed > the implementation of the "id" field and property getter/setters and > migrated that all down to each subclassing bean. So, given my code > above, no one should be requiring BaseBean to be persistable or even > enhanced. Good tip on the point that a plugin may be causing this, > here is the stack trace I posted earlier: > > Persistent class "Class com.resmark.client.model.BaseBean does not > seem to have been enhanced. You may want to rerun the enhancer and > check for errors in the output." has no table in the database, but the > operation requires it. Please check the specification of the MetaData > for this class. >at > org.datanucleus.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:375) >at > org.datanucleus.jdo.JDOPersistenceManager.jdoMakePersistent(JDOPersistenceManager.java:674) > at > org.datanucleus.jdo.JDOPersistenceManager.makePersistent(JDOPersistenceManager.java:694) > at > com.resmark.server.model.service.BaseDataService.create(BaseDataService.java:227) > at > com.resmark.server.SetupServiceImpl.updateOrCreate(SetupServiceImpl.java:123) >at > com.resmark.server.SetupServiceImpl.updateOrCreateActivity(SetupServiceImpl.java:60) >at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > com.google.appengine.tools.development.agent.runtime.Runtime.invoke(Runtime.java:100) > at > com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:527) > at > com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:166) > at > com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:86) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:713) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) > at > org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) > at > org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093) > at > com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43) > at > org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) > at > com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:121) > at > org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) > at > org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) > at > org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) > at > org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) > at > org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712) > at > org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) > at > com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:70) > at > org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) > at > com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:352) > at > org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) > at org.mortbay.jetty.Server.handle(Server.java:313) > at > org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506) > at > org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:844) > at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java
[appengine-java] Re: problems with SDK 1.2.8 and (local) task queues timing out...
Hi Max, after sleeping on it, it became apparent that as you describe the timeout is in fact in the "client" and not the execution of the (servlet) task itself ... On Dec 7, 10:54 am, "Max Ross (Google)" wrote: > Local task execution is using the local UrlFetchService implementation with > its default timeout: 5 seconds. So, if the url that your task hits takes > more than 5 seconds to respond you'll see this exception. However, this > exception is from the client of the task url, not the task execution > itself. The client will timeout after 5 seconds but the task should still > execute to completion - we don't interrupt it. Please let me know if that's > not the case. so I concur with your assertion above ... > > Now, 5 seconds is clearly not enough time since the request limit for apps > is 30 seconds. This is a bug, and it's already fixed. It should go out > with the next SDK. In the meantime just try to ignore the timeouts. great thanks ... Since I am using GAE-VFS and tasks in order to upload, parse and persist data via JDO into the DataStore, I anticipate that the Servlet/Task will potentially exceed the per-request quota and throw ... I was planning on catching this and scheduling additional tasks until all the file processing is complete ... any thoughts on this ... do you see any problems in doing so? > > As for retries, this is a known > limitation:http://code.google.com/appengine/docs/java/taskqueue/overview.html#Ta... > > We'll get this brought in line with production shortly. > > Thanks, and sorry for the trouble. > no problem! ... Thanks for the response! > Max > > > > On Sun, Dec 6, 2009 at 9:57 PM, Tristan wrote: > > I've seen this as well. I've also noticed that if I purposefully make > > a task fail (by returning any HTTP status code outside of the range > > 200-299), it doesn't get added back to queue for retrying. This used > > to work in 1.2.6. > > > -Tristan > > > On Dec 6, 4:18 pm, Larry Cable wrote: > > > I just updated from 1.2.6 to 1.2.8 and my application code has started > > > failing locally. > > > > I am using task queue's in order to process uploaded files, this > > > worked in 1.2.6 (although you had > > > to manually fire the task queue from the _ah admin console) > > > > Now, it is failing under 1.2.8 (as it seems as though it is now > > > automatically starting the queue) > > > with the following exception: > > > > Dec 7, 2009 12:08:57 AM org.quartz.core.JobRunShell run > > > SEVERE: Job default.a7f0abc6-ed81-4fa4-96f1-c09048a99883 threw an > > > unhandled Exception: > > > com.google.apphosting.api.ApiProxy$ApplicationException: > > > ApplicationError: 5: http method POST against > > URLhttp://localhost:8080/admin/gae-tasks/upload/csv/irs/processor.task > > > timed out. > > > at > > com.google.appengine.api.urlfetch.dev.LocalURLFetchService.fetch > > > (LocalURLFetchService.java:214) > > > at > > com.google.appengine.api.labs.taskqueue.dev.UrlFetchJob.execute > > > (UrlFetchJob.java:53) > > > at > > com.google.appengine.api.labs.taskqueue.dev.UrlFetchJob.execute > > > (UrlFetchJob.java:46) > > > at org.quartz.core.JobRunShell.run(JobRunShell.java:195) > > > at org.quartz.simpl.SimpleThreadPool$WorkerThread.run > > > (SimpleThreadPool.java:520) > > > Dec 7, 2009 12:08:57 AM org.quartz.core.ErrorLogger schedulerError > > > SEVERE: Job (default.a7f0abc6-ed81-4fa4-96f1-c09048a99883 threw an > > > exception. > > > org.quartz.SchedulerException: Job threw an unhandled exception. [See > > > nested exception: com.google.apphosting.api.ApiProxy > > > $ApplicationException: ApplicationError: 5: http method POST against > > > URLhttp://localhost:8080/admin/gae-tasks/upload/csv/irs/processor.task > > > timed out.] > > > at org.quartz.core.JobRunShell.run(JobRunShell.java:206) > > > at org.quartz.simpl.SimpleThreadPool$WorkerThread.run > > > (SimpleThreadPool.java:520) > > > * Nested Exception (Underlying Cause) --- > > > com.google.apphosting.api.ApiProxy$ApplicationException: > > > ApplicationError: 5: http method POST against > > URLhttp://localhost:8080/admin/gae-tasks/upload/csv/irs/processor.task > > > timed out. > > > at > > com.google.appengine.api.urlfetch.dev.LocalURLFetchService.fetch > > > (LocalURLFetchService.java:214) > > > at > > com.google.appengine.api.labs.taskqueue.dev.UrlFetchJob.execute > > > (UrlFetchJob.java:53) > > > at > > com.google.appengine.api.labs.taskqueue.dev.UrlFetchJob.execute > > > (UrlFetchJob.java:46) > > > at org.quartz.core.JobRunShell.run(JobRunShell.java:195) > > > at org.quartz.simpl.SimpleThreadPool$WorkerThread.run > > > (SimpleThreadPool.java:520) > > > > it implies that there is some form of timeout occuring ... since the > > > app code has not changed and is not > > > apparently getting invoked at all, I am somewhat at loss to know how > > > to resolve this! > > > > Has anyone else seen these problems? > > > --
Re: [appengine-java] Re: problems with SDK 1.2.8 and (local) task queues timing out...
Regarding the "per-request quota" Are you worried about the number of requests or the duration of those requests? On Mon, Dec 7, 2009 at 11:17 AM, Larry Cable wrote: > Hi Max, after sleeping on it, it became apparent that as you describe > the timeout is > in fact in the "client" and not the execution of the (servlet) task > itself ... > On Dec 7, 10:54 am, "Max Ross (Google)" > > > > wrote: > > Local task execution is using the local UrlFetchService implementation > with > > its default timeout: 5 seconds. So, if the url that your task hits takes > > more than 5 seconds to respond you'll see this exception. However, this > > exception is from the client of the task url, not the task execution > > itself. The client will timeout after 5 seconds but the task should > still > > execute to completion - we don't interrupt it. Please let me know if > that's > > not the case. > > so I concur with your assertion above ... > > > > > Now, 5 seconds is clearly not enough time since the request limit for > apps > > is 30 seconds. This is a bug, and it's already fixed. It should go out > > with the next SDK. In the meantime just try to ignore the timeouts. > > great thanks ... > > Since I am using GAE-VFS and tasks in order to upload, parse and > persist data via JDO into > the DataStore, I anticipate that the Servlet/Task will potentially > exceed the per-request quota > and throw ... I was planning on catching this and scheduling > additional tasks until all the file > processing is complete ... > > any thoughts on this ... do you see any problems in doing so? > > > > > As for retries, this is a known limitation: > http://code.google.com/appengine/docs/java/taskqueue/overview.html#Ta... > > > > We'll get this brought in line with production shortly. > > > > Thanks, and sorry for the trouble. > > > > no problem! ... > > Thanks for the response! > > > Max > > > > > > > > On Sun, Dec 6, 2009 at 9:57 PM, Tristan wrote: > > > I've seen this as well. I've also noticed that if I purposefully make > > > a task fail (by returning any HTTP status code outside of the range > > > 200-299), it doesn't get added back to queue for retrying. This used > > > to work in 1.2.6. > > > > > -Tristan > > > > > On Dec 6, 4:18 pm, Larry Cable wrote: > > > > I just updated from 1.2.6 to 1.2.8 and my application code has > started > > > > failing locally. > > > > > > I am using task queue's in order to process uploaded files, this > > > > worked in 1.2.6 (although you had > > > > to manually fire the task queue from the _ah admin console) > > > > > > Now, it is failing under 1.2.8 (as it seems as though it is now > > > > automatically starting the queue) > > > > with the following exception: > > > > > > Dec 7, 2009 12:08:57 AM org.quartz.core.JobRunShell run > > > > SEVERE: Job default.a7f0abc6-ed81-4fa4-96f1-c09048a99883 threw an > > > > unhandled Exception: > > > > com.google.apphosting.api.ApiProxy$ApplicationException: > > > > ApplicationError: 5: http method POST against > > > URLhttp://localhost:8080/admin/gae-tasks/upload/csv/irs/processor.task > > > > timed out. > > > > at > > > com.google.appengine.api.urlfetch.dev.LocalURLFetchService.fetch > > > > (LocalURLFetchService.java:214) > > > > at > > > com.google.appengine.api.labs.taskqueue.dev.UrlFetchJob.execute > > > > (UrlFetchJob.java:53) > > > > at > > > com.google.appengine.api.labs.taskqueue.dev.UrlFetchJob.execute > > > > (UrlFetchJob.java:46) > > > > at org.quartz.core.JobRunShell.run(JobRunShell.java:195) > > > > at org.quartz.simpl.SimpleThreadPool$WorkerThread.run > > > > (SimpleThreadPool.java:520) > > > > Dec 7, 2009 12:08:57 AM org.quartz.core.ErrorLogger schedulerError > > > > SEVERE: Job (default.a7f0abc6-ed81-4fa4-96f1-c09048a99883 threw an > > > > exception. > > > > org.quartz.SchedulerException: Job threw an unhandled exception. [See > > > > nested exception: com.google.apphosting.api.ApiProxy > > > > $ApplicationException: ApplicationError: 5: http method POST against > > > > > URLhttp://localhost:8080/admin/gae-tasks/upload/csv/irs/processor.task > > > > timed out.] > > > > at org.quartz.core.JobRunShell.run(JobRunShell.java:206) > > > > at org.quartz.simpl.SimpleThreadPool$WorkerThread.run > > > > (SimpleThreadPool.java:520) > > > > * Nested Exception (Underlying Cause) --- > > > > com.google.apphosting.api.ApiProxy$ApplicationException: > > > > ApplicationError: 5: http method POST against > > > URLhttp://localhost:8080/admin/gae-tasks/upload/csv/irs/processor.task > > > > timed out. > > > > at > > > com.google.appengine.api.urlfetch.dev.LocalURLFetchService.fetch > > > > (LocalURLFetchService.java:214) > > > > at > > > com.google.appengine.api.labs.taskqueue.dev.UrlFetchJob.execute > > > > (UrlFetchJob.java:53) > > > > at > > > com.google.appengine.api.labs.taskqueue.dev.UrlFetchJob.execute > > > > (UrlFetchJob.java:46) > > > > at org.quartz.cor
Re: [appengine-java] Critical issue with INDEX
Hi Jason and all Google guys, This is real big problem and its not just canslimbot application but there are many applications, in today's mails i can see 3 people have faced this problem i ncluding m e. I am sure there is some defect in index building. Can you please have a look. Thanks, Ravi. On Mon, Dec 7, 2009 at 3:40 PM, GTZhou wrote: > Jason: >I need your help. >Before I create the index,My app works fine,and I use the query > below,I can get 1 row. > SELECT FROM StockBase where code = '600175' and season = '3' and year > = '2009' >However,after create the index,and status of index is "serving".I > use the query above,then can not get anything.But I sure the data > stored on the server.Because when I remove the "and year = '2009'".I > can also get the rows. >My application id is canslimbot. >Pls tell me the reason about it,thank u! > > -- > > 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-j...@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-j...@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: Datastore Statistics vs. Quota
Ikai, how to check/clear session data? Thanks, Peter On Dec 7, 7:53 pm, "Ikai L (Google)" wrote: > Toby, > > There's another thing to be aware of: sessions are backed with the > datastore. If you have sessions enabled, you may want to write a scheduled > task that clears session data. > > > > > > On Mon, Dec 7, 2009 at 9:00 AM, Eric Rannaud wrote: > > On Mon, Dec 7, 2009 at 2:20 AM, Toby wrote: > > > thank you for your update. In fact I was suspecting the index or other > > > management data. But it is hard to believe that it leads to such a big > > > overhead. I mean it is enormous to have an index that is 10 times more > > > than the actual data, don't you think so? > > > If you look at the article, it doesn't seem that out of place. > > Remember that by default, two indexes are built for every property, > > EntitiesByProperty ASC and EntitiesByProperty DESC. If you look at the > > number of fields in the corresponding tables (see article), and if > > your entity has 5-10 fields, I would not be surprised by such an > > overhead. > > > Marking properties as non-indexable, if you don't need the systematic > > indexing that Google does, will help save a lot of space. > > > > Furthermore in the datastore statistics they already list so called > > > "Metadata". It is consuming about 44% of the space. I think that this > > > is the index, is it not? > > > I don't think it is, no. I believe it refers to other kinds of > > metadata (see article linked earlier in the thread). Index disk space > > usage is, I believe, nowhere explicit. > > > Eric. > > > -- > > > 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-j...@googlegroups.com. > > To unsubscribe from this group, send email to > > google-appengine-java+unsubscr...@googlegroups.com > unsubscr...@googlegroups.com> > > . > > For more options, visit this group at > >http://groups.google.com/group/google-appengine-java?hl=en. > > -- > Ikai Lan > Developer Programs Engineer, Google App Engine -- 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-j...@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] How to use jmsn on GAE?
Leon, I may have originally misdiagnosed your issue. Where did you place the JAR file? If you placed it in your JDK's lib/ext directory, it could cause dev_appserver to incorrectly think the class belongs to a package that we don't support. You'll need to put this JAR file under WEB-INF/lib and make sure it's in your build path. On Mon, Dec 7, 2009 at 10:58 AM, Ikai L (Google) wrote: > Yes, App Engine suggests external JARs. What is likely happening is that > the library is using a class that is not on the whitelist. Since it is an > MSN Messenger app, this likely has to do with classes that require socket > communication, which we do not allow. Have you looked into the XMPP service? > > > On Mon, Dec 7, 2009 at 2:19 AM, Leon wrote: > >> I have trying to deploy a web MSN Messenger app to GAE and the >> following error appears. >> >> java.lang.NoClassDefFoundError: rath.msnm.MSNMessenger is a restricted >> class. Please see the Google App Engine developer's guide for more >> details. >> >> The app used an external jar includes rath.msnm.MSNMessenger class. >> Does GAE support external jars? >> >> >> Thank you! >> >> Leon >> >> -- >> >> 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-j...@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. >> >> >> > > > -- > Ikai Lan > Developer Programs Engineer, Google App Engine > -- Ikai Lan Developer Programs Engineer, Google App Engine -- 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-j...@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: problems with SDK 1.2.8 and (local) task queues timing out...
sorry I should have been more precise, essentially I am concerned about blowing the 30sec per request processing/duration limit previously I was bulk uploading csv files and parsing them into POJOs then persisting them via JDO to pre-populate my app data ... I was encountering both the 5sec DS operation and 30sec processing quota exceptions with this model ... So, all I do initially is upload the CSV in Gae VFS ... then I schedule a task the task then batches lines from the file, parses, then pesists them ... if it gets an exception then it "quickly" (I hope) (repeatedly) reschedules another task to upload ... Thanks - Larry On Dec 7, 11:22 am, "Max Ross (Google)" wrote: > Regarding the "per-request quota" > > Are you worried about the number of requests or the duration of those > requests? > > > > On Mon, Dec 7, 2009 at 11:17 AM, Larry Cable wrote: > > Hi Max, after sleeping on it, it became apparent that as you describe > > the timeout is > > in fact in the "client" and not the execution of the (servlet) task > > itself ... > > On Dec 7, 10:54 am, "Max Ross (Google)" > > > > > wrote: > > > Local task execution is using the local UrlFetchService implementation > > with > > > its default timeout: 5 seconds. So, if the url that your task hits takes > > > more than 5 seconds to respond you'll see this exception. However, this > > > exception is from the client of the task url, not the task execution > > > itself. The client will timeout after 5 seconds but the task should > > still > > > execute to completion - we don't interrupt it. Please let me know if > > that's > > > not the case. > > > so I concur with your assertion above ... > > > > Now, 5 seconds is clearly not enough time since the request limit for > > apps > > > is 30 seconds. This is a bug, and it's already fixed. It should go out > > > with the next SDK. In the meantime just try to ignore the timeouts. > > > great thanks ... > > > Since I am using GAE-VFS and tasks in order to upload, parse and > > persist data via JDO into > > the DataStore, I anticipate that the Servlet/Task will potentially > > exceed the per-request quota > > and throw ... I was planning on catching this and scheduling > > additional tasks until all the file > > processing is complete ... > > > any thoughts on this ... do you see any problems in doing so? > > > > As for retries, this is a known limitation: > >http://code.google.com/appengine/docs/java/taskqueue/overview.html#Ta... > > > > We'll get this brought in line with production shortly. > > > > Thanks, and sorry for the trouble. > > > no problem! ... > > > Thanks for the response! > > > > Max > > > > On Sun, Dec 6, 2009 at 9:57 PM, Tristan wrote: > > > > I've seen this as well. I've also noticed that if I purposefully make > > > > a task fail (by returning any HTTP status code outside of the range > > > > 200-299), it doesn't get added back to queue for retrying. This used > > > > to work in 1.2.6. > > > > > -Tristan > > > > > On Dec 6, 4:18 pm, Larry Cable wrote: > > > > > I just updated from 1.2.6 to 1.2.8 and my application code has > > started > > > > > failing locally. > > > > > > I am using task queue's in order to process uploaded files, this > > > > > worked in 1.2.6 (although you had > > > > > to manually fire the task queue from the _ah admin console) > > > > > > Now, it is failing under 1.2.8 (as it seems as though it is now > > > > > automatically starting the queue) > > > > > with the following exception: > > > > > > Dec 7, 2009 12:08:57 AM org.quartz.core.JobRunShell run > > > > > SEVERE: Job default.a7f0abc6-ed81-4fa4-96f1-c09048a99883 threw an > > > > > unhandled Exception: > > > > > com.google.apphosting.api.ApiProxy$ApplicationException: > > > > > ApplicationError: 5: http method POST against > > > > URLhttp://localhost:8080/admin/gae-tasks/upload/csv/irs/processor.task > > > > > timed out. > > > > > at > > > > com.google.appengine.api.urlfetch.dev.LocalURLFetchService.fetch > > > > > (LocalURLFetchService.java:214) > > > > > at > > > > com.google.appengine.api.labs.taskqueue.dev.UrlFetchJob.execute > > > > > (UrlFetchJob.java:53) > > > > > at > > > > com.google.appengine.api.labs.taskqueue.dev.UrlFetchJob.execute > > > > > (UrlFetchJob.java:46) > > > > > at org.quartz.core.JobRunShell.run(JobRunShell.java:195) > > > > > at org.quartz.simpl.SimpleThreadPool$WorkerThread.run > > > > > (SimpleThreadPool.java:520) > > > > > Dec 7, 2009 12:08:57 AM org.quartz.core.ErrorLogger schedulerError > > > > > SEVERE: Job (default.a7f0abc6-ed81-4fa4-96f1-c09048a99883 threw an > > > > > exception. > > > > > org.quartz.SchedulerException: Job threw an unhandled exception. [See > > > > > nested exception: com.google.apphosting.api.ApiProxy > > > > > $ApplicationException: ApplicationError: 5: http method POST against > > > URLhttp://localhost:8080/admin/gae-tasks/upload/csv/irs/processor.task > > > > > timed out.] > > > > > at org.quartz.core.Jo
[appengine-java] Re: IOException on uploading app
How did you change the proxy settings to make it work? On Dec 4, 7:45 pm, GaryC wrote: > Resolved. The issue was the "Connection refused". I had to update > the proxy settings in Eclipse. > > On Dec 4, 4:49 pm, GaryC wrote: > > > > > Same issue. Just getting started today with Eclipse 3.5 and > > Appengine 1.2.8 and JDK 1.6.0_16. Forward slashes are a problem on > > Windows, no? > > > com.google.apphosting.utils.config.AppEngineConfigException: Received > > IOException parsing the input stream for /work/workspace/gac4- > > reference/war\WEB-INF/web.xml > > at > > com.google.apphosting.utils.config.AbstractConfigXmlReader.getTopLevelNode > > (AbstractConfigXmlReader.java:210) > > at com.google.apphosting.utils.config.AbstractConfigXmlReader.parse > > (AbstractConfigXmlReader.java:228) > > at com.google.apphosting.utils.config.WebXmlReader.processXml > > (WebXmlReader.java:141) > > at com.google.apphosting.utils.config.WebXmlReader.processXml > > (WebXmlReader.java:22) > > at > > com.google.apphosting.utils.config.AbstractConfigXmlReader.readConfigXml > > (AbstractConfigXmlReader.java:111) > > at com.google.apphosting.utils.config.WebXmlReader.readWebXml > > (WebXmlReader.java:72) > > at com.google.appengine.tools.admin.Application. > > (Application.java:91) > > at com.google.appengine.tools.admin.Application.readApplication > > (Application.java:120) > > at com.google.appengine.tools.admin.AppCfg.(AppCfg.java:107) > > at com.google.appengine.tools.admin.AppCfg.(AppCfg.java:58) > > at com.google.appengine.tools.admin.AppCfg.main(AppCfg.java:54) > > Caused by: java.net.ConnectException: Connection refused: connect > > at java.net.PlainSocketImpl.socketConnect(Native Method) > > at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) > > at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java: > > 195) > > at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) > > at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) > > at java.net.Socket.connect(Socket.java:525) > > at java.net.Socket.connect(Socket.java:475) > > > Gary > > > On Nov 19, 5:52 am, david jones wrote: > > > > heya, > > > > i'm quite (well, very) new to the google app engine and am just trying > > > to upload a very basic start to the project i'm working on. however, > > > when i try to upload (either using the plugin for eclipse or through > > > appcfg.cmd) i get the error: > > > > An internal error occurred during: "Deploying ConferenceCloud to > > > Google". > > > ReceivedIOExceptionparsing the input stream for C:/Users/dave/ > > > workspace/ConferenceCloud/war\WEB-INF/web.xml > > > > i havent edited theweb.xmlfile, leaving it as it was when i created > > > the project in eclipse > > > > has anyone encountered this before or knows how to solve it? > > > > thanks, > > > david- Hide quoted text - > > - Show quoted text - -- 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-j...@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: problems with SDK 1.2.8 and (local) task queues timing out...
Your approach sounds fine. As an alternative you could schedule the next task up front, then check to see if there is any work to be done, then proceed. That way you'll always have the next task scheduled no matter what might go wrong during processing. On Mon, Dec 7, 2009 at 2:19 PM, Larry Cable wrote: > sorry I should have been more precise, essentially I am concerned > about blowing the 30sec per request processing/duration limit > > previously I was bulk uploading csv files and parsing them into POJOs > then persisting them via JDO to pre-populate my app data ... > > I was encountering both the 5sec DS operation and 30sec processing > quota exceptions with this model ... > > So, all I do initially is upload the CSV in Gae VFS ... then I > schedule a task > > the task then batches lines from the file, parses, then pesists > them ... if it gets an exception then it "quickly" (I hope) > (repeatedly) reschedules another task to upload ... > > Thanks > > - Larry > > On Dec 7, 11:22 am, "Max Ross (Google)" > > > > wrote: > > Regarding the "per-request quota" > > > > Are you worried about the number of requests or the duration of those > > requests? > > > > > > > > On Mon, Dec 7, 2009 at 11:17 AM, Larry Cable > wrote: > > > Hi Max, after sleeping on it, it became apparent that as you describe > > > the timeout is > > > in fact in the "client" and not the execution of the (servlet) task > > > itself ... > > > On Dec 7, 10:54 am, "Max Ross (Google)" > > > > > > > > > > wrote: > > > > Local task execution is using the local UrlFetchService > implementation > > > with > > > > its default timeout: 5 seconds. So, if the url that your task hits > takes > > > > more than 5 seconds to respond you'll see this exception. However, > this > > > > exception is from the client of the task url, not the task execution > > > > itself. The client will timeout after 5 seconds but the task should > > > still > > > > execute to completion - we don't interrupt it. Please let me know if > > > that's > > > > not the case. > > > > > so I concur with your assertion above ... > > > > > > Now, 5 seconds is clearly not enough time since the request limit for > > > apps > > > > is 30 seconds. This is a bug, and it's already fixed. It should go > out > > > > with the next SDK. In the meantime just try to ignore the timeouts. > > > > > great thanks ... > > > > > Since I am using GAE-VFS and tasks in order to upload, parse and > > > persist data via JDO into > > > the DataStore, I anticipate that the Servlet/Task will potentially > > > exceed the per-request quota > > > and throw ... I was planning on catching this and scheduling > > > additional tasks until all the file > > > processing is complete ... > > > > > any thoughts on this ... do you see any problems in doing so? > > > > > > As for retries, this is a known limitation: > > >http://code.google.com/appengine/docs/java/taskqueue/overview.html#Ta. > .. > > > > > > We'll get this brought in line with production shortly. > > > > > > Thanks, and sorry for the trouble. > > > > > no problem! ... > > > > > Thanks for the response! > > > > > > Max > > > > > > On Sun, Dec 6, 2009 at 9:57 PM, Tristan wrote: > > > > > I've seen this as well. I've also noticed that if I purposefully > make > > > > > a task fail (by returning any HTTP status code outside of the range > > > > > 200-299), it doesn't get added back to queue for retrying. This > used > > > > > to work in 1.2.6. > > > > > > > -Tristan > > > > > > > On Dec 6, 4:18 pm, Larry Cable wrote: > > > > > > I just updated from 1.2.6 to 1.2.8 and my application code has > > > started > > > > > > failing locally. > > > > > > > > I am using task queue's in order to process uploaded files, this > > > > > > worked in 1.2.6 (although you had > > > > > > to manually fire the task queue from the _ah admin console) > > > > > > > > Now, it is failing under 1.2.8 (as it seems as though it is now > > > > > > automatically starting the queue) > > > > > > with the following exception: > > > > > > > > Dec 7, 2009 12:08:57 AM org.quartz.core.JobRunShell run > > > > > > SEVERE: Job default.a7f0abc6-ed81-4fa4-96f1-c09048a99883 threw an > > > > > > unhandled Exception: > > > > > > com.google.apphosting.api.ApiProxy$ApplicationException: > > > > > > ApplicationError: 5: http method POST against > > > > > > URLhttp://localhost:8080/admin/gae-tasks/upload/csv/irs/processor.task > > > > > > timed out. > > > > > > at > > > > > com.google.appengine.api.urlfetch.dev.LocalURLFetchService.fetch > > > > > > (LocalURLFetchService.java:214) > > > > > > at > > > > > com.google.appengine.api.labs.taskqueue.dev.UrlFetchJob.execute > > > > > > (UrlFetchJob.java:53) > > > > > > at > > > > > com.google.appengine.api.labs.taskqueue.dev.UrlFetchJob.execute > > > > > > (UrlFetchJob.java:46) > > > > > > at org.quartz.core.JobRunShell.run(JobRunShell.java:195) > > > > > > at org.quartz.simpl.SimpleThreadPool$WorkerThread.run
Re: [appengine-java] Now available: JDO/JPA preview release with inheritance support
Hi Shawn, My apologies, but the Extent example on the page you referenced is not supported because we have no way to efficiently query across different types (datastore queries are either by kind, by ancestor, or both). pm.getObjectById(TestDN.class, key) will fail if the persistent type of the entity referenced by key is not TestDN.class. If they key you're passing identifies a TestDN.TestSubDN instance then the failure is expected. Thanks, Max On Mon, Dec 7, 2009 at 12:40 AM, Shawn Brown wrote: > > You can find information on using inheritance in JDO here: > > > http://www.datanucleus.org/products/accessplatform_1_1/jdo/orm/inheritance.html > > Note that app engine _only_ supports the 4th option, "complete-table." > > According to that link, this should work to query subclasses: > > tx.begin(); > Extent e = pm.getExtent(com.mydomain.samples.store.Product.class, true); > Query q = pm.newQuery(e); > Collection c=(Collection)q.execute(); > tx.commit(); > > Is this supported or not. I can't get it to work using > > @PersistenceCapable(identityType = IdentityType.APPLICATION) > @Inheritance(customStrategy = "complete-table") > public abstract class TestDN { > > ... > > @PersistenceCapable(identityType = IdentityType.APPLICATION) > public static class TestSubDN extends TestDN { > ... > } > } > > > It's persisting fine and I can retrieve it if I use for example > pm.getObjectById(TestDN.TestSubDN.class, key); > > pm.getObjectById(TestDN.class, key); fails though. > > this is under 1.2.8 > > Shawn > > -- > > 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-j...@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-j...@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] What does true do?
Yes, pre-compilation reduces the time to load an application. This will benefit you on your first request after a deploy, after you've been cycled out or if more application instances are created to scale up with your load. You will see up to 30% improved loading time on your first request. Pre-compilation works by doing a bit of class loading work ahead of time in the App Engine environment before the request comes in. It's still opt-in, so you'll need to enable it if you want it. On Thu, Dec 3, 2009 at 4:29 PM, Gary B wrote: > The 1.2.8 release notes state that pre-compilation reduces "the length > of loading requests". Does pre-compilation reduce the *time* to load > the application? > > How does pre-compilation work? I noticed that the appcfg update > command logs information about precompilation. > > -- > > 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-j...@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. > > > -- Ikai Lan Developer Programs Engineer, Google App Engine -- 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-j...@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] Running queries in the Data Viewer of the Datastore
Scott, No, not in the data viewer. You should be able to use the Python bulk loader tool for this: http://blog.notdot.net/2009/9/Advanced-Bulk-Loading-Part-5-Bulk-Loading-for-Java On Sun, Dec 6, 2009 at 4:45 PM, Scott wrote: > Is it possible to run update/insert queries in the data viewer? I > have tried a few different variations of them and can't seem to get it > to work. > > -- > > 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-j...@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. > > > -- Ikai Lan Developer Programs Engineer, Google App Engine -- 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-j...@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: Photo and Video services
Excellent, look forward to trying it out! On Dec 3, 4:35 pm, Vince Bonfanti wrote: > I just committed the code to add support for the If-Modified-Since request > header (and the Last-Modified and Content-Length response headers). It'll be > in the next GaeVFS release, which will happen after SDK 1.2.8 is released to > production. > > BTW, the way this works is that the client simply takes the value from the > Last-Modified response header and sends it back as the If-Modified-Since > request header, so there's no need to worry about synchronization between > client time and server time. I tested on Chrome, IE8, and Firefox (all on > Windows). > > Thanks for the info. > > Vince > > On Fri, Nov 27, 2009 at 12:56 PM, James H wrote: > > > > > Here's some legwork...you can drill-down to section 14.25 of the page > > below where it describes the If-Modified-Since header. Basically, any > > Get with this header including a timestamp can be compared to the > > timestamp for the matching Entity to determine whether to respond > > normally (return the image) or respond with a 304 (Not modified) > > response. I think the trick is determining the compare granualarity > > since the server time and the client time are never exactly in sync. > > Perhaps the granularity for comparison should be down to the minute, > > not seconds and definitely not millisecond. What do you think? > > >http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html > > > On Oct 23, 10:08 am, Vince Bonfanti wrote: > > > No, not yet. It's on the TODO list (see line 171 of the GaeVfsServlet > > > source code). If you--or anyone else--wants to add this I'll be happy > > > to accept a patch. > > > > Vince > > > > On Fri, Oct 23, 2009 at 11:42 AM, Diana Cruise > > wrote: > > > > > In terms of performance does gaevfs accmmodate http resource timestamp > > > > checks to avoid re-downloading repeated requests for the same images?- > > Hide quoted text - > > > > - Show quoted text -- Hide quoted text - > > - Show quoted text - -- 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-j...@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] How to run appengine eclipse plugin on a public ip address ....(share)
Hi friends, Recently I required debugging my appengine webapps on a public ip address. There is no place set the host ip address in the plugin...finally I try this paramter to the command line of the plugin. It works... debug as >> debug configurations >> arguments >> Program arguments -a xxx.xxx.xx.xxx enjoy it... -- 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-j...@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] Application Memory Usage
Hi, Jason (Google) has mentioned that there is a limit on the amount of memory an application can consume in another thread: "There is an upper limit to the amount of memory your app can consume, but it's more than reasonable for the type of applications that App Engine is built to serve. If your application surpasses this limit, an exception will be thrown. " What is the limit (if not an exact value an approximate value)? I need to make some decisions about what to store in memcache and what to store in the application (in static variables, servlet instance variables, etc) and this decision depends to some degree on how much data I can reasonably store in the application. Regards, Len -- 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-j...@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] Cache stops returning results under heavy load
Martin, Can you provide your app ID? I'm not able to look up czumdm. On Sun, Dec 6, 2009 at 4:40 PM, Martin Caslavsky wrote: > Hi, > > my java app (czumdm) was over quota, so I enabled billing. First > request was processed at 12-06 04:10PM 11.559. App worked correctly -- > most request was processed from JCache (logged as "execute() > skipping") and several request was processed directly (logged as > "execute()"). > > But as of 12-06 04:15PM 49.099 the method call cache.containsKey(key) > returns false, thus no request is processed from cache! > > Cache statistics shows some cached objects (correct) but hits count is > stalled and miss count is increasing (weird). > > Greets > Martin > > -- > > 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-j...@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. > > > -- Ikai Lan Developer Programs Engineer, Google App Engine -- 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-j...@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] I'm afraid to migrate my application to the GAE4J
Hello, I care for an application that updates every day somewhere around 1 million rss (6 times a day) and we are looking for alternatives to reduce costs, and among the cheaper alternative is the Gae4j. But I'm still a little afraid to migrate the application, considering the limits that exist in gae4j, especially as the problem of updating the rss. These questions arose because my application has a strong dependence on long running processes and background tasks. My question is: can I migrate my application to the cloud without problems? Did not have my application blocked for exceeding the quota limit allowed, even being willing to pay for all necessary resources? Another question: does the gae4j allows me to run 100 tasks per second in a queue and increase my bucket size? I know I have to do a refactoring in my code, but I believe it will be worth it, mainly because of the scalability and price. If any expert gae4j can help me, I appreciate it. Thanks. sorry my poor english. Fulvius -- 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-j...@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: Spring + Tiles : java.lang.NoClassDefFoundError: javax/el/ELContext
Hi, I should have said "no error log" but on my browser "Error: NOT_FOUND" gets displayed. Below is my log with serverity set to DEBUG # 1. 12-07 05:33PM 21.623 / 404 11146ms 15477cpu_ms 0kb Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/ 3.5.5,gzip(gfe) See details 203.115.242.154 - - [07/Dec/2009:17:33:32 -0800] "GET / HTTP/ 1.1" 404 229 - "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv: 1.9.1.5) Gecko/20091102 Firefox/3.5.5,gzip(gfe)" "mobisociety.appspot.com" 2. I 12-07 05:33PM 23.767 javax.servlet.ServletContext log: Set web app root system property: 'mobisociety.root' = [/base/data/home/apps/mobisociety/ 1.338292022072629898/] 3. I 12-07 05:33PM 24.139 javax.servlet.ServletContext log: Initializing Spring root WebApplicationContext 4. W 12-07 05:33PM 24.140 [mobisociety/1.338292022072629898].: log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader). 5. W 12-07 05:33PM 24.140 [mobisociety/1.338292022072629898].: log4j:WARN Please initialize the log4j system properly. 6. I 12-07 05:33PM 30.695 javax.servlet.ServletContext log: org.tuckey.web.filters.urlrewrite.UrlRewriteFilter INFO: loaded (conf ok) 7. I 12-07 05:33PM 31.005 javax.servlet.ServletContext log: Initializing Spring FrameworkServlet 'mobisociety' On Dec 6, 7:53 am, Rusty Wright wrote: > What do you mean by "no log"? I often need to change the console web page's > filter level to debug to see some error messages. > > Wong wrote: > > Points to add > > > I'm using Spring 3.0.0 RC1 > > > > > > id="tilesViewResolver"> > > > value="org.springframework.web.servlet.view.tiles2.TilesView"/> > > > > > > > > class="org.springframework.web.servlet.view.tiles2.TilesConfigurer" > > id="tilesConfigurer"> > > > > > > /WEB-INF/layouts/layouts.xml > > > > /WEB-INF/views/**/views.xml > > > > > > > > > On Dec 1, 10:28 am, Wong wrote: > >> Hi, > > >> I'm trying to configure an environment with Spring and tiles. So far I > >> manage to be successful running the local web server within eclipse > >> but when I upload > >> my appspot and run it I get this error: > > >> # > > >> Nested in javax.servlet.ServletException: > >> org.springframework.beans.factory.BeanCreationException: Error > >> creating bean with name 'tilesConfigurer' defined in ServletContext > >> resource [/WEB-INF/config/webmvc-config.xml]: Invocation of init > >> method failed; nested exception is java.lang.NoClassDefFoundError: > >> javax/el/ELContext: > >> org.springframework.beans.factory.BeanCreationException: Error > >> creating bean with name 'tilesConfigurer' defined in ServletContext > >> resource [/WEB-INF/config/webmvc-config.xml]: Invocation of init > >> method failed; nested exception is java.lang.NoClassDefFoundError: > >> javax/el/ELContext > >> at > >> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean > >> (AbstractAutowireCapableBeanFactory.java:1395) > >> at > >> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean > >> (AbstractAutowireCapableBeanFactory.java:512) > >> at > >> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean > >> (AbstractAutowireCapableBeanFactory.java:450) > >> at org.springframework.beans.factory.support.AbstractBeanFactory > >> $1.getObject(AbstractBeanFactory.java:289) > >> at > >> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton > >> (DefaultSingletonBeanRegistry.java:222) > >> at > >> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean > >> (AbstractBeanFactory.java:286) > >> at > >> org.springframework.beans.factory.support.AbstractBeanFactory.getBean > >> (AbstractBeanFactory.java:188) > >> at > >> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons > >> (DefaultListableBeanFactory.java:543) > >> at > >> org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization > >> (AbstractApplicationContext.java:730) > >> at > >> org.springframework.context.support.AbstractApplicationContext.refresh > >> (AbstractApplicationContext.java:387) > >> at > >> org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext > >> (FrameworkServlet.java:447) > >> at > >> org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext > >> (FrameworkServlet.java:342) > >> at org.springframework.web.servlet.FrameworkServlet.initServletBean > >> (FrameworkServlet.java:308) > >> at org.springframework.web.ser
Re: [appengine-java] Re: Processing incoming email
Sam, I understand your confusion. I'm looking into it. The code I posted was to convert an InputStream to the proper format. My understanding is that 1.2.8 actually fixed the issue, so our code should actually end up being simpler and closer adhere to standard Java incoming mail processing. Any help the community provides would be much appreciated! The faster we can all get to the bottom of this, the faster I can get the docs updated. On Sun, Dec 6, 2009 at 2:40 AM, Sam wrote: > Appengine team, can someone please post (on the incoming mail docs > page) a full example of processing an incoming email in appengine > 1.2.8 including getting the message body and attachment? Please test > from different mail clients. Everyone is totally confused here, > especially with the mysterious API "fix" in 1.2.8 that broke all > incoming mail code. Thanks. > > -- > > 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-j...@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. > > > -- Ikai Lan Developer Programs Engineer, Google App Engine -- 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-j...@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] Multipart mail regression in 1.2.8 ?
François, Can you give this a try? ByteArrayDataSource mimePartDataSource = new ByteArrayDataSource(imgData, inboundMimeBodyPart.getContentType()); attachment.setDataHandler(new DataHandler(mimePartDataSource)); On Sat, Dec 5, 2009 at 1:47 AM, mably wrote: > This code doesn't work anymore for me : > >public void test() throws Exception{ > >String from = "x...@gmail.com"; >String to = "x...@gmail.com"; >String subject = "Testing multipart email"; >String htmlText = "Hello"; >byte[] imgData = this.obtainByteData( >"/com/mably/cms/themes/standard/resources/images/ > enveloppe.gif"); > >Properties props = new Properties(); >Session session = Session.getDefaultInstance(props, null); > >Message msg = new MimeMessage(session); >msg.setFrom(new InternetAddress(from)); >msg.addRecipient(Message.RecipientType.TO, new InternetAddress > (to)); >msg.setSubject(subject); > >Multipart mp = new MimeMultipart("related"); > >MimeBodyPart htmlPart = new MimeBodyPart(); >htmlPart.setContent(htmlText, "text/html"); >mp.addBodyPart(htmlPart); > >MimeBodyPart attachment = new MimeBodyPart(); >attachment.setFileName("test.gif"); >attachment.setContent(imgData, "image/gif"); >attachment.setHeader("Content-ID",""); >mp.addBodyPart(attachment); > >msg.setContent(mp); > >Transport.send(msg); >} > > What needs to be changed ? > > Any help will be greatly appreciated. > > François > > -- > > 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-j...@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. > > > -- Ikai Lan Developer Programs Engineer, Google App Engine -- 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-j...@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: 1.2.8 SDK Prerelease - help us verify!
Max, With your settings added to my MockAppEngineEnvironment.tearDown() method, there's no more issue. Personally, I think using my MockQueue which stores the submitted TaskOptions instances is easier to use. I can access each attributes individually (URL, method, parameters, etc.) with the TaskOptions getters. When dealing with TaskStateInfo instances, I need to extract the submitted parameters from the URL or from the body (depending on the method being GET or POST/PUT). A bit cumbersome to me ;) Thanks for your help, A+, Dom -- On Dec 7, 1:36 pm, "Max Ross (Google)" wrote: > Hi Dom, > > We definitely should have updated our unit-testing documentation to include > more information for testing with queues. I'll make sure this gets > addressed. In the meantime, I believe this should do what you want: > > QueueFactory.getDefaultQueue().add(TaskOptions.Builder.taskName("task29")); > ApiProxyLocalImpl proxy = new ApiProxyLocalImpl(new File(".")){}; > LocalTaskQueue ltq = (LocalTaskQueue) > proxy.getService(LocalTaskQueue.PACKAGE); > ltq.flushQueue(QueueFactory.getDefaultQueue().getQueueName()); > > QueueFactory.getDefaultQueue().add(TaskOptions.Builder.taskName("task29")); > > You can use LocalTaskQueue.getQueueStateInfo() to inspect and assert on the > state of your queues: > > LocalTaskQueue ltq = (LocalTaskQueue) > proxy.getService(LocalTaskQueue.PACKAGE); > for (QueueStateInfo qsi : ltq.getQueueStateInfo().values()) { > for (QueueStateInfo.TaskStateInfo ti : qsi.getTaskInfo()) { > System.out.println(ti.getTaskName()); > } > } > > Hope this helps, > Max > > On Sat, Dec 5, 2009 at 9:12 PM, Dom Derrien > wrote: > > > Max, > > > I've an issue probably related to my tests that recreate an > > environement at each step (as unit tests usually does ;). The issue is > > related to the re-creation of a Queue with the same name (the default > > one). > > > Here is the exception with part of the stack trace: > > com.google.appengine.api.labs.taskqueue.TaskAlreadyExistsException: > > Task name already exists : > > at > > com.google.appengine.api.labs.taskqueue.QueueApiHelper.translateError > > (QueueApiHelper.java:76) > > at > > com.google.appengine.api.labs.taskqueue.QueueApiHelper.makeSyncCall > > (QueueApiHelper.java:32) > > at com.google.appengine.api.labs.taskqueue.QueueImpl.add > > (QueueImpl.java:235) > > at com.google.appengine.api.labs.taskqueue.QueueImpl.add > > (QueueImpl.java:225) > > at twetailer.task.LocationValidator.process(LocationValidator.java: > > 119) > > > Here is the code with cause the error: > > Queue queue = QueueFactory.getDefaultQueue(); > > queue.add( > > url(ApplicationSettings.get().getServletApiPath() + "/ > > maezel/processCommand"). > > param(Command.KEY, commandKey.toString()). > > method(Method.GET) > > ); > > > I can understand you want to avoid the duplication but this is a > > regression... > > > Do you have a workaround for this issue too? Something to reset the > > factory... > > > At the same time, can you tell me how, from the code of the test, if > > we can verify that tasks have been added to the queue as expected? For > > now, I've to rely on yet another mock class ;) > > > Thanks, > > A+, Dom > > -- > > Any way to > > > On Dec 5, 11:05 pm, Dom Derrien wrote: > > > Hi Max, > > > > To be able cover my code with unit tests, I created a mock class for > > > the App Engine environment (http://github.com/DomDerrien/two-tiers- > > > utils/blob/master/src/Java/com/google/apphosting/api/ > > > MockAppEngineEnvironment.java). As reported in my recent blog post > > > (http://domderrien.blogspot.com/2009/11/unit-tests-mock-objects-and- > > > app-engine.html), it's inspired from your documentation and from a > > > post of App Engine fan. > > > > FYI, it seems to me that the official SDK still requires the > > > workaround. Thanks to your suggestion, the updated mock let the tests > > > passing as before ;) > > > > private class MockApiProxyEnvironment implements > > > ApiProxy.Environment { > > > // ... > > > public Map getAttributes() { > > > Map out = new HashMap(); > > > > // Only necessary for tasks that are added when there is > > > no "live" request > > > // See: > >http://groups.google.com/group/google-appengine-java/msg/8f5872b05214... > > > out.put("com.google.appengine.server_url_key", "http:// > > > localhost:8080"); > > > > return out; > > > } > > > }; > > > > A+, Dom > > > -- > > > On Dec 3, 7:01 pm, "Max Ross (Google)" > > > > > > > wrote: > > > > > Vince, > > > > > We added a last minute fix for this in the SDK that just went out. > > Could > > > > you please try your code with the official SDK download? > > > > > Thanks, > > > > Max > > > > > On Thu, Dec 3, 2009 at 12:15 PM, Max Ross (Google) < > > > > > maxr+appeng...@google.com < > > maxr%2bappeng...@google.
Re: [appengine-java] Re: A web service with security (java)
hi, Andrey: I am also looking for advices on how to use spring security and OpenID on Google App Engine applications, did you find any useful information? as far as my research, I found my application on GAE can't be used as OpenID RP because it's not allowed to create Realm. It will be great if any example application using openid+spring security can be found to login with google/yahoo account. Ricky On Tue, Nov 24, 2009 at 6:06 PM, Andrey wrote: > I begin to use Spring Security. > Now I learn how to use OpenID or OAuth with Spring Security... > > Regards, > > -Andrey > > -- > > 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-j...@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-j...@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: 1.2.8 SDK Prerelease - help us verify!
I'm glad to hear things are working for you. If MockQueue works best for you then by all means stick with that - that's more of a "pure" unit test anyway since it doesn't depend on the actual local task component. Max On Mon, Dec 7, 2009 at 8:47 PM, Dom Derrien wrote: > Max, > > With your settings added to my MockAppEngineEnvironment.tearDown() > method, there's no more issue. > > Personally, I think using my MockQueue which stores the submitted > TaskOptions instances is easier to use. I can access each attributes > individually (URL, method, parameters, etc.) with the TaskOptions > getters. When dealing with TaskStateInfo instances, I need to extract > the submitted parameters from the URL or from the body (depending on > the method being GET or POST/PUT). A bit cumbersome to me ;) > > Thanks for your help, > A+, Dom > -- > On Dec 7, 1:36 pm, "Max Ross (Google)" > > > > wrote: > > Hi Dom, > > > > We definitely should have updated our unit-testing documentation to > include > > more information for testing with queues. I'll make sure this gets > > addressed. In the meantime, I believe this should do what you want: > > > > > QueueFactory.getDefaultQueue().add(TaskOptions.Builder.taskName("task29")); > > ApiProxyLocalImpl proxy = new ApiProxyLocalImpl(new File(".")){}; > > LocalTaskQueue ltq = (LocalTaskQueue) > > proxy.getService(LocalTaskQueue.PACKAGE); > > ltq.flushQueue(QueueFactory.getDefaultQueue().getQueueName()); > > > > > QueueFactory.getDefaultQueue().add(TaskOptions.Builder.taskName("task29")); > > > > You can use LocalTaskQueue.getQueueStateInfo() to inspect and assert on > the > > state of your queues: > > > > LocalTaskQueue ltq = (LocalTaskQueue) > > proxy.getService(LocalTaskQueue.PACKAGE); > > for (QueueStateInfo qsi : ltq.getQueueStateInfo().values()) { > > for (QueueStateInfo.TaskStateInfo ti : qsi.getTaskInfo()) { > > System.out.println(ti.getTaskName()); > > } > > } > > > > Hope this helps, > > Max > > > > On Sat, Dec 5, 2009 at 9:12 PM, Dom Derrien >wrote: > > > > > Max, > > > > > I've an issue probably related to my tests that recreate an > > > environement at each step (as unit tests usually does ;). The issue is > > > related to the re-creation of a Queue with the same name (the default > > > one). > > > > > Here is the exception with part of the stack trace: > > > com.google.appengine.api.labs.taskqueue.TaskAlreadyExistsException: > > > Task name already exists : > > >at > > > com.google.appengine.api.labs.taskqueue.QueueApiHelper.translateError > > > (QueueApiHelper.java:76) > > >at > > > com.google.appengine.api.labs.taskqueue.QueueApiHelper.makeSyncCall > > > (QueueApiHelper.java:32) > > >at com.google.appengine.api.labs.taskqueue.QueueImpl.add > > > (QueueImpl.java:235) > > >at com.google.appengine.api.labs.taskqueue.QueueImpl.add > > > (QueueImpl.java:225) > > >at twetailer.task.LocationValidator.process(LocationValidator.java: > > > 119) > > > > > Here is the code with cause the error: > > >Queue queue = QueueFactory.getDefaultQueue(); > > >queue.add( > > >url(ApplicationSettings.get().getServletApiPath() + "/ > > > maezel/processCommand"). > > >param(Command.KEY, commandKey.toString()). > > >method(Method.GET) > > >); > > > > > I can understand you want to avoid the duplication but this is a > > > regression... > > > > > Do you have a workaround for this issue too? Something to reset the > > > factory... > > > > > At the same time, can you tell me how, from the code of the test, if > > > we can verify that tasks have been added to the queue as expected? For > > > now, I've to rely on yet another mock class ;) > > > > > Thanks, > > > A+, Dom > > > -- > > > Any way to > > > > > On Dec 5, 11:05 pm, Dom Derrien wrote: > > > > Hi Max, > > > > > > To be able cover my code with unit tests, I created a mock class for > > > > the App Engine environment (http://github.com/DomDerrien/two-tiers- > > > > utils/blob/master/src/Java/com/google/apphosting/api/ > > > > MockAppEngineEnvironment.java). As reported in my recent blog post > > > > (http://domderrien.blogspot.com/2009/11/unit-tests-mock-objects-and- > > > > app-engine.html), it's inspired from your documentation and from a > > > > post of App Engine fan. > > > > > > FYI, it seems to me that the official SDK still requires the > > > > workaround. Thanks to your suggestion, the updated mock let the tests > > > > passing as before ;) > > > > > > private class MockApiProxyEnvironment implements > > > > ApiProxy.Environment { > > > > // ... > > > > public Map getAttributes() { > > > > Map out = new HashMap(); > > > > > > // Only necessary for tasks that are added when there is > > > > no "live" request > > > > // See: > > >http://groups.google.com/group/google-appengine-java/msg/8f5872b05214. > .. > > > > out.put("com.google.appengine.server_
[appengine-java] Xmpp Log Appender
Hi all, I've created the log appender that write a log out through the XMPPService for sl4j and logback. XmppAppender.java --- import ch.qos.logback.classic.spi.ILoggingEvent; import ch.qos.logback.core.*; import com.google.appengine.api.xmpp.*; public class XmppAppender extends AppenderBase { private XMPPService service = XMPPServiceFactory.getXMPPService(); private String notifyTo; public String getNotifyTo() { return notifyTo; } public void setNotifyTo(String notifyTo) { if (notifyTo == null || notifyTo.isEmpty()) { throw new IllegalArgumentException(); } this.notifyTo = notifyTo; } @Override protected void append(ILoggingEvent eventObject) { JID jid = new JID(notifyTo); Message message = new MessageBuilder() .withMessageType(MessageType.CHAT) .withRecipientJids(jid) .withBody(getLayout().doLayout(eventObject)) .build(); switch (service.sendMessage(message).getStatusMap().get(jid)) { case SUCCESS: return; case INVALID_ID: throw new LogbackException("failed to append log event for invalid id:" + jid); case OTHER_ERROR: throw new LogbackException("failed to append log event for unknown error:" + jid); default: throw new AssertionError(); } } } --- sample logback.xml as following: logback.xml --- developper-account*at*gmail.com %-5p %d [%t] %m%n --- Then, invite *at*appspot.com to the desired GTalk account. That's it!! Enjoy your Log Life!! Since XMPPService works for the deault version only, you can not use this appender for the others. -- cynipe -- 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-j...@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: new in 1.2.8: "relationship fields of type . This is not yet supported."
Thanks for the link Max. Having BaseBean be PersistenceCapable isn't really a requirement. It'd be nice, 'cause pretty much every bean in my class structure is going to have an id field, a getter/setter and the exact same JDO annotation metadata on that field. It'd be nice to just have that defined once in a base class. However, it's no big thing to just implement an id field on every class, so I can certainly do without BaseBean being persistable. However, I'm noticing above mentioned errors when I make BaseBean a plain-ol class with no persistence metadata (i.e. it just implements equals and hashCode) and the appengine datanucleus plugin seems to be telling me that BaseBean needs to be enhanced. So, either way I go, I'm running into issues. I'd like to try to get to the bottom of why my non-persistable base class is being required to have been enhanced. Perhaps something is wrong with my configuration/meta data? perhaps a bug? any feedback/suggestions would be great. thanks! -bryce On Mon, Dec 7, 2009 at 12:04 PM, Max Ross (Google) wrote: > I need to investigate the requirement that BaseBean be PersistenceCapable, > but the relationship exception you're getting is most likely the result of a > separate bug. Here's a thread with the workaround: > https://groups.google.com/group/google-appengine-java/browse_thread/thread/241f366dde05f9f3# > > Max > > On Mon, Dec 7, 2009 at 1:41 AM, bryce cottam wrote: >> >> right, we're certainly on the same page on what should/shouldn't be >> persisted. I have that override on every single class that subclasses >> BaseBean. I would never expect JDO/datanucleus or any other framework >> for that matter to "magically" persist a field in a non-peristable >> super class. That's why I override it in every subclass. Again, I >> had it in there as a place holder until GAE supported persisting super >> class fields in subclasses. in the release notes of 1.2.8 of GAE, it >> indicates such functionality is available, so I removed my overrides, >> made BaseBean persistable and started testing. Once I saw the error >> in my original message, I reverted everything back to a state where >> BaseBean is not persistable, and in fact, it is abstract and I removed >> the implementation of the "id" field and property getter/setters and >> migrated that all down to each subclassing bean. So, given my code >> above, no one should be requiring BaseBean to be persistable or even >> enhanced. Good tip on the point that a plugin may be causing this, >> here is the stack trace I posted earlier: >> >> Persistent class "Class com.resmark.client.model.BaseBean does not >> seem to have been enhanced. You may want to rerun the enhancer and >> check for errors in the output." has no table in the database, but the >> operation requires it. Please check the specification of the MetaData >> for this class. >> at >> org.datanucleus.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:375) >> at >> org.datanucleus.jdo.JDOPersistenceManager.jdoMakePersistent(JDOPersistenceManager.java:674) >> at >> org.datanucleus.jdo.JDOPersistenceManager.makePersistent(JDOPersistenceManager.java:694) >> at >> com.resmark.server.model.service.BaseDataService.create(BaseDataService.java:227) >> at >> com.resmark.server.SetupServiceImpl.updateOrCreate(SetupServiceImpl.java:123) >> at >> com.resmark.server.SetupServiceImpl.updateOrCreateActivity(SetupServiceImpl.java:60) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >> at java.lang.reflect.Method.invoke(Method.java:597) >> at >> com.google.appengine.tools.development.agent.runtime.Runtime.invoke(Runtime.java:100) >> at >> com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:527) >> at >> com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:166) >> at >> com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:86) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:713) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) >> at >> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) >> at >> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093) >> at >> com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43) >> at >> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) >> at >> com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:121) >> at >> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) >>
[appengine-java] Re: oid is not instanceof javax.jdo.identity.ObjectIdentity
Max, have you had a chance to try this out? I'm not trying to push or anything, just wanted to make sure my last message didn't get overlooked. I've noticed this error sort of... randomly popping up in places where it preivously hasn't as of late. If i'm missing something in my configuration, I'll be happy to change it, I'm just not sure what I'm missing. again, I really appreciate your taking the time to help me debug this issue. thanks, -bryce On Dec 3, 4:46 pm, bryce cottam wrote: > Okay, sorry for the delay, I haven't been able to focus on this for a few > days. > > here is the full (including the jar libararies in > case there is an issue with them). > > http://www.resmarksystems.com/code/JdoTest.zip > > It's a very simple Servlet, by hitting the url hostname/jdotest you > should execute the test case that is failing for me. > > I really appreciate your taking a look at this. I'm looking forward > to getting it working. > > -bryce > > On Tue, Dec 1, 2009 at 10:15 PM, Max Ross (Google) > > wrote: > > Just give me the smallest amount of compilable, runnable code that > > demonstrates the incorrect behavior. A unit test is preferable because I > > can just drop it into my own test framework and run it, but I'll take > > whatever format you can manage. > > > Thanks, > > Max > > > On Tue, Dec 1, 2009 at 1:18 PM, bryce cottam wrote: > > >> yeah, I didn't see a TransactionNotActiveException. > >> here is my jdoconfig.xml: > >> > >> > >> value="org.datanucleus.store.appengine.jdo.DatastoreJDOPersistenceManagerFactory"/> > >> > >> >> value="true"/> > >> >> value="true"/> > >> > >> >> value="true"/> > >> > > >> I think the only thing I changed was putting in this line: > >> >> value="true"/> > > >> which may explain why I don't get the TransactionNotActiveException. > >> So, for this unit test/servlet, you want me to just post the class > >> file here, or strip down all my code and put up all my model classes > >> and the test case/servlet code somewhere in a war or something? > > >> h I just commented out that line, and I still get the same > >> behavior (i.e. I don't get the TransactionNotActiveException). Not > >> sure what's going on. > > >> thanks, > >> -bryce > > >> On Tue, Dec 1, 2009 at 2:04 PM, Max Ross (Google) > >> wrote: > >> > Now I'm starting to suspect something funny going on with your config. > >> > I > >> > received a TransactionNotActiveException when I tried to run your code > >> > without starting the txn, and the fact that you didn't receive that > >> > exception doesn't make any sense to me. I can't explain why you see the > >> > exception and I don't. The best thing would be for you to put together > >> > a > >> > stripped down test case that demonstrates the problem. An actual unit > >> > test > >> > would be ideal, but if you're not a position to write one then just a > >> > simple > >> > standalone servlet should suffice. > > >> > Thanks, > >> > Max > > >> > On Tue, Dec 1, 2009 at 1:00 PM, bryce cottam wrote: > > >> >> that is both a type-o and it was missing :) It was missing from my > >> >> test code, but it was present in my "real" code. So, after putting > >> >> the tx.begin() in the test code, I get the exact same behavior as the > >> >> "real" code (i.e. nothing gets written to the datastore and I get the > >> >> exception. Sorry about missing that in the code I posted. > > >> >> I'm kinda lost on where to go with this and where to look. I did > >> >> notice that the code actually prompts the exception is in the > >> >> datanucleus core and there is a comment above it that says: > >> >> / TODO Factor out this PersistenceCapable reference > >> >> ((PersistenceCapable)value).jdoCopyKeyFieldsFromObjectId(new > >> >> AppIDObjectIdFieldConsumer(param, om, ps, > >> >> javaTypeMappings), id); > > >> >> so, I'm not sure if this has soemthing to do with code style > >> >> datanucleus is trying to phase out or what? Again, I'm not gonna be > >> >> shocked if I'm missing something though. > >> >> thanks! > >> >> -bryce > > >> >> On Tue, Dec 1, 2009 at 1:53 PM, Max Ross (Google) > >> >> wrote: > >> >> > I don't see a call to tx.begin() in the code below. Is that a typo > >> >> > or > >> >> > is it > >> >> > actually missing? > > >> >> > On Tue, Dec 1, 2009 at 12:29 PM, bryce cottam > >> >> > wrote: > > >> >> >> thanks so much for checking into this Max. > > >> >> >> The data that I'm saving is user generated, so there's not a set > >> >> >> script for it. Conceptually what I'm doing is this: > > >> >> >> Bundle bundle = new Bundle(); > > >> >> >> bundle.setName("My Bundle"); > >> >> >> bundle.setDescription(new > >> >> >> com.google.appengine.api.datastore.Text("My Description")); > >> >> >> bundle.setPricingModel(PricingModel.PER_GUEST); > > >> >> >> RatePlanratePlan= newRatePlan(); > >> >> >> ratePlan.se