[appengine-java] Re: String as Primary key in JDO
Thanks Chau Huynh Regards Sahil On Jan 17, 12:32 pm, Chau Huynh cmhu...@gmail.com wrote: Queries must go with indexes (http://code.google.com/appengine/docs/java/datastore/queriesandindexe...) For the column, you can store it as lowercase/uppercase, For the display column, you can store the original value. On Sun, Jan 17, 2010 at 2:15 PM, Sahil Mahajan sahilm2...@gmail.com wrote: Isn't there any other way. I want to avoid toLowerCase(). I want String to be case insensitive for database, but while displaying String to user I would like it to conserve case.. I can compare strings through equalsIgnoreCase. But then I won't be able to make effective use of primary key. On Jan 17, 11:34 am, jd jdpatter...@gmail.com wrote: Just String#toLowerCase() the key when you store them On Jan 17, 1:11 am, sahil mahajan sahilm2...@gmail.com wrote: I am using String as primary key in JDO. But it is case sensitive. It considers name and NAME as different. Can I make it case sensitive? -- Regards Sahil Mahajan -- 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=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] String as Primary key in JDO
I am using String as primary key in JDO. But it is case sensitive. It considers name and NAME as different. Can I make it case sensitive? -- Regards Sahil Mahajan -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: String as Primary key in JDO
Isn't there any other way. I want to avoid toLowerCase(). I want String to be case insensitive for database, but while displaying String to user I would like it to conserve case.. I can compare strings through equalsIgnoreCase. But then I won't be able to make effective use of primary key. On Jan 17, 11:34 am, jd jdpatter...@gmail.com wrote: Just String#toLowerCase() the key when you store them On Jan 17, 1:11 am, sahil mahajan sahilm2...@gmail.com wrote: I am using String as primary key in JDO. But it is case sensitive. It considers name and NAME as different. Can I make it case sensitive? -- Regards Sahil Mahajan -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Problem running on datastore first time
On the server side try to print your data through System.out.println() This should be displayed on your logs. If you don't see message, then problem is in sending data to server. Otherwise you need to look into datastore. Sahil On Jan 14, 12:19 am, Jason (Google) apija...@google.com wrote: No, there is no special initialization needed when running your application for the first time in production. As Ian mentioned, please check your log output -- this should indicate what the issue is. If you have any questions about, feel free to post it here along with a full stack trace. - Jason On Mon, Jan 11, 2010 at 7:17 AM, Fugitive Steak fugitivest...@gmail.comwrote: I am trying to create a simple top score keeping app where you first enter game you want to keep top score for and number of top scores to keep track of. This is done using the simple form on http://helloworldfromfs.appspot.com/ScoreBoards.jsp but then the simple score board object is trying to be persisted to the database it blows up with Error: Server Error The server encountered an error and could not complete your request. Funny part is that it runs fine in my Eclipse IDE. Is there something special you need to do when you run your datastore for the first time on google app engine? Or is there any difference between local dev environment and online one? Is there a place where you can see the log files for this problem? I am just learning so any help will be appreciated. Thanks -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: ArrayList of children are saved without error but then cannot be read.
I don't have much idea. I saved list in database and I was not able to read list back. You can read solution to my problem at http://groups.google.com/group/google-appengine-java/browse_thread/thread/2047db275a9014a4/20cabaf1b113963c#20cabaf1b113963c You have IdentityType.APPLICATION,detachable = true So I am not sure whether my reply would help you. Regards Sahil Mahajan On Jan 14, 6:13 am, drdbuck drdb...@gmail.com wrote: Max Ross said... ...Please post your question on the Google Group for GAE Java (the link is in the App Engine Links section on the right) along with your model objects and the code you're using to query for the child objects I have been attempting to do an owned one-to-many and have followed the example here. I have also tried for more than 10 hours experimenting with sight variations (looking at other examples) and using the debugger. I save the parent with a long list of children with no erros. No matter what I do it when I query and get the parent, the child list comes back empty. My datastore now has 10s of parent records. One difference is that my fields are public. Is that the problem? I don't think it could be. Another difference is that when I use: public List chapters = new ArrayList(); When I try not using generics on the ArrayList I get the following runtime error: Jan 12, 2010 8:56:59 PM com.google.appengine.tools.development.ApiProxyLocalImpl log SEVERE: [1263329819732000] javax.servlet.ServletContext log: Exception while dispatching incoming RPC call com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract java.lang.String lt.client.GreetingService.greetServer (java.lang.String)' threw an unexpected exception: org.datanucleus.jdo.exceptions.ClassNotPersistenceCapableException: The class The class lt.server.Book is not persistable. This means that it either hasnt been enhanced, or that the enhanced version of the file is not in the CLASSPATH (or is hidden by an unenhanced version), or the Meta-Data/annotations for the class are not found. is not persistable. This means that it either hasnt been enhanced, or that the enhanced version of the file is not in the CLASSPATH (or is hidden by an unenhanced version), or the Meta-Data for the class is not found. I don't get the ClassNotPersistenceCapableException runtime error if I declare the list as: public Listlang;Chapterrang; chapters = new ArrayList〈Chapter〉 (); However, I am unable to query and get back any of the items that were in the list. I have also tried @Persistent (defaultFetchGroup = true) private Book theBook; in the child, and that gets this warning: Jan 12, 2010 8:06:34 PM org.datanucleus.store.appengine.MetaDataValidator warn WARNING: Meta-data warning for lt.server.Lyric.theBook: The datastore does not support joins and therefore cannot honor requests to place child objects in the default fetch group. The field will be fetched lazily on first access. You can modify this warning by setting the datanucleus.appengine.ignorableMetaDataBehavior property in your config. A value of NONE will silence the warning. A value of ERROR will turn the warning into an exception. To clarify the above, I think I have tried everything except private fields and a non-generic ArrayList. I have never been able to get the child records back, although I get the parent. (I have edited the above to change from Song to Book and Lyric to Chapter to agree with your example) Here is my query code: public lt.client.Song getSong(String input) { lt.client.Song result = null; Song theSong = null; PersistenceManager pm = pmfInstance.getPersistenceManager(); try { String query = select from + Song.class.getName() + where name == lastNameParam + parameters String lastNameParam ; ListSong songs = (ListSong) pm.newQuery(query).execute(input); for (Song aSong : songs) theSong = aSong; Listlt.client.Lyric ll = new ArrayListlt.client.Lyric(); if (theSong != null) { if (theSong.lyrics != null) for (Lyric l : (ListLyric)theSong.lyrics) { ll.add(new lt.client.Lyric(l.measure, l.words)); } if (ll.size() == 0) { ListString emptyLyric = new ArrayListString(); emptyLyric.add(emptyLyric); ll.add(new
[appengine-java] Re: XMPP getPresence response not valid?
Thanks using getPresence(recipientJid, fromJid).isAvailable()) solved the problem On Jan 3, 10:43 am, timzon jerome.bre...@gmail.com wrote: Yes, sorry for not providing an update earlier. My problem was that I was not passing the From Jabber Id initially used tosendtheinvitet0 .isAvailable. Doing the following fixed my problem: if (xmpp.getPresence(recipientJid, fromJid).isAvailable()) { ... On Jan 2, 11:55 am, Sahil Mahajan sahilm2...@gmail.com wrote: Hi I am facing same problem. Did you find any solution to this problem? getPresence is always returning false. On Nov 18 2009, 10:47 am, m seleron seler...@gmail.com wrote: Hi. Though it is likely already to have tried. If the state is [is not available] pleaseinviteit from GMailchat or GTalk toXMPPAddresses ([app...@appspot.com] or [anyth...@app-id.appspotchat.com],etc.) Please confirm Gtalk display thatXMPPAddresses ([app...@appspot.com] or [anyth...@app-id.appspotchat.com],etc.) is online and confirm presence status on the GppEngine side. Please refer to the following links for details ofXMPPAddresses.http://code.google.com/intl/us/appengine/docs/java/xmpp/overview.html Thanks. On 11月18日, 午前1:52, timzon jerome.bre...@gmail.com wrote: Is anybody having problem with xmpp.getPresencenot providing valid presence information for GTalk clients? Using very simple function to check the availability of a GTalk client: XMPPServicexmpp= XMPPServiceFactory.getXMPPService(); if (xmpp.getPresence(agentJid).isAvailable()) { log.info(agentJid.toString() + is available (added to list));} else { log.info(agentJid.toString() + is not available); } getPresencealways returns the same presence status for a user regardless of the user real status. I've tried this with GTalk clients on both GMail and Apps domains. The result is exactly the same. This is extremely blocking for our application as we need to validate the presence of a group of GTalk clients to determine what to do with a request. Thanks in advance for your help, Jerome. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: problem in XMPP sendMessage()
using getPresence(recipientJid, fromJid).isAvailable()) solved the problem found answer in http://groups.google.com/group/google-appengine-java/browse_thread/thread/13802bcecc63da4b/e5c17cc17e58d859?lnk=gstq=xmpp+send+invitepli=1 On Nov 30 2009, 12:51 pm, Sahil Mahajan sahilm2...@gmail.com wrote: Hello Thanks for your help Problem was in .withRecipientJids(receiverJid). When I simplified receiverjid, it works correctly Regards Sahil Mahajan On Nov 29, 12:47 pm, m seleron seler...@gmail.com wrote: Hi. I tested execution by the following source. JID jid = new JID(x...@gmail.com); // set your send gmail address Message msg = new MessageBuilder().withRecipientJids(jid) .withFromJid(new JID(x...@appspot.com) ) // set your ap...@appspot.com .withMessageType(MessageType.NORMAL) .withBody(send-message).build(); //set msg String boolean messageSent = false; XMPPServicexmpp= XMPPServiceFactory.getXMPPService(); if (xmpp.getPresence(jid).isAvailable()) { SendResponse status =xmpp.sendMessage(msg); messageSent = (status.getStatusMap().get(jid) == SendResponse.Status.SUCCESS); } I executed about ten times. My Gtalk is seem to receive it normally. Though various possibilities are thought. If it is possible Please execute it by the fixed value as much as possible to simplify a problem. Though something only has to be able to be useful. thanks. On 11月29日, 午前2:52, Sahil Mahajan sahilm2...@gmail.com wrote: I removed .withFromJid(new JID(recipientJid[0].getId()) ) but I am still facing problem. The servlet works correctly for first two messages. But problem starts when servlet receives third message. I find this strange. Initially it works fine, but gives problem from third message. Regards Sahil Mahajan On Nov 28, 8:19 pm, Ravi Sharma ping2r...@gmail.com wrote: I am not sure, but i think you dont need to(should not) set fromJid, as message will be sent from your application JID. I am running following code and its working . JID jid = new JID(responseJid); Message msg = new MessageBuilder() .withRecipientJids(jid) .withBody(msgBody) .build(); boolean messageSent = false; XMPPServicexmpp= XMPPServiceFactory.getXMPPService(); if (xmpp.getPresence(jid).isAvailable()) { SendResponse status =xmpp.sendMessage(msg); messageSent = (status.getStatusMap().get(jid) == SendResponse.Status.SUCCESS); } On Sat, Nov 28, 2009 at 2:51 PM, sahil mahajan sahilm2...@gmail.com wrote: I am usingXMPPand getting following error when I try /CODE*/ Message msg = new MessageBuilder() .withRecipientJids(receiverJid) .withFromJid(new JID(recipientJid[0].getId()) ) .withMessageType(MessageType.NORMAL) .withBody(msgBody) .build(); SendResponse status =xmpp.sendMessage(msg); My JID's are correct. msgBody is not null Problem occures atxmpp.sendMessage(msg); I don't understand what is null? /***ERROR DETAILS/ Uncaught exception from servlet java.lang.NullPointerException at com.google.appengine.api.xmpp.XMPPServiceImpl.createMessageRequest(XMPPServiceImpl.java:120) at com.google.appengine.api.xmpp.XMPPServiceImpl.sendMessage(XMPPServiceImpl.java:105) at com.ChatRoom.server.XMPPReceiverServlet.doPost(XMPPReceiverServlet.java:165) 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
[appengine-java] Re: getting wrong presence status for XMPP users
Hi I am facing same problem. Did you find any solution to this problem? getPresence is always returning false. On Dec 30 2009, 2:27 pm, Ankur stiitan...@gmail.com wrote: Hi, I have a very simple application where i sent a chat message to my application and check if user is available.But i am always getting as false. here is my code. XMPPServicexmpp= XMPPServiceFactory.getXMPPService(); Message message =xmpp.parseMessage(req); JID fromJid = message.getFromJid(); Presence p=xmpp.getPresence(fromJid); String status =p.isAvailable().toString(); I am getting status as false always. I even tried with fromJid.getId() to get user status but i get the same result. i tried with gmail chat and gtalk both.I can see my bot in my contact lists with available sign. is there any way to get the correct status or am i missing anything here. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: XMPP getPresence response not valid?
Hi I am facing same problem. Did you find any solution to this problem? getPresence is always returning false. On Nov 18 2009, 10:47 am, m seleron seler...@gmail.com wrote: Hi. Though it is likely already to have tried. If the state is [is not available] please invite it from GMailchat or GTalk toXMPPAddresses ([app...@appspot.com] or [anyth...@app-id.appspotchat.com],etc.) Please confirm Gtalk display thatXMPPAddresses ([app...@appspot.com] or [anyth...@app-id.appspotchat.com],etc.) is online and confirm presence status on the GppEngine side. Please refer to the following links for details ofXMPPAddresses.http://code.google.com/intl/us/appengine/docs/java/xmpp/overview.html Thanks. On 11月18日, 午前1:52, timzon jerome.bre...@gmail.com wrote: Is anybody having problem with xmpp.getPresencenot providing valid presence information for GTalk clients? Using very simple function to check the availability of a GTalk client: XMPPServicexmpp= XMPPServiceFactory.getXMPPService(); if (xmpp.getPresence(agentJid).isAvailable()) { log.info(agentJid.toString() + is available (added to list));} else { log.info(agentJid.toString() + is not available); } getPresencealways returns the same presence status for a user regardless of the user real status. I've tried this with GTalk clients on both GMail and Apps domains. The result is exactly the same. This is extremely blocking for our application as we need to validate the presence of a group of GTalk clients to determine what to do with a request. Thanks in advance for your help, Jerome. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: problem in retrieving arraylist from database
@datanucleus Thanks for your reply. I am new to jdo and app engine. I had no idea about fetch. I searched for it and after adding @Persistent(defaultFetchGroup = true) for arraylist my program is working according to my requirements. Thanks for your guidance @Michael Chan Thanks for your reply. arraylist is unavoidable for me. On Dec 24, 7:34 pm, datanucleus andy_jeffer...@yahoo.com wrote: Not bothered putting the List field in the fetch group, so it isn't fetched. There are many posts on this forum on how to do that -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] problem in retrieving arraylist from database
I have SomeClass which I store in database. Code for the class is /***/ @PersistenceCapable(identityType = IdentityType.APPLICATION) public class SomeClass implements Serializable { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Long id; @Persistent String val; @Persistent ArrayListString listval= new ArrayListString(); public void addlistval(String _val) { listval.add(_val); } public String getlistval(int _index) { return (String)listval.get(_index); } public void setval(String val) { this.val=val; } public String getname() { return val; } public int getCount() { return listval.size(); } } /*/ I have two functions /*/ void getSomeClassFromDatabase(String name) { SomeClass returnVal=null; PersistenceManager pm = PMF.get().getPersistenceManager(); Transaction tx = pm.currentTransaction(); try { tx.begin(); String query = select from + SomeClass.class.getName(); ListSomeClass databaseSomeClass = (ListSomeClass) pm.newQuery(query).execute(); for (SomeClass element: databaseSomeClass) { if (name.equals(element.getname())) { returnVal=element; System.out.println(found); break; } } tx.commit(); } finally { if (tx.isActive()) { tx.rollback(); } pm.close(); } System.out.println(returnVal.getval()=+returnVal.getname()); System.out.println(returnVal.getCount()=+returnVal.getCount()); for(int k=0;kreturnVal.getCount();k++) { System.out.println(listvalue=+returnVal.getlistval(k)); } } /***/ void saveSomeClassToDatabase() { SomeClass sc=new SomeClass(); sc.setval(abcd); sc.addlistval(a); sc.addlistval(b); sc.addlistval(c); PersistenceManager pm = PMF.get().getPersistenceManager(); Transaction tx = pm.currentTransaction(); try { tx.begin(); pm.makePersistent(sc); tx.commit(); } finally { if (tx.isActive()) { tx.rollback(); } pm.close(); } } } /*/ I call saveSomeClassToDatabase() and then getSomeClassFromDatabase(“abcd”) But I get result as found returnVal.getval()=abcd returnVal.getCount()=0 I am not able to get ArrayList back from database. What could be the 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-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: problem in XMPP sendMessage()
Hello Thanks for your help Problem was in .withRecipientJids(receiverJid). When I simplified receiverjid, it works correctly Regards Sahil Mahajan On Nov 29, 12:47 pm, m seleron seler...@gmail.com wrote: Hi. I tested execution by the following source. JID jid = new JID(x...@gmail.com); // set your send gmail address Message msg = new MessageBuilder().withRecipientJids(jid) .withFromJid(new JID(x...@appspot.com) ) // set your ap...@appspot.com .withMessageType(MessageType.NORMAL) .withBody(send-message).build(); //set msg String boolean messageSent = false; XMPPService xmpp = XMPPServiceFactory.getXMPPService(); if (xmpp.getPresence(jid).isAvailable()) { SendResponse status = xmpp.sendMessage(msg); messageSent = (status.getStatusMap().get(jid) == SendResponse.Status.SUCCESS); } I executed about ten times. My Gtalk is seem to receive it normally. Though various possibilities are thought. If it is possible Please execute it by the fixed value as much as possible to simplify a problem. Though something only has to be able to be useful. thanks. On 11月29日, 午前2:52, Sahil Mahajan sahilm2...@gmail.com wrote: I removed .withFromJid(new JID(recipientJid[0].getId()) ) but I am still facing problem. The servlet works correctly for first two messages. But problem starts when servlet receives third message. I find this strange. Initially it works fine, but gives problem from third message. Regards Sahil Mahajan On Nov 28, 8:19 pm, Ravi Sharma ping2r...@gmail.com wrote: I am not sure, but i think you dont need to(should not) set fromJid, as message will be sent from your application JID. I am running following code and its working . JID jid = new JID(responseJid); Message msg = new MessageBuilder() .withRecipientJids(jid) .withBody(msgBody) .build(); boolean messageSent = false; XMPPService xmpp = XMPPServiceFactory.getXMPPService(); if (xmpp.getPresence(jid).isAvailable()) { SendResponse status = xmpp.sendMessage(msg); messageSent = (status.getStatusMap().get(jid) == SendResponse.Status.SUCCESS); } On Sat, Nov 28, 2009 at 2:51 PM, sahil mahajan sahilm2...@gmail.com wrote: I am using XMPP and getting following error when I try /CODE*/ Message msg = new MessageBuilder() .withRecipientJids(receiverJid) .withFromJid(new JID(recipientJid[0].getId()) ) .withMessageType(MessageType.NORMAL) .withBody(msgBody) .build(); SendResponse status =xmpp.sendMessage(msg); My JID's are correct. msgBody is not null Problem occures at xmpp.sendMessage(msg); I don't understand what is null? /***ERROR DETAILS/ Uncaught exception from servlet java.lang.NullPointerException at com.google.appengine.api.xmpp.XMPPServiceImpl.createMessageRequest(XMPPServiceImpl.java:120) at com.google.appengine.api.xmpp.XMPPServiceImpl.sendMessage(XMPPServiceImpl.java:105) at com.ChatRoom.server.XMPPReceiverServlet.doPost(XMPPReceiverServlet.java:165) 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
[appengine-java] problem in XMPP sendMessage()
I am using XMPP and getting following error when I try /CODE*/ Message msg = new MessageBuilder() .withRecipientJids(receiverJid) .withFromJid(new JID(recipientJid[0].getId()) ) .withMessageType(MessageType.NORMAL) .withBody(msgBody) .build(); SendResponse status =xmpp.sendMessage(msg); My JID's are correct. msgBody is not null Problem occures at xmpp.sendMessage(msg); I don't understand what is null? /***ERROR DETAILS/ Uncaught exception from servlet java.lang.NullPointerException at com.google.appengine.api.xmpp.XMPPServiceImpl.createMessageRequest(XMPPServiceImpl.java:120) at com.google.appengine.api.xmpp.XMPPServiceImpl.sendMessage(XMPPServiceImpl.java:105) at com.ChatRoom.server.XMPPReceiverServlet.doPost(XMPPReceiverServlet.java:165) 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 com.google.net.rpc.impl.ServerConnection.messageReceived(ServerConnection.java:437) at com.google.net.rpc.impl.RpcConnection.parseMessages(RpcConnection.java:319) at com.google.net.rpc.impl.RpcConnection.dataReceived(RpcConnection.java:290) at com.google.net.async.Connection.handleReadEvent(Connection.java:436) at com.google.net.async.EventDispatcher.processNetworkEvents(EventDispatcher.java:762) at com.google.net.async.EventDispatcher.internalLoop(EventDispatcher.java:207) at com.google.net.async.EventDispatcher.loop(EventDispatcher.java:101) at com.google.net.rpc.RpcService.runUntilServerShutdown(RpcService.java:251) at com.google.apphosting.runtime.JavaRuntime$RpcRunnable.run(JavaRuntime.java:396) at java.lang.Thread.run(Unknown Source) -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Problem in uploading jsp file
Problem solved I found solution at comment 16 of Issue 1226 http://groups.google.com/group/google-appengine-java/browse_thread/thread/24aadd04f3ae0245 Regards Sahil On Nov 25, 11:14 pm, Sahil Mahajan sahilm2...@gmail.com wrote: Hello Stephan I am new to gae. My JAVA_HOME variable has value C:\Program Files\Java \jdk1.6.0_01 I also checked build.xml, but I could not understand where I need to mention jdk instead of jre. Can you give me some more details Regards Sahil On Nov 24, 11:00 pm, Stephan Hartmann hartm...@metamesh.de wrote: You are using a Java Runtime Environment (JRE) which does not include a compiler. You have to use a JDK instead. Regards, Stephan sahil mahajan schrieb: Hello I am working on java google app engine. When I try to upload my application, I receive following error Error Details: Nov 24, 2009 10:18:11 PM org.apache.jasper.JspC processFile INFO: Built File: \addressbook.jsp java.lang.IllegalStateException: cannot find javac executable based on java.home , tried C:\Program Files\Java\jre1.6.0_04\bin\javac.exe and C:\Program Files\ Java\bin\javac.exe Unable to upload app: cannot find javac executable based on java.home, tried C: \Program Files\Java\jre1.6.0_04\bin\javac.exe and C:\Program Files\Java\bin\ja vac.exe If I remove addressbook.jsp file, error does not occur What could be the reason? -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: problem in XMPP sendMessage()
I removed .withFromJid(new JID(recipientJid[0].getId()) ) but I am still facing problem. The servlet works correctly for first two messages. But problem starts when servlet receives third message. I find this strange. Initially it works fine, but gives problem from third message. Regards Sahil Mahajan On Nov 28, 8:19 pm, Ravi Sharma ping2r...@gmail.com wrote: I am not sure, but i think you dont need to(should not) set fromJid, as message will be sent from your application JID. I am running following code and its working . JID jid = new JID(responseJid); Message msg = new MessageBuilder() .withRecipientJids(jid) .withBody(msgBody) .build(); boolean messageSent = false; XMPPService xmpp = XMPPServiceFactory.getXMPPService(); if (xmpp.getPresence(jid).isAvailable()) { SendResponse status = xmpp.sendMessage(msg); messageSent = (status.getStatusMap().get(jid) == SendResponse.Status.SUCCESS); } On Sat, Nov 28, 2009 at 2:51 PM, sahil mahajan sahilm2...@gmail.com wrote: I am using XMPP and getting following error when I try /CODE*/ Message msg = new MessageBuilder() .withRecipientJids(receiverJid) .withFromJid(new JID(recipientJid[0].getId()) ) .withMessageType(MessageType.NORMAL) .withBody(msgBody) .build(); SendResponse status =xmpp.sendMessage(msg); My JID's are correct. msgBody is not null Problem occures at xmpp.sendMessage(msg); I don't understand what is null? /***ERROR DETAILS/ Uncaught exception from servlet java.lang.NullPointerException at com.google.appengine.api.xmpp.XMPPServiceImpl.createMessageRequest(XMPPServiceImpl.java:120) at com.google.appengine.api.xmpp.XMPPServiceImpl.sendMessage(XMPPServiceImpl.java:105) at com.ChatRoom.server.XMPPReceiverServlet.doPost(XMPPReceiverServlet.java:165) 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 com.google.net.rpc.impl.ServerConnection.messageReceived(ServerConnection.java:437
[appengine-java] Re: Problem in uploading jsp file
Hello Stephan I am new to gae. My JAVA_HOME variable has value C:\Program Files\Java \jdk1.6.0_01 I also checked build.xml, but I could not understand where I need to mention jdk instead of jre. Can you give me some more details Regards Sahil On Nov 24, 11:00 pm, Stephan Hartmann hartm...@metamesh.de wrote: You are using a Java Runtime Environment (JRE) which does not include a compiler. You have to use a JDK instead. Regards, Stephan sahil mahajan schrieb: Hello I am working on java google app engine. When I try to upload my application, I receive following error Error Details: Nov 24, 2009 10:18:11 PM org.apache.jasper.JspC processFile INFO: Built File: \addressbook.jsp java.lang.IllegalStateException: cannot find javac executable based on java.home , tried C:\Program Files\Java\jre1.6.0_04\bin\javac.exe and C:\Program Files\ Java\bin\javac.exe Unable to upload app: cannot find javac executable based on java.home, tried C: \Program Files\Java\jre1.6.0_04\bin\javac.exe and C:\Program Files\Java\bin\ja vac.exe If I remove addressbook.jsp file, error does not occur What could be the reason? -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Problem in uploading jsp file
Hello I am working on java google app engine. When I try to upload my application, I receive following error Error Details: Nov 24, 2009 10:18:11 PM org.apache.jasper.JspC processFile INFO: Built File: \addressbook.jsp java.lang.IllegalStateException: cannot find javac executable based on java.home , tried C:\Program Files\Java\jre1.6.0_04\bin\javac.exe and C:\Program Files\ Java\bin\javac.exe Unable to upload app: cannot find javac executable based on java.home, tried C: \Program Files\Java\jre1.6.0_04\bin\javac.exe and C:\Program Files\Java\bin\ja vac.exe If I remove addressbook.jsp file, error does not occur What could be the reason? -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] XMPP and JID
Hello I am using XMPP API. It looks that JID of a google account user does not remain constant. If a user is using gmail, then his JID is mai...@gmail.com/gmail.SOME_NO and when he is using gtalk JID is mai...@gmail.com/talk.SOME_DIFF_NO. I need to have something (for example mail id) which remains constant every time a user uses my website. I didn't find any function to extract constant part of JID. I tried using Users Service of Google App engine by including import com.google.appengine.api.users.User; import com.google.appengine.api.users.UserService; import com.google.appengine.api.users.UserServiceFactory;*** *but user remains null. Is their any way to get constant part from all Types of JID's. * *Regards Sahil* * -- 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: RPC call and variables
Hello Thanks leszek I tried datastore, it has solved many of my problems. Though I am not getting exact results, but I feel if I spend more time, I may improve the problems. I receive following message in my info log after certain intervals. org.datanucleus.ObjectManagerImpl close: Outstanding nontx update being committed to datastore I found http://groups.google.com/group/google-appengine-java/browse_thread/thread/8c8d3191d287553f information on this topic. I would like to know more about this. I have started looking into XMPP API which is specified in the link given by you. I would also like to know about any other alternative? Regards Sahil Mahajan On Sep 16, 2:37 pm, leszek leszek.ptokar...@gmail.com wrote: Follow this thread - could be helpful http://groups.google.co.uk/group/google-appengine-java/browse_frm/thr... --~--~-~--~~~---~--~~ 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] RPC call and variables
Hello In my application, If a client A makes an rpc call and changes a variable at server, I want this change to be immediately reflected to other clients when they make same rpc call. But it looks that my clients are interacting with different servers and changes are not reflected. What can I do to make this possible? Regards Sahil --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---