[appengine-java] Is it possible to use JSF in the cloud?
hello, is it possible to develop JSF web pages (similar like ASP.NET) and then deploy them and use them in the cloud environment? greatz valentino --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: GAE UserService and other google Api (Contact, Analytics) ???
How can I pass the auth from UserService to ContactsService? I got my App to pull data using the Profiles API but that was manually entering the profiles auth Something like this: String admin = request.getUserPrincipal().getName(); ask for password... ContactsService myService = new ContactsService(Add Rich Content); myService.setUserCredentials(admin, passWd, domain, HOSTED); Yes token would be great but could not find request.getTokenOrSomething --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Compile and execute at runtime
Just to clarify, the dynamic code (the code compiled by Janino) have an intentional error. Locally I get the line number etc., which is great for the user. I cannot get this information on the app-engine. Sorry for the confusion. Albert Attard Charles de Gaullehttp://www.brainyquote.com/quotes/authors/c/charles_de_gaulle.html - The better I get to know men, the more I find myself loving dogs. 2009/8/28 Albert Attard albertatt...@gmail.com Hey Toby: Thanks for your input. Following is the stack trace for the other problem I was talking about. Locally Janino compiles this without any issues, but it's throwing the following exception when executed on the app-engine. JaninoJavaAssessorHelper compile: THROW java.security.AccessControlException: access denied (java.lang.RuntimePermission accessDeclaredMembers) at java.security.AccessControlContext.checkPermission(Unknown Source) at java.security.AccessController.checkPermission(Unknown Source) at java.lang.SecurityManager.checkPermission(Unknown Source) at java.lang.SecurityManager.checkMemberAccess(Unknown Source) at java.lang.Class.checkMemberAccess(Unknown Source) at java.lang.Class.getDeclaredClasses(Unknown Source) at org.codehaus.janino.ReflectionIClass.getDeclaredIClasses2(ReflectionIClass.java:101) at org.codehaus.janino.IClass.getDeclaredIClasses(IClass.java:252) at org.codehaus.janino.IClass.findMemberType(IClass.java:617) at org.codehaus.janino.IClass.findMemberType(IClass.java:634) at org.codehaus.janino.IClass.findMemberType(IClass.java:604) at org.codehaus.janino.UnitCompiler.findMemberType(UnitCompiler.java:8011) at org.codehaus.janino.UnitCompiler.getType2(UnitCompiler.java:4022) at org.codehaus.janino.UnitCompiler.access$102(UnitCompiler.java:3990) at org.codehaus.janino.UnitCompiler$16.visitReferenceType(UnitCompiler.java:3936) at org.codehaus.janino.Java$ReferenceType.accept(Java.java:1868) at org.codehaus.janino.UnitCompiler.getType(UnitCompiler.java:3969) at org.codehaus.janino.UnitCompiler.access$136(UnitCompiler.java:3927) at org.codehaus.janino.UnitCompiler$31.getParameterTypes(UnitCompiler.java:6674) at org.codehaus.janino.IClass$IMethod.getDescriptor(IClass.java:762) at org.codehaus.janino.IClass.getIMethods(IClass.java:180) at org.codehaus.janino.IClass.getIMethods(IClass.java:169) at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:328) at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:313) at org.codehaus.janino.UnitCompiler$3.visitPackageMemberClassDeclaration(UnitCompiler.java:286) at org.codehaus.janino.Java$PackageMemberClassDeclaration.accept(Java.java:701) at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:292) at org.codehaus.janino.UnitCompiler.compileUnit(UnitCompiler.java:270) at org.codehaus.janino.SimpleCompiler.compileToClassLoader(SimpleCompiler.java:423) at org.codehaus.janino.SimpleCompiler.cook(SimpleCompiler.java:231) at org.codehaus.janino.Cookable.cook(Cookable.java:72) at org.codehaus.janino.Cookable.cook(Cookable.java:64) at org.codehaus.janino.Cookable.cook(Cookable.java:114) at com.albertattard.askme.server.utils.JaninoJavaAssessorHelper.compile(JaninoJavaAssessorHelper.java:30) at com.albertattard.askme.server.BuilderServiceImpl.validateAssessor(BuilderServiceImpl.java:40) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.Method_$3.run(Method_.java:149) at java.security.AccessController.doPrivileged(Native Method) at com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.Method_.privilegedInvoke(Method_.java:147) at com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.Method_.invoke(Method_.java:120) 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.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:35) at
[appengine-java] Re: Compile and execute at runtime
Hey Toby: Thanks for your input. Following is the stack trace for the other problem I was talking about. Locally Janino compiles this without any issues, but it's throwing the following exception when executed on the app-engine. JaninoJavaAssessorHelper compile: THROW java.security.AccessControlException: access denied (java.lang.RuntimePermission accessDeclaredMembers) at java.security.AccessControlContext.checkPermission(Unknown Source) at java.security.AccessController.checkPermission(Unknown Source) at java.lang.SecurityManager.checkPermission(Unknown Source) at java.lang.SecurityManager.checkMemberAccess(Unknown Source) at java.lang.Class.checkMemberAccess(Unknown Source) at java.lang.Class.getDeclaredClasses(Unknown Source) at org.codehaus.janino.ReflectionIClass.getDeclaredIClasses2(ReflectionIClass.java:101) at org.codehaus.janino.IClass.getDeclaredIClasses(IClass.java:252) at org.codehaus.janino.IClass.findMemberType(IClass.java:617) at org.codehaus.janino.IClass.findMemberType(IClass.java:634) at org.codehaus.janino.IClass.findMemberType(IClass.java:604) at org.codehaus.janino.UnitCompiler.findMemberType(UnitCompiler.java:8011) at org.codehaus.janino.UnitCompiler.getType2(UnitCompiler.java:4022) at org.codehaus.janino.UnitCompiler.access$102(UnitCompiler.java:3990) at org.codehaus.janino.UnitCompiler$16.visitReferenceType(UnitCompiler.java:3936) at org.codehaus.janino.Java$ReferenceType.accept(Java.java:1868) at org.codehaus.janino.UnitCompiler.getType(UnitCompiler.java:3969) at org.codehaus.janino.UnitCompiler.access$136(UnitCompiler.java:3927) at org.codehaus.janino.UnitCompiler$31.getParameterTypes(UnitCompiler.java:6674) at org.codehaus.janino.IClass$IMethod.getDescriptor(IClass.java:762) at org.codehaus.janino.IClass.getIMethods(IClass.java:180) at org.codehaus.janino.IClass.getIMethods(IClass.java:169) at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:328) at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:313) at org.codehaus.janino.UnitCompiler$3.visitPackageMemberClassDeclaration(UnitCompiler.java:286) at org.codehaus.janino.Java$PackageMemberClassDeclaration.accept(Java.java:701) at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:292) at org.codehaus.janino.UnitCompiler.compileUnit(UnitCompiler.java:270) at org.codehaus.janino.SimpleCompiler.compileToClassLoader(SimpleCompiler.java:423) at org.codehaus.janino.SimpleCompiler.cook(SimpleCompiler.java:231) at org.codehaus.janino.Cookable.cook(Cookable.java:72) at org.codehaus.janino.Cookable.cook(Cookable.java:64) at org.codehaus.janino.Cookable.cook(Cookable.java:114) at com.albertattard.askme.server.utils.JaninoJavaAssessorHelper.compile(JaninoJavaAssessorHelper.java:30) at com.albertattard.askme.server.BuilderServiceImpl.validateAssessor(BuilderServiceImpl.java:40) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.Method_$3.run(Method_.java:149) at java.security.AccessController.doPrivileged(Native Method) at com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.Method_.privilegedInvoke(Method_.java:147) at com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.Method_.invoke(Method_.java:120) 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.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:35) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) at
[appengine-java] Re: Getting a child from it's parent
http://code.google.com/appengine/docs/java/datastore/relationships.html = Child objects are loaded from the datastore when they are accessed for the first time. If you do not access the child object on a parent object, the entity for the child object is never loaded. (The datastore interface does not support the eager loading of child objects. The datastore does not support join queries, so an implementation of eager loading wouldn't save the app a call to the datastore.) = But it works only if the parent is attached to PersistentManager (before pm.close). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Is it possible to use JSF in the cloud?
PROBLEM SOLVED! http://groups.google.de/group/google-appengine-java/web/will-it-play-in-app-engine On 28 Aug., 08:26, Valentino Hankypants f.hirs...@gmx.at wrote: hello, is it possible to develop JSF web pages (similar like ASP.NET) and then deploy them and use them in the cloud environment? greatz valentino --~--~-~--~~~---~--~~ 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] JSTL x:out message NoClassDefFoundError: VariableStack
I put the following codes to my jsp: %...@taglib prefix=x uri=http://java.sun.com/jsp/jstl/xml; % x:parse doc=${xmldoc} var=output / x:out select=$output/i18n/home/en / And I got an error message: java.lang.NoClassDefFoundError: org/apache/xpath/VariableStack I used another sample which I got from internet, and I got the same message. Do I need to download something? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Getting a child from it's parent
You have to touch child field while the parent is still managed by PersistenceManager, before detaching (pm.close). Something like: PersistenceManager pm = PMF.get().getPersistenceManager(); try { Employee e = pm.getObjectById(Employee.class, id); ContactInfo i = e.getContactInfo(); return e; } finally { pm.close(); } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: deployment issues
Look here: http://code.google.com/status/appengine It seems that GAE Java was having some problems yesterday. Error 500 suggests some problems on the server side. But I'm guessing only. --~--~-~--~~~---~--~~ 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] is not that of an entity but needs to be for this operation when persist entity
Hi, I have a web application on GAE with JPA persistence and one entity enhanced with datanucleos tool This entity compiled and jar in extra library was on WEB-INF/lib of my web application when I try to persist my Object like this code ... try { entityManagerSession.persist(oggetto); entityManagerSession.flush(); } catch (Throwable e) { throw new PersistenceException(e); } finally { } I get this error (only on GAE enviroment, because on my local development IDE work ok)... java.lang.IllegalArgumentException: Type (it.irex.stats.beans.Log) is not that of an entity but needs to be for this operation it.irex.stats.StatsHandlerGaeImpl.logStats(StatsHandlerGaeImpl.java: 41) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) java.lang.reflect.Method.invoke(Unknown Source) com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.Method_ $3.run(Method_.java:149) java.security.AccessController.doPrivileged(Native Method) com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.Method_.privilegedInvoke (Method_.java:147) com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.Method_.invoke (Method_.java:120) org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection (AopUtils.java:307) My entity bean is this: import java.io.Serializable; import java.util.Date; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; @Entity public class Log implements Serializable { /** * Entity bean JPA for persistence of log bean */ private static final long serialVersionUID = 5776764707008905528L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long logId; /** * url view (URI) */ private String uriView; /** * query string view */ private String urlParamView; public Long getLogId() { return logId; } public void setLogId(Long logId) { this.logId = logId; } public String getUriView() { return uriView; } public void setUriView(String uriView) { this.uriView = uriView; } public String getUrlParamView() { return urlParamView; } public void setUrlParamView(String urlParamView) { this.urlParamView = urlParamView; } } Why I get is not that of an entity but needs to be for this operation ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: is not that of an entity but needs to be for this operation when persist entity
What you mean by: -- I get this error (only on GAE enviroment, because on my local development IDE work ok)... - You mean that your code works while running on local datastore and not work after deploying to the google (production) environment ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: java.io.IOException: Unknown - using URLFetch
ping On Aug 18, 3:13 pm, Spanishgringo freeman...@gmail.com wrote: I am having a problem using GData Client for Google Analytics because most queries take longer than 5 seconds for the servers to process. As is, I usually get a networktimeoutbecause App Engine URLFetch is capped at 5 seconds. Please coordinate with the GData team (Especially for Analytics) to work out a solution. The apps should work well together but today it is impossible to support any meaningful application in App Engine using the Analytics API for Java. Thanks, Michael On Jul 16, 11:04 pm, Jason (Google) apija...@google.com wrote: Typically, when you hit the URL Fetchtimeout, you will see a more helpful and explanatory exception as opposed to Unknown. The answer to your question is not yet -- the URL Fetch deadline is fixed at 5 seconds but will be configurable in a later release --- but I don't think this is the issue here. Can you share the URL that you're trying to fetch? - Jason On Wed, Jul 15, 2009 at 1:43 AM, BarberNet peterbarbe...@gmail.com wrote: Looking more into this, I suspect it is thetimeoutof 5 seconds that is preventing app engine receiving the response. Can thetimeoutbe made configuarable as in the Python SDK? (up to 10 sec) On Jul 15, 12:13 am, BarberNet peterbarbe...@gmail.com wrote: Get following error ONLY when deployed to google apps not on local development server. com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler $Connection.getHeaderField(URLFetchServiceStreamHandler.java:196) at java.net.URLConnection.getContentType(Unknown Source) at com.saucysounds.payment.MobilePayPalAPI.httpcall (MobilePayPalAPI.java:166) ... 43 more Caused by: java.io.IOException: Unknown at line producing error is: int rc = conn.getResponseCode(); taken from the following code snippet: postURL = new URL(gv_APIEndpoint); conn = (HttpURLConnection) postURL.openConnection(); logger.info(postURL.toString()); conn.setDoInput(true); conn.setDoOutput(true); conn.setRequestProperty(Content-Type, application/x-www-form- urlencoded); conn.setRequestProperty(User-Agent, agent); conn.setRequestProperty(Content-Length, String .valueOf(encodedData.length())); conn.setRequestMethod(POST); output = new DataOutputStream(conn.getOutputStream()); logger.info(encodedData); output.writeBytes(encodedData); output.flush(); output.close(); int rc = conn.getResponseCode(); logger.info(response code: +rc); if (rc != -1) { BufferedReader reader = new BufferedReader(new InputStreamReader( conn.getInputStream())); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: jdo date
Look at: http://www.jpox.org/docs/1_1/query_jdoql_methods.html But I cannot tell if it is supported in GAE plugin for DataNucleus. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: jdo date
Try also with two Date fields - the second keeping the year/month/date part only or just use a java.sql.Date ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: jdo date
Try also with two Date fields - the second keeping the year/month/date part only Something like: // Entity @Persistent private Date birthDate; @Persistent private Date birthDateOnly; public void setBirthDate(Date birthDate) { this.birthDate = birthDate; if (birthDate != null) { this.birthDateOnly = new Date(birthDate.getYear(),birthDate.getMonth (),birthDate.getDate());} } } // query ListObject... li; Query query = pm.newQuery(Object...class); query.setFilter(birthDateOnly == birthDateParam); query.declareParameters(Date birthDateParam); query.declareImports(import java.util.Date); try { li = (ListObject..) query.execute(new Date(100,10,15)); } ... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: JSTL x:out message NoClassDefFoundError: VariableStack
what was the full stack trace? you probably need to get xalan-j from the apache site I expect the JSTL XML tags are dependent on it for processing ... On Aug 28, 1:48 am, ant2legs ant2l...@gmail.com wrote: I put the following codes to my jsp: %...@taglib prefix=x uri=http://java.sun.com/jsp/jstl/xml; % x:parse doc=${xmldoc} var=output / x:out select=$output/i18n/home/en / And I got an error message: java.lang.NoClassDefFoundError: org/apache/xpath/VariableStack I used another sample which I got from internet, and I got the same message. Do I need to download something? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Datanucleus fails when commiting non-existing transaction
Thank you for the detailed bug report, Eddy. - Jason On Thu, Aug 27, 2009 at 12:25 AM, eddyd dimitrov...@gmail.com wrote: Yes, it is clear now: 1. It works if before the request there is one persisted entity of type A and in the request all entities of type A are deleted (out of transaction) and two entities of type A are persisted (out of transaction). 2. It fails if before the request entity of type A has never been persisted and in the request two entities of type A are persisted (out of transaction) - fails with the above exception. Looks like a bug (not fatal). I will add this description to the issue, I raised yesterday (issue 117). On Aug 27, 2:20 pm, eddyd dimitrov...@gmail.com wrote: I can not reproduce the problem in simple code. By the way the full- size code also works, when uploaded. Anyway it consistently fails on the development server - in one and the same way. If the above log does not say enough, I will have to investigate more. On Aug 27, 6:49 am, Jason (Google) apija...@google.com wrote: If I'm reading your logs correctly, you should be able to add both entities since you're supposedly not operating inside of a transaction. Can you post your full test code? - Jason On Tue, Aug 25, 2009 at 3:50 AM, eddyd dimitrov...@gmail.com wrote: This happens on the development server, using JPA. In the request there are: 1. transaction.begin; run query; transaction.commit; log (transaction.isActive) 2. (w/o transaction) delete entry; log(transaction.isActive) 3. (w/o transaction) add entry; log(transaction.isActive) 4. (w/o transaction) add entry; log(transaction.isActive) 5. log(transaction.isActive); close connection (i.e. close entityManager) And close connection fails, because it tries to commit a transaction, which fails because there are two entities in different entity groups - see the messages bellow. And at any point the logs show transaction.isActive::false. My question - why at close connection does it try to commit, if there is no active transaction?? == Aug 25, 2009 9:56:50 AM com.mound.flexiview.fvstory.StoryEntryRepositoryJPA list Entries INFO: story::listEntries::transaction.isActive::false Aug 25, 2009 9:56:50 AM com.mound.flexiview.fvstory.StoryEntryRepositoryJPA dele teEntries INFO: story::deleteEntries::transaction.isActive::false Aug 25, 2009 9:56:50 AM com.mound.flexiview.fvstory.StoryEntryRepositoryJPA addE ntry INFO: story::addEntry::transaction.isActive::false Aug 25, 2009 9:56:50 AM com.mound.flexiview.fvstory.StoryEntryRepositoryJPA addE ntry INFO: story::addEntry::transaction.isActive::false Aug 25, 2009 9:56:50 AM com.mound.flexiview.db.DBManagerJPA closeConnection INFO: closeConnection::transaction.isActive::false Aug 25, 2009 9:56:50 AM com.mound.flexiview.db.DBManagerJPA closeConnection WARNING: closeConnection failed (close):: javax.persistence.PersistenceException: Illegal argument at org.datanucleus.jpa.NucleusJPAHelper.getJPAExceptionForJDOException(N ucleusJPAHelper.java:214) at org.datanucleus.jpa.EntityManagerImpl.close (EntityManagerImpl.java:15 7) at org.datanucleus.store.appengine.jpa.DatastoreEntityManager.close(Data storeEntityManager.java:54) at com.mound.flexiview.db.DBManagerJPA.closeConnection(Unknown Source) at com.mound.flexiview.db.DBPhaseListener.afterPhase(Unknown Source) at com.sun.faces.lifecycle.Phase.handleAfterPhase(Phase.java: 179) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:103) ... Caused by: java.lang.IllegalArgumentException: can't operate on multiple entity groups in a single transaction. found both com.google.appengine.api.datastore.de v.localdatastoreservice$profile$entitygr...@1bd427 and com.google.appengine.api. datastore.dev.localdatastoreservice$profile$entitygr...@1054f93 at com.google.appengine.api.datastore.DatastoreApiHelper.translateError( DatastoreApiHelper.java:29) at com.google.appengine.api.datastore.DatastoreApiHelper.makeSyncCall(Da tastoreApiHelper.java:56) at com.google.appengine.api.datastore.DatastoreServiceImpl $2.run(Datasto reServiceImpl.java:169) at com.google.appengine.api.datastore.TransactionRunner.runInTransaction (TransactionRunner.java:30) at com.google.appengine.api.datastore.DatastoreServiceImpl.put (Datastore ServiceImpl.java:157) at com.google.appengine.api.datastore.DatastoreServiceImpl.put (Datastore ServiceImpl.java:137) at com.google.appengine.api.datastore.DatastoreServiceImpl.put (Datastore ServiceImpl.java:133) at
[appengine-java] Re: Cron scheduling and versions
I fairly certain that cron will only hit the defined handler for the default version. - Jason On Thu, Aug 27, 2009 at 1:35 AM, Martyn martyn.cutc...@googlemail.comwrote: I have been thinking about using versions to allow multiple concurrent JVMs. In particular I was planning to use one version to run cron tasks. Can anyone tell me (without me bothering to test!) whether the cron tasks run for all versions or only for the default version? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: How to upload larger than than 1M size file
You should be able to upload a file up to 10 MB (the maximum request size) but you won't be able to persist it in the datastore unless you split the file into 1 MB chunks (the maximum entity size). You can write the code to do this yourself, but you may also want to look at existing abstraction layers that do this for you: http://code.google.com/p/gaevfs/ - Jason On Thu, Aug 27, 2009 at 12:38 AM, Shawn wushi...@gmail.com wrote: Hi,all. How to upload larger than than 1M size file?I try to use the google plugin for eclipse to upload.But the message like this: java.io.IOException: Error posting to URL: http://appengine.google.com/api/appversion/addfile?path=WEB-INF%2Fclasses%2Fcom%2Fip%2FQQWry.Datapp_id=publicgetipversion=1; 500 ( The specified network name is no longer available. ) !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTMLHEADTITLEError Message/TITLE META http-equiv=Content-Type content=text/html; charset=UTF-8 STYLE id=L_64_1A { FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: #005a80; FONT-FAMILY: tahoma } A:hover { FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: #0d3372; FONT-FAMILY: tahoma } TD { FONT-SIZE: 8pt; FONT-FAMILY: tahoma } TD.titleBorder { BORDER-RIGHT: #955319 1px solid; BORDER-TOP: #955319 1px solid; PADDING-LEFT: 8px; FONT-WEIGHT: bold; FONT-SIZE: 12pt; VERTICAL-ALIGN: middle; BORDER-LEFT: #955319 0px solid; COLOR: #955319; BORDER-BOTTOM: #955319 1px solid; FONT-FAMILY: tahoma; HEIGHT: 35px; BACKGROUND- COLOR: #d2b87a; TEXT-ALIGN: left } TD.titleBorder_x { BORDER-RIGHT: #955319 0px solid; BORDER-TOP: #955319 1px solid; PADDING-LEFT: 8px; FONT-WEIGHT: bold; FONT-SIZE: 12pt; VERTICAL-ALIGN: middle; BORDER-LEFT: #955319 1px solid; COLOR: #978c79; BORDER-BOTTOM: #955319 1px solid; FONT-FAMILY: tahoma; HEIGHT: 35px; BACKGROUND- COLOR: #d2b87a; TEXT-ALIGN: left } .TitleDescription { FONT-WEIGHT: bold; FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: tahoma } SPAN.explain { FONT-WEIGHT: normal; FONT-SIZE: 10pt; COLOR: #934225 } SPAN.TryThings { FONT-WEIGHT: normal; FONT-SIZE: 10pt; COLOR: #934225 } .TryList { MARGIN-TOP: 5px; FONT-WEIGHT: normal; FONT-SIZE: 8pt; COLOR: black; FONT-FAMILY: tahoma } .X { BORDER-RIGHT: #955319 1px solid; BORDER-TOP: #955319 1px solid; FONT- WEIGHT: normal; FONT-SIZE: 12pt; BORDER-LEFT: #955319 1px solid; COLOR: #7b3807; BORDER-BOTTOM: #955319 1px solid; FONT-FAMILY: verdana; BACKGROUND-COLOR: #d1c2b4 } .adminList { MARGIN-TOP: 2px } /STYLE META content=MSHTML 6.00.2800.1170 name=GENERATOR/HEAD BODY bgColor=#f3f3ed TABLE cellSpacing=0 cellPadding=0 width=100% TBODY TR TD class=titleborder_x width=30 TABLE height=25 cellSpacing=2 cellPadding=0 width=25 bgColor=black TBODY TR TD class=x vAlign=center align=middleX/TD /TR /TBODY /TABLE /TD TD class=titleBorder id=L_64_2Network Access Message:SPAN class=TitleDescription The page cannot be displayed/SPAN /TD /TR /TBODY /TABLE TABLE id=spacer TBODY TR TD height=10/TD/TR/TBODY/TABLE TABLE width=400 TBODY TR TD noWrap width=25/TD TD width=400SPAN class=explainID id=L_64_3BExplanation:/ B/ID/SPANID id=L_64_4 The request timed out before the page could be retrieved. /IDBRBR BSPAN class=tryThingsID id=L_64_5BTry the following:/B/ ID/SPAN/B UL class=TryList LI id=L_64_6BRefresh page:/B Search for the page again by clicking the Refresh button. The timeout may have occurred due to Internet congestion. LI id=L_64_7BCheck spelling:/B Check that you typed the Web page address correctly. The address may have been mistyped. LI id=L_64_8BAccess from a link:/B If there is a link to the page you are looking for, try accessing the page from that link. LI id=L_64_9BContact website:/B You may want to contact the website administrator to make sure the Web page still exists. You can do this by using the e-mail address or phone number listed on the website home page. /UL ID id=L_64_10If you are still unable to view the requested page, try contacting your administrator or Helpdesk./ID BRBR /TD /TR /TBODY /TABLE TABLE id=spacerTBODYTRTD height=15/TD/TR/TBODY/TABLE TABLE width=400 TBODY TR TD noWrap width=25/TD TD width=400 id=L_64_11BTechnical Information (for support personnel)/B UL class=adminList LI id=L_64_12Error Code 64: Host not available LI id=L_64_13Background: The gateway or proxy server lost connection to the Web server. LI id=L_64_14Date: 2009-8-26 7:59:08 [GMT] LI id=L_64_15Server: cd-gateway-CT.chengdu.ecwise.com LI id=L_64_16Source: Remote server /UL /TD /TR /TBODY /TABLE /BODY /HTML at com.google.appengine.tools.admin.ServerConnection.send (ServerConnection.java:143) at com.google.appengine.tools.admin.ServerConnection.post (ServerConnection.java:95)