Search Results

Search found 30167 results on 1207 pages for 'spark view engine'.

Page 29/1207 | < Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >

  • Exception in Google App Engine (Java) while trying to create Memcache Object

    - by Shreeni
    I am coming back to an old Google App Engine project on which I saw a bug. During this lag, I have been upgrading my AppEngine SDK and is now set at 1.3. When I try to run the same project again, I see the following exception: java.lang.NoSuchMethodError: com.google.apphosting.api.ApiProxy$Environment.getDefaultNamespace()Ljava/lang/String; at com.google.appengine.api.NamespaceManager.get(NamespaceManager.java:56) at com.google.appengine.api.memcache.MemcacheServiceImpl.setNamespace(MemcacheServiceImpl.java:181) at com.google.appengine.api.memcache.MemcacheServiceImpl.(MemcacheServiceImpl.java:145) at com.google.appengine.api.memcache.MemcacheServiceFactory.getMemcacheService(MemcacheServiceFactory.java:25) The line causing the problem is: CacheManager.getInstance().getCacheFactory().createCache(Collections.emptyMap()); (It is the same line as suggested by the AppEngine documentation to create a memcache object. It used to work fine previously. ) Any suggestions on how to fix it?

    Read the article

  • glow when touch the button in the view in iphone

    - by Pugal Devan
    Hi, I am new to iphone development. I have seen the facebook application.In Facebook -- Camera(Click)-- Photo Albums--Thumbnails-- Write a caption View. Here click event is highlighted. In this view where ever i touch, the touch is highlighted. How it can be achieve. Can i try like this. Is there any sample codes available?. Please help me out, Thanks.

    Read the article

  • custom view with layout

    - by user270811
    ok, what i am trying to do is to embed a custom view in the default layout main.xml: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <com.lam.customview.CustomDisplayView android:id="@+id/custom_display_view1" android:layout_width="fill_parent" android:layout_height="fill_parent" /> <LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content"> <Button android:id="@+id/prev" android:layout_width="0dip" android:layout_height="wrap_content" android:layout_weight="50" android:textAppearance="?android:attr/textAppearanceSmall" android:text="@string/prev" /> </LinearLayout> </LinearLayout> as you can see the class is called com.lam.customview.CustomDisplayView, with the id of custom_display_view1. now in the com.lam.customview.CustomDisplayView class, i want to use another layout called custom_display_view.xml because i don't want to programmatically create controls/widgets. custom_display_view.xml is just a button and an image, the content of which i want to change based on certain conditions: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <TextView android:id="@+id/display_text_view1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello" /> <ImageView android:id="@+id/display_image_view1" android:layout_width="wrap_content" android:layout_height="wrap_content"> </ImageView> </LinearLayout> i tried to do: 1) public CustomDisplayView(Context context, AttributeSet attrs) { super(context, attrs); try { // register our interest in hearing about changes to our surface SurfaceHolder holder = getHolder(); holder.addCallback(this); View.inflate(context, R.layout.custom_display_view, null); ... but got this error, "03-08 20:33:15.711: ERROR/onCreate(10879): Binary XML file line #8: Error inflating class java.lang.reflect.Constructor ". 2) public CustomDisplayView(Context context, AttributeSet attrs) { super(context, attrs); try { // register our interest in hearing about changes to our surface SurfaceHolder holder = getHolder(); holder.addCallback(this); View.inflate(context, R.id.custom_display_view1, null); ... but got this error, "03-08 20:28:47.401: ERROR/CustomDisplayView(10806): Resource ID #0x7f050002 type #0x12 is not valid " also, if i do it this way, as someone has suggested, it's not clear to me how the custom_display_view.xml is associated with the custom view class. thanks.

    Read the article

  • Invoke modal view controller from UIWebView weblink

    - by JD
    Hey folks I was wondering if anyone can tip me on a painless way of invoking a modal view controller from a web link in a UIWebView. Is it possible to do this? I want the modal view controller to still be a part of the app as opposed to closing the main app and using a helper application instead. Any help would be greatly appreciated.

    Read the article

  • New to Android - Drawing a view at runtime

    - by Brian515
    HI all, I'm just getting started with developing for Android. I'm looking to port one of my iPhone applications, but I'm kind of at a loss for how to draw a view at runtime (a view not declared in the XML). Basically, I want to draw a simple rectangle, but then be able to manipulate its frame after being drawn. Sorry if this is a really, really simple question, but I can't seem to find some equivalent to the iPhone SDK here. Thanks in advance!

    Read the article

  • linq groupby in strongly typed MVC View

    - by jason
    How do i get an IGrouping result to map to the view? I have this query: var groupedManuals = manuals.GroupBy(c => c.Series); return View(groupedManuals); What is the proper mapping for the ViewPage declaration? Inherits="System.Web.Mvc.ViewPage<IEnumerable<ProductManual>>"

    Read the article

  • How to seperate the model from the view?

    - by geejay
    I have a bunch of model objects. These objects end up being rendered as views (say forms) in a rich client app. I started to annotate the fields in the model objects (Java annotations) with things that let me render them as forms on the fly (e.g displayname, group, page, validvalues). I now realise that the view has crept into the model. How should I seperate the view logic out of the model objects? TECH: Java, Java Annotations, Eclipse RCP

    Read the article

  • How to set background color of a View

    - by Peter vdL
    I'm trying to set the background color of a View (in this case a Button). I use this code: // set the background to green v.setBackgroundColor(0x0000FF00 ); v.invalidate(); It causes the Button to disappear from the screen. What am I doing wrong, and what is the correct way to change the background color on any View? Thanks.

    Read the article

  • Looping Redirect with PyFacebook and Google App Engine

    - by Nick Gotch
    I have a Python Facebook project hosted on Google App Engine and use the following code to handle initialization of the Facebook API using PyFacebook. # Facebook Initialization def initialize_facebook(f): # Redirection handler def redirect(self, url): logger.info('Redirecting the user to: ' + url) self.response.headers.add_header("Cache-Control", "max-age=0") self.response.headers.add_header("Pragma", "no-cache") self.response.out.write('<html><head><script>parent.location.replace(\'' + url + '\');</script></head></html>') return 'Moved temporarily' auth_token = request.params.get('auth_token', None) fbapi = Facebook(settings['FACEBOOK_API_KEY'], settings['FACEBOOK_SECRET_KEY'], auth_token=auth_token) if not fbapi: logger.error('Facebook failed to initialize') if fbapi.check_session(request) or auth_token: pass else: logger.info('User not logged into Facebook') return lambda a: redirect(a, fbapi.get_login_url()) if fbapi.added: pass else: logger.info('User does not have ' + settings['FACEBOOK_APP_NAME'] + ' added') return lambda a: redirect(a, fbapi.get_add_url()) # Return the validated API logger.info('Facebook successfully initialized') return lambda a: f(a, fbapi=fbapi) I'm trying to set it up so that I can drop this decorator on any page handler method and verify that the user has everything set up correctly. The issue is that when the redirect handler gets called, it starts an infinite loop of redirection. I tried using an HTTP 302 redirection in place of the JavaScript but that kept failing too. Does anyone know what I can do to fix this? I saw this similar question but there are no answers.

    Read the article

  • Google app engine issue 777 particular solution?

    - by Niklas R
    I use 64.202.189.170 (godaddy) for a HTTP access to a www...on google app engine like GAE issue 777 so that a blank subdomain forwards to www.domain I get the blank to respond by output "This website is temporarily unavailable, please try again later. " There's info about this issue here http://knol.google.com/k/google-apps-discussion-group#view and here http://code.google.com/p/googleappengine/issues/detail?id=777 Since I managed to do it with a .com domain (The godaddy DNS hosted gralumo.com correctly responds to www..) I now want to do it with an off-site DNS managed domain getting the following info about servers: $ ping montao.com.br PING montao.com.br (64.202.189.170) 56(84) bytes of data. 64 bytes from pwfwd-v01.prod.mesa1.secureserver.net (64.202.189.170): icmp_seq=1 ttl=113 time=188 ms 64 bytes from pwfwd-v01.prod.mesa1.secureserver.net (64.202.189.170): icmp_seq=2 ttl=113 time=188 ms ^C --- montao.com.br ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1001ms rtt min/avg/max/mdev = 188.459/188.692/188.926/0.493 ms ubuntu@ubuntu:~$ ping www.montao.com.br PING ghs.l.google.com (74.125.43.121) 56(84) bytes of data. 64 bytes from bw-in-f121.1e100.net (74.125.43.121): icmp_seq=1 ttl=56 time=30.2 ms 64 bytes from bw-in-f121.1e100.net (74.125.43.121): icmp_seq=2 ttl=56 time=28.0 ms 64 bytes from bw-in-f121.1e100.net (74.125.43.121): icmp_seq=3 ttl=56 time=24.2 ms ^C --- ghs.l.google.com ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2003ms rtt min/avg/max/mdev = 24.201/27.522/30.282/2.514 ms So it looks to me these are the same IP numbers whether or not it's off-site DNS. It's just that it works for one domain and not the other. Could it be just resetting the appspot app ie removing and adding it? Can you recommend how to proceed? Thanks in advance

    Read the article

  • Google App Engine: JDO does the job, JPA does not

    - by Phuong Nguyen de ManCity fan
    I have setup a project using both Jdo and Jpa. I used Jpa Annotation to Declare my Entity. Then I setup my testCases based on LocalTestHelper (from Google App Engine Documentation). When I run the test, a call to makePersistent of Jdo:PersistenceManager is perfectly OK; a call to persist of Jpa:EntityManager raised an error: java.lang.IllegalArgumentException: Type ("org.seamoo.persistence.jpa.model.ExampleModel") is not that of an entity but needs to be for this operation at org.datanucleus.jpa.EntityManagerImpl.assertEntity(EntityManagerImpl.java:888) at org.datanucleus.jpa.EntityManagerImpl.persist(EntityManagerImpl.java:385) Caused by: org.datanucleus.exceptions.NoPersistenceInformationException: The class "org.seamoo.persistence.jpa.model.ExampleModel" is required to be persistable yet no Meta-Data/Annotations can be found for this class. Please check that the Meta-Data/annotations is defined in a valid file location. at org.datanucleus.ObjectManagerImpl.assertClassPersistable(ObjectManagerImpl.java:3894) at org.datanucleus.jpa.EntityManagerImpl.assertEntity(EntityManagerImpl.java:884) ... 27 more How can it be the case? Below is the link to the source code of the maven projects that reproduce that problem: http://seamoo.com/jpa-bug-reproduce.tar.gz Execute the maven test goal over the parent pom you will notice that 3/4 tests from org.seamoo.persistence.jdo.JdoGenericDAOImplTest passed, while all tests from org.seamoo.persistence.jpa.JpaGenericDAOImplTest failed.

    Read the article

  • Google App Engine - "Invalid sender format" when sending e-mail

    - by Taylor Leese
    I'm trying to send an e-mail using Google App Engine. I'm getting the exception below and I'm not sure why at the moment. Any ideas? javax.mail.SendFailedException: Send failure (javax.mail.MessagingException: Illegal Arguments (java.lang.IllegalArgumentException: Bad Request: Invalid sender format)) at javax.mail.Transport.send(Transport.java:163) at javax.mail.Transport.send(Transport.java:48) at com.mystuff.service.mail.MailService.sendActivationEmail(MailService.java:145) Below is the code related to sending the e-mail. public final void sendActivationEmail(final UserAccount user) { final Properties props = new Properties(); final Session session = Session.getDefaultInstance(props, null); final Message message = new MimeMessage(session); final Multipart multipart = new MimeMultipart(); final MimeBodyPart htmlPart = new MimeBodyPart(); final MimeBodyPart textPart = new MimeBodyPart(); final Locale locale = LocaleContextHolder.getLocale(); try { message.setFrom(new InternetAddress(getFromAddress(), "Qoogeo")); message.addRecipient(Message.RecipientType.TO, new InternetAddress(user.getUsername(), user.getFirstName() + " " + user.getLastName())); message.setSubject(messageSource.getMessage("mail.subject", null, locale)); textPart.setContent(messageSource.getMessage("mail.body.txt", new Object[] {getHostname(), user.getActivationKey()}, locale), "text/plain"); htmlPart.setContent(messageSource.getMessage("mail.body.html", new Object[] {getHostname(), user.getActivationKey()}, locale), "text/html"); multipart.addBodyPart(textPart); multipart.addBodyPart(htmlPart); message.setContent(multipart); Transport.send(message); } catch (MessagingException e) { LOGGER.warn(ERROR_MSG, e); } catch (UnsupportedEncodingException e) { LOGGER.warn(ERROR_MSG, e); } } Also, getFromAddress() returns "[email protected]".

    Read the article

  • Google App Engine: Unit testing concurrent access to memcache

    - by Phuong Nguyen de ManCity fan
    Would you guys show me a way to simulating concurrent access to memcache on Google App Engine? I'm trying with LocalServiceTestHelpers and threads but don't have any luck. Every time I try to access Memcache within a thread, then I get this error: ApiProxy$CallNotFoundException: The API package 'memcache' or call 'Increment()' was not found I guess that the testing library of GAE SDK tried to mimic the real environment and thus setup the environment for only one thread (the thread that running the test) which cannot be seen by other thread. Here is a piece of code that can reproduce the problem package org.seamoo.cache.memcacheImpl; import org.testng.Assert; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; import com.google.appengine.api.memcache.MemcacheService; import com.google.appengine.api.memcache.MemcacheServiceFactory; import com.google.appengine.tools.development.testing.LocalMemcacheServiceTestConfig; import com.google.appengine.tools.development.testing.LocalServiceTestHelper; public class MemcacheTest { LocalServiceTestHelper helper; public MemcacheTest() { LocalMemcacheServiceTestConfig memcacheConfig = new LocalMemcacheServiceTestConfig(); helper = new LocalServiceTestHelper(memcacheConfig); } /** * */ @BeforeMethod public void setUp() { helper.setUp(); } /** * @see LocalServiceTest#tearDown() */ @AfterMethod public void tearDown() { helper.tearDown(); } @Test public void memcacheConcurrentAccess() throws InterruptedException { final MemcacheService service = MemcacheServiceFactory.getMemcacheService(); Runnable runner = new Runnable() { @Override public void run() { // TODO Auto-generated method stub service.increment("test-key", 1L, 1L); try { Thread.sleep(200L); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } service.increment("test-key", 1L, 1L); } }; Thread t1 = new Thread(runner); Thread t2 = new Thread(runner); t1.start(); t2.start(); while (t1.isAlive()) { Thread.sleep(100L); } Assert.assertEquals((Long) (service.get("test-key")), new Long(4L)); } }

    Read the article

  • AJAX - querying a search engine and returning the number of results

    - by Moddy
    Right, so basically I need to query a selection of search engines in an AJAX app. As there is a number of different search engines - there's no search engine specific API I can use either. My main problem is getting the number of results returned by the search. So far, I have decided it is probably best to use a regexp from the returned search query HTML, and then convert the string of characters to an integer. However, this method just doesn't feel.. clean to me. It seems a bit rough around the edges and I think it could do with improving! I guess not being 100% confident with regular expressions doesn't help; but it just feels like it could be improved. Any ideas on how to implement this would be great cheers! It doesn't seem like that an exotic thing to do, so I was wondering if perhaps any of you guys have done this before and would have a few tips? Note: This is an AJAX app at the moment, but I may be re-writing this functionality in a different app soon - which won't be AJAX. I'm confident I can transfer any AJAX implementation to the other language though.

    Read the article

  • Why use Django on Google App Engine?

    - by Travis Bradshaw
    When researching Google App Engine (GAE), it's clear that using Django is wildly popular for developing in Python on GAE. I've been scouring the web to find information on the costs and benefits of using Django, to find out why it's so popular. While I've been able to find a wide variety of sources on how to run Django on GAE and the various methods of doing so, I haven't found any comparative analysis on why Django is preferable to using the webapp framework provided by Google. To be clear, it's immediately apparent why using Django on GAE is useful for developers with an existing skillset in Django (a majority of Python web developers, no doubt) or existing code in Django (where using GAE is more of a porting exercise). My team, however, is evaluating GAE for use on an all-new project and our existing experience is with TurboGears, not Django. It's been quite difficult to determine why Django is beneficial to a development team when the BigTable libraries have replaced Django's ORM, sessions and authentication are necessarily changed, and Django's templating (if desirable) is available without using the entire Django stack. Finally, it's clear that using Django does have the advantage of providing an "exit strategy" if we later wanted to move away from GAE and need a platform to target for the exodus. I'd be extremely appreciative for help in pointing out why using Django is better than using webapp on GAE. I'm also completely inexperienced with Django, so elaboration on smaller features and/or conveniences that work on GAE are also valuable to me. Thanks in advance for your time!

    Read the article

  • Copy an entity in Google App Engine datastore in Python without knowing property names at 'compile'

    - by Gordon Worley
    In a Python Google App Engine app I'm writing, I have an entity stored in the datastore that I need to retrieve, make an exact copy of it (with the exception of the key), and then put this entity back in. How should I do this? In particular, are there any caveats or tricks I need to be aware of when doing this so that I get a copy of the sort I expect and not something else. ETA: Well, I tried it out and I did run into problems. I would like to make my copy in such a way that I don't have to know the names of the properties when I write the code. My thinking was to do this: #theThing = a particular entity we pull from the datastore with model Thing copyThing = Thing(user = user) for thingProperty in theThing.properties(): copyThing.__setattr__(thingProperty[0], thingProperty[1]) This executes without any errors... until I try to pull copyThing from the datastore, at which point I discover that all of the properties are set to None (with the exception of the user and key, obviously). So clearly this code is doing something, since it's replacing the defaults with None (all of the properties have a default value set), but not at all what I want. Suggestions?

    Read the article

  • Movies recommendation engine conceptual database design

    - by Supyxy
    I am working at an movie recommendations engine and i'm facing a DB design issue. My actual database looks like this: MOVIES [ID,TITLE] KEYWORDS_TABLE [ID,KEY_ID] - where ID is Foreign Key for MOVIES.id and KEY_ID is a key for a text keywords table This is not the entire DB, but i showed here what's important for my problem. I have about 50,000 movies and about 1,3 milion keywords correlations, and basically my algorithm consists in extracting all the who have the same keywords with a given movie, then ordering them by the number of keywords correlations. For example i looked for a movie similar to 'Cast away' and it returned 'Six days and six nights' because it had the most keywords correlations (4 keywords): Island Airplane crash Stranded Pilot The algorithm is based on more factors, but this one is the most important and the most difficult for the approach. Basically what i do now is getting all the movies that have at least one keyword similar to the given movie and then ordering them by other factors which are not important for a moment. There wouldn't be any problem if there weren't so many records, a query lasts in many cases up to 10-20 seconds and some of them return even over 5000 movies. Someone already helped me on here (thanks Mark Byers) with optimizing the query but that's not enough because it takes too longer SELECT DISTINCT M.title FROM keywords_table K1 JOIN keywords_table K2 ON K2.key_id = K1.key_id JOIN movies M ON K2.id = M.id WHERE K1.id = 4 So i thought it would be better if i pre-made those lists with movies recommendations for each movie, but i'm not sure how to design the tables.. whatever is it a good idea or how would you take this approach?

    Read the article

  • Django 'ImproperlyConfigured' error after deployment on google app engine

    - by oreon
    Hello, I'm currently trying to get my first django project running on Google App Engine. I followed the instructions given here http://www.allbuttonspressed.com/projects/djangoappengine as best I could. Unfortunately I have run into some issues. Locally everything runs fine, no problems. I then tried to deploy my project to the cloud. This is where I'm totally stuck. I always receive 500 Server Errors coupled with google.appengine.runtime.DeadlineExceededError's. Every now and then I get the following error message in my logs, which I think is the root of the problem : <class 'django.core.exceptions.ImproperlyConfigured'>: ImportError projectyalanda.pricecompare: No module named projectyalanda.pricecompare Obviously something is wrong in the way I reference my django app. Why this is only an issue in the cloud is a mystery to me. The interesting part in the settings.py file is setup as following: INSTALLED_APPS = ( 'djangotoolbox', # 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'projectyalanda.pricecompare', ) I absolutely can't figure out why django/appengine wouldn't be able to find the module, especially since everything works perfectly locally. So where else can I look? The local folder structure is of course also correct as automatically done by django, so maybe something is messed up during deployment? How would I be able to find out? Please help me ;-) Thanks

    Read the article

  • Running Flask framework on App Engine: Could not find module app.cgi

    - by Linc
    I'm running this Flask example app on App Engine: http://github.com/gigq/flasktodo You can see on the github page that app.cgi is in the main directory for this project. However, when I run this code I get an error complaining about a missing app.cgi: ERROR 2010-05-01 16:43:47,006 dev_appserver.py:2109] Encountered error loading module "app.cgi": <type 'exceptions.ImportError'>: Could not find module app.cgi Traceback (most recent call last): File "/opt/google_appengine/google/appengine/tools/dev_appserver.py", line 2096, in LoadTargetModule module_code = import_hook.get_code(module_fullname) File "/opt/google_appengine/google/appengine/tools/dev_appserver.py", line 1279, in Decorate return func(self, *args, **kwargs) File "/opt/google_appengine/google/appengine/tools/dev_appserver.py", line 1956, in get_code full_path, search_path, submodule = self.GetModuleInfo(fullname) File "/opt/google_appengine/google/appengine/tools/dev_appserver.py", line 1279, in Decorate return func(self, *args, **kwargs) File "/opt/google_appengine/google/appengine/tools/dev_appserver.py", line 1908, in GetModuleInfo submodule, search_path = self.GetParentSearchPath(fullname) File "/opt/google_appengine/google/appengine/tools/dev_appserver.py", line 1279, in Decorate return func(self, *args, **kwargs) File "/opt/google_appengine/google/appengine/tools/dev_appserver.py", line 1887, in GetParentSearchPath parent_package = self.GetParentPackage(fullname) File "/opt/google_appengine/google/appengine/tools/dev_appserver.py", line 1279, in Decorate return func(self, *args, **kwargs) File "/opt/google_appengine/google/appengine/tools/dev_appserver.py", line 1864, in GetParentPackage raise ImportError('Could not find module %s' % fullname) ImportError: Could not find module app.cgi How do I indicate to dev_appserver.py where to look to find it?

    Read the article

  • Struts2 Tiles in Google app engine

    - by user365941
    I am trying to build an java web application using struts2 and tiles in Google App Engine. Below is my tiles.xml file <!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN" "http://tiles.apache.org/dtds/tiles-config_2_0.dtd"> <tiles-definitions> <definition name="baseLayout" template="BaseLayout.jsp"> <put-attribute name="title" value="" /> <put-attribute name="header" value="Header.jsp" /> <put-attribute name="body" value="" /> <put-attribute name="footer" value="Footer.jsp" /> </definition> <definition name="/welcome.tiles" extends="baseLayout"> <put-attribute name="title" value="Welcome" /> <put-attribute name="body" value="Welcome.jsp" /> </definition> </tiles-definitions> But when I run the app,I am not getting any error. it just prints "Header.jsp Welcome.jsp Footer.jsp". It does not show the actual jsp pages. Please advise on what needs to be done. Thanks in advance Regards

    Read the article

  • 'Stack level too deep' error in engine-like plugin with globalize

    - by nutsmuggler
    Hello folks. I have built an engine-like plugin thanks to the new features of Rails 2.3. It's a 'Product' module for a CMS, extrapolated from a previously existing (and working) model/controller. The plugin relies on easy_fckeditor and on globalize (description and title field are localised), and I suspect that globalized could be the culprit here... Everything works fine, except for the update action. I get the following error message: (posting just the first lines, all the message is about attribute_methods) stack level too deep /Library/Ruby/Gems/1.8/gems/activerecord-2.3.2/lib/active_record/attribute_methods.rb:64:in `generated_methods?' /Library/Ruby/Gems/1.8/gems/activerecord-2.3.2/lib/active_record/attribute_methods.rb:241:in `method_missing' /Library/Ruby/Gems/1.8/gems/activerecord-2.3.2/lib/active_record/attribute_methods.rb:249:in `method_missing' For referenze, the full error stack is here: http://pastie.org/596546 I've tried to debug eliminating all the input fields, one by one, but I keep getting the error. fckeditor doesn't seem the culprit (error even without fckeditor) This is the action: def update params[:product][:term_ids] ||= [] @product = Product.find(params[:id]) respond_to do |format| if @product.update_attributes(params[:product]) flash[:notice] = t(:Product_was_successfully_updated) format.html { redirect_to products_path } format.xml { head :ok } else format.html { render :action => "edit" } format.xml { render :xml => @product.errors, :status => :unprocessable_entity } end end end As you see it's quite straightforward. Of course I am not hoping someone to solve this question straightaway, I'd just like to have a head up, a suggestion about where to look to solve this issue. Thanks in advance, Davide

    Read the article

  • Is a GWT app running on Google App Engine protected from CSRF

    - by gerdemb
    I'm developing a GWT app running on the Google App Engine and wondering if I need to worry about Cross-site request forgery or is that automatically taken care of for me? For every RPC request that requires authentication, I have the following code: public class BookServiceImpl extends RemoteServiceServlet implements BookService { public void deleteInventory(Key<Inventory> inventoryKey) throws NotLoggedInException, InvalidStateException, NotFoundException { DAO dao = new DAO(); // This will throw NotLoggedInException if user is not logged in User user = dao.getCurrentUser(); // Do deletion here } } public final class DAO extends DAOBase { public User getCurrentUser() throws NotLoggedInException { currentUser = UserServiceFactory.getUserService().getCurrentUser(); if(currentUser == null) { throw new NotLoggedInException(); } return currentUser; } I couldn't find any documentation on how the UserService checks authentication. Is it enough to rely on the code above or do I need to to more? I'm a beginner at this, but from what I understand to avoid CSRF attacks some of the strategies are: adding an authentication token in the request payload instead of just checking a cookie checking the HTTP Referer header I can see that I have cookies set from Google with what look like SID values, but I can't tell from the serialized Java objects in the payloads if tokens are being passed or not. I also don't know if the Referer header is being used or not. So, am I worrying about a non-issue? If not, what is the best strategy here? This is a common enough problem, that there must be standard solutions out there...

    Read the article

  • Refreshing WEB-INF/lib in Google App Engine (with Eclipse)

    - by Adrian Petrescu
    Hi, I've created a new Google App Engine project within Eclipse. I copied several JARs that I need for my application into the WEB-INF/lib directory, and add them to the build path. I make some random calls to these JARs from within the handler, deploy, and everything works fine. However, if I then change one of the JARs outside the project, and copy the new version to WEB-INF/lib (with the same name) and re-deploy, it doesn't seem to be sending the new JAR; everything is still linking to the old one even though it's not even in my WEB-INF/lib anymore. I'm guessing it's being cached by the server or Eclipse is not even realizing something has changed in order to upload the new version. If I just create a new project with the new JAR, everything is fine again (until I have to make another change...) but of course I don't want to have to create a new project for every change to a dependency I make. My question is, how can I make GAE re-upload all the JARs I have from within Eclipse? Thanks in advance, guys :) -Adrian

    Read the article

< Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >