[appengine-java] Re: Unit testing 2nd class citizen?
On Nov 21, 1:18 am, John Towell john.tow...@gmail.com wrote: I just had to do this http://groups.google.com/group/google-appengine-java/browse_thread/th... This is a bit shady to still not have been fixed. I don't see the problem here. It's the same thing with JUnit, Hamcrest and all the other test dependencies. You can use the same solution you use there like for example test scoped Maven dependencies. 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-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=.
[appengine-java] Re: XML to Object libraries and Vice Versa
Hi Few days back i asked a question that which libraries can be used to Convert Object to Xml and vice versa, and got advice to use betwixt (http://commons.apache.org/betwixt/).. I tried it and its working locally but on GAE server its not working and throwing following exception org.apache.commons.betwixt.XMLIntrospector introspect: Security manager does not allow bean info search path to be set then i suppose we can not use Betwixt on GAE. If we can then can anyone tell what i can do to make it work. If not then can you suggest any othe rlibarary which can be used. Thanks, Ravi. On Nov 8, 5:50 pm, LUAI KASSAR luai.kas...@gmail.com wrote: Use Apache betwixt ,its works on GAEhttp://commons.apache.org/betwixt/ On Sun, Nov 8, 2009 at 7:46 PM, Ravi Sharma ping2r...@gmail.com wrote: I am not sure if i understand you. Can you explain bit more, an example or link would be great. I can do normal Sax parsing but then writing code for each different kind of xml is gonna be very tidious work.So looking for some GAE supported libararies like JAXB or XMLBEAN My Requirment is as follows(in cae is there was any misunderstanding) xml order clientinfo name/name address/address /clientinfo items item namePersonName/neam quantity2/quantity price/price /item /items vendor nameMy Venod ltd/name addressABC 234/address /vendor /order and now in java if i want to get the vbendor name tehn i should be able to access it using classes directly(which will be generated compile time) Order order = SomeMarsheller.unmashel(fullxml); String vendorName = order.getVendor().getName(); My Orginal Mail was Hi, Is there any library like Apache XMLBeans/JAXB supported in Google APP Engine which can be used for converting XML to Java Object and Java Objects to XML. I checked the White lists of libraries and found that JAXB is not supported ( I have already stared the issue related to it) and Xmlbeans was not mentioned as Supported Library. I am sure lots of people here doing this normal thing to convert Java Object to XML and Vice Versa. Please Suggest some thing Ravi. On Fri, Nov 6, 2009 at 3:59 PM, rakeshv rak...@rakeshv.org wrote: I am sure lots of people here doing this normal thing to convert Java Object to XML and Vice Versa. Please Suggest some thing. The XML element/attribute pair maps quite well into the low level API Entity/properties structure. That should be all you need. Rakesh- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=.
[appengine-java] Make application available for Google Apps customers
This is less technical question and I am not sure if it can be answered. I have a Google App Engine application I would like to be used by Google Apps domains (and publish to Google Enterprise Marketplace to make it available for any Google Apps customers). However when testing I found that if I use Google Apps authentication this application is available to just one Google Apps domain and cannot be used by another. If I allow use by any Google account Google Apps customers can add this application but they are unable to sign in using their Google Apps domain account. How is this done? There are plenty of applications available (Moderator for instance) which you can hook up to any domain. Thanks, Peter -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=.
Re: [appengine-java] Re: updating object doesn't work anymore
I am not using OpenPersistenceManagerInViewFilter, but I am using Spring to create the PersistenceManager at the beginning of the a request. If am changing many objects, and I seem to have problems where they don't get stored to the datastore. I can check right before I close the PersistenceManager that they objects are dirty, but they don't seem to update the datastore. I have found a hacky workaround, that if I open and close the PersistenceManager pretty close to where I make the change, it seems to store correctly. But this has caused other bugs where I have handles to objects that are part of a closed PersistenceManager. I am not sure this helps you, but I wanted to let you know that other people are having similar problems. --Jeff On Thu, Nov 19, 2009 at 11:48 PM, datanucleus andy_jeffer...@yahoo.comwrote: Any thoughts Look at the log perhaps? since it will tell you exactly what happens (at DEBUG level), and since you present no persistence code I'm not sure what other replies you're likely to get -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=.
Re: [appengine-java] Re: A web service with security (java)
There's also Spring Security (aka Acegi). Andrey wrote: Now I can (partly) answer the question by myself :) 1) In the simplest situation it's easy to develop a stateless web service (the userName and userPassword can be passed straight into the request url). 2) To simplify the transformation of object to XML it's better to use languages like Groovy. Which groovy package can be used under the GAE is the question :). It's interesting, does everything from here https://www.ibm.com/developerworks/java/library/j-grails09168/ can be applied under GAE... Gaelyk http://gaelyk.appspot.com/ can simplify the life :). 3) Articles about usage of SOAP Service under GAE: http://blog.cloudwhiz.com/2009/09/exposing-soap-service-on-gae-part-1.html (and other parts as well...) 4) Restlet is also interesting http://wiki.restlet.org/docs_2.0/13-restlet/275-restlet/252-restlet.html -Andrey -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=.
[appengine-java] Re: java.lang.NoClassDefFoundError: com/google/appengine/api/xmpp/JID
My answers to your questions are in my post from 28. oct. I continued debugging my XMPP test app today. At first, the same error occurred. I tried Class.forName(com.google.appengine.api.xmpp.JID). That worked. And now sending XMPP also worked! To find out, what caused the problems, I added the saxon9.jar (provides services for javax.xml.xpath.XPathFactory and javax.xml.transform.TramsformerFactory). Now I got a ClassNotFoundException again! And I still get this exception even though I removed the saxon9.jar (and deployed a new version of the app and removed all other old versions). So what I did: APP1 (uses saxon9.jar): added XMPP test - ClassNotFoundException JID APP2 (created from scratch, empty lib, no saxon9.jar): XMPP test - works! APP2: small changes (just logging) - ClassNotFoundException JID APP2: a lot of testing, creating new versions, deleting old versions, ... - ClassNotFoundException JID APP1: XMPP test removed APP2: Class.forName(com.google.appengine.api.xmpp.JID) and some other testing - works! APP2: adding saxon9.jar - ClassNotFoundException JID APP2: removing saxon9.jar - ClassNotFoundException JID APP2: creating new versions, deleting old versions, ... - ClassNotFoundException JID - Claus On 27 Okt., 22:24, Jason (Google) apija...@google.com wrote: Are you still seeing this error? If so, which version of the SDK are you using? Did you change your SDK settings or update your SDK between the time when XMPP was working and when it started failing? Also, can you list the JARs in your war/WEB-INF/lib directory? - Jason On Sat, Oct 24, 2009 at 12:56 PM, lallafa claus.cla...@gmail.com wrote: I wrote a test servlet SendServlet that sends invitations and messages. Calling the servlet works fine with with the runtime. It also worked when it was uploaded to app engine the first time. But after uploading new versions the following exception is thrown: java.lang.NoClassDefFoundError: com/google/appengine/api/xmpp/JID at plapperbot.SendServlet.doPost(SendServlet.java:29) 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:238) 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:239) at com.google.apphosting.base.RuntimePb$EvaluationRuntime $6.handleBlockingRequest(RuntimePb.java:5135) at com.google.apphosting.base.RuntimePb$EvaluationRuntime $6.handleBlockingRequest(RuntimePb.java:5133) at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest (BlockingApplicationHandler.java:24) at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java: 363) at com.google.net.rpc.impl.Server$2.run(Server.java:814) 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:769) at com.google.net.rpc.impl.Server.processRequest(Server.java:351) at
[appengine-java] Re: convert JDO query to JPA
Can you post the JPA version of your entity? @Entity public class Friend { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Key key; private String lastName; public int crud; private String firstName; @Basic private CollectionKey friends; I've just built something similar, and if I pass a Key to: query.setParameter(key, key); This works correctly, though if I pass the String key to it query.setParameter(key, someLongString); what was ur query? was the query to filter on a collection? i have set the parameters against primitive members successfully but not against collection members. It returns an empty list. Could this be what is happening? no.i just retested my code to make sure i hadnt messed up. i am definitely using a Key not a string. //JPA javax.persistence.Query query = em.createQuery(select from Friend f where f.friends=:key); query.setParameter(key, user2.getKey()); return list of 0 using the *same* JPA entity code the JDO works fine //JDO javax.jdo.Query query = pm.newQuery(Friend.class); Key myKey = user2.getKey(); query.declareParameters(com.google.appengine.api.datastore.Key myKey); query.setFilter(friends == myKey); query.setOrdering(lastName ASC, firstName ASC); ListFriend friendList = (ListFriend) query.execute(myKey); return correct list Q1 can u post your JPA code so i can see what u have done differently? Q2. is mixing JPA and JDO ok? ie. JPA entity and JDO seems to work for me. Q3.how does the collection equality filter work in app engine? I have not found any docs to explain the 'voodoo' like behaviour. from what i can determine the collection filter is executed on the data store and not in the application as the unfiltered list executed the 1000 row limit. it works but i dont understand how. any help most appreciated -lp -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=.
[appengine-java] Re: Cannot retrieve value of the newly created attribute in a JDO
I have some problems with making some ArrayList attributes persistent,i wonder whether these two problem have some similarities. Would you tell me how u fixed it or can u help me to fix my own? please. On Nov 7, 4:59 pm, delightwjk delight@gmail.com wrote: I have fixed this problem. Thanks. On Nov 6, 11:05 am, delightwjk delight@gmail.com wrote: Thank you Jorge, I checked the document you mentioned, but i'm still not sure what is the reason of my issue. I added a field inJDO(Boolean successFlag), and stored several entities in datastore, I was able to see the entities with successFlag property from admin console Datastore - Data Viewer, and the values of successFlag properties were correct. The entities have the property successFlag with correct value, and the JDOclass has the corresponding field, but why I could not retrieve the values of successFlag viaJDO? Jiakuan On Nov 5, 9:57 pm, Jorge athenas...@gmail.com wrote: You may want to check the rules that apply in this case as documented at the bottom of this page:: http://code.google.com/appengine/docs/java/datastore/dataclasses.html Jorge Gonzalez On Nov 4, 8:06 am, delightwjk delight@gmail.com wrote: Hi All, I created aJDOclass, which had some attributes, and I created some CRUD operations, all of them worked correctly. Then I added a new attribute in theJDOclass, and then set value to it and persisted it as usual when I executed CRUD operations. The problem is that I cannot retrieve the value of the new attribute in program, the value is always null. But when I check the value in Datastore - Data Viewer, the value is correct. So i'm wondering why it cannot be retrieved in application. Is there some cache mechanism? Thanks in advance! Jiakuan -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=.
[appengine-java] Re: Cannot get guestbook.jsp of Guestbook app to work
I also have the same problem and i do have the jdk1.6 installed. If i copy the guestbook.jsp code inside the predefined index.html file in the eclipse the guestbook.jsp code it shows me the html code in the browser but the java functions does not work! If I do a new file named guestbook.jsp nothing works. Any other ideas please? Thank you, Andreas On Nov 15, 5:06 am, zhiw...@gmail.com zhiw...@gmail.com wrote: 1. make sure use jdk1.5 or 1.6 2. uninstall your jre , only let jdk in your computer. On Nov 15, 8:10 am, Martin martin.j.lebor...@gmail.com wrote: Hello - I'm trying to work through the Guestbook tutorial of Google App Engine tutorial. (Using Eclipse), but getting stuck at the section where I develop jsps (and then develop a guestbook.jsp) I'm able to get the project working - I can manipulate the GuestbookServlet class file to display a welcome message. However, when I attempt to incorporate the guestbook.jsp, I still only see the old display message that I wrote in GuestbookServlet. (I've recompiled, restarted Eclipse, and even restarted computer). 1) Web xml looks like: welcome-file-list welcome-fileguestbook.jsp/welcome-file /welcome-file-list 2) guestbook.jsp is pasted directly from tutorial. 3) Going to http://localhost:8080/guestbook; yields the message I coded in the GuestbookServlet 4) Going directly to:http://localhost:8080/guestbook.jspyieldsan error: Error running javac.exe compiler RequestURI=/guestbook.jsp Caused by: Error running javac.exe compiler at org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter.executeExter nalCompile (DefaultCompilerAdapter.java:473) at org.apache.tools.ant.taskdefs.compilers.JavacExternal.execute (JavacExternal.java:47) at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:931) at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:757) at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java: 382) 5) I even trimmed out all jsp code from guestbook.jsp and i get same results - get servlet message from going to /guestbook and get above error from going directly to guestbook.jsp. (And yeap, I recompiled and restarted) . Any thoguhts? Thank you very much for your help. I greatly appreciate it. Martin -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=.
[appengine-java] JDO x JPA
Hi there, What's the better suport for GAE, JDO or JPA? I see many examples in JDO so I think that it have the better support. -- Rafael Reuber MSN/Gtalk: psico.in...@gmail.com -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=.
[appengine-java] Re: Datastore Issues
The Datastore problems makes me crazy too... On Nov 22, 3:46 pm, Jeffrey Goetsch jeffg@gmail.com wrote: I have been having a lot of trouble with JDO objects not storing, or at least not storing some of the data. This has been extremely frustrating, and have thought about giving up on Appengine a few times, because my current design seems bring out all the bugs in the Datastore/Datanucleus code. Are other people also having major issues? Currently, my design starts a Data session at the beginning of the request, and then closes at the end of the request. I figured this should save all the changes that I have made to the Datastore. What I am finding is that some of the objects are being stored and other objects are not. I have managed to get most of the code working by open and closing PersistenceManager multiple times during the processing of a request. This feels very hacky, and introduces other bugs where I have a handle to an object opened in one of the early PersistenceManager, but not in the currently opened one. The project has lots of business logic unit test, which makes sure that all the objects get updated correctly per request. So, when I discover bad data in the datastore, I know it is a problem with the storing of the objects. I have made multiple attempts at simplifying the issue to post to this list, but as the code gets simpler the issues seem to go away. I am willing to share my larger code base with developers that are working on trying to fix these problems, but I don't want make a general post to everyone. Thanks, Jeffrey Goetsch -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=.
[appengine-java] Batched gets via pm.getObjectsById
Is there any particular reason that persistenceManager.getObjectsById isn't optimized to perform batch gets like the low-level API does? Seems like it would make sense and it would also make my current optimization problem easier. Context The getObjectsById function hasn't been optimized to perform a batch get, so you're just as well-off issuing multiple calls to getObjectById. If you need to issue a batch get, you'll need to use the low-level API. (http://groups.google.com/group/google-appengine-java/browse_thread/ thread/53f9acc11b6d1a84/4af4368394521b2f? lnk=gstq=newObjectIdInstance#4af4368394521b2f) -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=.
[appengine-java] Re: convert JDO query to JPA
Q2. is mixing JPA and JDO ok? ie. JPA entity and JDO seems to work for me. As per the DataNucleus docs you can define persistence with JPA metadata and persist using JDO, or define persistence using JDO metadata and persist using JPA. You definitely won't find that flexibility in any other JPA/JDO implementation. Q3.how does the collection equality filter work in app engine? I have not found any docs to explain the 'voodoo' like behaviour. I assume their interpretation of field == collectionValue is the same as collectionValue.contains(field) i.e non-standard JDOQL. When they support valid JDOQL syntax (the latter expression, in their next release IIRC) you would be strongly recommended to change to use that rather than this weirdness -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=.