[appengine-java] email templating

2010-07-22 Thread Matt Farnell
Does anyone have any recommendations for an emailing template solution?
Ideally I'd like to be able to define my HTML emails like JSP and then just
substitute in the values.

I've come across Velocity and StringTemplate, I'd like something thats
really lightweight, simple, fast and easy to you.

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] Re: appcfg bulkuploading null key values from csv

2010-07-22 Thread Dani
I can answer to myself:
Modify the config.yml to:

- kind: Callerid
  connector: csv
  connector_options:
  property_map:
- property: __key__
  external_name: key
  export_transform: transform.key_id_or_name_as_string

- property: queue
  external_name: queue
  import_transform:
transform.none_if_empty(transform.create_foreign_key('Queue'))
  export_transform: transform.key_id_or_name_as_string

- property: num
  external_name: num



On 21 jul, 13:53, Dani dab...@gmail.com wrote:
 Hi, I created a new app and I want to fill it with data from an old
 django app using csv files.

 The Java app is like:

 @PersistenceCapable(identityType = IdentityType.APPLICATION)
 public class Callerid {
         @PrimaryKey
         @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
         private Key key;

         @Persistent
         private String num;

         @Persistent
         private Key queue;

 The config.yml is like:

 - kind: Callerid
   connector: csv
   connector_options:
   property_map:
     - property: __key__
       external_name: key
       export_transform: transform.key_id_or_name_as_string

     - property: queue
       external_name: queue
       import_transform: transform.create_foreign_key('Queue')
       export_transform: transform.key_id_or_name_as_string

     - property: num
       external_name: num

 And finally a csv example:

 key,queue,num
 111,,9

 When i run: appcfg.py upload_data --config_file=config.yml --
 filename=Callerid.csv --url=http://APPID.appspot.com/remote_api--
 application=APPID --kind=Callerid

 Returns this error: BadValueError: name must not be empty.

 By the way, i can entry a new entity via the admin site, with null
 values in the queue field.

 What is wrong? how can i upload null values?

 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] Re: next gen queries

2010-07-22 Thread pac
Thanks for getting back Ikai.

On Jul 22, 2:09 am, Ikai L (Google) ika...@google.com wrote:
 We don't have an ETA yet. We'll announce it when it's ready.



 On Mon, Jul 19, 2010 at 11:08 AM, pac parvez.chau...@gmail.com wrote:
  In Alfred Fuller's presentation (http://www.youtube.com/watch?
  v=ofhEyDBpngMfeature=channel), he mentioned that limit of 5000 list
  items and need for number of composite indexes for list (i.e. 2 value
  search from list, 3 value search from list etc) will be removed. As
  per video, I think he mentioned that functionality is nearly in place.

  At this stage, is it possible to give an approx idea when can we
  expect this one 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.comgoogle-appengine-java%2bunsubscr...@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
 Blog:http://googleappengine.blogspot.com
 Twitter:http://twitter.com/app_engine
 Reddit:http://www.reddit.com/r/appengine

-- 
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: How to close an object before second transaction?

2010-07-22 Thread l.denardo

Be sure also that modifyObject does not make indirectly calls to
datastore.
It was the case in one of my handlers, where the call to modify
checked users authorizations, and those were occasionally read from
datastore when memcache expired.
That resulted in an exception in entity group handling.

Logs are usually useful to detect some of these behaviors.

regards
Lorenzo


On Jul 22, 3:07 am, Ikai L (Google) ika...@google.com wrote:
 Can you start the transaction before you do the fetch? The way you're
 writing it won't result in what you want to do.

 If that still doesn't work, just retrieve a new instance of the
 PersistenceManager. This is cheap so it won't cost you significant
 additional CPU.



 On Mon, Jul 19, 2010 at 5:59 AM, coltsith conla...@gmail.com wrote:
  Here's the psudo-code for one of my methods:

  1. Get PersistenceManager (pm)

  2. pm.fetchObject1

  3. pm.beginTransaction

  4. pm.modifyObject1

  5. pm.commit

  6. pm.fetchObject2

  7. pm.beginTransaction

  8. pm.modifyObject2

  9. pm.commit

  however I get this error can't operate on multiple entity groups in a
  single transaction...

  Do I have to put another line in between step 5 and 7 saying that I'm
  'done' with object1, like to close it?

  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.

 --
 Ikai Lan
 Developer Programs Engineer, Google App Engine
 Blog:http://googleappengine.blogspot.com
 Twitter:http://twitter.com/app_engine
 Reddit:http://www.reddit.com/r/appengine

-- 
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] SOLVED: Re: JDO relationships and deletion.

2010-07-22 Thread Christian Gruber
On Jul 21, 2:43 am, Ian Marshall ianmarshall...@gmail.com wrote:
 I use
 @PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = 
 true)

Hey Ian.  Sorry, I had left that off the example - I also use
@Per...Cap... with the options you identified.

However, I have solved it.

It seems that I had a back-relationship with mapped-by and added a
backlink, which I didn't need, but the big thing seems to be that when
I was fetching these entities, I did not detach them.

So I got my persistence manager to do something like...

pm.setDetachAllOnCommit(true);
tx.begin();
...
tx.commit();

(or whatever).

it's the either individually detaching or bulk detaching that wasn't
working.  Somehow some internal state in the PM was being messed up by
my passing around non-detached persistent entities between
transactions.

cheers,
Christian

-- 
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: SOLVED: Re: JDO relationships and deletion.

2010-07-22 Thread Ian Marshall
I'm glad that you have fixed your problem.

I made the decision very early on to detach everything always (unless
I was actually in the middle of persisting data within a method). This
might be inefficient, but it does seem to work for my brain!


On Jul 22, 2:18 pm, Christian Gruber christianedwardgru...@gmail.com
wrote:
 On Jul 21, 2:43 am, Ian Marshall ianmarshall...@gmail.com wrote:

  I use
  @PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = 
  true)

 Hey Ian.  Sorry, I had left that off the example - I also use
 @Per...Cap... with the options you identified.

 However, I have solved it.

 It seems that I had a back-relationship with mapped-by and added a
 backlink, which I didn't need, but the big thing seems to be that when
 I was fetching these entities, I did not detach them.

 So I got my persistence manager to do something like...

 pm.setDetachAllOnCommit(true);
 tx.begin();
 ...
 tx.commit();

 (or whatever).

 it's the either individually detaching or bulk detaching that wasn't
 working.  Somehow some internal state in the PM was being messed up by
 my passing around non-detached persistent entities between
 transactions.

 cheers,
 Christian

-- 
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: How to upload primary key as an id instead of name

2010-07-22 Thread MANISH DHIMAN

Let me explain once again if I missed something earlier. I have an
existing task management application  wants to shift it now to google
app engine. While I tried porting my existing data into google app
engine using BulkLoader 1.3.5 with csv file, all my IDs saved as
string (not as long). Suppose I was having a user with id=1 (long), it
uploaded into google app engine with name=1(String). Now when I am
saving new records directly on google app engine using my application
running on google app engine, it saves an another record with
id=1(this time it's long). So it's not possible for me to identifiy b/
w these two records (one with id=1  another with name=1).

I hope a lot of people are using BulkLoader API for uploading existing
data to GAE  Google also recommend this API, so it should not have
such a basic bug at this level.

Any help/suggestion in this regard will be highly appreciated

On Jul 14, 6:08 am, John Patterson jdpatter...@gmail.com wrote:
 You can do this now using the RemoteDatastore Java utility

 http://code.google.com/p/remote-datastore/

 For example, this code runs on your desktop and creates a single  
 entity in your live datastore:

     // divert datastore operations to live application
     RemoteDatastore.install();
     
 RemoteDatastore.divert(http://myVersion.latest.myApp.appspot.com/remote-datastore
 , myApp, myVersion);

     // create an entity with a numeric key
     Key key = KeyFactory.createKey(MyKindName, 35);
     Entity entity1 = new Entity(key);
     entity1.setProperty(property1, hello);

     // put entity to the remote datastore
     DatastoreService service =  
 DatastoreServiceFactory.getDatastoreService();
     datastore.put(entity1);

 This also works for bulk puts

 On 14 Jul 2010, at 03:37, Matthew Blain wrote:



  Sorry, this won't be available until 1.3.6. You should be able to do
  something like this:

  - property: __key__
    external_name: CityId
    export_transform: datastore.Key.id
    import_transform: lambda value: datastore.Key.from_path('City',
  int(value))

  --Matthew

  On Jul 10, 5:53 pm, Pasha pavel.selivers...@gmail.com wrote:
  Could you please post an example. Thank you in advance.

  On Jun 30, 1:18 pm, Matthew Blain matthew.bl...@google.com wrote:

  The 1.3.5 bulkloader client will allow you to specify a numeric key;
  you must use the Key constructor explicitly to do this, integers  
  will
  still be converted into strings.

  On Jun 30, 12:12 am, MANISH DHIMAN manisd...@gmail.com wrote:

  Hi All
  When I upload data using CSV file on G A E. Primary key is stored
  there as a name instead of id.
  Example.

  Format of .yaml is Given below
  transformers:
  - kind: City
    connector: csv
    connector_options:
      encoding: utf-8
      columns: from_header
    property_map:
      - property: __key__
        external_name: CityId
        export_transform: datastore.Key.id
      - property: Name
        external_name: Name

  Primary key stored there is:
  ID/Name                   Name
  name=1                    Delhi
  name=2                    London

  Due to uploaded data with name=keyvalue, when I am try to get Key
  from any Fetched Entities, then Key contains only name value but id
  value is 0 and also name contains long value as a String instance.

  Is it possible to store primary key(Using CSV while uploading  
  data) in
  a format given below :
  ID/Name              Name
  id=1                    Delhi
  id=2                    London

  When data is stored with id=keyvalue, then Key contains id  
  value is
  keyvalue as long instance.

  --
  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 
  athttp://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: email templating

2010-07-22 Thread Nacho Coloma
Have you tried MVEL?

On Jul 22, 9:41 am, Matt Farnell mfarn...@gmail.com wrote:
 Does anyone have any recommendations for an emailing template solution?
 Ideally I'd like to be able to define my HTML emails like JSP and then just
 substitute in the values.

 I've come across Velocity and StringTemplate, I'd like something thats
 really lightweight, simple, fast and easy to you.

 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] Re: Tag clouds on GAE for Java - how to store and how to aggregate

2010-07-22 Thread planetjones
Thanks again - I'm busy with a few things at the moment, but will have
a play with some code over the next week or two and report back here.

On Jul 22, 2:41 am, Mark Wyszomierski mar...@gmail.com wrote:
 Cool, if you structure your entity class like this though:

     class Entity {
          ListString tags;
          String foo;
      }

 how are you going to query which Entity instances match a given tag? I think
 that all the tags need to be indexed so your query statement can find them -
 I'm not 100% sure on this, if you can somehow match on that ListString,
 that would be new to me! I was thinking you might have to decide how many
 tags an Entity can have, and explicitly declare each like:

     class Entity {
          String tag1, tag2, tag3;
          String foo;
      }

 only the first tag is required, the other two can be null. Then your query
 statement would have to be something like:

     select from Entity where tag1 == 'cow' || tag2 == 'cow' || tag3 ==
 'cow';

 not sure if there's a better way to do it, let us know what you try because
 this is probably a pattern that can be reused for others wanting to do the
 same thing,

 Thanks,
 Mark



 On Wed, Jul 21, 2010 at 3:15 PM, planetjones jon.r.jo...@gmail.com wrote:
  Mark,

  Thanks very much for this - it's useful.  I'm slowly getting used to
  this non-relational way of thinking.

  The count of the tags doesn't need to be 100% accurate, as it will
  only be used to approximate how many entries exist for a given tag -
  the tag cloud aim is to show tags associated with many entities in a
  larger font and tags associated with fewer entities in a smaller
  font.  If the insert, update or delete of Entity succeeds and gets
  committed, but the persistence action against the TagCounter fails in
  a few instances that would not be a big deal.

  I'll probably allow three tags per Entity, so was planning on:

   class Entity {
           ListString tags;
           String foo;
       }

  for flexibility in of the number of tags.

  So when inserting a new entity I would need to:

  Create Entity
  For each tag in Entity select TagCounter
  If tag counter exists for tag increment count by 1
  If tag counter does not exist for tag create TagCounter with count of
  1

  When deleting an entity I would need to:

  For each tag in Entity select TagCounter
  Decrease count by 1 of TagCounter
  Delete Entity

  This sounds ok to me.  When a user clicks a tag the query is simple
  too.

  I'll give this a try and see how it looks.

  Thanks again.

  On Jul 21, 12:46 pm, Mark mar...@gmail.com wrote:
   I probably have a naive understanding of what you're doing, maybe
   explain a little more, but to me it looks like this:

       class TagCounter {
           int count;
           String label; // primary key, unique tag name.
       }

       class Entity {
           String tag;
           String foo;
       }

   whenever the user creates a new entity, record its tag(s), then
   increment the appropriate TagCounter instance. Keeping counters like
   this introduces a bottleneck and goes against what you want to be
   doing for a highly scalable web service, so you may want to shard them
   (imagine you have thousands of users all trying to increment a single
   tag counter at once).   Since the above two classes won't be in the
   same entity group, you wouldn't be able to perform both operations in
   a single transaction. You can either accept the fact that your tag
   count may be out of sync with the actual number of entities with that
   tag, or you can have a multistep process and clean up dangling tag
   counts with a task (eventual consistency might be the term here). I'm
   referring to Nick Johnson's article on distributed transactions which
   I think you can modify to do what you're looking for:

      http://blog.notdot.net/2009/9/Distributed-Transactions-on-App-Engine

   I'm still learning app engine so take the above with a big grain of
   salt. To me, it seems that if you want to write a highly scalable web
   service, you need to accept that you may lose some data precision, or
   you have to put in additional work to get what you want (compared to
   assuming a single mysql instance etc).

   Anyway, after you implement something like the above, your original
   two queries should be easy to do. You probably want to define how many
   tags an Entity can have. If an Entity can have more than one tag, I'd
   explicitly state what that max is. Write out everything you need when
   the user submits an entity, so that your reads will be fast as other
   users browse the site.

   Mark

   On Jul 19, 9:16 am, planetjones jon.r.jo...@gmail.com wrote:

Hi,
I'm looking to store entities using GAE Java which have 1-many tags.
I
would like to display a tag cloud, so will need to know how many
times
each tag occurs (can't use aggregate functions and group by on GAE to
do this like I would in SQL). And when 

[appengine-java] App Engine down?

2010-07-22 Thread Yegor
My GAE apps (Java) and the app engine dashboard produce intermittent
Server 500 errors with a generic message:


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.


Because the dashboard is down too I can't even see the error logs.

The system status doesn't show any problems except for some Python
anomaly. I am on Java.

Yegor

-- 
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] App Engine down?

2010-07-22 Thread Don Schwarz
It should be okay now.  There was a brief outage that affected some
percentage of both Java and Python applications.  The Java application that
we test to create that dashboard was apparently lucky.

On Thu, Jul 22, 2010 at 1:14 PM, Yegor yegor.jba...@gmail.com wrote:

 My GAE apps (Java) and the app engine dashboard produce intermittent
 Server 500 errors with a generic message:

 
 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.
 

 Because the dashboard is down too I can't even see the error logs.

 The system status doesn't show any problems except for some Python
 anomaly. I am on Java.

 Yegor

 --
 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] cron log

2010-07-22 Thread Andrei
I have cron job that runs every 2 hours, but it ran 20 times in last
few minutes with message

Request was aborted after waiting too long to attempt to service your
request. This may happen sporadically when the App Engine serving
cluster is under unexpectedly high or uneven load. If you see this
message frequently, please contact the App Engine team.

-- 
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] NPE JspRuntimeLibrary.getContextRelativePath

2010-07-22 Thread Jon Lorusso
Hi,

I'm having trouble with my setup of Struts 2 on GAE. I had this very
same set up working in the past, but I obviously flipped the wrong
switch somewhere

I've got a jsp (index.jsp) which calls up an action:

s:action name=home executeResult=true /

This 'home' action does nothing, but forward on to another jsp,
home.jsp. All very simple. However, I'm getting the following
NullPointerException  in Google's jasper runtime:

ERROR [917483...@qtp-1301411841-0] ActionComponent.error(27) | Could
not execute action: /home
java.lang.NullPointerException
at
org.apache.jasper.runtime.JspRuntimeLibrary.getContextRelativePath(JspRuntimeLibrary.java:
908)
at
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:
963)
at
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:
581)
at
org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:
123)
at
org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:
186)
at
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:
362)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:
266)
at
com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:
165)
at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:
87)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:
237)
at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:
89)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:
237)
at
com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:
122)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:
237)
at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:
195)
at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:
87)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:
237)
at
com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:
179)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:
237)
at
org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:
94)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:
237)
at
org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:
235)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:
237)
at
com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:
89)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:
237)
at
com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:
130)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:
237)
at
org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept(ProfilingActivationInterceptor.java:
104)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:
237)
at
org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:
267)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:
237)
at
com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:
126)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:
237)
at
com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:
165)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:
237)
at
com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:
138)
at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:
87)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:
237)
at
org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:
164)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:
237)
at
com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:
179)
at

[appengine-java] Re: GAE Deployment - Unable to compile JSP

2010-07-22 Thread Shoubhik
Hi Mukesh,

have you copied the
  tools.jar from .../JDK1.6/lib to .../JRE1.6/lib   ?
And  javac.exe from .../JDK1.6/bin  to   JRE1.6/lib   ?


if not ,
try these,.

Also,check whether you have kept any unnecessary .jsp files in your /
war directory...(or the one appropriate in ur app's case).

Regards,
Shoubhik.

-- 
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] Invalid handle problem while using Transaction in Remote API.

2010-07-22 Thread Subhash
Hi

I am using Remote API for connecing with my database while running
code on my local machine. While I use transactions, it gives Invalid
handle exception while saving my entity. If I don't use transaction.
same code is running fine. Below is my code:


RemoteDatastore.install();
RemoteDatastore.divert(http://my_application_link/remote-datastore;,
applicationname, versionname);
DatastoreService datastoreService =
DatastoreServiceFactory.getDatastoreService();
Transaction transaction = datastoreService.beginTransaction();
Entity entity = new Entity(TestUser);
entity.setProperty(ActivityDateTime, new Date());
entity.setProperty(Activity, LOGIN);
entity.setProperty(IPAddress, 192.168.1.666);
datastoreService.put(entity);
transaction.commit();


Below is exception which I got on server:

java.lang.IllegalStateException: Could not read datastore request.
Main cause is [ApplicationError: 1: invalid handle:
15930507385780890370] Class Type [class
com.google.apphosting.api.ApiProxy$ApplicationException]

Any help/suggestion in this regard will be highly appreciated.

Regards,

Subhash

-- 
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] Unable to SHOW image...

2010-07-22 Thread Shoubhik
input name=COLLEGE type=image src=/Image0652.jpg

The above HTML snippet works fine when i use my app offline..

But after uploading it,.. the image just doesn't show up!

The logs:

No handlers matched this URL

Where am I wrong, please advise.. :-(


Thanks and regards,
Shoubhik Bose.

-- 
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: How to upload primary key as an id instead of name

2010-07-22 Thread Uberto Barbini
On Thu, Jul 22, 2010 at 3:49 PM, MANISH DHIMAN manisd...@gmail.com wrote:

 Let me explain once again if I missed something earlier. I have an
 existing task management application  wants to shift it now to google
 app engine. While I tried porting my existing data into google app
 engine using BulkLoader 1.3.5 with csv file, all my IDs saved as
 string (not as long). Suppose I was having a user with id=1 (long), it
 uploaded into google app engine with name=1(String). Now when I am
 saving new records directly on google app engine using my application
 running on google app engine, it saves an another record with
 id=1(this time it's long). So it's not possible for me to identifiy b/
 w these two records (one with id=1  another with name=1).

If you want to use names you have to put some logic in your app and
create them also for new objects before saving.

Otherwise if all your existing ids are numeric you can change
bulkloader to create the id instead of name.

I think gae behavior is clear, simple and consistent.

cheers

Uberto

-- 
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] Google App Engine problem with receiving OPTIONS requests

2010-07-22 Thread Panu
Hey,

I have a rather problematic issue with App Engine when attempting to
post data to the server.
Firefox uses OPTIONS method to verify the data before sending it to
the server and this is causing the issue.
Everything works fine on localhost and the server receives the OPTIONS
request, returns 200 and everything goes fine.
But when I put it to production I get the following error when trying
to post data:

java.security.AccessControlException: access denied
(java.lang.RuntimePermission accessDeclaredMembers)
at
java.security.AccessControlContext.checkPermission(AccessControlContext.java:
355)
at
java.security.AccessController.checkPermission(AccessController.java:
567)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at
com.google.apphosting.runtime.security.CustomSecurityManager.checkPermission(CustomSecurityManager.java:
45)
at java.lang.SecurityManager.checkMemberAccess(Unknown Source)
at java.lang.Class.checkMemberAccess(Unknown Source)
at java.lang.Class.getDeclaredMethods(Unknown Source)
at
javax.servlet.http.HttpServlet.getAllDeclaredMethods(HttpServlet.java:
479)
at
javax.servlet.http.HttpServlet.getAllDeclaredMethods(HttpServlet.java:
478)
at
javax.servlet.http.HttpServlet.getAllDeclaredMethods(HttpServlet.java:
478)
at javax.servlet.http.HttpServlet.doOptions(HttpServlet.java:534)
at
org.springframework.web.servlet.FrameworkServlet.doOptions(FrameworkServlet.java:
594)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
511)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1166)
at org.springframework.security.web.FilterChainProxy
$VirtualFilterChain.doFilter(FilterChainProxy.java:343)
at
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:
109)
at
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:
83)
at org.springframework.security.web.FilterChainProxy
$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
at
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:
97)
at org.springframework.security.web.FilterChainProxy
$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
at
org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:
78)
at org.springframework.security.web.FilterChainProxy
$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
at
org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:
187)
at org.springframework.security.web.FilterChainProxy
$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
at
org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:
105)
at org.springframework.security.web.FilterChainProxy
$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
at
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:
79)
at org.springframework.security.web.FilterChainProxy
$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
at
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:
149)
at
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:
237)
at
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:
167)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:
88)
at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:
76)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java:
97)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:
35)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:
43)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at

[appengine-java] Re: App Engine down?

2010-07-22 Thread Yegor
Yep, it seems to be back to normal. Thanks.

On Jul 22, 12:21 pm, Don Schwarz schwa...@google.com wrote:
 It should be okay now.  There was a brief outage that affected some
 percentage of both Java and Python applications.  The Java application that
 we test to create that dashboard was apparently lucky.



 On Thu, Jul 22, 2010 at 1:14 PM, Yegor yegor.jba...@gmail.com wrote:
  My GAE apps (Java) and the app engine dashboard produce intermittent
  Server 500 errors with a generic message:

  
  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.
  

  Because the dashboard is down too I can't even see the error logs.

  The system status doesn't show any problems except for some Python
  anomaly. I am on Java.

  Yegor

  --
  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%2B 
  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: GAE JavaMail jumbles UTF-8

2010-07-22 Thread Marc Hacker
Please star the issue at 
http://code.google.com/p/googleappengine/issues/detail?id=3497

On Jul 13, 3:40 pm, Marc Hacker marc1hac...@gmail.com wrote:
 Sounds good, thanks for trying, but it didn't help for me :-(

 Also I need a solution for the html body as well...

 Anyone?

 On Jul 13, 8:45 am, Peter Ondruska peter.ondru...@gmail.com wrote:



  You should encode subject if using non-ASCII:

  msg.setSubject(MimeUtility.encodeText(_subject, UTF-8, Q));

  On Jul 12, 9:03 pm, Pieter Coucke pieter.cou...@onthoo.com wrote:

   I can only confirm I see the same issue when sending e-mail with a German 
   ü
   in the subject.  I haven't found a solution yet.

   On Mon, Jul 12, 2010 at 3:04 PM, Marc Hacker marc1hac...@gmail.com 
   wrote:
On Google App Engine Java email service, I am trying to send a UTF8
(Hebrew) email subject and body but they arrive (in Gmail) jumbled  as

Here is my code

       MimeMessage msg = new MimeMessage(session);
       msg.setSubject(emailSubject, UTF-8);

       Multipart mp = new MimeMultipart();
       MimeBodyPart htmlPart = new MimeBodyPart();
       htmlPart.setContent(htmlBody, text/html; charset=UTF-8);
       mp.addBodyPart(htmlPart);
       msg.setContent(mp);
       Transport.send(msg);

I noticed that my browser is treating the email when viewed in Gmail
us Unicode UTF8 so that isn't the problem.

Any ideas please?

Marc

--
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%2B
 unsubscr...@googlegroups.com
.
For more options, visit this group at
   http://groups.google.com/group/google-appengine-java?hl=en.

   --
   Pieter Coucke
   Onthoo BVBAhttp://www.onthoo.comhttp://www.koopjeszoeker.be

-- 
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] Invalid handle problem while using Transaction in Remote API.

2010-07-22 Thread John Patterson


On 22 Jul 2010, at 20:53, Subhash wrote:


Hi

I am using Remote API for connecing with my database while running
code on my local machine. While I use transactions, it gives Invalid
handle exception while saving my entity. If I don't use transaction.
same code is running fine. Below is my code:


I haven't used RemoteDatastore with transactions myself.  This error  
looks similar to one thrown when using Iterators that need to fetch  
more data.  It seems that there are some differences in the local and  
production servers that cannot be overcome.  My only advice would be,  
don't use transactions!  Sorry can't be more help.


If this could be fixed with some help from a Googler with the inside  
know-how it would be really great.  For me this is the ideal way to  
work with the datastore remotely - exactly the same way you do locally  
using the same APIs.


--
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] number of properties in a composite index

2010-07-22 Thread pac
I think there is limit of 100/200 composite indexes.

But is there a limit on number of properties in a composite index ?
e.g. I have 4 in following example

datastore-index kind=SomeKind ancestor=false source=auto
property name=itemsList direction=asc/
property name=itemsList direction=asc/
property name=itemsList direction=asc/
property name=someDate direction=asc/
/datastore-index

-- 
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: email templating

2010-07-22 Thread TL
For very simple templates you can use java.text.MessageFormat. It
lacks the ability to do real template work, conditions, loops, HTML
escaping etc, but for simple substitutions, numbers, dates, etc it
works. There may be a comparable and better implementation in one of
the apache utility packages as far as I remember.

Velocity is a big hammer, but it is a fully featured template
language. Complicated to integrate if you do not use it they way they
thought you would (web pages with predefined templates, like JSP).

-- 
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] new demo shows google appengine instances registering in opscode chef upon startup

2010-07-22 Thread Adrian Cole
I wrote a demo application which registers google appengine instances in
chef [1], specifically the opscode
platformhttps://cookbooks.opscode.com/users/new,
upon startup.  While the chef api is not 100% complete in jclouds, enough is
finished to start integrating.

   http://github.com/jclouds/jclouds-chef-googleappengine-demo

The status page shows all the instances of the current google app engine
application, which are registered in the opscode platform.

   http://jclouds-chef-demo.appspot.com/nodes/status.check

When this seems to hesitate, it is probably google firing up a new instance,
which implies a new node registration.  This is a simple demonstration.
More sophisticated applications can be built to use the databag concept in
chef to ensure that all dots between your cloud and non-cloud infrastructure
are connected [2].  You could even use the jclouds compute api to launch new
compute nodes (ex. ec2) and register them accordingly.

This demo requires a publicly available Chef 0.9.6 endpoint.  If you are
using the Opscode Platform, remember that you get 5 nodes for free.  Make
sure you clean up your nodes in the console when you are finished testing
[3].

I hope you like it!
-Adrian
founder jclouds

[1] http://wiki.opscode.com/display/chef/Home
[2] http://wiki.opscode.com/display/chef/Data+Bags
[3] https://manage.opscode.com/nodes

-- 
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 of persistence in JDO

2010-07-22 Thread lisandrodc
Hi! I have a problem with active transaction.When I try to guard in
the datastore, says:

 Object with id com.google.appengine.api.datastore.Key:Torneo(1)/
Equipo(3) is managed by a different Object Manager.

Disegn:
A Torneo has relation one to many Equipo
A Fecha has relation one to many Partido

The method:
private static PersistenceManager pm =
PMF.get().getPersistenceManager();
//pm is a singleton
public void crearPartido(Long idEqLocal, Long idEqVisitante, Date
fecha,
Fecha fechaAgreg, String resultado, String
hora,Long idTorneo){

PersistenceManager pm =
JDOHelper.getPersistenceManager(fechaAgreg);
//or Transaction tx = pm.currentTransaction();
Transaction tx = pm.currentTransaction();

try {
tx.begin();
Partido par1 = null;
ControladorTorneo cT= new ControladorTorneo();
par1 = new Partido(null, new
Resultado(),cT.devolverEquipo( idTorneo,idEqLocal),
cT.devolverEquipo(idTorneo,idEqVisitante), fecha, hora);
 /*In mode debug, is here below where accedes for the
block finally(with error)   */
 fechaAgreg.agregarPartido(par1);

pm.makePersistent(fechaAgreg);
tx.commit();

} finally {
 if (tx != null  tx.isActive())
 tx.rollback();
  pm.close();
}

}

And the method crearPartido is called for:
public String execute() throws Exception {

ControladorFecha cF = new ControladorFecha();

Fecha fechaSel = cF.devolverFecha(fecha, torParam);
ControladorPartido cP= new ControladorPartido();
cP.crearPartido(idEquipoLocal, idEquipoVisitante,
fechaPartido,fechaSel,resultado,hora,torParam);

return SUCCESS;
}

Thr method devolverFecha:
private static PersistenceManager pm =
PMF.get().getPersistenceManager();
//pm is a singleton
public Fecha devolverFecha(Long idFecha, Long torneo) {

Transaction tx = pm.currentTransaction();
try {
tx.begin();
Key k2 = new 
KeyFactory.Builder(Torneo.class.getSimpleName(),

torneo).addChild(Fecha.class.getSimpleName(), idFecha)
.getKey();

Fecha f = pm.getObjectById(Fecha.class, k2);

 tx.commit();
return f;
} finally {
if (tx.isActive()) {
tx.rollback();
}
//pm.close();
}
}

Regards!
Lisandro

-- 
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] Please help, I'm not able to obtain the oAuth redirect URL from twitter

2010-07-22 Thread nischalshetty
To obtain the redirect URL it's an https call to twitter. I'm just not
able to obtain it in production.

However, it works in my development environment on my PC. Please help
ASAP, my site gets a lot of users and this is causing problems for all
of them :(

Here's the stack trace :

twitter4j.TwitterException: Could not fetch URL: 
https://twitter.com/oauth/request_token
at twitter4j.internal.http.HttpClient.request(HttpClient.java:340)
at
twitter4j.internal.http.HttpClientWrapper.request(HttpClientWrapper.java:
68)
at
twitter4j.internal.http.HttpClientWrapper.post(HttpClientWrapper.java:
99)
at
twitter4j.http.OAuthAuthorization.getOAuthRequestToken(OAuthAuthorization.java:
121)
at twitter4j.Twitter.getOAuthRequestToken(Twitter.java:1406)
at
justunfollow.manager.impl.JustUnfollowManagerImpl.redirectURL(JustUnfollowManagerImpl.java:
60)
at justunfollow.action.Login.authenticate(Login.java:56)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.Method_
$1.run(Method_.java:165)
at java.security.AccessController.doPrivileged(Native Method)
at
com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.Method_.privilegedInvoke(Method_.java:
163)
at
com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.Method_.invoke_(Method_.java:
124)
at
com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.Method_.invoke(Method_.java:
43)
at
com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:
404)
at
com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:
267)
at
justunfollow.interceptor.ExceptionInterceptor.intercept(ExceptionInterceptor.java:
23)
at com.opensymphony.xwork2.DefaultActionInvocation
$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation
$2.doProfiling(DefaultActionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:
455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:
221)
at
com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:
221)
at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:
86)
at com.opensymphony.xwork2.DefaultActionInvocation
$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation
$2.doProfiling(DefaultActionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:
455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:
221)
at
com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:
150)
at
org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:
48)
at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:
86)
at com.opensymphony.xwork2.DefaultActionInvocation
$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation
$2.doProfiling(DefaultActionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:
455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:
221)
at
com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:
123)
at com.opensymphony.xwork2.DefaultActionInvocation
$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation
$2.doProfiling(DefaultActionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:
455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:
221)
at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:
184)
at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:
86)
at com.opensymphony.xwork2.DefaultActionInvocation
$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation
$2.doProfiling(DefaultActionInvocation.java:223)
at

[appengine-java] Re: Please help, I'm not able to obtain the oAuth redirect URL from twitter

2010-07-22 Thread nischalshetty
Was searching twitter, others seem to be facing the same problem.
Please treat this on priority, my entire site http://www.justunfollow.com
is unusable right now due to the error.

A lot of users are stuck due to the error.

-Nischal

On Jul 23, 7:24 am, nischalshetty nischalshett...@gmail.com wrote:
 To obtain the redirect URL it's an https call to twitter. I'm just not
 able to obtain it in production.

 However, it works in my development environment on my PC. Please help
 ASAP, my site gets a lot of users and this is causing problems for all
 of them :(

 Here's the stack trace :

 twitter4j.TwitterException: Could not fetch 
 URL:https://twitter.com/oauth/request_token
         at twitter4j.internal.http.HttpClient.request(HttpClient.java:340)
         at
 twitter4j.internal.http.HttpClientWrapper.request(HttpClientWrapper.java:
 68)
         at
 twitter4j.internal.http.HttpClientWrapper.post(HttpClientWrapper.java:
 99)
         at
 twitter4j.http.OAuthAuthorization.getOAuthRequestToken(OAuthAuthorization.j 
 ava:
 121)
         at twitter4j.Twitter.getOAuthRequestToken(Twitter.java:1406)
         at
 justunfollow.manager.impl.JustUnfollowManagerImpl.redirectURL(JustUnfollowM 
 anagerImpl.java:
 60)
         at justunfollow.action.Login.authenticate(Login.java:56)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at
 com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.M 
 ethod_
 $1.run(Method_.java:165)
         at java.security.AccessController.doPrivileged(Native Method)
         at
 com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.M 
 ethod_.privilegedInvoke(Method_.java:
 163)
         at
 com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.M 
 ethod_.invoke_(Method_.java:
 124)
         at
 com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.M 
 ethod_.invoke(Method_.java:
 43)
         at
 com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionI 
 nvocation.java:
 404)
         at
 com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultAct 
 ionInvocation.java:
 267)
         at
 justunfollow.interceptor.ExceptionInterceptor.intercept(ExceptionIntercepto 
 r.java:
 23)
         at com.opensymphony.xwork2.DefaultActionInvocation
 $2.doProfiling(DefaultActionInvocation.java:224)
         at com.opensymphony.xwork2.DefaultActionInvocation
 $2.doProfiling(DefaultActionInvocation.java:223)
         at
 com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStac 
 k.java:
 455)
         at
 com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocat 
 ion.java:
 221)
         at
 com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept( 
 DefaultWorkflowInterceptor.java:
 221)
         at
 com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Metho 
 dFilterInterceptor.java:
 86)
         at com.opensymphony.xwork2.DefaultActionInvocation
 $2.doProfiling(DefaultActionInvocation.java:224)
         at com.opensymphony.xwork2.DefaultActionInvocation
 $2.doProfiling(DefaultActionInvocation.java:223)
         at
 com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStac 
 k.java:
 455)
         at
 com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocat 
 ion.java:
 221)
         at
 com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(Validat 
 ionInterceptor.java:
 150)
         at
 org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.d 
 oIntercept(AnnotationValidationInterceptor.java:
 48)
         at
 com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Metho 
 dFilterInterceptor.java:
 86)
         at com.opensymphony.xwork2.DefaultActionInvocation
 $2.doProfiling(DefaultActionInvocation.java:224)
         at com.opensymphony.xwork2.DefaultActionInvocation
 $2.doProfiling(DefaultActionInvocation.java:223)
         at
 com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStac 
 k.java:
 455)
         at
 com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocat 
 ion.java:
 221)
         at
 com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(Co 
 nversionErrorInterceptor.java:
 123)
         at com.opensymphony.xwork2.DefaultActionInvocation
 $2.doProfiling(DefaultActionInvocation.java:224)
         at com.opensymphony.xwork2.DefaultActionInvocation
 $2.doProfiling(DefaultActionInvocation.java:223)
         at
 com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStac 
 k.java:
 455)
         at
 com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocat 
 ion.java:
 221)
         at
 

[appengine-java] Re: How to upload primary key as an id instead of name

2010-07-22 Thread Subhash
Hi Uberto,

 Otherwise if all your existing ids are numeric you can change
 bulkloader to create the id instead of name.

How I can upload exiting data with id as numeric not with name as
string.

My .yaml file format is given below:

transformers:
- kind:User
  connector: csv
  connector_options:
encoding: utf-8
columns: from_header
  property_map:
- property: __key__
  external_name: UserId
  export_transform: datastore.Key.id
- property: UserName
  external_name: UserName

Any help/suggestion in this regard will be highly appreciated.

Regards,
Subhash


On Jul 22, 7:04 pm, Uberto Barbini ube...@ubiland.net wrote:
 On Thu, Jul 22, 2010 at 3:49 PM, MANISH DHIMAN manisd...@gmail.com wrote:

  Let me explain once again if I missed something earlier. I have an
  existing task management application  wants to shift it now to google
  app engine. While I tried porting my existing data into google app
  engine using BulkLoader 1.3.5 with csv file, all my IDs saved as
  string (not as long). Suppose I was having a user withid=1 (long), it
  uploaded into google app engine withname=1(String). Now when I am
  saving new records directly on google app engine using my application
  running on google app engine, it saves an another record with
 id=1(this time it's long). So it's not possible for me to identifiy b/
  w these two records (one withid=1  another withname=1).

 If you want to use names you have to put some logic in your app and
 create them also for new objects before saving.

 Otherwise if all your existing ids are numeric you can change
 bulkloader to create theidinstead ofname.

 I think gae behavior is clear, simple and consistent.

 cheers

 Uberto

-- 
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] limit on the entities in the entitygroup

2010-07-22 Thread aswath satrasala
Hello,
I am writing a multi-tenant accounting app for SMB's.
Is there any limit on the number of entities in the entitygroup?   I am
planning to put most of the entities in one entity group for each tenant.
Since my app is for SMB's, the number of concurrent users is 3-5. Hence, I
don't anticipate the loss of concurrency, even if I put most of the entities
for each tenant in the same entitygroup.

Any suggestions
-Aswath

-- 
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: Please help, I'm not able to obtain the oAuth redirect URL from twitter

2010-07-22 Thread Benjamin
Sorry to hear of your trouble Nischal

I'm hitting twitter without any issue from my prod app engine - if it
helps, i've had a lot of success using twitter4j libraries - maybe you
can check them out.

The only strange thing about getting an auth token from twitter oauth
from app engine is how you have to direct the user to the
authorization url and hold the token in your session on the server
side while they authorize the app - then continue with the process of
getting an oauth token on the server.



On Jul 22, 10:33 pm, nischalshetty nischalshett...@gmail.com wrote:
 Was searching twitter, others seem to be facing the same problem.
 Please treat this on priority, my entire sitehttp://www.justunfollow.com
 is unusable right now due to the error.

 A lot of users are stuck due to the error.

 -Nischal

 On Jul 23, 7:24 am, nischalshetty nischalshett...@gmail.com wrote:



  To obtain the redirect URL it's an https call to twitter. I'm just not
  able to obtain it in production.

  However, it works in my development environment on my PC. Please help
  ASAP, my site gets a lot of users and this is causing problems for all
  of them :(

  Here's the stack trace :

  twitter4j.TwitterException: Could not fetch 
  URL:https://twitter.com/oauth/request_token
          at twitter4j.internal.http.HttpClient.request(HttpClient.java:340)
          at
  twitter4j.internal.http.HttpClientWrapper.request(HttpClientWrapper.java:
  68)
          at
  twitter4j.internal.http.HttpClientWrapper.post(HttpClientWrapper.java:
  99)
          at
  twitter4j.http.OAuthAuthorization.getOAuthRequestToken(OAuthAuthorization.j 
  ava:
  121)
          at twitter4j.Twitter.getOAuthRequestToken(Twitter.java:1406)
          at
  justunfollow.manager.impl.JustUnfollowManagerImpl.redirectURL(JustUnfollowM 
  anagerImpl.java:
  60)
          at justunfollow.action.Login.authenticate(Login.java:56)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
          at java.lang.reflect.Method.invoke(Unknown Source)
          at
  com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.M 
  ethod_
  $1.run(Method_.java:165)
          at java.security.AccessController.doPrivileged(Native Method)
          at
  com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.M 
  ethod_.privilegedInvoke(Method_.java:
  163)
          at
  com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.M 
  ethod_.invoke_(Method_.java:
  124)
          at
  com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.M 
  ethod_.invoke(Method_.java:
  43)
          at
  com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionI 
  nvocation.java:
  404)
          at
  com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultAct 
  ionInvocation.java:
  267)
          at
  justunfollow.interceptor.ExceptionInterceptor.intercept(ExceptionIntercepto 
  r.java:
  23)
          at com.opensymphony.xwork2.DefaultActionInvocation
  $2.doProfiling(DefaultActionInvocation.java:224)
          at com.opensymphony.xwork2.DefaultActionInvocation
  $2.doProfiling(DefaultActionInvocation.java:223)
          at
  com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStac 
  k.java:
  455)
          at
  com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocat 
  ion.java:
  221)
          at
  com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept( 
  DefaultWorkflowInterceptor.java:
  221)
          at
  com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Metho 
  dFilterInterceptor.java:
  86)
          at com.opensymphony.xwork2.DefaultActionInvocation
  $2.doProfiling(DefaultActionInvocation.java:224)
          at com.opensymphony.xwork2.DefaultActionInvocation
  $2.doProfiling(DefaultActionInvocation.java:223)
          at
  com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStac 
  k.java:
  455)
          at
  com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocat 
  ion.java:
  221)
          at
  com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(Validat 
  ionInterceptor.java:
  150)
          at
  org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.d 
  oIntercept(AnnotationValidationInterceptor.java:
  48)
          at
  com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Metho 
  dFilterInterceptor.java:
  86)
          at com.opensymphony.xwork2.DefaultActionInvocation
  $2.doProfiling(DefaultActionInvocation.java:224)
          at com.opensymphony.xwork2.DefaultActionInvocation
  $2.doProfiling(DefaultActionInvocation.java:223)
          at
  com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStac 
  k.java:
  

[appengine-java] Re: Please help, I'm not able to obtain the oAuth redirect URL from twitter

2010-07-22 Thread nischalshetty
@Benjamin

I am using twitter4j. Its not an issue on my end since the apps been
running from 6 months now. And I just ran a check on many other
twitter apps hosted on the app engine, none seem to be working.

Can you share the url of your app?

-Nischal

On Jul 23, 10:03 am, Benjamin bsaut...@gmail.com wrote:
 Sorry to hear of your trouble Nischal

 I'm hitting twitter without any issue from my prod app engine - if it
 helps, i've had a lot of success using twitter4j libraries - maybe you
 can check them out.

 The only strange thing about getting an auth token from twitter oauth
 from app engine is how you have to direct the user to the
 authorization url and hold the token in your session on the server
 side while they authorize the app - then continue with the process of
 getting an oauth token on the server.

 On Jul 22, 10:33 pm, nischalshetty nischalshett...@gmail.com wrote:



  Was searching twitter, others seem to be facing the same problem.
  Please treat this on priority, my entire sitehttp://www.justunfollow.com
  is unusable right now due to the error.

  A lot of users are stuck due to the error.

  -Nischal

  On Jul 23, 7:24 am, nischalshetty nischalshett...@gmail.com wrote:

   To obtain the redirect URL it's an https call to twitter. I'm just not
   able to obtain it in production.

   However, it works in my development environment on my PC. Please help
   ASAP, my site gets a lot of users and this is causing problems for all
   of them :(

   Here's the stack trace :

   twitter4j.TwitterException: Could not fetch 
   URL:https://twitter.com/oauth/request_token
           at twitter4j.internal.http.HttpClient.request(HttpClient.java:340)
           at
   twitter4j.internal.http.HttpClientWrapper.request(HttpClientWrapper.java:
   68)
           at
   twitter4j.internal.http.HttpClientWrapper.post(HttpClientWrapper.java:
   99)
           at
   twitter4j.http.OAuthAuthorization.getOAuthRequestToken(OAuthAuthorization.j
ava:
   121)
           at twitter4j.Twitter.getOAuthRequestToken(Twitter.java:1406)
           at
   justunfollow.manager.impl.JustUnfollowManagerImpl.redirectURL(JustUnfollowM
anagerImpl.java:
   60)
           at justunfollow.action.Login.authenticate(Login.java:56)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
           at java.lang.reflect.Method.invoke(Unknown Source)
           at
   com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.M
ethod_
   $1.run(Method_.java:165)
           at java.security.AccessController.doPrivileged(Native Method)
           at
   com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.M
ethod_.privilegedInvoke(Method_.java:
   163)
           at
   com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.M
ethod_.invoke_(Method_.java:
   124)
           at
   com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.M
ethod_.invoke(Method_.java:
   43)
           at
   com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionI
nvocation.java:
   404)
           at
   com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultAct
ionInvocation.java:
   267)
           at
   justunfollow.interceptor.ExceptionInterceptor.intercept(ExceptionIntercepto
r.java:
   23)
           at com.opensymphony.xwork2.DefaultActionInvocation
   $2.doProfiling(DefaultActionInvocation.java:224)
           at com.opensymphony.xwork2.DefaultActionInvocation
   $2.doProfiling(DefaultActionInvocation.java:223)
           at
   com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStac
k.java:
   455)
           at
   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocat
ion.java:
   221)
           at
   com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(
DefaultWorkflowInterceptor.java:
   221)
           at
   com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Metho
dFilterInterceptor.java:
   86)
           at com.opensymphony.xwork2.DefaultActionInvocation
   $2.doProfiling(DefaultActionInvocation.java:224)
           at com.opensymphony.xwork2.DefaultActionInvocation
   $2.doProfiling(DefaultActionInvocation.java:223)
           at
   com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStac
k.java:
   455)
           at
   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocat
ion.java:
   221)
           at
   com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(Validat
ionInterceptor.java:
   150)
           at
   org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.d
oIntercept(AnnotationValidationInterceptor.java:
   48)
           at