[appengine-java] Accept-Encoding doesn't seem to get passed to the application
Hi I'm getting really strange behavior here where it looks as if the Accept-Encoding wouldn't get passed to the application. My request looks like this: GET /the/url HTTP/1.1 Accept-Encoding: gzip User-Agent: Jakarta Commons-HttpClient/3.1 Host: myapp.appspot.com Cookie: the cookie However the only headers I see are User-Agent, Host and Cookie. Cheers Philippe --~--~-~--~~~---~--~~ 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] Not able to upload application after adding com.google.gdata.DisableCookieHandler in appengine-web.xml file
I am using contact api in my application. According to google documents I have to add the following property in appengine-web.xml file see the link http://code.google.com/intl/zh-HK/appengine/kb/java.html#googledata When I try to upload I get the following error An internal error occurred during: "Deploying application to Google". XML error validating D:\opt\MyWorkSpace\CordysContact\war\WEB-INF \appengine-web.xml against D:\opt\Eclipse33\plugins \com.google.appengine.eclipse.sdkbundle_1.2.2.v200907131018\appengine- java-sdk-1.2.2\docs\appengine-web.xsd --~--~-~--~~~---~--~~ 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: Performance optimization of insert into datastore (cpu_ms/api_cpu_ms showing red)
Thanks for your reply. My app id is my-sree.appspot.com. I have only 1 index defined on a date property. We get 6.5 hours of cpu time each reset on a daily basis. Do both cpu_ms and api_cpu_ms gets counted for this? My app requires a lot of writes and hence I want to optimize for best performance. I have very few indexes created as well. And on a average my entity has around 10 properties. On Aug 21, 8:39 pm, Don Schwarz wrote: > What is your app id? Do you have a large number of indexes defined for this > entity kind? > > FYI, it's certainly a good idea to optimize for performance, but I wouldn't > worry too much about the particular point at which warnings appear in the > request logs. These are just guidelines to let you know which requests are > consuming the most CPU. If you're only planning to update these entities on > a fraction of your requests then the overall CPU cost should not be too > high. However, if your application is doing a lot of writes then by all > means, try to optimize this (e.g. by reducing the number of indexes, or > perhaps by reducing the number of columns if you don't query them > independently). > > On Fri, Aug 21, 2009 at 6:55 AM, sree wrote: > > > In a test app I have created, I am able to insert only 2 rows per > > request (for 1 entity with 10 properties only) into the datastore by > > using low-level api without getting any warnings for cpu_ms / > > api_cpu_ms usage. > > > However if I try to insert 3 rows or more (again only 1 entity being > > inserted), the cpu gets used for more than 1s thereby generating a > > warning or error from GAE. > > > Stats from GAE log: > > > For inserting 2 records -> /insert.do 200 77ms 655cpu_ms 643api_cpu_ms > > (everything ok) > > > For inserting 3 records -> /insert.do 200 134ms 979cpu_ms > > 964api_cpu_ms (yellow warning) > > > For inserting 10 records -> /insert.do 200 178ms 3249cpu_ms > > 3216api_cpu_ms (red warning) > > > How to optimize the ‘cpu_ms and api_cpu_ms’ usage? Can GAE perform > > only as many operations as 2 inserts into datastore if we want to keep > > within the warning levels? > > > Can you please provide some feedback as to whether I am doing anything > > wrong in code or have not used a good practice to achieve better > > performance. Thanks in advance. > > > Code in servlet (parsing and split operations have been benchmarked > > and they are not causing any adverse impact on performance): > > > Pattern p1 = Pattern.compile(","); // created as servlet instance > > variable > > > public void doPost(HttpServletRequest req, HttpServletResponse res) > > throws ServletException, IOException > > { > > try { > > > DatastoreService datastore = > > DatastoreServiceFactory.getDatastoreService(); > > List entity = new ArrayList(); > > > for (int i = 0; i < n; i++) { > > > String[] record = > > p1.split("1,tester,1.0,1.0,1.0,1.0,1.0,1.0"); > > > data1 = Long.parseLong(record[0]); > > data2 = record[1]; > > data3 = Double.parseDouble(record[2]); > > data4 = Double.parseDouble(record[3]); > > data5 = Double.parseDouble(record[4]); > > data6 = Double.parseDouble(record[5]); > > data7 = Double.parseDouble(record[6]); > > data8 = Float.parseFloat(record[7]); > > > Entity e = new > > Entity(DetailsBean.class.getSimpleName()); > > e.setProperty("column1", i); > > e.setProperty("column2", data2); > > e.setProperty("column3", i + data3); > > e.setProperty("column4", i + data4); > > e.setProperty("column5", i + data5); > > e.setProperty("column6", i + data6); > > e.setProperty("column7", i + data7); > > e.setProperty("column8", i + data8); > > e.setProperty("crDate", new Date()); > > e.setProperty("modDate", new Date()); > > > entity.add(e); > > > } > > > datastore.put(entity); > > > } catch (Exception e) { > > e.printStackTrace(); > > } finally { > > persistenceManager.close(); > > } > > } > > > Entity bean code: > > > package com.pojo; > > > import java.io.Serializable; > > import java.util.Date; > > import java.util.List; > > > import javax.jdo.annotations.IdGeneratorStrategy; > > import javax.jdo.annotations.IdentityType; > > import javax.jdo.annotations.NotPersiste
[appengine-java] Re: java.lang.IllegalStateException: Primary key for object of type xxx is null.
Ok ... a little more trial and error. See if these changes fix your issue using the reverse save method I proposed above. They fixed mine. Change Employee @Extension(vendorName="datanucleus", key="gae.encoded-pk", value="true") private String id; @Persistent @Extension(vendorName="datanucleus", key="gae.pk-id", value="true") private Long keyId; Change Evaluation @Extension(vendorName="datanucleus", key="gae.encoded-pk", value="true") private String id; @Persistent @Extension(vendorName="datanucleus", key="gae.pk-id", value="true") private Long keyId; On Aug 24, 10:37 pm, Simon Blackwell wrote: > Same issue here. The trouble seems to be in DatastoreFieldManager > > private Key getKeyForObject(Object pc) { > ApiAdapter adapter = getStoreManager().getOMFContext > ().getApiAdapter(); > Object internalPk = adapter.getTargetKeyForSingleFieldIdentity > (adapter.getIdForObject(pc)); > ObjectManager om = getObjectManager(); > AbstractClassMetaData acmd = > om.getMetaDataManager().getMetaDataForClass(pc.getClass(), > getClassLoaderResolver()); > return EntityUtils.getPkAsKey(internalPk, acmd, om); > } > > internalPk is null because adapter.getIdForObject(pc) is null > > public Object getIdForObject(Object obj) > { > if (!isPersistable(obj)) > { > return null; > } > return ((PersistenceCapable)obj).jdoGetObjectId(); <--- this > returns null > } > > The error only seems to occur when saving child objects. In the case > from the original poster, that means if the Employee were saved after > adding the Evaluation in a transient state or if the Evaluation were > added to an Employee that pointed to a persistent object, the code > would work. Of course, this means that the entire state of the > Employee would be re-saved. > > Try replacing "em.persist(evaluationBean);" with > > EmployeeBean e = evaluationBean.getEmployee(); > em.persist(e); > > However, this may result in an error "Attempt was made to manually set > the id component of a Key primary key" ... even if you have no code > that sets a primary key! If you trace into the AppEngine code you will > find this comment: > > if (key.getName() == null) { > // This means an id was provided to an incomplete Key, > // and that means the user is trying to set the id manually, > which > // we don't support. > > I'm suspicious that if you use real Keys instead of encoded strings, > stuff may work. Unfortunately, this means that the same class files > can't be used on the client and sever because GWT does not support > client side Key references. > > On Aug 12, 1:03 am, kfc wrote: > > > > > I have the same problem --~--~-~--~~~---~--~~ 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: HttpServletRequest.getLocalPort() returns 0
Thank you Gabriel. Obrigado/FilipeAlvesFerreira#4(1942) 2009/8/25 Gabriel Moreira > > Im trying this on google appengine: > > public class MyFilter implements javax.servlet.Filter { > > public void doFilter(ServletRequest servletRequest, ServletResponse > response, FilterChain filterChain) throws IOException, > ServletException { > response.getWriter().print("port " + ((HttpServletRequest) > servletRequest).getLocalPort() ); > } > } > > > Testing this local url: http://localhost:8080/test.servlet > > AppEngine is returning 8080 on HttpServletRequest.getLocalPort(). > > > Testing this remote url: http://myapp.appspot.com/test.servlet > > AppEngine is returning 0 on HttpServletRequest.getLocalPort(). > > > Anyone can test this? > > > > -- FilipeAlvesFerreira#4(1942) --~--~-~--~~~---~--~~ 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.lang.IllegalStateException: Primary key for object of type xxx is null.
Same issue here. The trouble seems to be in DatastoreFieldManager private Key getKeyForObject(Object pc) { ApiAdapter adapter = getStoreManager().getOMFContext ().getApiAdapter(); Object internalPk = adapter.getTargetKeyForSingleFieldIdentity (adapter.getIdForObject(pc)); ObjectManager om = getObjectManager(); AbstractClassMetaData acmd = om.getMetaDataManager().getMetaDataForClass(pc.getClass(), getClassLoaderResolver()); return EntityUtils.getPkAsKey(internalPk, acmd, om); } internalPk is null because adapter.getIdForObject(pc) is null public Object getIdForObject(Object obj) { if (!isPersistable(obj)) { return null; } return ((PersistenceCapable)obj).jdoGetObjectId(); <--- this returns null } The error only seems to occur when saving child objects. In the case from the original poster, that means if the Employee were saved after adding the Evaluation in a transient state or if the Evaluation were added to an Employee that pointed to a persistent object, the code would work. Of course, this means that the entire state of the Employee would be re-saved. Try replacing "em.persist(evaluationBean);" with EmployeeBean e = evaluationBean.getEmployee(); em.persist(e); However, this may result in an error "Attempt was made to manually set the id component of a Key primary key" ... even if you have no code that sets a primary key! If you trace into the AppEngine code you will find this comment: if (key.getName() == null) { // This means an id was provided to an incomplete Key, // and that means the user is trying to set the id manually, which // we don't support. I'm suspicious that if you use real Keys instead of encoded strings, stuff may work. Unfortunately, this means that the same class files can't be used on the client and sever because GWT does not support client side Key references. On Aug 12, 1:03 am, kfc wrote: > I have the same problem --~--~-~--~~~---~--~~ 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: Inheritance in JDO
> Does anyone know if JPA supports polymorphism? I've been working with JDO > because it appears to be better documented right now, but I'd switch for a > more Java-like model. JDO and JPA as specifications both support polymorphism, as does DataNucleus. The only thing missing is for GAE/J's plugin to fully support it. Why not look at the issue tracker http://code.google.com/p/datanucleus-appengine/issues/list --~--~-~--~~~---~--~~ 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] HttpServletRequest.getLocalPort() returns 0
Im trying this on google appengine: public class MyFilter implements javax.servlet.Filter { public void doFilter(ServletRequest servletRequest, ServletResponse response, FilterChain filterChain) throws IOException, ServletException { response.getWriter().print("port " + ((HttpServletRequest) servletRequest).getLocalPort() ); } } Testing this local url: http://localhost:8080/test.servlet AppEngine is returning 8080 on HttpServletRequest.getLocalPort(). Testing this remote url: http://myapp.appspot.com/test.servlet AppEngine is returning 0 on HttpServletRequest.getLocalPort(). Anyone can test this? --~--~-~--~~~---~--~~ 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: Inheritance in JDO
Does anyone know if JPA supports polymorphism? I've been working with JDO because it appears to be better documented right now, but I'd switch for a more Java-like model. Tom On Sun, Aug 23, 2009 at 7:22 AM, David Given wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > jd wrote: > [...] > > I have a structure similar to this this: > [...] > > class Zoo > > class Zebra implements Animal > > class Donkey implements Animal > [...] > > javax.jdo.JDOUserException: Field "animal" is declared as a reference > > type (interface/Object) but no implementation classes of "Animal" have > > been found! > > JDO on App Engine doesn't support polymorphism, as I understand it, > which means you have to store your Zebras and Donkeys separately. I take > it that what you want is a mixed bag of Animals of differing objects? > > The only way I found of doing that was to manually serialise my objects > and store them in Blobs. It's not as hard as it looks, as the low-level > API is quite nicely designed, but you do need to explicitly pull fields > you want indexed out of the object before serialisation and store them > as indexable properties on the entity. > > - -- > ┌─── dg@cowlark.com ─ http://www.cowlark.com ─ > │ > │ "People who think they know everything really annoy those of us who > │ know we don't." --- Bjarne Stroustrup > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iD8DBQFKkVCdf9E0noFvlzgRAmmBAJwIHs8T5Qy5t0FgQ/ik4oTdOca1rACg0Oy1 > IzwfB2MUttjgJZMdgAetr38= > =U8uT > -END PGP SIGNATURE- > > > > --~--~-~--~~~---~--~~ 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] Any example for JPA One-To-Many relationship
Hi there, I am struggling to implements one-to-many relationship ,but I never make it work. Does any body make any relationship based on JPA? or it is impossible on GAE / J ? 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] Re: Datanucleus + Eclipse problems
I have the same problem. And in my case it´s related to the use of the @PersistenceAware annotation. If I don´t use it, it works fine, otherwise eclipse starts an infinite loop with the enhancer. On Jul 7, 12:25 pm, Alex Rudnick wrote: > Alright, thanks for the detailed report! > > I'll try to reproduce the problem and figure out what's going on. > > > > On Tue, Jul 7, 2009 at 4:07 AM, Roland wrote: > > > Well, I only have one project at the time: > > I have used an Eclipse JEE Ganymede SR1 installation on Windows XP > > (SP3) I use for another project (in C:\eclipse\) and just installed > > the Google > > Plugin for Eclipse 3.4 via Software Updates -> Available Software -> > > Add Site > > (http://dl.google.com/eclipse/plugin/3.4). > > > Then I followed the GAE Guestbook tutorial and it worked fine. > > Then I switched on the GWT in the plugin and enhanced the GUI to use > > GWT > > (the result is onhttp://mbi-t1.appspot.com/). > > > During development I shared the project in my SVN repository and > > worked > > additionally on my home PC (Windows Vista SP2). There I have several > > Eclipse versions installed and for this project I used Eclipse > > Ganymede SR2 > > for plain Java (not JEE) that was installed in C:\eclipse34. > > > In the Preferences -> Google Section I found that the Google plugin > > did not > > recognize the included SDKs for GAE and GWT as valid. Therefore I > > downloaded > > both SDKs separately and put them into the SVN in parallel to the > > project > > folder. I also ensured that the SVN checkout folder was the same on > > both PCs: > > D:\JAVA. Also I configured the Google Plugin to use the separate > > SDKs on both PCs. This worked so far.. > > > In the course of the project I configured the Java compiler to use > > project specific > > settings, as such my standard Code templates, code formatter settings, > > and > > some slightly more restrictive compiler warning settings. > > > I'm not sure when it began that the Enhancer Builder ran in an endless > > loop, > > but now it is the case and I have to disable it in the project > > settings to stop > > this behavior. > > > I also had the impression that when I edit some file and store it, the > > Enhancer > > Builder did not find the class to enhance, because the edited file was > > in a > > subpackage: for example: > > edited file: src/guestbook/client/Guestbook.java > > file to be enhanced: src/guestbook/Greeting.java > > > Actually I completed the project by using ANT and used Eclipse as an > > editor only. > > > BTW: You can find the Sources on my Site: > > http://roland.blochberger.us/dl/guestbook_20090706.zip > > -- > Alex Rudnick > swe, gwt, atl --~--~-~--~~~---~--~~ 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 - key -- set the name component instead
On Jul 13, 2:16 am, Shawn Brown wrote: > Hello, > > I'm seeing "Attempt was made to manually set the id component of a Key > primary key. If you want to control the value of the primary key, set > the name component instead." > > Do I have to fetch an object before updating it? > > I'm fetching (dataClass) from the store with detachable=true > then copying the data to a bean for serialization to my GWT client > when it returns, I create a new (dataClass) instance containing the id > of the original. > > Does that make sense? > > Should be trying something > likehttp://www.datanucleus.org/products/accessplatform_1_1/jdo/attach_det... > > Thanks for your good advice! I am getting the same error in a similar, but different, scenario with JPA+DataNucleus+GAE ... I *think* it may be as a result that the PersistenceProvider believes that it is in control of the PK value allocation strategy, and not the application, and it is complaining because the app is setting the PK field (which would be a bad thing if the PP thought it was in charge of that field and it's contents)! That's what I think the route of my problem is ... sadly I am not sure how to resolve 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-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: Launching a GWT app without the hosted mode browser
Thank you! That works for me. For future reference for anyone reading this thread, this is what I did: - Go to Run -> Run Configurations... - Create a new Java Application run configuration - Use com.google.appengine.tools.KickStart as the Main class - Go to the Arguments tab - Enter "com.google.appengine.tools.development.DevAppServerMain war" (without quotes) under Program arguments - In case you are using a different directory layout, replace "war" with the right path to your war directory (relative to the project root) Miguel, I'd like to add a feature request for this. Where can I do it? Regards, -- Cafesolo On Aug 24, 11:01 am, Miguel Méndez wrote: > There is not automated support for that currently; you can however add an > enhancement request for this if you like. > What you can do, is to create your own Java Launch Configuration instead of > using the Web Application one. The new launch configuration should be able > to run just run DevAppServer directly. > > 2009/8/22 Cafesolo > > > > > > > > > Thanks Miguel. > > > I opened my project's properties, went to Google -> Web Toolkit, > > unchecked "Use Google Web Toolkit" and closed the window. Then I ran > > my application and it didn't open any of the usual GWT windows. I'm > > able to browse my app running in localhost:8080 without problems. > > > One more question: Is it possible to create two launch configurations, > > one with GWT support enabled and another for running my application > > with GWT support disabled instead of editing the project properties > > each time? > > > Regards, > > -- Cafesolo > > > On Aug 21, 10:32 am, Miguel Méndez wrote: > > > If you are using App Engine and GWT, you could: > > > >- Do a GWT compile, if your test path includes GWT code, > > >- Disable GWT on the project > > >- Launch your web application again > > > > Those changes will alter the launch to only use the devappserver without > > any > > > of the GWT stuff. > > > > If you are not using App Engine you could create a new java launch > > > configuration that launches a simple servlet container like Jetty > > pointing > > > at your war directory. > > > > 2009/8/20 Cafesolo > > > > > Miguel, > > > > > I'm still experiencing a long startup time. Is there any way to > > > > disable the hosted mode window? > > > > > Regards, > > > > -- Cafesolo > > > > > On Aug 20, 12:08 pm, Miguel Méndez wrote: > > > > > 2009/8/20 Cafesolo > > > > > > > Miguel, > > > > > > > I went to the launch configuration's GWT tab and cleared the URL > > > > > > field. Now when I launch my application the hosted browser doesn't > > > > > > show anymore, but the "Google Web Toolkit Hosted Mode" window still > > > > > > appears (this is the window with the "Hosted Mode", "Restart > > Server", > > > > > > "Collapse All", etc. buttons.) > > > > > > I also tried removing my GWT module from the "Available Modules" > > list > > > > > > in the launch configuration's GWT tab, but had the same effect. > > > > > > Any ideas? > > > > > > The hosted mode window will always start, but having no modules or > > > > browser's > > > > > active should not have a significant impact. Are you still > > experiencing > > > > a > > > > > long startup time even after removing the URL, etc? > > > > > > > Regards, > > > > > > -- Cafesolo > > > > > > > On Aug 20, 10:21 am, Miguel Méndez wrote: > > > > > > > The hosted mode browser is only launched if you specify a URL in > > the > > > > Web > > > > > > > Application launch configuration's GWT tab. If you leave it > > blank it > > > > > > should > > > > > > > have the effect that you are looking for. > > > > > > > > 2009/8/20 Cafesolo > > > > > > > > > Hi Robin, > > > > > > > > > Not exactly. Even if I hit the "compile" button, the hosted > > mode > > > > > > > > browser will still appear later when I launch the application. > > > > > > > > > I want to launch my application without opening the hosted mode > > > > > > > > browser so I can reduce the application start-up time when I'm > > > > > > > > debugging the non-GWT portions of my application. > > > > > > > > > Regards, > > > > > > > > -- Cafesolo > > > > > > > > > On Aug 20, 4:03 am, Zhi Le Zou wrote: > > > > > > > > > Hi there, > > > > > > > > > The hosted browser has a "compile" button which compiles your > > > > code > > > > > > into > > > > > > > > > javascripts, and let you view your app in the native browser. > > Is > > > > that > > > > > > > > what > > > > > > > > > you want? > > > > > > > > > > 2009/8/20 Cafesolo > > > > > > > > > > > Hello everyone! > > > > > > > > > > > I'm writing a GWT + GAE application, which has many pages, > > but > > > > only > > > > > > > > > > one actually uses GWT. > > > > > > > > > > > When I launch my application from Eclipse (using the Google > > > > plugin, > > > > > > of > > > > > > > > > > course) a hosted mode browser instance appears, which is > > fine > > > > for > > > > > > > > > > debugging the page that uses GWT. However, the hosted mode
[appengine-java] Re: Overriding default GWT blue theme
Oh, Toby, thanks :-) 2009/8/24 Toby Reyelts > [bcc google-appengine-j...@googlegroups.com] > [+google-web-tool...@googlegroups.com] > > Hey Robin, > > You'll probably get a quicker answer for this on the GWT users group. > > 2009/8/24 Zhi Le Zou > > Hi, >> As you know, the default theme is blue, i.e. the borders or tabs are all >> in blue. So is there a quick way to change the blue color into another color >> such as "green"? I mean changing everything into green wherever currently >> shown in blue. >> >> Thanks a lot. >> >> -- >> Best Regards >> Robin (邹志乐) >> >> >> > > > > -- Best Regards Robin (邹志乐) --~--~-~--~~~---~--~~ 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] Using @EmbeddedID and @Embedded with JPA ...
Has anyone managed to get @EmbeddedId with JPA to work in GAE/ DataNucleus??? @Entity public class MyEntity { //... @EmbeddedId public MyId id; } // ... @Embeddable public class MyId { //... public String id; } I'm getting an "unsupported primary key type" exception at runtime during em.flush() any thoughts? examples of working code? I am pretty sure it's pilot error ... but the documentation for this is pretty thin on the ground ... will try and isolate an actual "working" example and post that here also ... --~--~-~--~~~---~--~~ 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: Logging Levels....
On Aug 24, 8:08 pm, Toby Reyelts wrote: > The mappings for java.util.logging levels to GAE log levels are: > level >= SEVERE -> Error > level >= WARNING -> Warn > level >= INFO -> Info > else Debug > > We reserve the Critical level for errors such as escaping ServletExceptions > (e.g. errors that would cause 500s). > > So, for example, if you want to log at GAE's Debug level, you should be able > to use Level.FINE, FINER, or FINEST (or even CONFIG). Wow, this just shows how bad the jul API is. There are these level that you can't explain unless you put them all into a bag and give them a different level which doesn't exist. Cheers Philippe --~--~-~--~~~---~--~~ 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: Object manager has been closed (GAE with Spring)
For a general solution (that will work it tests and outside of tests ... and you might want to verify that the OpenPersistenceManagerInViewFilter will work on the GAE host), you'll likely need to look into "fetch groups". On Aug 24, 12:50 pm, randal wrote: > On Aug 25, 1:44 am, objectuser wrote: > > > +1 to Wagner for a better way of determining the issue. :) > > Yeah, that pretty much says it. If I'm not mistaken, JdoTemplate takes > the persistence manager from the OpenPersistenceManagerInViewFilter, > or any existing transaction. I'll check on this. --~--~-~--~~~---~--~~ 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: Problems accessing guestbook after deployment
I have same problem here. in localhost this guest book it's working. but when i uploading , and i try to open this link, it's show nothing. what i missing something? i using eclipse and i has install google plugin. - Creating staging directory Scanning for jsp files. Compiling jsp files. Compiling java files. Scanning files on local disk. Initiating update. Cloning 2 static files. Cloning 28 application files. Uploading 0 files. Deploying new version. Will check again in 1 seconds Will check again in 2 seconds Closing update: new version is ready to start serving. Uploading index definitions. Deployment completed successfully --~--~-~--~~~---~--~~ 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: Logging Levels....
The mappings for java.util.logging levels to GAE log levels are: level >= SEVERE -> Error level >= WARNING -> Warn level >= INFO -> Info else Debug We reserve the Critical level for errors such as escaping ServletExceptions (e.g. errors that would cause 500s). So, for example, if you want to log at GAE's Debug level, you should be able to use Level.FINE, FINER, or FINEST (or even CONFIG). On Mon, Aug 24, 2009 at 1:12 PM, Cliff Hill wrote: > I'm getting the impression I'm missing something ridiculously simple here. > The logging levels I see access to (which show up in the log interface in > the GAE dashboard) are: > > java.util.logger.Level.INFO -- Info > java.util.logger.Level.WARNING -- Warning > java.util.logger.Level.SEVERE -- Error > > But there also seems to be something for: > > Debug = > Critical = > > Of particular interest to me is the Debug level, as I'd love to be able to > use it if possible when I'm wanting debugging output on an app engine file, > however I'm kinda stuck here. I've looked, and it appears these are levels > in the Log4J system for apache, but if there is a way to have those other > additional levels without using Log4J, I'd like to know. > > On Sat, Aug 22, 2009 at 1:12 PM, Xlorep DarkHelm wrote: > >> >> I'm in search of a way to get the non-standard (that is, not java >> logging) levels which are apparently used in GAE/J. Like fatal, and >> debug (specifically, I'd like to use the debug level). I'm having a >> heck of a time doing this... do I need to make my own Level class >> derived from the java base one, and make my own debug and fatal levels? >> >> > > > -- > "I'm not responcabel fer my computer's spleling errnors" - Xlorep DarkHelm > Website: http://darkhelm.org > > > > > > --~--~-~--~~~---~--~~ 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: Object manager has been closed (GAE with Spring)
On Aug 25, 1:44 am, objectuser wrote: > +1 to Wagner for a better way of determining the issue. :) Yeah, that pretty much says it. If I'm not mistaken, JdoTemplate takes the persistence manager from the OpenPersistenceManagerInViewFilter, or any existing transaction. I'll check on this. --~--~-~--~~~---~--~~ 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: Error 500
Finally , thx. here i made a screen shot for maybe someone who have problem like here. what U need is following this 1. Right click on JRE System Library , and chose properties (http://i61.photobucket.com/albums/h79/hc_reborn/Step1.jpg) 2. Follow the number (http://i61.photobucket.com/albums/h79/hc_reborn/Step2.jpg) note: ignore the word "JDK [version]" lol because i made this after i finish. 3.Follow the number (again) until u can found your JDK directory (http://i61.photobucket.com/albums/h79/hc_reborn/Step3.jpg) 4.Klik Finish , and change alternate Jre into ur new what U add. For U who have problem is where is " /sign" ?? the step is easy u must change ur web.xml into like this (http://i61.photobucket.com/albums/h79/hc_reborn/Step4.jpg) for web.xml like that U can found in ( [your directory] appengine-java- sdk\demos\guestbook\war\WEB-INF). Note don't forget the name MUST SAME... --Fin--- i hope this can help other people. On Aug 24, 8:51 am, Rajeev Dayal wrote: > Hi, > You can't add a JDK by adding the JDK's bin path to your classpath. What you > need to do is go into the Java Build Path dialog, and select the "JRE System > Library" entry. Then, click "Edit". A dialog will pop up, giving you the > option to select an alternate JRE. However, you probably have not registered > the JDK you downloaded with Eclipse, so you'll have to click on the > "Installed JREs" button. You'll be presented with another dialog where > you'll be able to add your JDK, then when you go back to the previous > dialog, you can choose the JDK that you just installed. > > Let me know if you run into any trouble. > > Rajeev > > On Mon, Aug 24, 2009 at 7:58 AM, HC wrote: > > > Can U explain with picture step by step ? Sorry i have try ur > > instruction > > > " By right clicking either on the error in the Problems tab or > > by right clicking on the project in the package explorer, find Build > > path. I don't know if the next step was necessary, but under Java > > Build Path, I included a new folder and mapped a new folder to my jdk > > [version]/bin folder. Then under Libraries if you click on JRE System > > Library and then select Edit on the right, you will then be presented > > with the option of using an Alternate JRE, which is where I was able > > to select jdk[version]. " > > > i try adding JDK > >http://i61.photobucket.com/albums/h79/hc_reborn/hah.jpg > > > but still the white cross in the red box didn't went away @.@ > > > THX. --~--~-~--~~~---~--~~ 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: Object manager has been closed (GAE with Spring)
+1 to Wagner for a better way of determining the issue. :) On Aug 24, 12:25 pm, Wagner Aioffi wrote: > Hi, > > I got the same exception using the persistence manager (jpa) outside a > spring transaction. > Is it your case? > > W. > > 2009/8/24 randal > > > > > On Aug 24, 4:44 am, objectuser wrote: > > > Do you get it when you're trying to walk the graph on an object? If > > > you add that property to the defaultFetchGroup does it fix it? > > > I'm not sure I got that. What I do with the test, I call on a DAO > > object that uses JdoTemplate to accomplish its task. Then, I invoke a > > JdoTemplate from within my test case built around the same > > PersistenceManagerFactory to help me check on the side effects of the > > data access method I'm testing--asserting states, etc. --~--~-~--~~~---~--~~ 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: Logging Levels....
I'm getting the impression I'm missing something ridiculously simple here. The logging levels I see access to (which show up in the log interface in the GAE dashboard) are: java.util.logger.Level.INFO -- Info java.util.logger.Level.WARNING -- Warning java.util.logger.Level.SEVERE -- Error But there also seems to be something for: Debug = Critical = Of particular interest to me is the Debug level, as I'd love to be able to use it if possible when I'm wanting debugging output on an app engine file, however I'm kinda stuck here. I've looked, and it appears these are levels in the Log4J system for apache, but if there is a way to have those other additional levels without using Log4J, I'd like to know. On Sat, Aug 22, 2009 at 1:12 PM, Xlorep DarkHelm wrote: > > I'm in search of a way to get the non-standard (that is, not java > logging) levels which are apparently used in GAE/J. Like fatal, and > debug (specifically, I'd like to use the debug level). I'm having a > heck of a time doing this... do I need to make my own Level class > derived from the java base one, and make my own debug and fatal levels? > > > -- "I'm not responcabel fer my computer's spleling errnors" - Xlorep DarkHelm Website: http://darkhelm.org --~--~-~--~~~---~--~~ 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: Object manager has been closed (GAE with Spring)
Hi, I got the same exception using the persistence manager (jpa) outside a spring transaction. Is it your case? W. 2009/8/24 randal > > On Aug 24, 4:44 am, objectuser wrote: > > Do you get it when you're trying to walk the graph on an object? If > > you add that property to the defaultFetchGroup does it fix it? > > I'm not sure I got that. What I do with the test, I call on a DAO > object that uses JdoTemplate to accomplish its task. Then, I invoke a > JdoTemplate from within my test case built around the same > PersistenceManagerFactory to help me check on the side effects of the > data access method I'm testing--asserting states, etc. > > > --~--~-~--~~~---~--~~ 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: Error creating JDO PersistanceManagerFactory with "transactions-optional"
Filed as http://code.google.com/p/googleappengine/issues/detail?id=2019 On Thu, Aug 20, 2009 at 10:15 PM, Geoff Denning wrote: > > They are hidden at the OS level, which seems to hide them in Eclipse > as well. > > On Aug 19, 9:08 am, Miguel Méndez wrote: > > Are these directories hidden at the OS level or at the eclipse level > (like a > > derived folder)? > > > > > > > > > > > > On Wed, Aug 19, 2009 at 11:52 AM, Rajeev Dayal > wrote: > > > Glad that everything is working for you. The deployment process does > indeed > > > grab everything under the war directory, including those that are > hidden. > > > However, I think it's a reasonable option to ignore hidden directories > > > during an application upload. I've added Miguel and Don to this thread > so > > > they can weigh in on this. > > > > > On Wed, Aug 19, 2009 at 2:27 AM, Geoff Denning > wrote: > > > > >> Hi Rajeev, > > > > >> I finally just figured out what was causing my app to fail, thanks to > > >> your help. I looked at the stack trace more closely, and noticed this > > >> near the end: > > > > >> Caused by: org.datanucleus.exceptions.NucleusException: Plugin > > >> (Bundle) "org.datanucleus" is already registered. Ensure you dont have > > >> multiple JAR versions of the same plugin in the classpath. The URL > > >> "file:/base/data/home/apps/taskpathapp/1-2.335721585450873497/WEB-INF/ > > >> lib/_sgbak/datanucleus-core-1.1.0.jar. > > >> 22581.1.2009-07-13.20-12-57.3906" is already registered, and you are > > >> trying to register an identical plugin located at URL > "file:/base/data/ > > >> home/apps/taskpathapp/1-2.335721585450873497/WEB-INF/lib/datanucleus- > > >> core-1.1.4-gae.jar." > > > > >> The reason for this is that I am using SourceGear Vault for source > > >> code control, which creates a hidden directory called _sgbak in the > > >> working directory whenever a file is overwritten. Apparently one of > > >> those files was an old version of the datanucleus-core jar, and > > >> Eclipse (or perhaps the GWT plugin) seems to include hidden > > >> directories when compiling and/or uploading to Google App Engine. > > >> After deleting these directories (and instructing Vault to put them in > > >> a separate folder) everything is working perfectly. Thanks a million > > >> for your help. > > > > >> On Aug 14, 8:39 am, Rajeev Dayal wrote: > > >> > Hi Geoff, > > >> > Your classpaths look correct. The only thing somewhat suspect is > that > > >> you > > >> > have xercesImpl.jar in your war/WEB-INF/lib folder, and > gwt-gears.jar > > >> > contains a set of Xerces classes itself. However, if you had this > > >> working > > >> > before you upgraded the App Engine SDK, there is no reason as to why > it > > >> > would break now. > > > > >> > Can you verify that the timestamp on gwt-servlet.jar matches that of > the > > >> > gwt-servlet.jar distributed with GWT 1.7.0? > > > > >> > Also, do you mind pasting the exact stack trace? You mentioned that > it > > >> is > > >> > the same as the one that Clint posted. However, you mentioned a > > >> > NoClassDefFound error, and that wasn't listed in Clint's stack > trace. > > > > >> > Thanks, > > >> > Rajeev > > > > -- > > Miguel > > > --~--~-~--~~~---~--~~ 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: Updating to Eclipse Galileo issues/problems
The fact that it did not complain at the outset is odd. Just to be clear, you restarted Eclipse, and the error showed up right away, or did you do anything else? Do you have the "Build Automatically" option checked? On Sat, Aug 22, 2009 at 7:33 AM, jack wrote: > > Thanks for post... it solved the same issue I was having. > > Originally I had gwtext.jar as an external jar, but eclipse did not > complain at the outset. When I restarted the workspace, it complained > as above. > > On Aug 17, 11:08 am, Rajeev Dayal wrote: > > Hi Pion, > > I'm glad that everything seems to be working now. Just to be clear, your > > Java build path should have a Classpath Container called "App Engine > SDK". > > None of the entries within that container should point to the libraries > in > > your war/WEB-INF/lib folder. > > > > Whenever the SDK jars are not in sync with the jars in your > war/WEB-INF/lib > > folder, you should see a warning message. If you select that message and > hit > > CTRL-1, that will give you the option to "fix" the problem by syncing up > the > > jars - i.e. copying them to your war/WEB-INF/lib folder. > > > > Thanks, > > Rajeev > > > > On Wed, Aug 12, 2009 at 7:49 PM, Pion wrote: > > > > > I am using Eclipse. My "Java Build Path" points the external jars to a > > > folder (not war/WEB-INF/lib. Per your question below, I did the > > > following: > > > > > 1. Copy the external jar files manually to the war\WEB-INF\lib > > > 2. Set my "Java Build Path Libraries" to point to the jar files > > > located in war\WEB-INF\lib. > > > > > The above steps have solved the problem. The errors go away now! > > > > > Thanks all for your help! > > > > > On Aug 12, 6:50 am, Miguel Méndez wrote: > > > > Now that the file is in war/WEB-INF/lib, does the classpath entry > point > > > to > > > > the one in war/WEB-INF/lib or does it point to the original location? > > > > Also, is there not warning on project with a quick fix? > > > > > > On Tue, Aug 11, 2009 at 5:25 PM, Pion wrote: > > > > > > > I have just copied (manually) the file to war/WEB-INF/lib. But the > > > > > error message is still there. > > > > > > > On Aug 10, 7:02 am, Jason Parekh wrote: > > > > > > Oh, that could be your problem. If you don't copy the JAR into > > > > > > war/WEB-INF/lib, it may not get bundled in your war file and > hence > > > will > > > > > be > > > > > > unavailable to the app server. > > > > > > jason > > > > > > > > On Sat, Aug 8, 2009 at 12:38 PM, Pion > wrote: > > > > > > > > > No, I did not manually copy > commons-fileupload-1.2.1-javadoc.jar to > > > > > > > the war/WEB-INF/lib directory . I just added the commons- > > > > > > > fileupload-1.2.1-javadoc.jar using "Project Properties -> Java > > > Build > > > > > > > Path -> Libraries -> Add External JARS". > > > > > > > Then, I got the classpath entry error. > > > > > > > > > On Aug 8, 9:16 am, Jason Parekh wrote: > > > > > > > > Hmm, are you placing that JAR in war/WEB-INF/lib? > > > > > > > > jason > > > > > > > > > > On Sat, Aug 8, 2009 at 11:48 AM, Pion > > > wrote: > > > > > > > > > > > > > Per your suggestion below, I created a default new > project > > > > > > > > > > > (GreetingService sample) using Galileo. It ran fine > without > > > any > > > > > > > error > > > > > > > > > > > and the Galileo "Markers" tab does not show any error. > > > > > > > > > > > I just added external jar > commons-fileupload-1.2.1-javadoc.jar > > > to > > > > > this > > > > > > > > > GreetingService sample. It does produce the error "2. > Google > > > Web > > > > > App > > > > > > > > > Problem -- The following classpath entry > 'D:\download\commons- > > > > > > > > > fileupload-1.2.1\lib\commons-fileupload-1.2.1-javadoc.jar' > will > > > not > > > > > be > > > > > > > > > available on the server's classpath ". > > > > > > > > > > > On Aug 8, 8:20 am, Pion wrote: > > > > > > > > > > One more thing ... I did clean the project. The errors > still > > > show > > > > > up. > > > > > > > > > > > > On Aug 8, 8:17 am, Pion wrote: > > > > > > > > > > > > > Thanks for looking into this problem. > > > > > > > > > > > > > Yes, the Galileo " Project Properties -> Java Build > Path -> > > > > > > > Libraries" > > > > > > > > > > > shows the JRE, App Engine SDK 1.2.2, GWT SDK 1.7.0 and > some > > > my > > > > > > > > > > > external jars (for example, > > > > > commons-fileupload-1.2.1-javadoc.jar). > > > > > > > > > > > > > I did the following this morning: > > > > > > > > > > > > > 1. Installed Galileo ( > > > > > > >http://www.eclipse.org/downloads/download.php? > > > > > file=/technology/epp/downloads/release/galileo/R/eclipse-jee-galileo- > > > > > > > > > > > win32.zip) from scratch. > > > > > > > > > > > 2. Followed "Google Plugin for Eclipse 3.5 (Galileo) > > > > > Installation > > > > > > > > > > > Instructions" > > > > > > > > > > http://code.google.com/eclipse/docs/install-eclipse-3.5.html > > > > > > > > > > > 3. Imported my previous project/app created by Eclipse > 3.4 > > > > > > >
[appengine-java] Re: Error 500
Hi, You can't add a JDK by adding the JDK's bin path to your classpath. What you need to do is go into the Java Build Path dialog, and select the "JRE System Library" entry. Then, click "Edit". A dialog will pop up, giving you the option to select an alternate JRE. However, you probably have not registered the JDK you downloaded with Eclipse, so you'll have to click on the "Installed JREs" button. You'll be presented with another dialog where you'll be able to add your JDK, then when you go back to the previous dialog, you can choose the JDK that you just installed. Let me know if you run into any trouble. Rajeev On Mon, Aug 24, 2009 at 7:58 AM, HC wrote: > > Can U explain with picture step by step ? Sorry i have try ur > instruction > > " By right clicking either on the error in the Problems tab or > by right clicking on the project in the package explorer, find Build > path. I don't know if the next step was necessary, but under Java > Build Path, I included a new folder and mapped a new folder to my jdk > [version]/bin folder. Then under Libraries if you click on JRE System > Library and then select Edit on the right, you will then be presented > with the option of using an Alternate JRE, which is where I was able > to select jdk[version]. " > > i try adding JDK > http://i61.photobucket.com/albums/h79/hc_reborn/hah.jpg > > > but still the white cross in the red box didn't went away @.@ > > THX. > > > --~--~-~--~~~---~--~~ 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: Overriding default GWT blue theme
[bcc google-appengine-j...@googlegroups.com] [+google-web-tool...@googlegroups.com] Hey Robin, You'll probably get a quicker answer for this on the GWT users group. 2009/8/24 Zhi Le Zou > Hi, > As you know, the default theme is blue, i.e. the borders or tabs are all in > blue. So is there a quick way to change the blue color into another color > such as "green"? I mean changing everything into green wherever currently > shown in blue. > > Thanks a lot. > > -- > Best Regards > Robin (邹志乐) > > > > --~--~-~--~~~---~--~~ 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] Google Internet Authority Issuer and appspot.com
With the Google App Engine, one must use https://.appspot.com for SSL. With Google, the issuer is the "Google Internet Authority". I accept this, however when one uses VeriSign as the issuer, they're allowed to display a "VeriSign Secured" logo. This logo can also be clicked to to trigger a confirmation or verification event. Basically, it makes the users feel a bit more secure about submitting personal information and that there actually is an SSL connection. Is it possible that the Google App Engine already has a feature like this? If not, would it be possible for them to develop one? Thank you, Jeff --~--~-~--~~~---~--~~ 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] JDO request IN
Hi, there is any way to do an IN clause in a JDO request thanks for your 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-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 request IN
An IN clause ? you mean you pass in a parameter ("inputParam") that is a Collection and then say something like this ? inputParam.contains(someFieldOfMyClass) That's Java, so is JDOQL. --~--~-~--~~~---~--~~ 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] Overriding default GWT blue theme
Hi, As you know, the default theme is blue, i.e. the borders or tabs are all in blue. So is there a quick way to change the blue color into another color such as "green"? I mean changing everything into green wherever currently shown in blue. Thanks a lot. -- Best Regards Robin (邹志乐) --~--~-~--~~~---~--~~ 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: Object manager has been closed (GAE with Spring)
On Aug 24, 4:44 am, objectuser wrote: > Do you get it when you're trying to walk the graph on an object? If > you add that property to the defaultFetchGroup does it fix it? I'm not sure I got that. What I do with the test, I call on a DAO object that uses JdoTemplate to accomplish its task. Then, I invoke a JdoTemplate from within my test case built around the same PersistenceManagerFactory to help me check on the side effects of the data access method I'm testing--asserting states, etc. --~--~-~--~~~---~--~~ 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: Anyone successfully redirected "naked domain" to their "www" domain with NetworkSolutions?
After a lot of research, and some awful tech support from Network Solutions, I decided to move to another domain registrar. I picked NameCheap.com - the name itself does not inspire confidence but I found a lot of good reviews, and the services are good. One nice thing about them is that you can migrate to their DNS for free, ahead of time. This turned out to be the solution to my problem, because I will use their DNS for the next year until my time runs out with Network Solutions, and then formally move over domains to them at that point. Their DNS console is excellent although you have to know a little more about what you are doing. I set up a 301 redirect for the naked domain ("@") to the www subdomain needed by Google, and it works fantastically well. - Jim --~--~-~--~~~---~--~~ 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] Probleme with Relationships managed by JDO
hello, I have three objects User, Type and Announce i'm storing the User and his Type (relation one to one) i want to store a new Announce and in the same time affect the persisted User to the new announce but i have an exception like javax.jdo.JDOFatalUserException: Detected attempt to establish Announce (3) as the parent of User(1) but the entity identified by User(1) has already been persisted without a parent. A parent cannot be established or changed once an object has been persisted. --~--~-~--~~~---~--~~ 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: Launching a GWT app without the hosted mode browser
There is not automated support for that currently; you can however add an enhancement request for this if you like. What you can do, is to create your own Java Launch Configuration instead of using the Web Application one. The new launch configuration should be able to run just run DevAppServer directly. 2009/8/22 Cafesolo > > Thanks Miguel. > > I opened my project's properties, went to Google -> Web Toolkit, > unchecked "Use Google Web Toolkit" and closed the window. Then I ran > my application and it didn't open any of the usual GWT windows. I'm > able to browse my app running in localhost:8080 without problems. > > One more question: Is it possible to create two launch configurations, > one with GWT support enabled and another for running my application > with GWT support disabled instead of editing the project properties > each time? > > Regards, > -- Cafesolo > > On Aug 21, 10:32 am, Miguel Méndez wrote: > > If you are using App Engine and GWT, you could: > > > >- Do a GWT compile, if your test path includes GWT code, > >- Disable GWT on the project > >- Launch your web application again > > > > Those changes will alter the launch to only use the devappserver without > any > > of the GWT stuff. > > > > If you are not using App Engine you could create a new java launch > > configuration that launches a simple servlet container like Jetty > pointing > > at your war directory. > > > > 2009/8/20 Cafesolo > > > > > > > > > > > > > > > > > Miguel, > > > > > I'm still experiencing a long startup time. Is there any way to > > > disable the hosted mode window? > > > > > Regards, > > > -- Cafesolo > > > > > On Aug 20, 12:08 pm, Miguel Méndez wrote: > > > > 2009/8/20 Cafesolo > > > > > > > Miguel, > > > > > > > I went to the launch configuration's GWT tab and cleared the URL > > > > > field. Now when I launch my application the hosted browser doesn't > > > > > show anymore, but the "Google Web Toolkit Hosted Mode" window still > > > > > appears (this is the window with the "Hosted Mode", "Restart > Server", > > > > > "Collapse All", etc. buttons.) > > > > > I also tried removing my GWT module from the "Available Modules" > list > > > > > in the launch configuration's GWT tab, but had the same effect. > > > > > Any ideas? > > > > > > The hosted mode window will always start, but having no modules or > > > browser's > > > > active should not have a significant impact. Are you still > experiencing > > > a > > > > long startup time even after removing the URL, etc? > > > > > > > Regards, > > > > > -- Cafesolo > > > > > > > On Aug 20, 10:21 am, Miguel Méndez wrote: > > > > > > The hosted mode browser is only launched if you specify a URL in > the > > > Web > > > > > > Application launch configuration's GWT tab. If you leave it > blank it > > > > > should > > > > > > have the effect that you are looking for. > > > > > > > > 2009/8/20 Cafesolo > > > > > > > > > Hi Robin, > > > > > > > > > Not exactly. Even if I hit the "compile" button, the hosted > mode > > > > > > > browser will still appear later when I launch the application. > > > > > > > > > I want to launch my application without opening the hosted mode > > > > > > > browser so I can reduce the application start-up time when I'm > > > > > > > debugging the non-GWT portions of my application. > > > > > > > > > Regards, > > > > > > > -- Cafesolo > > > > > > > > > On Aug 20, 4:03 am, Zhi Le Zou wrote: > > > > > > > > Hi there, > > > > > > > > The hosted browser has a "compile" button which compiles your > > > code > > > > > into > > > > > > > > javascripts, and let you view your app in the native browser. > Is > > > that > > > > > > > what > > > > > > > > you want? > > > > > > > > > > 2009/8/20 Cafesolo > > > > > > > > > > > Hello everyone! > > > > > > > > > > > I'm writing a GWT + GAE application, which has many pages, > but > > > only > > > > > > > > > one actually uses GWT. > > > > > > > > > > > When I launch my application from Eclipse (using the Google > > > plugin, > > > > > of > > > > > > > > > course) a hosted mode browser instance appears, which is > fine > > > for > > > > > > > > > debugging the page that uses GWT. However, the hosted mode > > > browser > > > > > is > > > > > > > > > not needed for debugging the non-GWT part of my app (which > is > > > about > > > > > > > > > 90% of the code), and it adds a lot of startup time. > > > > > > > > > > > So my question is: Can I disable the hosted mode browser > and > > > still > > > > > be > > > > > > > > > able to launch my application from Eclipse using the App > Engine > > > > > > > > > development server? I don't care if I'm not able to run the > > > page > > > > > that > > > > > > > > > uses GWT. > > > > > > > > > > > For the curious, I'm using Wicket 1.4 for the non-GWT part > of > > > the > > > > > > > > > application. > > > > > > > > > > > Regards, > > > > > > > > > -- Cafesolo > > > > > > > > > > -- > > > > > > > > Best Regards > > > > > > > > Robin (邹志乐) > > > > > > > > --
[appengine-java] Re: Error 500
Can U explain with picture step by step ? Sorry i have try ur instruction " By right clicking either on the error in the Problems tab or by right clicking on the project in the package explorer, find Build path. I don't know if the next step was necessary, but under Java Build Path, I included a new folder and mapped a new folder to my jdk [version]/bin folder. Then under Libraries if you click on JRE System Library and then select Edit on the right, you will then be presented with the option of using an Alternate JRE, which is where I was able to select jdk[version]. " i try adding JDK http://i61.photobucket.com/albums/h79/hc_reborn/hah.jpg but still the white cross in the red box didn't went away @.@ THX. --~--~-~--~~~---~--~~ 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] Cannot access field of a parent (using defaultFetchGroup)
Hi, I'm trying to use default fetch groups to obtain fields at once (not on demand) in my entity: public class Survey { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) @Extension(vendorName="datanucleus", key="gae.encoded-pk", value="true") private String idSurvey; @Persistent private String name; @Persistent private Date dateFrom; @Persistent private Date dateUntil; @Persistent private String author; @Persistent(mappedBy = "survey", defaultFetchGroup = "true") private List responseList; } public class Response { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) @Extension(vendorName="datanucleus", key="gae.encoded-pk", value="true") private String idResponse; @Persistent(defaultFetchGroup = "true") private Survey survey; //list of all Answers in this Response @Persistent(mappedBy="response", defaultFetchGroup = "true") private List answerList; } I'm getting the entities with a method in a DAO class, so I need to open and close the PM: public Object getObjectByID(Class objectClass, String objectID) { PersistenceManager pm = PMFactory.get().getPersistenceManager (); Object o = null; try { o = pm.getObjectById(objectClass, objectID); pm.retrieve(o); } catch (JDOException jdoe) { jdoe.printStackTrace(); } finally { //pm.close(); } return o; } When I fetch a Survey I can access the responseList and all fields in Responses in the list. But when I fetch a Response, although I can see the Survey (I'm using debugger in NetBeans to watch the variables), every field of the Survey (except surveyID) is null, even if it has been set before. So basically I can access child's fields after obtaining the parent, but not via versa. if I change the code in DAO to : o = pm.getObjectById(Response.class, responseID); pm.retrieve(o.getSurvey()); it works. Also, I could make it with not closing the PM - when the fields are accessed they are being refreshed. What is happening? Thank you! --~--~-~--~~~---~--~~ 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] Can't persist objects -- impossible method is called
All I'm doing is persisting an entity in the datastore. No biggie. And now I get this super weird error. What is the deal here? I have no idea how to fix this, especially when the stack trace says that some code is calling some code "which should be impossible." Has anyone run into this problem and / or know how to fix? The culprit code: Message message = new Message(); message.setActionPlan(actionPlan.getKey()); message.setBody(new Text(body)); message.setCoach(actionPlan.getActionPlanScript()); message.setCoachName(actionPlanScript.getName()); message.setMedium(Notifications.Medium.ANDROID); message.setSubject(subject); message.setUser(user.getId()); messageManager.saveMessage(message); Here's the stack trace: javax.servlet.ServletContext log: Exception while dispatching incoming RPC call com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract java.lang.String com.todoroo.client.ActionPlanScriptUploadService.uploadActionPlanScript (java.lang.Long,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String)' threw an unexpected exception: org.mozilla.javascript.WrappedException: Wrapped javax.persistence.PersistenceException: Somehow org.datanucleus.sco.UnsetOwners.storeStringField() was called, which should have been impossible (SimpleShort#5) at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure (RPC.java:360) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse (RPC.java:546) 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 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.runtime.jetty.AppVersionHandlerMap.handle (AppVersionHandlerMap.java:237) 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.headerComplete (HttpConnection.java:830) at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable (RpcRequestParser.java:76) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381) at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest (JettyServletEngineAdapter.java:139) at com.google.apphosting.runtime.JavaRuntime.handleRequest (JavaRuntime.java:235) at com.google.apphosting.base.RuntimePb$EvaluationRuntime $6.handleBlockingRequest(RuntimePb.java:4823) at com.google.apphosting.base.RuntimePb$EvaluationRuntime $6.handleBlockingRequest(RuntimePb.java:4821) at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest (BlockingApplicationHandler.java:24) at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java: 359) at com.google.net.rpc.impl.Server$2.run(Server.java:820) at com.google.tracing.LocalTraceSpanRunnable.run (LocalTraceSpanRunnable.java:56) at com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan (LocalTraceSpanBuilder.java:516) at com.google.net.rpc.impl.Server.startRpc(Server.java:775) at com.google.net.rpc.impl.Server.processRequest(Server.java:348) at com.google.net.rpc.impl.ServerConnection.messageReceived (ServerConnection.java:436) at com.google.net.rpc.impl.RpcConnection.parseMessages (RpcConnection.java:319) at com.google.net.rpc.impl.RpcConnection.dataReceived (RpcC
[appengine-java] Re: I don't understand Relationships managed by JDO and Datanucleus in GAE
http://code.google.com/appengine/docs/java/datastore/relationships.html#Dependent_Children_and_Cascading_Deletes - Dependent Children and Cascading Deletes The App Engine implementation of JDO makes all owned relationships "dependent." If a parent object is deleted, all child objects are also deleted. Breaking an owned relationship by assigning a new value to the dependent field on the parent also deletes the old child. As with creating and updating objects, if you need every delete in a cascading delete to occur in a single atomic action, you must perform the delete in a transaction. -- So your: @PersistenceCapable(identityType = IdentityType.APPLICATION) public class MobilePhone implements IsSerializable { @Persistent(dependent = "false") private User creator; . is regarded as 'MobilePhone' being the owner of the 'User' what is you don't expected. If you want to keep 'non-owned' relationship between 'MobilePhone' and 'User' than the best way is simply keep the key of the User in MobilePhone and to handle is manually. @PersistenceCapable(identityType = IdentityType.APPLICATION) public class MobilePhone implements IsSerializable { @Persistent private Key creator; . --~--~-~--~~~---~--~~ 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: htmlunit
Any similar tools that one could use with GAE? On Fri, Aug 21, 2009 at 11:04 AM, Marc Guillemot wrote: > > currently not :-( > > As far as I know, there are 3 main issues: > > (1) URLStreamHandler not on white list > http://code.google.com/p/googleappengine/issues/detail?id=1384 (feel > free to star it) > (2) HttpWebConnection not supported as it uses sockets > (3) implemenation of JavaScript setTimeout, setInterval, and asynch XHR > uses threads, what is not supported by GAE > > (1) is problematic. On one side I believe that URLStreamHandler could be > white listed without problem (not the registration of protocols, just > the usage of own handler). On the other side, HtmlUnit might migrate > from URL to URI for internal usage and therefore this problem would > disappear > > (2) quite easy: write own WebConnection that use AppEngine UrlFetcher > instead > > (3) more difficult. Everything would need to run in the same thread. I > think that it is possible to achieve it preserving the execution order > but without any guarantee on the time where js code is executed. > > Cheers, > Marc. > -- > Web: http://www.efficient-webtesting.com > Blog: http://mguillem.wordpress.com > > ssprauer wrote: >> Is there a way to make htmlunit run within GAE? >> > >> > > > > > --~--~-~--~~~---~--~~ 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: Maven
Thanks Alexei, I just don't understand why Google has not pushed it to http://code.google.com/p/google-maven-repository Should be part of there release plan! On Aug 24, 5:56 am, Alexei Vidmich wrote: > I managed to setup maven descriptor so that I can build and enhance > classes. > I execute "mvn clean package" when I want to build it and it works > just fine. > > I add the following pieces to my pom.xml file at the appropriate > locations: > > 1.2.2 > [path-to-appengine-SDK] > > > > org.apache.maven.plugins > maven-antrun-plugin > 1.3 > > > process-classes > > run > > > > > name="appengine.tools.classpath" > location="$ > {appengine.sdk.dir}/lib/appengine-tools-api.jar"/> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > classpath="$ > {appengine.tools.classpath}" > > classname="com.google.appengine.tools.enhancer.EnhancerTask"/> > > > > > > > > > > > > > > > > build.classpath definition there has been copied from maven-build.xml > generated with "mvn ant:ant". Will probably have to be different for > you environment. > > AppEngine 1.2.2 libraries can be included like this: > > > com.google.appengine > appengine-api-1.0-sdk > ${appengine.version} > > > com.google.appengine > appengine-api-1.0-stubs > ${appengine.version} > test > > > com.google.appengine > appengine-api-1.0-runtime > ${appengine.version} > test > > > com.google.appengine > appengine-tools-sdk > ${appengine.version} > test > > > com.google.appengine.orm > datanucleus-appengine > 1.0.2 > > > org.datanucleus > datanucleus-jpa > 1.1.4 > > > org.apache.geronimo.specs > geronimo-jpa_3.0_spec > 1.1.1 > > > Google AppEngine 1.2.2 libraries can be found at mvnsearch.org, so the > list of repositories needs to include this: > > mvnsearch-repo > MVNSearch Maven Repository > http://www.mvnsearch.org/maven2/ >
[appengine-java] Re: How to retreive a List
It works perfectly. Thank you Cid On 6 août, 20:19, "Jason (Google)" wrote: > This may be related to the fetch group of the classes field. Try replacing > the appropriate lines in School.java with this: > @Persistent(mappedBy = "school", defaultFetchGroup = "true") > private List classes = new ArrayList(); > > Let me know if this works for you. > > - Jason > > 2009/8/4 Cédric Chevarier > > > > > Hi, > > > I have a problem with a one-to-many relationship. Here is my code > > > Class School : > > > @PersistenceCapable(identityType = IdentityType.APPLICATION) > > public class School implements IsSerializable{ > > �...@primarykey > > �...@persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) > > private Key key; > > �...@persistent > > private String name; > > �...@persistent > > private String structure; > > �...@persistent(mappedBy = "school") > > private List classes = new ArrayList(); > > //. > > } > > > Class Classe : > > > @PersistenceCapable(identityType = IdentityType.APPLICATION) > > public class Classe implements IsSerializable{ > > �...@persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) > > �...@primarykey > > private Key key; > > �...@persistent > > private String name; > > �...@persistent > > private School school; > > �...@persistent > > private String schoolName; > > // > > } > > > Code to add a Classe (it's work) > > > public String addClasse(Classe classe) { > > PersistenceManager pm = PMF.get().getPersistenceManager(); > > Key key2 = > > KeyFactory.createKey(School.class.getSimpleName(), > > classe.getSchoolName()); > > School school2 = (School) pm.getObjectById(School.class, > > key2); > > Key key = new > > KeyFactory.Builder(School.class.getSimpleName(), > > school2 > > > .getName()).addChild(Classe.class.getSimpleName(), > > classe.getName()).getKey(); > > classe.setKey(key); > > school2.addClasses(classe); > > pm.makePersistent(school2); > > pm.close(); > > return "ok"; > > } > > > Code to get all Classes (It's the problem) > > > public List getClasseSchool(String schoolName){ > > PersistenceManager pm = PMF.get().getPersistenceManager(); > > Key key = KeyFactory.createKey(School.class.getSimpleName(), > > schoolName); > > School school = (School) pm.getObjectById(School.class, > > key); > > List classeList = new ArrayList(); > > classeList = school.getClasses(); > > return classeList; > > > } > > > When I try to retreive the ClassList I have got this error : > > [ERROR] Uncaught exception escaped > > java.lang.NullPointerException: null > > > Can you help me ?? > > > Cédric > > > OS : Mac OS X 10.5 > > App Engine SDK : 1.2.2 > > GWT SDK : 1.7.0 > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---