Search Results

Search found 888 results on 36 pages for 'gae datastore'.

Page 18/36 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • gae error : Error: Server Error, how to debug it .

    - by zjm1126
    when i upload my project to google-app-engine , it show this : Error: Server Error The server encountered an error and could not complete your request. If the problem persists, please report your problem and mention this error message and the query that caused it. why ? how can i debug this error ? thanks

    Read the article

  • How to login to gdata in GWT application deployed on GAE?

    - by Raffo
    I want to use the Google account login to retrieve the informations to be used for Google's gdata api so that when I start the application deployed on Google App Engine the user is asked for its login and I can then use this information on the server side to specify the credentials for Google Calendar login (through gdata api). How can I do that? I tried using Client login but it seems that there's no way to get password information from che Client object on the server side... thank you.

    Read the article

  • What is the proper way to access datastore in custom Model Binders?

    - by mare
    How should I properly implement data access in my custom model binders? Like in controllers I use IContentRepository and then have it create an instance of its implementing class in constructor. So I have everything ready for incorporating IoC (DI) at a later stage. Now I need something similar in model binder. I need to make some DB lookups in the binder. I'm thinking of doing it the same way I do it in controllers but I am open to suggestion. This is a snippet from one of my controllers so you can imagine how I'm doing it in them: public class WidgetZoneController : BaseController { // BaseController has IContentRepository ContentRepository field public WidgetZoneController() : this(new XmlWidgetZoneRepository()) { } public WidgetZoneController(IContentRepository repository) { ContentRepository = repository; } ...

    Read the article

  • Loading datasets from datastore and merge into single dictionary. Resource problem.

    - by fredrik
    Hi, I have a productdatabase that contains products, parts and labels for each part based on langcodes. The problem I'm having and haven't got around is a huge amount of resource used to get the different datasets and merging them into a dict to suit my needs. The products in the database are based on a number of parts that is of a certain type (ie. color, size). And each part has a label for each language. I created 4 different models for this. Products, ProductParts, ProductPartTypes and ProductPartLabels. I've narrowed it down to about 10 lines of code that seams to generate the problem. As of currently I have 3 Products, 3 Types, 3 parts for each type, and 2 languages. And the request takes a wooping 5500ms to generate. for product in productData: productDict = {} typeDict = {} productDict['productName'] = product.name cache_key = 'productparts_%s' % (slugify(product.key())) partData = memcache.get(cache_key) if not partData: for type in typeData: typeDict[type.typeId] = { 'default' : '', 'optional' : [] } ## Start of problem lines ## for defaultPart in product.defaultPartsData: for label in labelsForLangCode: if label.key() in defaultPart.partLabelList: typeDict[defaultPart.type.typeId]['default'] = label.partLangLabel for optionalPart in product.optionalPartsData: for label in labelsForLangCode: if label.key() in optionalPart.partLabelList: typeDict[optionalPart.type.typeId]['optional'].append(label.partLangLabel) ## end problem lines ## memcache.add(cache_key, typeDict, 500) partData = memcache.get(cache_key) productDict['parts'] = partData productList.append(productDict) I guess the problem lies in the number of for loops is too many and have to iterate over the same data over and over again. labelForLangCode get all labels from ProductPartLabels that match the current langCode. All parts for a product is stored in a db.ListProperty(db.key). The same goes for all labels for a part. The reason I need the some what complex dict is that I want to display all data for a product with it's default parts and show a selector for the optional one. The defaultPartsData and optionaPartsData are properties in the Product Model that looks like this: @property def defaultPartsData(self): return ProductParts.gql('WHERE __key__ IN :key', key = self.defaultParts) @property def optionalPartsData(self): return ProductParts.gql('WHERE __key__ IN :key', key = self.optionalParts) When the completed dict is in the memcache it works smoothly, but isn't the memcache reset if the application goes in to hibernation? Also I would like to show the page for first time user(memcache empty) with out the enormous delay. Also as I said above, this is only a small amount of parts/product. What will the result be when it's 30 products with 100 parts. Is one solution to create a scheduled task to cache it in the memcache every hour? It this efficient? I know this is alot to take in, but I'm stuck. I've been at this for about 12 hours straight. And can't figure out a solution. ..fredrik

    Read the article

  • How can I kill off a Python web app on GAE early following a redirect?

    - by Mike Hayes
    Hi Disclaimer: completely new to Python from a PHP background Ok I'm using Python on Google App Engine with Google's webapp framework. I have a function which I import as it contains things which need to be processed on each page. def some_function(self): if data['user'].new_user and not self.request.path == '/main/new': self.redirect('/main/new') This works fine when I call it, but how can I make sure the app is killed off after the redirection. I don't want anything else processing. For example I will do this: class Dashboard(webapp.RequestHandler): def get(self): some_function(self) #Continue with normal code here self.response.out.write('Some output here') I want to make sure that once the redirection is made in some_function() (which works fine), that no processing is done in the get() function following the redirection, nor is the "Some output here" outputted. What should I be looking at to make this all work properly? I can't just exit the script because the webapp framework needs to run. I realise that more than likely I'm just doing things in completely the wrong way any way for a Python app, so any guidance would be a great help. Hopefully I have explained myself properly and someone will be able to point me in the right direction. Thanks

    Read the article

  • Cant we use a Set or collection as a return type in GAE?

    - by user273422
    In my code i have used Set<Employees> as a return type to my function addEmp(). So, i m gettin an Compilation error. The Error is: Compiling module com.employeedepartmentgae.Employeedepartmentgae Refreshing module from source Validating newly compiled units Removing units with errors [ERROR] Errors in 'file:/home/wissen18/employeedepartmentgae/src/com/employeedepartmentgae/client/GreetingServiceAsync.java' [ERROR] Line 6: The import com.employeedepartmentgae.server.domainobject.Employee cannot be resolved [ERROR] Line 18: Employee cannot be resolved to a type [ERROR] Errors in 'file:/home/wissen18/employeedepartmentgae/src/com/employeedepartmentgae/client/GreetingService.java' [ERROR] Line 6: The import com.employeedepartmentgae.server.domainobject.Employee cannot be resolved [ERROR] Line 20: Employee cannot be resolved to a type [ERROR] Errors in 'file:/home/wissen18/employeedepartmentgae/src/com/employeedepartmentgae/client/EmployeeWidget.java' [ERROR] Line 12: The import com.employeedepartmentgae.server.domainobject.Employee cannot be resolved [ERROR] Line 75: The method addEmp(String, String, String, AsyncCallback) from the type GreetingServiceAsync refers to the missing type Employee [ERROR] Line 75: The type new AsyncCallback(){} must implement the inherited abstract method AsyncCallback.onSuccess(Set) [ERROR] Line 75: Employee cannot be resolved to a type [ERROR] Line 94: The method onSuccess(Set) of type new AsyncCallback(){} must override or implement a supertype method [ERROR] Line 94: Employee cannot be resolved to a type [ERROR] Line 96: Employee cannot be resolved to a type [ERROR] Line 96: Employee cannot be resolved to a type [ERROR] Line 98: Employee cannot be resolved to a type Removing invalidated units [WARN] Compilation unit 'file:/home/wissen18/employeedepartmentgae/src/com/employeedepartmentgae/client/Employeedepartmentgae.java' is removed due to invalid reference(s): [WARN] file:/home/wissen18/employeedepartmentgae/src/com/employeedepartmentgae/client/EmployeeWidget.java [WARN] Compilation unit 'file:/home/wissen18/employeedepartmentgae/src/com/employeedepartmentgae/client/DepartmentWidget.java' is removed due to invalid reference(s): [WARN] file:/home/wissen18/employeedepartmentgae/src/com/employeedepartmentgae/client/GreetingService.java [WARN] file:/home/wissen18/employeedepartmentgae/src/com/employeedepartmentgae/client/GreetingServiceAsync.java Computing all possible rebind results for 'com.employeedepartmentgae.client.Employeedepartmentgae' Rebinding com.employeedepartmentgae.client.Employeedepartmentgae Checking rule [ERROR] Unable to find type 'com.employeedepartmentgae.client.Employeedepartmentgae' [ERROR] Hint: Previous compiler errors may have made this type unavailable [ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly So please help me.....

    Read the article

  • Is it possible to bulk load an NDB child Entity in GAE?

    - by hmacread
    At some point in the future I may need to bulk load migration data (i.e. from a CSV). Has anyone had exceptions raised doing the following? Also is there any change in behaviour if the ndb.put_multi() function is used? from google.appengine.ext import ndb while True: if not id: break id, name = read_csv_row(readline()) x = X(parent=ndb.Key('Y','static_id') x.id, x.name = id, name x.put() class X(ndb.Model): id = StringProperty() name = StringProperty() class Y(ndb.Model): pass def read_csv_row(line): """returns tuple"""

    Read the article

  • How to organize files in a gae python project, in eclipse?

    - by Totty
    Hy! I have my project with pydev and looks like this: ProjectName -src -gaesessions -geo -static_files -app is this ok? I really don't like to have the gaesessions and geo in my root, but their namespace are by root. I would like to have a structure like this: ProjectName -src -python -thirdParty -gaesessions -geo -app -static_files is this possible? or even better would be to make them as a library. this would be the best thing, but how to do this in eclipse and then when deploy my app, to deploy with those files too? thanks

    Read the article

  • How to display a page in my browser with python code that is run locally on my computer with "GAE" S

    - by brilliant
    When I run this code on my computer with the help of "Google App Engine SDK", it displays (in my browser) the HTML code of the Google home page: from google.appengine.api import urlfetch url = "http://www.google.com/" result = urlfetch.fetch(url) print result.content How can I make it display the page itself? I mean I want to see that page in my browser the way it would normally be seen by any user of the internet.

    Read the article

  • GAE JCache NumberFormatException, will I need to write Java to avoid?

    - by Jasper
    This code below produces a NumberFormatException in this line: val cache = cf.createCache(Collections.emptyMap()) Do you see any errors? Will I need to write a Java version to avoid this, or is there a Scala way? ... import java.util.Collections import net.sf.jsr107cache._ object QueryGenerator extends ServerResource { private val log = Logger.getLogger(classOf[QueryGenerator].getName) } class QueryGenerator extends ServerResource { def getCounter(cache:Cache):long = { if (cache.containsKey("counter")) { cache.get("counter").asInstanceOf[long] } else { 0l } } @Get("html") def getHtml(): Representation = { val cf = CacheManager.getInstance().getCacheFactory() val cache = cf.createCache(Collections.emptyMap()) val counter = getCounter(cache) cache.put("counter", counter + 1) val q = QueueFactory.getQueue("query-generator") q.add(TaskOptions.Builder.url("/tasks/query-generator").method(Method.GET).countdownMillis(1000L)) QueryGenerator.log.warning(counter.toString) new StringRepresentation("QueryGenerator started!", MediaType.TEXT_HTML) } } Thanks!

    Read the article

  • Running a Silverlight application in the Google App Engine platform

    - by rajbk
    This post shows you how to host a Silverlight application in the Google App Engine (GAE) platform. You deploy and host your Silverlight application on Google’s infrastructure by creating a configuration file and uploading it along with your application files. I tested this by uploading an old demo of mine - the four stroke engine silverlight demo. It is currently being served by the GAE over here: http://fourstrokeengine.appspot.com/ The steps to run your Silverlight application in GAE are as follows: Account Creation Create an account at http://appengine.google.com/. You are allocated a free quota at signup. Select “Create an Application”   Verify your account by SMS   Create your application by clicking on “Create an Application”   Pick an application identifier on the next screen. The identifier has to be unique. You will use this identifier when uploading your application. The application you create will by default be accessible at [applicationidentifier].appspot.com. You can also use custom domains if needed (refer to the docs).   Save your application. Download SDK  We will use the  Windows Launcher for Google App Engine tool to upload our apps (it is possible to do the same through command line). This is a GUI for creating, running and deploying applications. The launcher lets you test the app locally before deploying it to the GAE. This tool is available in the Google App Engine SDK. The GUI is written in Python and therefore needs an installation of Python to run. Download and install the Python Binaries from here: http://www.python.org/download/ Download and install the Google App Engine SDK from here: http://code.google.com/appengine/downloads.html Run the GAE Launcher. Select Create New Application.   On the next dialog, give your application a name (this must match the identifier we created earlier) For Parent Directory, point to the directory containing your Silverlight files. Change the port if you want to. The port is used by the GAE local web server. The server is started if you choose to run the application locally for testing purposes. Hit Save. Configure, Test and Upload As shown below, the files I am interested in uploading for my Silverlight demo app are The html page used to host the Silverlight control The xap file containing the compiled Silverlight application A favicon.ico file.   We now create a configuration file for our application called app.yaml. The app.yaml file specifies how URL paths correspond to request handlers and static files.  We edit the file by selecting our app in the GUI and clicking “Edit” The contents of file after editing is shown below (note that the contents of the file should be in plain text): application: fourstrokeengine version: 1 runtime: python api_version: 1 handlers: - url: /   static_files: Default.html   upload: Default.html - url: /favicon.ico   static_files: favicon.ico   upload: favicon.ico - url: /FourStrokeEngine.xap   static_files: FourStrokeEngine.xap   upload: FourStrokeEngine.xap   mime_type: application/x-silverlight-app - url: /.*   static_files: Default.html   upload: Default.html We have listed URL patterns for our files, specified them as static files and specified a mime type for our xap file. The wild card URL at the end will match all URLs that are not found to our default page (you would normally include a html file that displays a 404 message).  To understand more about app.yaml, refer to this page. Save the file. Run the application locally by selecting “Browse” in the GUI. A web server listening on the port you specified is started (8080 in my case). The app is loaded in your default web browser pointing to http://localhost:8080/. Make sure the application works as expected. We are now ready to deploy. Click the “Deploy” icon. You will be prompted for your username and password. Hit OK. The files will get uploaded and you should get a dialog telling you to “close the window”. We are done uploading our Silverlight application. Go to http://appengine.google.com/ and launch the application by clicking on the link in the “Current Version” column.   You should be taken to a URL which points to your application running in Google’s infrastructure : http://fourstrokeengine.appspot.com/. We are done deploying our application! Clicking on the link in the Application column will take you to the Admin console where you can see stats related to system usage.  To learn more about the Google Application Engine, go here: http://code.google.com/appengine/docs/whatisgoogleappengine.html

    Read the article

  • j2ee implementing security and using a framwork pros and cons

    - by Ismail Marmoush
    I'm a newbie to j2ee security, and i'm not j2ee expert either, though i'm really willing to put some effort and learn I've an application that i'm about to develop on Google App Engine (GAE) --with no time constraints. As you know GAE handles a lot of web container security issues for you, also I will be using openID for authentication exclusively (sessions will be handled by provider). GAE supports SSL which will help with confidentiality and integrity maybe. Authorization can be done through filters. I know reinventing the wheel is a mess, but I was looking forward to learn something about security and implement that in my new app. so what the pros and cons of using a framework like shiro, spring security, jguard etc or filling the rest of gaps on my own ?

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >