[appengine-java] Strange error after deployment
On my app id synclio-ivr all of my previous versions work great and if I deploy the current code to a different app id it works, but when I try to deploy my latest version I see a lot of errors that look like this: EXCEPTION java.lang.RuntimeException: java.io.FileNotFoundException: /base/data/ home/apps/s~synclio-ivr/20.353100563800392183/_ah/java_compiled/WEB- INF/classes/org/apache/jsp/pages/financialInfo_jsp.class (No such file or directory) at com.google.appengine.runtime.Request.process-6c587ad80ed61a42(Request.java) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) at org.mortbay.util.Loader.loadClass(Loader.java:91) at org.mortbay.util.Loader.loadClass(Loader.java:71) at org.mortbay.jetty.servlet.Holder.doStart(Holder.java:73) at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java: 242) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java: 50) at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java: 685) at org.mortbay.jetty.servlet.Context.startContext(Context.java:140) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java: 1250) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java: 517) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java: 467) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java: 50) at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.java: 202) at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.getHandler(AppVersionHandlerMap.java: 171) at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java: 123) at com.google.apphosting.runtime.JavaRuntime $RequestRunnable.run(JavaRuntime.java:391) at com.google.apphosting.runtime.ThreadGroupPool $PoolEntry.run(ThreadGroupPool.java:160) at java.lang.Thread.run(Thread.java:679) Caused by: java.io.FileNotFoundException: /base/data/home/apps/ s~synclio-ivr/20.353100563800392183/_ah/java_compiled/WEB-INF/classes/ org/apache/jsp/pages/financialInfo_jsp.class (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.(FileInputStream.java:139) ... 18 more Any ideas what might be up? Thanks! Shaun -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Imap support for gmail
Any chance Imap Support for getting to gmail from app engine is possible yet? 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-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] 1.4.0 Preview + javax.xml.rpc.ServiceException
I am getting: javax.xml.rpc.ServiceException: access denied (java.lang.RuntimePermission modifyThreadGroup) at com.google.api.adwords.lib.AdWordsVersion $AdWordsVersionV201008.setHeaders(AdWordsVersion.java:313) at com.google.api.adwords.lib.AdWordsServiceFactory.getConfiguredStub(AdWordsServiceFactory.java: 184) at com.google.api.adwords.lib.AdWordsServiceFactory.generateSerivceStub(AdWordsServiceFactory.java: 104) at com.google.api.adwords.lib.AdWordsUser.getService(AdWordsUser.java: 334) at com.appointment.actions.Google.AdWordsActions.getClicks(AdWordsActions.java: 47) at org.apache.jsp.jsp.utils.analyticstest_jsp._jspService(analyticstest_jsp.java: 92) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) at javax.servlet.http.HttpServlet.service(HttpServlet.java: 717) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java: 377) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java: 313) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) at com.google.appengine.tools.development.PrivilegedJspServlet.access $101(PrivilegedJspServlet.java:23) at com.google.appengine.tools.development.PrivilegedJspServlet $2.run(PrivilegedJspServlet.java:59) at java.security.AccessController.doPrivileged(Native Method) at com.google.appengine.tools.development.PrivilegedJspServlet.service(PrivilegedJspServlet.java: 57) at javax.servlet.http.HttpServlet.service(HttpServlet.java: 717) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1166) at com.google.appengine.tools.appstats.AppstatsFilter.doFilter(AppstatsFilter.java: 141) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java: 58) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java: 43) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java: 122) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 388) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java: 216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java: 182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java: 765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418) at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java: 70) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at com.google.appengine.tools.development.JettyContainerService $ApiProxyHandler.handle(JettyContainerService.java:349) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: 542) at org.mortbay.jetty.HttpConnection $RequestHandler.headerComplete(HttpConnection.java:923) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java: 212) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java: 404) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java: 409) at org.mortbay.thread.QueuedThreadPool $PoolThread.run(QueuedThreadPool.java:582) This occurs when I run: CampaignServiceInterface campaignService = mccUser.getService(AdWordsService.V201008.CAMPAIGN_SERVICE); with the adwords api. Any ideas? Thanks! Shaun -- 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] 400 Bad Request - The request is invalid for an unspecified reason on deploy
I'm getting: Creating staging directory Scanning for jsp files. Compiling jsp files. Scanning files on local disk. Scanned 250 files. Scanned 500 files. Scanned 750 files. Scanned 1000 files. Initiating update. java.io.IOException: Error posting to URL: https://appengine.google.com/api/appversion/create?app_id=LexMatter&version=2&; 400 Bad Request Client Error (400) The request is invalid for an unspecified reason. Debugging information may be found in C:\Users\ShaunLaptop\AppData \Local\Temp\appengine-deploy3135855494003619007.log I've tried changing versions, etc with no luck. Any idea what's up? It worked this morning just fine, 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.
[appengine-java] Request was aborted after waiting too long to attempt to service your request.
I'm sure I'm doing something wrong, but I feel like I am getting a lot of these: 10-28 02:36PM 34.293 /googlesyncactions.do?action=syncemailforeveryone 500 10005ms 0cpu_ms 0kb AppEngine-Google; (+http://code.google.com/ appengine) W 10-28 02:36PM 44.299 Request was aborted after waiting too long to attempt to service your request. This may happen sporadically when the App Engine serving cluster is und 10-28 02:34PM 31.118 /googlesyncactions.do 500 10302ms 0cpu_ms 0kb AppEngine-Google; (+http://code.google.com/appengine) W 10-28 02:34PM 41.420 Request was aborted after waiting too long to attempt to service your request. This may happen sporadically when the App Engine serving cluster is und 10-28 02:34PM 31.089 /googlesyncactions.do 500 10008ms 0cpu_ms 0kb AppEngine-Google; (+http://code.google.com/appengine) W 10-28 02:34PM 41.098 Request was aborted after waiting too long to attempt to service your request. This may happen sporadically when the App Engine serving cluster is und 10-28 02:34PM 31.066 /googlesyncactions.do 500 10020ms 0cpu_ms 0kb AppEngine-Google; (+http://code.google.com/appengine) W 10-28 02:34PM 41.086 Request was aborted after waiting too long to attempt to service your request. This may happen sporadically when the App Engine serving cluster is und 10-28 02:34PM 31.035 /googlesyncactions.do 500 10050ms 0cpu_ms 0kb AppEngine-Google; (+http://code.google.com/appengine) W 10-28 02:34PM 41.085 Request was aborted after waiting too long to attempt to service your request. This may happen sporadically when the App Engine serving cluster is und 10-28 02:34PM 19.565 /dashboard 500 10280ms 0cpu_ms 0kb AppEngine- Google; (+http://code.google.com/appengine) W 10-28 02:34PM 29.846 Request was aborted after waiting too long to attempt to service your request. This may happen sporadically when the App Engine serving cluster is und 10-28 02:16PM 17.637 /settingsActions.do? action=updateSettings&settingsjson=%7B%22key %22:%22aglsZXhtYXR0ZXJyGgsSEk1haW5DbGllbnRTZXR0aW5ncxja6xgM%22,%22name %22:%22LexMatter%22,%22url%22:%22lexmatter%22,%22paypalusername %22:%22shaunc869%22,%22paypalpassword %22:%22shaunc869%22,%22defaultbillingrate %22:%220.0%22,%22targetbillingsperyear%22:%22871,000%22,%22firmyearend %22:%2212/23/2010%22,%22paypaldepositaccount %22:%22aglsZXhtYXR0ZXJyEwsSC0JhbmtBY2NvdW50GKn1Ggw %22,%22adwordsaccountnumber%22:%22null %22%7D&settingskey=aglsZXhtYXR0ZXJyGgsSEk1haW5DbGllbnRTZXR0aW5ncxja6xgM 500 117ms 133cpu_ms 16api_cpu_ms 0kb Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.41 Safari/534.7,gzip(gfe),gzip(gfe) W 10-28 02:16PM 17.743 /settingsActions.do com.google.gson.JsonParseException: The JsonDeserializer DoubleDeserializer failed to deserialized json object "871,000" given the C 10-28 02:16PM 17.746 Uncaught exception from servlet com.google.gson.JsonParseException: The JsonDeserializer DoubleDeserializer failed to deserialized json object "871,00 10-28 02:09PM 54.105 /dashboard 500 10297ms 0cpu_ms 0kb AppEngine- Google; (+http://code.google.com/appengine) W 10-28 02:10PM 04.403 Request was aborted after waiting too long to attempt to service your request. This may happen sporadically when the App Engine serving cluster is und 10-28 02:09PM 52.418 /googlesyncactions.do 500 10085ms 0cpu_ms 0kb AppEngine-Google; (+http://code.google.com/appengine) W 10-28 02:10PM 02.504 Request was aborted after waiting too long to attempt to service your request. This may happen sporadically when the App Engine serving cluster is und 10-28 02:09PM 52.384 /googlesyncactions.do 500 10118ms 0cpu_ms 0kb AppEngine-Google; (+http://code.google.com/appengine) W 10-28 02:10PM 02.503 Request was aborted after waiting too long to attempt to service your request. This may happen sporadically when the App Engine serving cluster is und 10-28 02:09PM 52.367 /googlesyncactions.do 500 10135ms 0cpu_ms 0kb AppEngine-Google; (+http://code.google.com/appengine) W 10-28 02:10PM 02.502 Request was aborted after waiting too long to attempt to service your request. This may happen sporadically when the App Engine serving cluster is und 10-28 02:09PM 52.343 /googlesyncactions.do 500 10157ms 0cpu_ms 0kb AppEngine-Google; (+http://code.google.com/appengine) W 10-28 02:10PM 02.501 Request was aborted after waiting too long to attempt to service your request. This may happen sporadically when the App Engine serving cluster is und 10-28 02:08PM 37.024 /googlesyncactions.do?action=syncemailforeveryone 500 10051ms 0cpu_ms 0kb AppEngine-Google; (+http://code.google.com/ appengine) W 10-28 02:08PM 47.076 Request was aborted after waiting too long to attempt to service your request. This may happen sporadically when the App Engine serving cluster is und 10-28 02:07PM 26.899 /dashboard 500 10068ms 0cpu_ms 0kb AppEngine- Google; (+http://code.google.com/appengine) W 10-28 02:07PM 36.968 Request was aborted after waiting too long to attempt to service your request. This may happen sporadic
[appengine-java] Best way to get all contacts from Google Contacts API on App Engine
In my application I integrate with Google Apps, in this case specifically contacts. When you first sign up I want to get all of your contacts, but that could be thousands so with App Engine's 30 second limit I decided to break the problem into pieces and use the last modified date to try to download contacts 25 at a time, store the last modified date and walk forward from there. The only issue is that I have a case where someone imported hundreds of contacts and Google marks the update of all the entries to the exact same millisecond for all of them. So there are too many to get through before Google shuts me down and I can't ask Google to return a smaller subset. The docs are here: http://code.google.com/apis/contacts/docs/3.0/developers_guide_java.html#retrieving_with_query I consider this an App Engine question because if it weren't for the 30 seconds limit it would work fine, as it does when I test it locally with no cap on the number of entries returned. Thanks in advance! Shaun -- 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: Good wurfl example for mobile detection on app engine?
Excellent thanks for the help! On Oct 5, 1:09 am, Jean-Claude Moissinac wrote: > It works > I have an application which uses WURFL > I have to put a guide online > But, in the meantime, I can confirm a fact: WURFL is a good way to do > mobile detection in GAE > > -- > Jean-Claude Moissinac > > > > On Tue, Oct 5, 2010 at 6:52 AM, Gal Dolber wrote: > > Hi, I used it long time ago, but not in appengine. > > You need to import the database and tweak a bit the java api. > > But it should work ok > > Best > > > On Mon, Oct 4, 2010 at 7:16 PM,Shaun wrote: > > >> Does any know of a good example and/or library to do WURFL mobile > >> detection on App Engine or is there a better way to do it? Based on > >> the users device I would like to serve a different interface > > >> Thanks! > > >>Shaun > > >> -- > >> 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. > > > -- > > Guit: Elegant, beautiful, modular and *production ready* gwt applications. > > >http://code.google.com/p/guit/ > > > -- > > 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] Good wurfl example for mobile detection on app engine?
Does any know of a good example and/or library to do WURFL mobile detection on App Engine or is there a better way to do it? Based on the users device I would like to serve a different interface Thanks! Shaun -- 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] GSON BitSet Serialization Issues
I am getting an error on app engine: java.lang.SecurityException: java.lang.IllegalAccessException: Reflection is not allowed on private static final int java.util.BitSet.ADDRESS_BITS_PER_WORD >From what I understand this relates to app engine's support of reflection? I was wondering if their is a workaround available or if there are any plans to allow for this in future app engine releases? Thanks! For now I wrote my own serializer that spits out a null: public class BitSetSerializer implements JsonSerializer { private static final Logger log = Logger.getLogger(BitSetSerializer.class.getName()); @Override public JsonElement serialize(BitSet src, Type arg1, JsonSerializationContext arg2) { log.info("-BitSetSerializer start"); log.info("DateSerializer::BitSetSerializer::src" + src); log.info("-BitSetSerializer end"); return null; } } Not sure this is really going to work, but worth a try. Thanks! Shaun -- 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 string bug when storing a timezone id in the datastore
I am working with timezones and I tried to store the timezone id "Etc/ GMT+12" to the datastore as a string, but it gets stored as "Etc/GMT 12". Any idea why with a valid string it decides to strip out the plus? Thanks! Shaun -- 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] Java Adwords API not compatible with AppEngine
I just heard back from the AdWords team: "Currently the Java client library is not supported on AppEngine. The classes that the library uses are blacklisted by the AppEngine runtime (so while it may work locally, it will not work when your run it). We are hoping to look at official AppEngine support sometime in the next few quarters but do not have an ETA as of yet." Any idea when you might be working on this? It's nice to be able to access all of Google's services from App Engine. Thanks! Shaun -- 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: PayPal Payflow Pro Connection Error
I am using Java, are you talking PayPalX? Doesn't that only support paypal accounts, i.e. not credit cards? If your code does work with credit cards can you post a basic example of your pay method? Thanks for the help! On Sep 23, 10:13 pm, nischalshetty wrote: > Are you on Python or Java? > > I have my app on Java and PayPal provides an official java API for > Google Appengine. It works great for me! > > -N > > On Sep 23, 6:42 pm, Shaun wrote: > > > > > I think that this is due to Google's limitation for allowing > > connections to port 443. But when I try to connect to PayPal for a > > payment I get the error: > > > "Transaction Context Errors: Message 1:: > > [FATAL]RESULT=-1&RESPMSG=Failed to connect to host Input Server > > Uri=https://pilot-payflowpro.paypal.com:443"; > > > Is there anyway around this or will this feature be available when > > Business Edition goes live? Any help is much appreciate it! > > > Thanks, > > > Shaun -- 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] PayPal Payflow Pro Connection Error
I think that this is due to Google's limitation for allowing connections to port 443. But when I try to connect to PayPal for a payment I get the error: "Transaction Context Errors: Message 1:: [FATAL]RESULT=-1&RESPMSG=Failed to connect to host Input Server Uri= https://pilot-payflowpro.paypal.com:443"; Is there anyway around this or will this feature be available when Business Edition goes live? Any help is much appreciate it! Thanks, Shaun -- 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] java.lang.NoClassDefFoundError: java.net.InetAddress is a restricted class. Trying to send email
I know I must be doing something really simple wrong here, but I followed the example (http://code.google.com/appengine/docs/java/mail/ overview.html) for sending mail through GAE and I getting: WARNING: /invoiceactions.do java.lang.NoClassDefFoundError: java.net.InetAddress is a restricted class. Please see the Google App Engine developer's guide for more details. at com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java: 51) at javax.mail.internet.InternetAddress.getLocalAddress(InternetAddress.java: 479) at javax.mail.internet.UniqueValue.getUniqueMessageIDValue(UniqueValue.java: 75) at javax.mail.internet.MimeMessage.updateHeaders(MimeMessage.java: 1933) at javax.mail.internet.MimeMessage.saveChanges(MimeMessage.java:1911) My code looks like (email addresses have been changed to protect the innocent): java.util.Properties props = new Properties(); Session session = Session.getDefaultInstance(props, null); Message msg = new MimeMessage(session); msg.setFrom(new InternetAddress("ad...@bob.com", "Admin")); msg.addRecipient(Message.RecipientType.TO, new InternetAddress("b...@bob.com", "Bob")); msg.setSubject("Invoice Payment Email"); msg.setText(writer.toString()); Transport.send(msg); pm.close(); Thanks! Shaun Any ideas? 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.
[appengine-java] Query on List where the keys are not primary
I have two entities: public class People { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key key; @Persistent private List contactmethods; } public class ContactMethod { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key key; @Persistent private String contactmethodaddress; } Every time I add a new contact method, i.e. phone number, email, etc I add an entry into the person's list so we know all of the ways we can contact them. Now, I want to find out who a person is based on one of those entries. So if I have the key for a specific contactmethod, how do I select the Person(s) to which it belongs? I have tried: javax.jdo.Query q = pm.newQuery(People.class); q.setFilter("this.contactmethods.contains(pContactMethod)"); and q.setFilter("contactmethods == pContactMethod"); q.declareImports("import com.google.appengine.api.datastore.Key"); q.declareParameters("Key pContactMethod"); List allPeople = (List) pm.newQuery(q).execute(lContactMethodKey); Where lContactMethodKey is the Key of the contact method being searched for. either way I get: javax.jdo.JDOFatalUserException: Exception converting com.appointment.datastoreobjects.peo...@2c453c47 to an internal key. Received a request to find an object of type com.appointment.datastoreobjects.People identified by com.appointment.datastoreobjects.peo...@2c453c47. This is not a valid representation of a primary key for an instance of com.appointment.datastoreobjects.People. Thanks for any insight you can give! Shaun -- 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 Not Persisting Object and No Error That I can find
I found out this was due to object references directly inside other objects, which created owned relationships. I have now removed all object references from other objects and I am using Key references where I would have otherwise used an Object. Thanks! On Aug 27, 9:37 am, Shaun wrote: > I have the following code: > > public String addBankAccountTransaction(String > lBankAccountTransactionJson) { > > log.info("\n\nBankAccountActions::addBankAccountTransaction:start"); > > GsonBuilder gsonb = new GsonBuilder(); > DateDeserializer ds = new DateDeserializer(); > gsonb.registerTypeAdapter(Date.class, ds); > GoogleKeyDeserializer gkd = new GoogleKeyDeserializer(); > gsonb.registerTypeAdapter(Key.class, gkd); > Gson gson = gsonb.create(); > > BankAccountTransaction lBankAccountTransaction = > gson.fromJson(lBankAccountTransactionJson, > BankAccountTransaction.class); > > PersistenceManager pm = > PMF.getSecond().getPersistenceManager(); > > Transaction tx = pm.currentTransaction(); > > try { > tx.begin(); > pm.makePersistent(lBankAccountTransaction); > tx.commit(); > > log.info("BankAccountActions::addBankAccountTransaction:lBankAccountTransac > tion.getKey::Committed > transction"); > } catch (Exception e) { > > log.info("BankAccountActions::addBankAccountTransaction:Exception " > + e.getStackTrace()); > } finally { > if (tx.isActive()) { > > log.info("BankAccountActions::addBankAccountTransaction:lBankAccountTransac > tion.getKey::transction > FAILED!"); > tx.rollback(); > } > pm.close(); > } > > log.info("BankAccountActions::addBankAccountTransaction:lBankAccountTransac > tion.getKey() > " + lBankAccountTransaction.getKey()); > > log.info("BankAccountActions::getBankAccounts:end\n\n"); > return "ok"; > } > > It throws no error, but the makePersistent doesn't seem to complete/ > work and the key is subsequently null and it doesn't show up in the > datastoreviewer so I assume it's not there. Maybe I don't have logging > setup correctly, my logging.properties looks like: > > java.util.logging.ConsoleHandler.formatter = > java.util.logging.SimpleFormatter > > # Set the default logging level for INFO loggers to WARNING > .level = INFO > > # Set the default logging level for ORM, specificFINEy, to INFO > DataNucleus.JDO.level=INFO > DataNucleus.Persistence.level=FINE > DataNucleus.Cache.level=INFO > DataNucleus.MetaData.level=INFO > DataNucleus.General.level=INFO > DataNucleus.Utility.level=INFO > DataNucleus.Transaction.level=FINE > DataNucleus.Datastore.level=FINE > DataNucleus.ClassLoading.level=INFO > DataNucleus.Plugin.level=INFO > DataNucleus.ValueGeneration.level=INFO > DataNucleus.Enhancer.level=INFO > DataNucleus.SchemaTool.level=INFO > > Any ideas why this isn't saving and why I don't see any errors? I am > using SDK 1.3.6. 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.
[appengine-java] Replace an object in the datastore with another not currently in the datastore?
This might be very obvious, but imagine you have an object in the datastore that you simply want to to replace with another, i.e. keep the same key, just replace all the field values. Is there any easy way to do this without setting each field value of the datastore object with field values of the other object? As an example I find myself doing this alot: ExpenseEntry lJsonExpenseEntry = gson.fromJson(pExpenseEntryJson, ExpenseEntry.class); ExpenseEntry lExpenseEntry = pm.getObjectById(ExpenseEntry.class, expenseKey); lExpenseEntry.setExpenseamount(lJsonExpenseEntry.getExpenseamount()); lExpenseEntry.setExpensecategory(lJsonExpenseEntry.getExpensecategory()); lExpenseEntry.setExpensedate(lJsonExpenseEntry.getExpensedate()); lExpenseEntry.setExpensename(lJsonExpenseEntry.getExpensename()); lExpenseEntry.setExpensenotes(lJsonExpenseEntry.getExpensenotes()); lExpenseEntry.setExpenseuser(lJsonExpenseEntry.getExpenseuser()); lExpenseEntry.setProjectid(lJsonExpenseEntry.getProjectid()); in order to update the datastore object, ideally I could do this all in a few lines by simply replacing the current datastore object with the new one. Maybe just removepersistence and then add it again? Thanks for the thoughts. Shaun -- 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] Datastore Not Persisting Object and No Error That I can find
I have the following code: public String addBankAccountTransaction(String lBankAccountTransactionJson) { log.info("\n\nBankAccountActions::addBankAccountTransaction:start"); GsonBuilder gsonb = new GsonBuilder(); DateDeserializer ds = new DateDeserializer(); gsonb.registerTypeAdapter(Date.class, ds); GoogleKeyDeserializer gkd = new GoogleKeyDeserializer(); gsonb.registerTypeAdapter(Key.class, gkd); Gson gson = gsonb.create(); BankAccountTransaction lBankAccountTransaction = gson.fromJson(lBankAccountTransactionJson, BankAccountTransaction.class); PersistenceManager pm = PMF.getSecond().getPersistenceManager(); Transaction tx = pm.currentTransaction(); try { tx.begin(); pm.makePersistent(lBankAccountTransaction); tx.commit(); log.info("BankAccountActions::addBankAccountTransaction:lBankAccountTransaction.getKey::Committed transction"); } catch (Exception e) { log.info("BankAccountActions::addBankAccountTransaction:Exception " + e.getStackTrace()); } finally { if (tx.isActive()) { log.info("BankAccountActions::addBankAccountTransaction:lBankAccountTransaction.getKey::transction FAILED!"); tx.rollback(); } pm.close(); } log.info("BankAccountActions::addBankAccountTransaction:lBankAccountTransaction.getKey() " + lBankAccountTransaction.getKey()); log.info("BankAccountActions::getBankAccounts:end\n\n"); return "ok"; } It throws no error, but the makePersistent doesn't seem to complete/ work and the key is subsequently null and it doesn't show up in the datastoreviewer so I assume it's not there. Maybe I don't have logging setup correctly, my logging.properties looks like: java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter # Set the default logging level for INFO loggers to WARNING .level = INFO # Set the default logging level for ORM, specificFINEy, to INFO DataNucleus.JDO.level=INFO DataNucleus.Persistence.level=FINE DataNucleus.Cache.level=INFO DataNucleus.MetaData.level=INFO DataNucleus.General.level=INFO DataNucleus.Utility.level=INFO DataNucleus.Transaction.level=FINE DataNucleus.Datastore.level=FINE DataNucleus.ClassLoading.level=INFO DataNucleus.Plugin.level=INFO DataNucleus.ValueGeneration.level=INFO DataNucleus.Enhancer.level=INFO DataNucleus.SchemaTool.level=INFO Any ideas why this isn't saving and why I don't see any errors? I am using SDK 1.3.6. 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.
[appengine-java] Query result sets are not modifiable
I have no idea how this doesn't seem to come up anywhere when I search, but for some reason when I try to add an item to a List that has been pulled out of the datastore I get this error: java.lang.UnsupportedOperationException: Query result sets are not modifiable at org.datanucleus.store.query.AbstractQueryResult.add(AbstractQueryResult.java: 221) at com.appointment.actions.ContactActions.updateContactMethods(ContactActions.java: 1186) My code looks like this: public List updateContactMethods(List pPassedContactMethods,List pDatastoreContactMethodKeys) { PersistenceManager pm = PMF.get().getPersistenceManager(); Query query = pm.newQuery(ContactMethod.class); query.setFilter("key == :keyList"); query.execute(pDatastoreContactMethodKeys); List pDataStoreContactMethods = (List) pm.newQuery(query).execute(pDatastoreContactMethodKeys); for (ContactMethod lContactMethod : pPassedContactMethods) { pDataStoreContactMethods.add(lContactMethod); } pm.close(); return pDataStoreContactMethods; } The goal is that when someone adds a new ContactMethod the system picks that up and adds it to the set of Keys reference in that Person's List contactsmethods to allow the managing of an unowned relationship. Thanks ahead of time for any help! -- 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.