[appengine-java] Re: Set the Timezone
> >> Is there a way to set the timezone for my application? > > TimeZone.setDefault(TimeZone.getTimeZone("GMT-8:00")); Have you actually *tested* this on App Engine? This should be inserted in the servlet initialization code? thank you, -g. > > If you use JSTL, try the following setup in web.xml: > > javax.servlet.jsp.jstl.fmt.timeZone > GMT-8:00 > > > You can change "GMT-8:00" as you want. > > Hope this helps, > > Yasuo Higa -- 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.
Re: [appengine-java] Re: Set the Timezone
Hi George, >> >> Is there a way to set the timezone for my application? >> >> TimeZone.setDefault(TimeZone.getTimeZone("GMT-8:00")); > > Have you actually *tested* this on App Engine? Yes. > This should be inserted in the servlet initialization code? > You can insert the code when the servlet initializes as follows: @Override public void init() throws ServletException { TimeZone.setDefault(TimeZone.getTimeZone("GMT-8:00")); } When I reply something, I always try it. Hope this helps, Yasuo Higa -- 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] Data Nucleus Enhancer Exception
Hie While trying to do executeQuery i get the follow exception: SEVERE: Exception is :Persistent class "Class vik.sakshum.sakshumweb.server.model.jdo.Subscribe does not seem to have been enhanced. You may want to rerun the enhancer and check for errors in the output." has no table in the database, but the operation requires it. Please check the specification of the MetaData for this class. javax.jdo.JDOUserException: Persistent class "Class vik.sakshum.sakshumweb.server.model.jdo.Subscribe does not seem to have been enhanced. You may want to rerun the enhancer and check for errors in the output." has no table in the database, but the operation requires it. Please check the specification of the MetaData for this class. at org.datanucleus.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:375) at org.datanucleus.jdo.JDOQuery.execute(JDOQuery.java:230) at vik.sakshum.sakshumweb.server.model.DoSubscribe.execute(DoSubscribe.java:35) at vik.sakshum.sakshumweb.server.SubscribeModule$1$2.buttonClick(SubscribeModule.java:119) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.appengine.tools.development.agent.runtime.Runtime.invoke(Runtime.java:100) at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:487) at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:161) at com.vaadin.ui.AbstractComponent.fireEvent(AbstractComponent.java:1105) at com.vaadin.ui.Button.fireClick(Button.java:341) at com.vaadin.ui.Button.changeVariables(Button.java:177) at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariables(AbstractCommunicationManager.java:1058) at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest(AbstractCommunicationManager.java:559) at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(CommunicationManager.java:260) at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:438) at com.vaadin.terminal.gwt.server.GAEApplicationServlet.service(GAEApplicationServlet.java:231) 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.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:51) 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 com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:121) 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.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:70) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:352) 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.content(HttpConnection.java:844) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442) NestedThrowablesStackTrace: Persistent class "Class vik.sakshum.sakshumweb.server.model.jdo.Subscribe does not seem to have been enhanced. You may want to rerun the enhancer and check for errors in the output." has no table in the database, but the operation requires it. Please check the specification of the MetaData for this class. org.datanucleus.store.exceptions.NoTableManagedException: Persistent class "Class vik.sakshum.sakshumweb.server.model.jdo.Subscribe does not seem to have been enhanced. You may want to rerun the enhancer and c
[appengine-java] Re: blobstore & lucene search index
Hallo Jacek, Thank you for your mail. Can you give a bit more details about that search engine that you implemented? I would like to use lucene because I like to use their analyzers and things like levenshtein distance result ordering etc. Currently I use the compass-lucen framework that comes with a special adapter to store the index in the datastore: http://www.kimchy.org/searchable-google-appengine-with-compass/ I wonder if now the blob-store could be a better way to achieve the same goal. Cheers, Tobi On Dec 23, 3:18 pm, "jacek.ambroziak" wrote: > I have been using a search engine of my own design. > I had first to adapt it to GAE by generalizing the index > storage mechanism so that it can be *implemented* > using files (originally the only way) or with Datastore. > It was a good couple of days of work but it is not hard. > > On Dec 22, 6:33 pm, Toby wrote: > > > Hello, > > > I think a sophisticated search api is what a lot of us are missing. I > > use currently the compass-lucene project but I am not completely > > satisfied with the performance. I think there is also the GAELucene > > project that uses a similar aproach. > > I guess the main issue was so far that you could not write the index > > files to a "regular" file system. I wonder if the new blob-store API > > could solve that issue and if anyone has done some experimentation > > with it. > > > Cheers, > > Tobi > > -- 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: GAE roadmap for 2010
Hello, Some visibility on the roadmap would be great. I think in the last month GAE has already improved a lot. There are quite some open issues that are often listed against the use of GAE. I believe if we knew that they will be addressed at some point in time it might help. Personally I see two major things for my applications: - improve spin up or keep alive option - full fledged search I guess a good MVC framework and better Spring integration would be great as well. Cheers, Tobias On Dec 25, 5:09 am, Antoine Sabot-durand wrote: > As i s'aider in m'y post this doc is not a roadmap : it stops in > december 2009. Nothing in 2010. Is Thérèse an update on thé way ? > > On 22 déc, 23:23, "Ikai L (Google)" wrote: > > > The roadmap that is up right now represents our six month > > goals:http://code.google.com/appengine/docs/roadmap.html > > > Beyond that, we do not even have much visibility ourselves into what we are > > going to work on, but as soon as we have set high level objectives, we'll > > communicate them with our developers. This is one of the reasons we ask > > everybody to create and star > > issues:http://code.google.com/p/googleappengine/issues/list > > > On Tue, Dec 22, 2009 at 8:32 AM, Muz wrote: > > > I second this request for 2010 roadmap visibility. > > > > I'm especially curious if there will be any definite plan to support > > > multi-tenancy on GAE (beyond the current odd workaround/exception > > > mechanisms). We have requirements for several of these to get started > > > in Q2. Google seems to be the only cloud player to not have a long- > > > term model for this yet. > > > > M > > > > On 20 Dec, 02:54, Antoine Sabot-durand > > > wrote: > > > > Hi, > > > > > I found the roadmap for 2009 but is there one for 2010 ? I'd like to > > > > propose my company to start developement on GAE but the lack of > > > > visibility on the platform is an issue. Will you support some of the > > > > JEE6 new standard (JSF 2, CDI, JPA 2, EJB 3.1 ?). Is the imageio issue > > > > with the JSF richfaces library will be corrected ? > > > > I saw a lot of question in the forum but few answer (or wasn't able to > > > > find them). > > > > Thanks for your answers. > > > > > Antoine > > > > -- > > > > 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 > > unsubscr...@googlegroups.com> > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/google-appengine-java?hl=en. > > > -- > > Ikai Lan > > Developer Programs Engineer, Google App Engine > > -- 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: blobstore & lucene search index
My search engine is a full-text proximity based engine which you can check out in action in an Android add called NewsDroid. The indexer part indexes Reuters News semi-continuously and a user searching on Android will be shown query hits in matching news where as many keywords as possible were found together. This is, btw, an XML search engine -- in addition to keywords you need to specify in which elements to search for text passages. I am currently working on another application of the engine, beyond news. The original version of the search engine used a number of files to store indexes. As I "ported" the system to GAE I had to figure out ways to store and use indexes stored as blobs in the Datastore. Basically, any file can be split into chunks of up to 1,000,000 bytes. Things work OK, but not great on GAE. Loading indexes into memory is taking time when servlets are restarted. On Dec 25, 7:51 am, Toby wrote: > Hallo Jacek, > > Thank you for your mail. Can you give a bit more details about that > search engine that you implemented? > I would like to use lucene because I like to use their analyzers and > things like levenshtein distance result ordering etc. > Currently I use the compass-lucen framework that comes with a special > adapter to store the index in the > datastore:http://www.kimchy.org/searchable-google-appengine-with-compass/ > I wonder if now the blob-store could be a better way to achieve the > same goal. > > Cheers, > Tobi > > On Dec 23, 3:18 pm, "jacek.ambroziak" > wrote: > > > > > I have been using a search engine of my own design. > > I had first to adapt it to GAE by generalizing the index > > storage mechanism so that it can be *implemented* > > using files (originally the only way) or with Datastore. > > It was a good couple of days of work but it is not hard. > > > On Dec 22, 6:33 pm, Toby wrote: > > > > Hello, > > > > I think a sophisticated search api is what a lot of us are missing. I > > > use currently the compass-lucene project but I am not completely > > > satisfied with the performance. I think there is also the GAELucene > > > project that uses a similar aproach. > > > I guess the main issue was so far that you could not write the index > > > files to a "regular" file system. I wonder if the new blob-store API > > > could solve that issue and if anyone has done some experimentation > > > with it. > > > > Cheers, > > > Tobi -- 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: blobstore & lucene search index
My search engine is a full-text proximity based engine which you can check out in action in an Android add called NewsDroid. The indexer part indexes Reuters News semi-continuously and a user searching on Android will be shown query hits in matching news where as many keywords as possible were found together. This is, btw, an XML search engine -- in addition to keywords you need to specify in which elements to search for text passages. I am currently working on another application of the engine, beyond news. The original version of the search engine used a number of files to store indexes. As I "ported" the system to GAE I had to figure out ways to store and use indexes stored as blobs in the Datastore. Basically, any file can be split into chunks of up to 1,000,000 bytes. Things work OK, but not great on GAE. Loading indexes into memory is taking time when servlets are restarted. On Dec 25, 7:51 am, Toby wrote: > Hallo Jacek, > > Thank you for your mail. Can you give a bit more details about that > search engine that you implemented? > I would like to use lucene because I like to use their analyzers and > things like levenshtein distance result ordering etc. > Currently I use the compass-lucen framework that comes with a special > adapter to store the index in the > datastore:http://www.kimchy.org/searchable-google-appengine-with-compass/ > I wonder if now the blob-store could be a better way to achieve the > same goal. > > Cheers, > Tobi > > On Dec 23, 3:18 pm, "jacek.ambroziak" > wrote: > > > > > I have been using a search engine of my own design. > > I had first to adapt it to GAE by generalizing the index > > storage mechanism so that it can be *implemented* > > using files (originally the only way) or with Datastore. > > It was a good couple of days of work but it is not hard. > > > On Dec 22, 6:33 pm, Toby wrote: > > > > Hello, > > > > I think a sophisticated search api is what a lot of us are missing. I > > > use currently the compass-lucene project but I am not completely > > > satisfied with the performance. I think there is also the GAELucene > > > project that uses a similar aproach. > > > I guess the main issue was so far that you could not write the index > > > files to a "regular" file system. I wonder if the new blob-store API > > > could solve that issue and if anyone has done some experimentation > > > with it. > > > > Cheers, > > > Tobi -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] java.util.Timer is in the white list but you can't use it
Hi ppl, please explain me. Maybe I'm kinda stupid but we have java.util.Timer class in the white list. But actually you can't use this class since GAE forbids threads instantiation. Now a simple straightforward question: why the heck the class is in the whitelist? Just for fun? Regards, Alex -- 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] Relational Table using JDO
Hi all, I have a simple doubt that I would like to see explained. I know a bit of relational databases but I don't understand how I can do the same using JDO. As for example, I have a table users-plans which combines the table user to the table plans. In table plans I have all the plans and I just match it to the user in a "middle table". Could someone explain how this would work in GAE? Thanks and Merry Christmas! -- 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] guestbook problem...
Hi, I am new to this group and to googleapp also.. i tried it turorial of Guestbook.. It is running sucessfully in the eclipse rather its output is not coming .. as i open the localhost but the page is not appearing...Please help me out -- 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] Can we deploy Axis WebServices on Google App Engine
Can we deploy Axis webservices on Google App Engine? I'm getting below exeception when I'm tesing in my developement environment the URL : http://localhost:8080/services/Version?wsdl Sorry, something seems to have gone wrong... here are the details: Fault - ; nested exception is: java.security.AccessControlException: access denied (java.io.FilePermission C:\Softwares\jdk1.6.0\jre\lib\wsdl.properties read) AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/} Server.userException faultSubcode: faultString: java.security.AccessControlException: access denied (java.io.FilePermission C:\Softwares\jdk1.6.0\jre\lib\wsdl.properties read) faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}hostname:localhost -- 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] mail message
Hi , i ma tring to send mail with google app engine with java my code : Properties props = new Properties(); Session session = Session.getDefaultInstance(props, null); String msgBody = "test"; try { Message msg = new MimeMessage(session); try { msg.setFrom(new InternetAddress("nidadavolu.ven...@gmail.com", "Example.com Admin")); } catch (UnsupportedEncodingException e) { // TODO Auto-generated catch block e.printStackTrace(); } try { msg.addRecipient(Message.RecipientType.TO, new InternetAddress("nidadavolu.ven...@gmail.com ", "Mr. User")); } catch (UnsupportedEncodingException e) { // TODO Auto-generated catch block e.printStackTrace(); } msg.setSubject("Your Example.com account has been activated"); msg.setText(msgBody); Transport.send(msg); } catch (AddressException e) { // ... } catch (MessagingException e) { // ... } but i didn't get any error , but we are not receaving mail thanks -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] JDK 1.7 in Google App Engine (GAE)
Hi, May I know is there any plan or timeline for GAE to support JDK 1.7? Thank you. Chee Kin -- 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] Code does not run server side.
Some code, that i created and tested using Eclipse and the google plugin, seems not to run while installed on the App Engine, no matter what. I have really no idea what it couldd be, Anyone else an idea? By the way, the code for all files is listed below. Main file: package poaphost; import javax.servlet.http.*; import javax.jdo.Query; import javax.jdo.PersistenceManager; import java.io.IOException; import poaphost.PMF; import poaphost.Address; import poaphost.Iphandler; import java.util.Locale; import java.util.Random; import java.util.List; import java.util.Date; import java.util.Formatter; public class LOGONServlet extends HttpServlet { /** * */ private static final long serialVersionUID = 1373256072813419920L; public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { String uid = ""; Cookie[] cookies = req.getCookies(); for (Integer i = 0; i < cookies.length; i++) { if (cookies[i].getName().equals("poap_uid") && cookies[i].getValue().length() == 8) { uid = cookies[i].getValue(); } } if (uid == "") { String base = "abcdefghijklmnopqrstuvwxyz1234567890"; Random generator = new Random(); for (Integer i = 0; i < 8; i++) { uid += base.charAt(generator.nextInt(35)); } } String ip = req.getRemoteAddr(); Long ipNo = Iphandler.ip2long(ip); PersistenceManager pm = PMF.get().getPersistenceManager(); Query q = pm.newQuery(Address.class, "ip == ipParam && code == uidParam"); q.declareParameters("Long ipParam, String uidParam"); List result = (List) q.execute(ipNo, uid); if (result.isEmpty()) { Address a = new Address(ipNo, uid); pm.makePersistent(a); } Cookie c = new Cookie("poap_uid",uid); c.setPath("/"); c.setDomain("http://poaphost.appspot.com";); c.setMaxAge(60*60*24*365); resp.setContentType("text/xml"); resp.setCharacterEncoding("ISO-8859-1"); resp.addCookie(c); Date d = new Date(); Long i = d.getTime(); Double f = i.doubleValue() / 1000; StringBuilder sb = new StringBuilder(); Formatter formatter = new Formatter(sb, Locale.US); formatter.format("%11.4f", f); resp.getWriter().println( ""); resp.getWriter().println(""); resp.getWriter().println("logon"); resp.getWriter().println("1"); resp.getWriter().println("0"); resp.getWriter().println("" + sb.toString() + ""); resp.getWriter().println("0"); resp.getWriter().println("" + uid + ""); resp.getWriter().println(""); } } poaphost.PMF file package guestbook; import javax.jdo.JDOHelper; import javax.jdo.PersistenceManagerFactory; public final class PMF { private static final PersistenceManagerFactory pmfInstance = JDOHelper.getPersistenceManagerFactory("transactions- optional"); private PMF() {} public static PersistenceManagerFactory get() { return pmfInstance; } } file poaphost.iphandler package poaphost; public class Iphandler { public static long ip2long( String aIpAddress ) { long ip = 0; String[] t = aIpAddress.split("\\."); ip = Long.parseLong(t[0]) * 256 * 256 * 256; ip += Long.parseLong(t[1]) * 256 * 256; ip += Long.parseLong(t[2]) * 256; ip += Long.parseLong(t[3]); return ip; } public static String long2ip( long aIpAddress ) { return (aIpAddress >> 24 & 255) + "." + (aIpAddress >> 16 & 255) + "." + (aIpAddress >> 8 & 255) + "." + (aIpAddress & 255); } } file poaphost.Address package poaphost; import com.google.appengine.api.datastore.Key; import java.lang.Long; import java.lang.String; import javax.jdo.annotations.IdGeneratorStrategy; import javax.jdo.annotations.IdentityType; import javax.jdo.annotations.PersistenceCapable; import javax.jdo.annotations.Persistent; import javax.jdo.annotations.PrimaryKey; @PersistenceCapable(identityType = IdentityType.APPLICATION) public class Address { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key key; @Persistent private Long ip; @Persistent private String code; public Address(Long ip, String code) {
[appengine-java] Re: problem in retrieving arraylist from database
use this @Persistent(defaultFetchGroup="true") ArrayList listval= new ArrayList(); i guess this ll solve ur problem & try u read about fetchgroup for a better understanding -- 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] Eclipse AppEngine Plugin
I have recently upgraded eclipse to Galileo. Previously, with Ganymede, I had no problems running an app locally using the Google Appengine plugin. I now cannot run Appengine code (run as ...Google Web App). I get an exception 'javax.xml.parsers.FactoryConfigurationError: Provider oracle.xml.jaxp.JXDocumentBuilderFactory not found' I have now also tried running my Ganymede installation and that falls over during a build with the same message. Could this be related to the Eclipse upgrade? Regards Kevin -- 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] Spring Security with GAE - Adding object into HttpServletRequest does not appear to be working
Hi, I've created a GAE web application using Spring 3.0 and Spring Security 2.0.5. After a little heartache and help from reading the posts on the forum, I managed to get it all working locally, with users able to register, validate their accounts via email and login in securely. When a user logs in, I wanted to make their details available across the site. I did this by creating an Interceptor, responsible for pulling the prinicipal from the Spring Security Authentication class (retrieved from the SecurityContextHolder) and then placing the object in the HttpServletRequest object. Below is a snippet of code from the interceptor. public void postHandle( HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) { try { Member member = securityContext.getMember(); request.setAttribute("user", member); log.info("injecting user into request"); } catch(SecurityRuntimeException e) { // do nothing - will be thrown if no user is logged in } } The user's information is wrapped in a 'Member' object, with the securityContext responsible for retrieving it from the SecurityContextHolder. Locally, on the GAE development environment, everything works fine! The interceptor correctly places the principal in the request and my JSP's can readily access it. However, when I deploy the application to the app engine, it does not appear to work. The logs have not provided any clue as to why the request does not appear to have the principal in it. Is there any reason why the interceptor would not work on the app engine? Or, is it ill-advised to add objects into the HttpServletRequest? I'm tearing my hair out with why it's not working, and it's the only thing within my application that isn't! So any help or advice offered is much appreciated. I'm hoping to have my code up in the Google Code repository so if anyone wants to have a look, they're more than welcome. Thanks! Sully -- 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: Generating QR Codes with ZXing
I'm trying to generate QR code using zxing, but the image i create does not decode / or the decoder fails to recognize. Here is my code . You mentioned that you were successful in generating QRcode with PNGencoder, can you provide me how you did that. If you can provide code that will great. thanks. public static void main(String[] args) { QRCodeWriter q = new QRCodeWriter(); try { ByteMatrix bm = q.encode("hello", BarcodeFormat.QR_CODE, 100, 100); BufferedImage i = toBufferedImage(bm); ImageIO.write(i, "PNG", new File("a2.png")); } catch (WriterException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } } public static BufferedImage toBufferedImage(ByteMatrix matrix) { int width = matrix.getWidth(); int height = matrix.getHeight(); BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); for (int x = 0; x < width; x++) { for (int y = 0; y < height; y++) { image.setRGB(x, y, matrix.get(y, x)); } } return image; } On Dec 21, 10:32 am, mably wrote: > Hi Roberto, thanx for your answer. > > I finally succeeded generating QRCodes with the ZXing QRCode encoder > and a home made PNGEncoder (derivated from the ones found there > :http://catcode.com/pngencoder/). > > But I'm still stuck with Datamatrix bar codes coz ZXing doesn't > generate them. > > Any help will be greatly appreciated. > > François > > On 20 déc, 18:27, Roberto Saccon wrote: > > > There is a sample app with ZXing, which runs on GAE, but I don't know > > exactly what it does, but I think to encode QRCodes (generating an > > image) isn't that difficult, I recently did that (just for a test) in > > Javascript, with an Open source code I found after 2 seconds of > > Googeling. If you want to decode Images, then I think the ZXing code > > has some AWT dependencies, which aren't GAE whitelisted. > > -- > > Roberto > > > On Dec 20, 12:16 pm, mably wrote: > > > > More generally, has anybody heard of an open source barcode generator > > > java library running on GAE ? > > > > We need to generate QR Codes or Datamatrix bar codes from our > > > application running on GAE. > > > > We are using the Google Charts API for generating QR Codes for the > > > moment. > > > > Thanx for you help. > > > > On 19 déc, 18:50, mably wrote: > > > > > Has anyone successfully used Google ZXing library on GAE for > > > > generating QR Codes ? > > > > > Thanx for your help. > > > > > François -- 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] Clear particular session manually
I need to clear a session manually from a servlet which has only the id of the session which needs to be cleared (long story short this is to overcome some limitation with flash not supporting cookies). I need to delete both the session from datastore and memcache. How can this be done ? (is the name of the entity in _ah_session table the id of the session ? ) What is the key of the particular session for memcache ? can it be derived from the session id ? -- 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: mail message
Hi, I tested the source code that you had contributed. It seems to operate normally. I think that the setting or the environment in the mail address is a cause. Follow this thread: http://groups.google.com/group/google-appengine/browse_thread/thread/fdfdafa51ef140fc/97d7c0492c2270bb?lnk=gst&q=seleronm#97d7c0492c2270bb Please Try. thanks. On 12月24日, 午後4:34, venkat satyanarayana wrote: > Hi , i ma tring to send mail with google app engine with java > > my code : > > Properties props = new Properties(); > Session session = Session.getDefaultInstance(props, null); > > String msgBody = "test"; > > try { > Message msg = new MimeMessage(session); > try { > msg.setFrom(new > InternetAddress("nidadavolu.ven...@gmail.com", > "Example.com Admin")); > } catch (UnsupportedEncodingException e) { > // TODO Auto-generated catch block > e.printStackTrace(); > } > try { > msg.addRecipient(Message.RecipientType.TO, > new > InternetAddress("nidadavolu.ven...@gmail.com > ", "Mr. User")); > } catch (UnsupportedEncodingException e) { > // TODO Auto-generated catch block > e.printStackTrace(); > } > msg.setSubject("Your Example.com account has been > activated"); > msg.setText(msgBody); > Transport.send(msg); > > } catch (AddressException e) { > // ... > } catch (MessagingException e) { > // ... > } > > but i didn't get any error , but we are not receaving mail > > thanks -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Relational Table using JDO
You can do some sort of relational mappings between entities but not to the full extend like RDBMS. Have you worked through the examples in http://code.google.com/appengine/docs/java/datastore/ yet? On Fri, Dec 25, 2009 at 9:36 PM, TiagoP wrote: > Hi all, > > I have a simple doubt that I would like to see explained. > > I know a bit of relational databases but I don't understand how I can > do the same using JDO. > > As for example, I have a table users-plans which combines the table > user to the table plans. In table plans I have all the plans and I > just match it to the user in a "middle table". > > Could someone explain how this would work in GAE? > > Thanks and Merry Christmas! > > > > -- > > 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. > > > -- Regards, Michael Hoi Sang Chan MSc Advanced Software Engineering Department of Computer Science King's College London Strand, LONDON WC2R 2LS Tel: +447881900965 -- 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.