Re: [appengine-java] Datastore server error

2012-03-21 Thread Aswath Satrasala
I have been have the same Datastore Viewer error with my appid
'vs-accounting'.  It is configure as M/S.
I am having this trouble for over 1.5 days.  This application is in
production.  I don't know what to do now  :(

Error: Server Error
The server encountered an error and could not complete your request.
If the problem persists, please
reportyour problem
and mention this error message and the query that caused it.

-Aswath


On Sat, Mar 10, 2012 at 10:33 PM, wakk...@hotmail.com
wrote:

> Hi,
>
> My application is address-generator-singapore.appspot.com, however the
> Datastore Viewer seems to have gone awry. I can't view it at all; all that
> happens when I click it is a server error and a link returning me to the
> applications screen.
>
> I've done research and it seems this problem is pretty rampart, but there
> has been no fix regarding this as of yet. Is there a way to get an admin to
> fix the problem? Because it broke my application and I can't run it at all
> now.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-appengine-java/-/Bn9FOOIDEN0J.
> To post to this group, send email to
> google-appengine-java@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Namespace error - Datastore Statistics

2012-03-02 Thread Aswath Satrasala
Hello,
In the appengine console, I choose my appid and go to the Datastore
Statistics screen.
I type the namespace name, and select the namespace in the suggested list.

I get the error
There were errors:

   - 
Namespace-
Namespace does not exist:
   abc-company-aswath.satrasala-gmail.com

I tried for many namespaces, and I get the same above error

-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-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Metadata in Datastore Statistics

2012-03-02 Thread Aswath Satrasala
Hello,
I am looking at the Datastore Statistics screen
What is Metadata, that is showing in the pie chart in that screen

-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-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Thread question

2012-03-01 Thread Aswath Satrasala
I am already resetting the ThreadLocal variables to null in the first
filter in the web.xml.  But, wanted to find out, if any other configuration
is available.

Regards
-Aswath

On Thu, Mar 1, 2012 at 5:16 PM, Aswath Satrasala  wrote:

> Hello,
> In Appengine, after a request is served by a Thread, is there any
> configuration to automatically discard the ThreadLocal data of the Thread.
> I want to ensure that every request coming does not have the ThreadLocal
> data that may have been stored by an earlier request.
>
> Regards
> -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-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Thread question

2012-03-01 Thread Aswath Satrasala
Hello,
In Appengine, after a request is served by a Thread, is there any
configuration to automatically discard the ThreadLocal data of the Thread.
I want to ensure that every request coming does not have the ThreadLocal
data that may have been stored by an earlier request.

Regards
-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-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Re: backup for data in namespaces

2012-02-24 Thread Aswath Satrasala
I have starred 3-4 of the issues that are namespace and backup related.

-Aswath

On Fri, Feb 24, 2012 at 1:32 PM, andrew wrote:

> Good question!
>
> For us, the feature is useless without this
>
> All datastore admin tools and utilities need to be data space aware by
> default.
>
> On Feb 24, 3:50 am, Aswath Satrasala 
> wrote:
> > Hello,
> > In the Datastore Admin console, there is no UI to backup for the data
> > containing in namespaces.   It shows only the entities in no namespace.
> > When will this feature rollout?
> >
> > -Aswathwww.AccountingGuru.in
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-java@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] backup for data in namespaces

2012-02-23 Thread Aswath Satrasala
Hello,
In the Datastore Admin console, there is no UI to backup for the data
containing in namespaces.   It shows only the entities in no namespace.
When will this feature rollout?

-Aswath
www.AccountingGuru.in

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] versioning on dev server

2012-02-09 Thread Aswath Satrasala
Hello,
I want to do the following
* The user logs in to the default application
* Based on the user criteria that is stored in the datastore, I want to
redirect the further requests to different appengine version of the server.
The reason I want to do this is, I will be able to put my selected users on
a new version first, and if things go well then, I can put the remaining
users to the new version.
I think this may be possible on the remote server.  Any one tried this
approach.

Can we do this dev server also? There are no app versions on the dev
server.  Any alternatives to do the above during development and testing

-Aswath
www.AccountingGuru.in

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [objectify-appengine] Re: [appengine-java] HRD - Eventual consistency

2011-11-01 Thread Aswath Satrasala
Thanks for the tips on making it work with JUNIT tests.  But, I have
webdriver tests that are failing. In my case, many webdriver tests give the
real experience as done by the user.

I am reading the pattern suggested by Jeff.  But, it still leads to many
application wide changes in my case.
I am thinking the following approach, to limit the pain of the HRD eventual
consistency issue.  It can be done along the same lines as the Objectify
CachingService.  Here is my first cut.

Lets say the Class is Product.  I will created another Class ProductECList
(EC - Eventual Consistency)
class ProductECList {
@Id long = 1;
Key listProductKeys;
}

1st part ObjectifyImpl put()
- Extend ObjectifyImpl put().  Check if the POJO's Class is Product.  Then
get the KEY of this put entity.
- Read ProductEcList, and add to the listProductKeys and do the
put(ProductEcList)

2nd part - QueryImpl.list() for the simple case discussion.
1. Extend QueryImpl.list()
2. Do the normal Objectify list()
3. Get the listProductKeys from the ProductECList entity
4. Do a Query for the listProductKeys, and find if you get back the same
number of entities as in the list.  Then you can assume you have got
entities queried in the above no 2.  Then remove the keys from the
listProductKeys and persist ProductECList
5. If no entities are returned in above no 4, then get each entity by the
Key, and then check if the entity satisfies the Query conditions. If yes,
then add it to the QueryImpl.list() from above no 1.

Give your feedback please..

-Aswath
www.AccountingGuru.in




On Tue, Nov 1, 2011 at 5:01 AM, Broc Seib  wrote:

> In my unit tests for my entities using HRD, I simply switch that
> percentage completely on/off around those few places in the unit test code
> where I need my entity to become "fully committed" in order for the rest of
> the unit test to work. Yes, it is kind of contrived, but then again so is a
> unit test. I must consciously decide to flip it on/off around that bit of
> code. My unit test code looks something like this:
>
>
> //read this:
> http://code.google.com/appengine/docs/java/tools/localunittesting.html
> public class SampleUnitTest {
>
> private static boolean SHOULD_APPLY = false; // set this flag
> appropriately in the units test below.
>  private static final class CustomHighRepJobPolicy implements
> HighRepJobPolicy {
> @Override
>  public boolean shouldApplyNewJob(Key arg0) {
> return SHOULD_APPLY;
> }
>  @Override
> public boolean shouldRollForwardExistingJob(Key arg0) {
> return SHOULD_APPLY;
>  }
> }
>
> private final LocalServiceTestHelper helper = new
> LocalServiceTestHelper(new
> LocalDatastoreServiceTestConfig().setAlternateHighRepJobPolicyClass(CustomHighRepJobPolicy.class));
>
> @Before
> public void setUp() {
> helper.setUp();
> }
>
> @After
> public void tearDown() {
> helper.tearDown();
> }
>
>
> @Test
> public void test1() throws Exception {
> String orgName = "The Organization, Inc.";
>  SHOULD_APPLY = true; // temporarily allow things to be written to
> datastore for real
>  final OOrganization org = ODaoOrganization.create(orgName);
> SHOULD_APPLY = false; // return HRD writes back to full "failure" for
> remaining unit test
>
> // now do my unit test that needed my org entity to be properly
> persisted.
> }
> }
>
>
> Broc
>
>
>
> On Mon, Oct 31, 2011 at 3:36 PM, Jeff Schnitzer wrote:
>
>> There's this:
>>
>> https://groups.google.com/d/msg/google-appengine/NdUAY0crVjg/3fJX3Gn3cOYJ
>>
>> Some thoughts:
>>
>>  * I don't think there's really anything to save you from eventuality
>> except careful consideration during the design of your data model.  Pick
>> your entity groups carefully and use XG transactions sparingly to move data
>> "across" when you need atomicity.
>>
>>  * A lot of the time eventuality is not a big deal. On the other hand, if
>> you're building an accounting app, it probably is a big deal.
>>
>>  * There's a difference between what your users experience and what your
>> tests experience.  Say you have a test for "add this product to the catalog
>> and then check to see if it's in the catalog".  In the real world it
>> doesn't matter if your users see the new product right away.  But your
>> tests demand it immediately.  The problem is with the test.  I've "fixed"
>> the tests by doing this in my fixture setup:
>>
>> newLocalDatastoreServiceTestConfig().setDefaultHighRepJobPolicyUnappliedJobPercentage(0.1f)
>>
>> Unfortunately a good argument can be made that this diminishes the

[appengine-java] Re: HRD - Eventual consistency

2011-10-31 Thread Aswath Satrasala
On Mon, Oct 31, 2011 at 7:01 PM, Aswath Satrasala <
aswath.satras...@gmail.com> wrote:

> Hi,
> I am trying HRD on local dev server.  I have bunch of webdriver tests for
> different parts of my application that create entities and then doing a
> list of all the entities.
> My tests are failing in several places.  It is due to the eventual
> consistency of the HRD.  The tests run fine on M/S and on both
> production/local environment.
> I have 20-30 KINDS, and entities are created for 1-or more KINDs depending
> on the business logic, all in a transaction.   Immediately, various reports
> are done.  They fail.
>
> My question: What pattern needs to be followed?  My application has grown
> very large during last 1.5 years or so.  Doing re-factoring at every place
> in the application for eventual consistency will be a very large effort for
> a small team. I don't even know what extra work needs to be put to get this
> fixed.
>
> Am I better of sticking with M/S.  So far, I have managed and designed
> entity relationships to work within one entity group.

I mean, for a given business logic, i create group of entities involving
different KINDS, all with same Parentkey.  The parentKey itself is based it
on the Customer/supplier in the given context. Hence, my queries/reports
are spread across different entity groups.

>
>
> Are there any patterns coming out from the Objectify team to handle
> Eventual consistency issue of the HRD?
>
> -Aswath
> www.AccountingGuru.in
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] HRD - Eventual consistency

2011-10-31 Thread Aswath Satrasala
Hi,
I am trying HRD on local dev server.  I have bunch of webdriver tests for
different parts of my application that create entities and then doing a
list of all the entities.
My tests are failing in several places.  It is due to the eventual
consistency of the HRD.  The tests run fine on M/S and on both
production/local environment.
I have 20-30 KINDS, and entities are created for 1-or more KINDs depending
on the business logic, all in a transaction.   Immediately, various reports
are done.  They fail.

My question: What pattern needs to be followed?  My application has grown
very large during last 1.5 years or so.  Doing re-factoring at every place
in the application for eventual consistency will be a very large effort for
a small team. I don't even know what extra work needs to be put to get this
fixed.

Am I better of sticking with M/S.  So far, I have managed and designed
entity relationships to work within one entity group.

Are there any patterns coming out from the Objectify team to handle
Eventual consistency issue of the HRD?

-Aswath
www.AccountingGuru.in

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Migration to HRD

2011-10-21 Thread Aswath Satrasala
Hi,
I have my application in M/S, and I have lots of namespaces.  The Datastore
Admin utility does not display entities in namespaces.
How do I copy the data to new HRD app-id.

Some of the other options I considered, and does not work very well for me
- bulkloader to transfer data to the local machine and then uploading to the
new app-id.  It is too slow and I did not have luck dealing while dealing
with the namespace data.
- Remote api option does not work yet on the webapplication.

Regards,
-Aswath
www.AccountingGuru.in

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] BigTable "LIKE"

2011-08-28 Thread Aswath Satrasala
Following is the solution I am planning to implement for a similar case in
my application.  But, it depends on your data.
*Method 1*
* Create 3-4 additional properties in the BOOK kind.  Like for example,
word1, word2, word3 properties etc.
* Split the book title into words and store each word into a property.
* With objectify, then you can do the above split login in the PrePersist
method
* Do the query with word1, word2 and word3 properties.  This means,
additional 2-3 queries will be performed.

*Method 2
** Create a KIND BookWords
{
   @Long id
   Key bookKey
   String word
}

* Split the book tile and for each word add a row in the BookWords table.
* If, interested in case insensitive searches, convert the 1 letter of the
split word into upper/lower case and created additional rows in KIND
BookWords
* Do a query with the BookWords, and then get all the Book Keys.
* Now do a query with the Book

-Aswath
www.AccountingGuru.in

On Fri, Aug 26, 2011 at 9:55 PM, realdope  wrote:

> Hi,
> I know that you cannot do a "LIKE" clause in BigTable. How do you get
> around this issue?
>
> Suppose I'm making a book database, and I want to implement a search
> function that compares titles against a random string. What is a plausible
> mechanism with which to do so?
>
> Any help would be appreciated!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-appengine-java/-/S3KWOBYjWuEJ.
> To post to this group, send email to
> google-appengine-java@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] using https with my domain

2011-08-25 Thread Aswath Satrasala
Hello,
I want to use https with my domain www.AccountingGuru.in
Any ideas on how to do this?

Regards
-Aswath
www.AccountingGuru.in

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] MemcacheServiceExceptions during 9:30AM IST thru 11:45AM IST.

2011-08-25 Thread Aswath Satrasala
Hello Google Team,
I am noticing few MemcacheServiceExceptions in my logs today.  Anyone
noticing the same?
The exceptions occured during 9:30AM IST thru 11:45AM IST.

Memcache errors in the logs:

com.google.appengine.api.memcache.LogAndContinueErrorHandler
handleServiceError: Service error in memcache
com.google.appengine.api.memcache.MemcacheServiceException: Memcache
increment of key
'monotonic-Party-Softsolutions:kavyashre...@gmail.com-2001': exception
at 
com.google.appengine.api.memcache.MemcacheServiceImpl.increment(MemcacheServiceImpl.java:745)
at 
com.google.appengine.api.memcache.MemcacheServiceImpl.increment(MemcacheServiceImpl.java:709)
..
Caused by: com.google.apphosting.api.ApiProxy$CapabilityDisabledException:
The API call memcache.Increment() is temporarily unavailable: Memcache
is temporarily unavailable. Please see
http://code.google.com/status/appengine for more information.
at 
com.google.apphosting.runtime.ApiProxyImpl$AsyncApiFuture.rpcFinished(ApiProxyImpl.java:415)
at 
com.google.net.rpc.RpcStub$RpcCallbackDispatcher$1.runInContext(RpcStub.java:1050)


com.google.appengine.api.memcache.LogAndContinueErrorHandler
handleServiceError: Service error in memcache
com.google.appengine.api.memcache.MemcacheServiceException: Memcache
increment of key 'monotonic-AcctgTransaction-ASTRIX
TECHNOLOGIES:nitheeshshett...@gmail.com-2189096': exception
at 
com.google.appengine.api.memcache.MemcacheServiceImpl.increment(MemcacheServiceImpl.java:745)
at 
com.google.appengine.api.memcache.MemcacheServiceImpl.increment(MemcacheServiceImpl.java:709)
at com.veersoft.objectify.VsMonotonic.next(VsMonotonic.java:124)
...
Caused by: com.google.apphosting.api.ApiProxy$CapabilityDisabledException:
The API call memcache.Increment() is temporarily unavailable: Memcache
is temporarily unavailable. Please see
http://code.google.com/status/appengine for more information.
at 
com.google.apphosting.runtime.ApiProxyImpl$AsyncApiFuture.rpcFinished(ApiProxyImpl.java:415)
at 
com.google.net.rpc.RpcStub$RpcCallbackDispatcher$1.runInContext(RpcStub.java:1050)
at 
com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:454)
at com.google.tracing.TraceContext.runInContext(TraceContext.java:694)


-Aswath
www.AccountingGuru.in

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] white labeling

2011-08-18 Thread Aswath Satrasala
Hi,
I have appengine application which is shown interest by few resellers. They
are taking about white labeling.
Can anyone provide details on how to do the white labeling for appengine
application.
What options are available?
One possibility is that each reseller be given a different app-id with
permissions.  In this case, I have to monitor/upgrade all the app-id's.

Any pointers on this subject?

Regards
-Aswath
www.AccountingGuru.in

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] DatastoretimeExceptions

2011-08-18 Thread Aswath Satrasala
It is master/slave.  Now, I am not seeing those exceptions.

Thanks
-Aswath

On Wed, Aug 17, 2011 at 1:00 AM, Ikai Lan (Google) wrote:

> Aswath, is your application on master/slave or high replication?
>
> --
> Ikai Lan
> Developer Programs Engineer, Google App Engine
> plus.ikailan.com | twitter.com/ikai
>
>
>
> On Tue, Aug 9, 2011 at 3:59 AM, Aswath Satrasala <
> aswath.satras...@gmail.com> wrote:
>
>> Hello All,
>> Recently for the past 2-3 days,  I see the logs with
>> DatastoreTimeoutExceptions.
>>
>> Anyone experiencing the same...
>>
>> -Aswath
>> www.AccountingGuru.in.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine for Java" group.
>> To post to this group, send email to
>> google-appengine-java@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-appengine-java+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/google-appengine-java?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-java@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] How to HTTP Request a public Google Doc from GAE Java?

2011-08-16 Thread Aswath Satrasala
Hi,
You can use gdata-java-client
http://code.google.com/p/gdata-java-client/

Also, look at
http://code.google.com/appengine/articles/java/retrieving_gdata_feeds.html

-Aswath
www.AccountingGuru.in.

On Tue, Aug 16, 2011 at 1:38 AM, Slaine  wrote:

> Hi all,
>
> Does anyone know how a public (web published) Google doc can be
> requested with HTTP from GAE Java?
>
> I used to do this with this very straight forward code but for some
> reason, it does not work anymore.
>
> URL url = new URL(requestUrl.toString());
> BufferedReader in = new BufferedReader(new
> InputStreamReader(   url.openStream()));
> String inputLine;
>  while ((inputLine = in.readLine()) != null) {
>  str = str +  inputLine + "\n";
>  }
> in.close();
> return str;
>
> I have done a similar post but with rather cryptic title so I
> rephrased here.
>
>
> http://groups.google.com/group/google-appengine-java/browse_thread/thread/9845b590a887ade9/1e5eb9458d499da4#1e5eb9458d499da4
>
> BR & All help really appreciated!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-java@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] DatastoretimeExceptions

2011-08-09 Thread Aswath Satrasala
Hello All,
Recently for the past 2-3 days,  I see the logs with
DatastoreTimeoutExceptions.

Anyone experiencing the same...

-Aswath
www.AccountingGuru.in.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: bulkloader - namespace -errors

2011-07-18 Thread Aswath Satrasala
Any suggestions on this...

Thanks.

On Sat, Jul 16, 2011 at 10:08 AM, Aswath Satrasala <
aswath.satras...@gmail.com> wrote:

> Hello,
> I was trying to download the data for a particular namespace using the
> bulkloader tool.  Following command is issued.
>
> C:\backup\vs-accounting\asterix>"\Program
> Files\Google\google_appengine"\appcfg.py download_data
> --filename=aswath.sql3 --url=http://vs-accounting.appspot.com/r
> emote_api --namespace=aswath-gmail-com
> Downloading data records.
> [INFO] Logging to bulkloader-log-20110715.201356
> [INFO] Throttling transfers:
> [INFO] Bandwidth: 25 bytes/second
> [INFO] HTTP connections: 8/second
> [INFO] Entities inserted/fetched/modified: 20/second
> [INFO] Batch Size: 10
> [INFO] Opening database: bulkloader-progress-20110715.201356.sql3
> [INFO] Opening database: bulkloader-results-20110715.201356.sql3
> [INFO] Connecting to vs-accounting.appspot.com/remote_api
> [ERROR   ] Unable to download kind stats for all-kinds download.
> [ERROR   ] Kind stats are generated periodically by the appserver
> [ERROR   ] Kind stats are not available on dev_appserver.
>
> Any ideas on how to make bulkloader work with namespaces?
>
> -Aswath
> www.AccountingGuru.in
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] bulkloader - namespace -errors

2011-07-15 Thread Aswath Satrasala
Hello,
I was trying to download the data for a particular namespace using the
bulkloader tool.  Following command is issued.

C:\backup\vs-accounting\asterix>"\Program
Files\Google\google_appengine"\appcfg.py download_data
--filename=aswath.sql3 --url=http://vs-accounting.appspot.com/r
emote_api --namespace=aswath-gmail-com
Downloading data records.
[INFO] Logging to bulkloader-log-20110715.201356
[INFO] Throttling transfers:
[INFO] Bandwidth: 25 bytes/second
[INFO] HTTP connections: 8/second
[INFO] Entities inserted/fetched/modified: 20/second
[INFO] Batch Size: 10
[INFO] Opening database: bulkloader-progress-20110715.201356.sql3
[INFO] Opening database: bulkloader-results-20110715.201356.sql3
[INFO] Connecting to vs-accounting.appspot.com/remote_api
[ERROR   ] Unable to download kind stats for all-kinds download.
[ERROR   ] Kind stats are generated periodically by the appserver
[ERROR   ] Kind stats are not available on dev_appserver.

Any ideas on how to make bulkloader work with namespaces?

-Aswath
www.AccountingGuru.in

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Apache Shiro on Google App Engine

2011-07-14 Thread Aswath Satrasala
On Fri, Jul 15, 2011 at 6:43 AM, objectuser  wrote:

> Well, on the client (browser), there's no security at all.  Security (that
> is, protecting your site from the user), is impossible.  If you just mean
> disabling buttons or changing parts of the page, then you can just pass back
> permissions to do that.  It doesn't guarantee anything, of course.

Yes, permissions can be passed back to the client side.  With the help of
permission, buttons can be enabled and disabled atleast for normal users.
However, I imagine there will be lot of 'ifs' and 'else' in the code. Is
there any structured pattern/library that can be followed here.

If you mean on the server, GWT requests are web requests.  So you intercept
> them with the filter (shown in my post).
>

> If you mean something else, let me know.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Apache Shiro on Google App Engine

2011-07-14 Thread Aswath Satrasala
Hi,
How do you handle the security/authorizations on GWT layer.

-Aswath
www.AccountingGuru.in

On Wed, Jul 13, 2011 at 5:59 AM, objectuser  wrote:

> If anyone is interested, I've posted a short guide to using Apache Shiro on
> Google App Engine:
>
>
> http://objectuser.wordpress.com/2011/06/30/apache-shiro-on-google-app-engine/
>
> It focuses on my current stack, which includes Google Guice.  I also use
> GWT, but that should mostly be irrelevant.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-appengine-java/-/Y2s1I4sg07AJ.
> To post to this group, send email to
> google-appengine-java@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: No of namespaces limit ?

2011-06-15 Thread Aswath Satrasala
Any replies on this...

-Aswath

On Tue, Jun 14, 2011 at 9:44 PM, Aswath Satrasala <
aswath.satras...@gmail.com> wrote:

> Hello,
> Is there any limit on the number of namespaces per app-id.?
>
> -Aswath
> www.AccountingGuru.in
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] No of namespaces limit ?

2011-06-14 Thread Aswath Satrasala
Hello,
Is there any limit on the number of namespaces per app-id.?

-Aswath
www.AccountingGuru.in

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Federated Login authentication Issues.

2011-06-09 Thread Aswath Satrasala
 Fedarated Login authentication option is enabled.

- The user logs in using the Google apps account.
- The user will not be able to send emails.  Email service is broken with
FederatedLogin with Google Apps account.

Why I need Federated Login:  One of the requirement to list in the googlapps
market place is to support OpenID authentication.Hence I have to choose
the FederatedLogin authentication option.  Otherwise, I am happy with
'GoogleAccounts API' authentication.

Can Google please look into the following issues with FederatedLogin
- bulkloader
- client remote-api.
- Emails service with Googleapps accounts.

-Aswath
www.AccountingGuru.in

On Tue, May 31, 2011 at 4:00 PM, Aswath Satrasala <
aswath.satras...@gmail.com> wrote:

> Hello,
> In the Application Setting of the Appengine console, set the Authentication
> Options to  'Federated Login'.
>
> Two features will not work
> - bulkloader
> - client remote-api.
>
> Any workarounds for the above?
>
> -Aswath
> www.AccountingGuru.in
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Timeout while fetching: Google spreadsheet api.

2011-06-08 Thread Aswath Satrasala
Yes, I am using the spreadsheet Batch to write the data in chunks.

-Aswath

On Wed, Jun 8, 2011 at 2:24 PM, Ikai Lan (Google)  wrote:

> I don't think you can do anything on the App Engine end. Have you asked for
> tips in the GData groups? It could be that the data you are writing is
> inherently slow. Are there methods for writing data in chunks?
>
> 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
>
>
>
> On Wed, Jun 8, 2011 at 4:40 PM, Aswath Satrasala <
> aswath.satras...@gmail.com> wrote:
>
>> I am writing data using Google Spreadsheet data api
>> I am frequently getting the following error.
>>
>> Timeout while fetching:
>>
>> I have Googled for the above message, and there are few issues created on
>> the error.  There seems to be no fix.  Anyone has a workaround for this.
>>
>> Note:  I am using Appengine TaskQueue to write the data.  Hence the
>> timeout is 10mins.  Still a Timeout??
>> Any special settings needs to be done to work with Appengine.
>>
>> -Aswath
>> www.AccountingGuru.in <http://www.accountingguru.in/>.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine for Java" group.
>> To post to this group, send email to
>> google-appengine-java@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-appengine-java+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/google-appengine-java?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-java@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Timeout while fetching: Google spreadsheet api.

2011-06-08 Thread Aswath Satrasala
I am writing data using Google Spreadsheet data api
I am frequently getting the following error.

Timeout while fetching:

I have Googled for the above message, and there are few issues created on
the error.  There seems to be no fix.  Anyone has a workaround for this.

Note:  I am using Appengine TaskQueue to write the data.  Hence the timeout
is 10mins.  Still a Timeout??
Any special settings needs to be done to work with Appengine.

-Aswath
www.AccountingGuru.in .

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: the id allocated for a new entity was already in use, please try again.

2011-06-03 Thread Aswath Satrasala
Hello Ronoaldo,
Thanks a lot :).  That really fixed the issue.  It is a very tricky one.

Regards
-Aswath
www.AccountingGuru.in

2011/6/2 Ronoaldo José de Lana Pereira 

> Hi Aswath,
>
> I guess that you have to allocate Ids, since you are setting the ids from
> the entities manually when you do the copy between namespaces. Try this:
>
> DatastoreService ds = DatastoreServiceFactory.getDatastoreService();
>
> // Before you put your entity:
> KeyRange range = new KeyRange(p.getParent(), p.getKind(),
> p.getKey().getId(), p.getKey().getId());
> ds.allocateIdRange(range);
>
> For each entity that you copy from one namespace to another one. I did this
> trick and stopped getting those errors.
>
> Best Regards,
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Map Reduce

2011-06-02 Thread Aswath Satrasala
I tried using the mapper with namespace entities.  The mapper fails to run
and complains

com.google.appengine.tools.mapreduce.MapReduceServlet handleCommand:
Got exception while running command
java.lang.RuntimeException: Got an IOException while trying to make splits

Caused by: java.io.IOException: No entities in the datastore query to split.


Any ways to configure the mapper for working with all namespaces?

-Aswath

On Mon, May 16, 2011 at 10:18 PM, Stephen Johnson wrote:

> I have two questions on the Java version of mapreduce since the docs seem
> pretty sparse.
> 1.) Is it possible to use mapreduce over a namespace and if so, how do you
> configure it?
> 2.) Is only inputing entity keys and not the entire values supported on the
> Java version and if so, how do I configure that as well?
> Thanks,
> Stephen
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-java@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] the id allocated for a new entity was already in use, please try again.

2011-06-02 Thread Aswath Satrasala
Hello,

I have the following

Class Party {
@Long id;
Key tenantKey;
String firstname;
}

Party p = new Party();
Key tenantKey = new Key(Tenant.class, "mmc");
p.setTenantKey(tenantKey);
// create a Party in empty namespace
Key partyKey = ofy.put(p);

Now, I do the following, just for illustration and to clearly understand
with namespaces.
p = ofy.get(partyKey);
tenantKey = p.getTenantKey();
NamespaceManager.set(tenantKey.getName());
ofy.put(p)
// delete the Party in the empty namespace
NamespaceManager.set("");
ofy.delete(p);

Actually, I did the above logic in a mapper for few thousand Parties,
transferring the party entities into its own Namespace.

Now, I start creating Parties in the "mmc" namespace, I frequently get the
following error

*com.google.appengine.api.datastore.DatastoreFailureException: the id
allocated for a new entity was already in use, please try again*

Regards,
-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-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Federated Login authentication

2011-05-31 Thread Aswath Satrasala
Hello,
In the Application Setting of the Appengine console, set the Authentication
Options to  'Federated Login'.

Two features will not work
- bulkloader
- client remote-api.

Any workarounds for the above?

-Aswath
www.AccountingGuru.in

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] bulkloader upload_data

2011-05-21 Thread Aswath Satrasala
Hi,
I was doing upload_data to one of the remote servers using the
bulkloader.py.
It prints few message and stays at the last message shown below for a long
time.
[INFO] Connecting to vs-stage.appspot.com/remote_api

I even gave the --noisy option on the commandline.
Any other options to use, to make the bulkloader more friendly.

-Aswath
www.AccountingGuru.in.

[INFO] Logging to bulkloader-log-20110522.064623
[INFO] Throttling transfers:
[INFO] Bandwidth: 250 bytes/second
[INFO] HTTP connections: 8/second
[INFO] Entities inserted/fetched/modified: 500/second
[INFO] Batch Size: 100
[INFO] Opening database: bulkloader-progress-20110522.064623.sql3
[DEBUG   ] [Thread-1] RestoreThread: started
[DEBUG   ] [Thread-1] RestoreThread: exiting
[DEBUG   ] [Thread-2] RestoreThread: started
[DEBUG   ] [Thread-3] WorkerThread: started
[DEBUG   ] [Thread-4] WorkerThread: started
[DEBUG   ] [Thread-6] WorkerThread: started
[DEBUG   ] [Thread-5] WorkerThread: started
[DEBUG   ] [Thread-7] WorkerThread: started
[DEBUG   ] [Thread-8] WorkerThread: started
[DEBUG   ] [Thread-10] WorkerThread: started
[DEBUG   ] [Thread-9] WorkerThread: started
[DEBUG   ] [Thread-12] WorkerThread: started
[DEBUG   ] [Thread-11] WorkerThread: started
[DEBUG   ] Configuring remote_api. url_path = /remote_api, servername =
vs-stage
.appspot.com
[DEBUG   ] Bulkloader using app_id: vs-stage
[INFO] Connecting to vs-stage.appspot.com/remote_api

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: UserService.getCurrentUser() returning null sometimes

2011-05-17 Thread Aswath Satrasala
No, I don't think so.
This issue never occurred for me.

I also spoke to my customer about the gmail logout.  He said he has not
logged out.
The worst part is, you try the same operation by refreshing the browser or
sending the same RPC, the RPC is successful.
I can see these RPC success and errors logs.

-Aswath

On Tue, May 17, 2011 at 4:38 PM, nacho  wrote:

> If the user logins in your app and then in another tab logout from gmail
> (for example) you will get null when you do UserService.getCurrentUser()
>
> Could this be your trouble?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: UserService.getCurrentUser() returning null sometimes

2011-05-16 Thread Aswath Satrasala
Any ideas, on this.  Why does UserService.getCurrentUser() return null
sometimes.
How long is user logged in status valid?  In my application setting, the
cookie expiration is set to 1 day.

-Aswath
www.AccountingGuru.in <http://www.accountingguru.in/>.


On Sat, May 14, 2011 at 11:14 AM, Aswath Satrasala <
aswath.satras...@gmail.com> wrote:

> Hi,
> I have a GWT application.  For every RPC made, I do
> UserService.getCurrentUser() on the server, and then go ahead with the
> business logic.
> Sometimes, this call is returning null.  Under what circumstances it might
> return null?  This is really causing intermittent errors for my customers.
> Please suggest
>
> Regards,
> -Aswath
> www.AccountingGuru.in.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Setting Namespace for an entire Request

2011-05-13 Thread Aswath Satrasala
Namespace-api is set normally in a Servlet Filter, which is normally the
beginning point for most application HttpRequests.  This means, there is a
request coming in, it is serviced by a single-thread.  Namespace-api is
threadsafe and the namespace is put in the threadlocal, and hence, the same
namespace is available during the complete HttpRequest serviced by that
thread.

-Aswath

On Fri, May 13, 2011 at 9:13 PM, mpire
wrote:

> Hi!
>
> I'm trying to use the Namespace-API to build a multi-tenant app.
> Therefore i have defined a filter that sets the Namespace for each request
> regarding to the User making the request.
> However, if there's a new Request before the current request finishes its
> datastore-operation, the namespace would be overwritten by the new request
> and the current operation would have an incorrect namespace.
> I could also set the namespace before each datastore operation, but the
> problem would be the same.If another request overwrites the namespace before
> the operation is finished, the data in the database will be messed.
> Is there a way to set the namespace for an entire request?
> Or should i try to build some kind of Mutex around the NamespaceManager?
>
> Any suggestions to solve this problem are welcome :)
>
> Thx in advance
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-java@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] UserService.getCurrentUser() returning null sometimes

2011-05-13 Thread Aswath Satrasala
Hi,
I have a GWT application.  For every RPC made, I do
UserService.getCurrentUser() on the server, and then go ahead with the
business logic.
Sometimes, this call is returning null.  Under what circumstances it might
return null?  This is really causing intermittent errors for my customers.
Please suggest

Regards,
-Aswath
www.AccountingGuru.in.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: startup errors while using RemoteApiInstaller

2011-05-09 Thread Aswath Satrasala
Anyone has setup remote_api web client?  Appreciate if you can share the
details of the setup.

-Aswath

On Sun, May 8, 2011 at 5:43 PM, Aswath Satrasala  wrote:

> Hi,
> I am trying1.4.3 SDK and looking into Remote API.
> In the ServletContextListener, I was installing the api, as provide in the
> document
>
> RemoteApiOptions options = new RemoteApiOptions()
>
> .server(".appspot.com", 443)
>
> .credentials(username, password);
>
> RemoteApiInstaller installer = new RemoteApiInstaller();
>
> installer.install(options);
>
> I started the server, to get the following errors.
> I have also copied, $APPENGINE_SDK/lib/appengine-remote-api.jar to the
> war/WEB-INF/lib folder.
>
> java.lang.NoClassDefFoundError: java.util.logging.ConsoleHandler is a
> restricted class. Please see the Google  App Engine developer's guide for
> more details.
> at
> com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java:51)
> at
> com.google.appengine.tools.remoteapi.RemoteApiInstaller.(RemoteApiInstaller.java:37)
> at
> com.veersoft.listener.VsServletContextListener.contextInitialized(VsServletContextListener.java:76)
> at
> org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548)
> at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
> at
> org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
>
> -Aswath
> http://www.AccountingGuru.in.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] startup errors while using RemoteApiInstaller

2011-05-08 Thread Aswath Satrasala
Hi,
I am trying1.4.3 SDK and looking into Remote API.
In the ServletContextListener, I was installing the api, as provide in the
document

RemoteApiOptions options = new RemoteApiOptions()
.server(".appspot.com", 443)
.credentials(username, password);

RemoteApiInstaller installer = new RemoteApiInstaller();
installer.install(options);

I started the server, to get the following errors.
I have also copied, $APPENGINE_SDK/lib/appengine-remote-api.jar to the
war/WEB-INF/lib folder.

java.lang.NoClassDefFoundError: java.util.logging.ConsoleHandler is a
restricted class. Please see the Google  App Engine developer's guide for
more details.
at
com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java:51)
at
com.google.appengine.tools.remoteapi.RemoteApiInstaller.(RemoteApiInstaller.java:37)
at
com.veersoft.listener.VsServletContextListener.contextInitialized(VsServletContextListener.java:76)
at
org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)

-Aswath
http://www.AccountingGuru.in.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] warmup requests going crazy (9850 requests in 15 hours)

2011-05-06 Thread Aswath Satrasala
I had this issue earlier.  I re-deployed the application and it is gone.
http://groups.google.com/group/google-appengine-java/browse_thread/thread/9cab44047d5b1c56/7c3477f485ac8cb0?lnk=gst&q=warmup#7c3477f485ac8cb0


Now, again, since 3-4 hrs, I don't have any /_ah/warmup requests. My
application is normal :).

-Aswath
www.AccountingGuru.in

On Fri, May 6, 2011 at 7:17 AM, Aswath Satrasala  wrote:

> I have the same issue since yesterday.
> *Current Load [image: 
> help]<http://code.google.com/appengine/kb/general.html#currentload>
> *  URI  Req/Min current  Requests last 19 hrs  Avg CPU (API) last hr % 
> CPU last
> 19 hrs
> /_ah/warmup<https://appengine.google.com/logs?version_id=9.350156772333002480&app_id=vs-accounting&filter_type=labels&filter=path%3A%22%2F_ah%2Fwarmup%22&severity_level_override=1&view=Search>
>  7.0  379  7630 (0)  84%
>
> -Aswath
>
>
>
> On Thu, May 5, 2011 at 5:50 AM, Matt Farnell  wrote:
>
>> That url doesn't work, I'm assuming you mean
>> http://code.google.com/p/googleappengine/issues/detail?id=4984
>>
>>
>> On Wed, May 4, 2011 at 5:08 PM, Ikai Lan (Google) wrote:
>>
>>> Can anyone else experiencing this add details here?
>>>
>>> http://code.google.com/p/googleappengine/issues/list?cursor=4984
>>>
>>> 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
>>>
>>>
>>>
>>> On Wed, May 4, 2011 at 3:33 PM, Matt Farnell  wrote:
>>>
>>>> Hi there,
>>>>
>>>> My app is going crazy with warmup requests, here's the dashboard
>>>>
>>>>  URI  Req/Mincurrent Requestslast 16 hrs Avg CPU (API)last hr % CPUlast
>>>> 16 hrs
>>>> /_ah/warmup<https://appengine.google.com/logs?version_id=1.350168112217871336&app_id=memapapi&filter_type=labels&filter=path%3A%22%2F_ah%2Fwarmup%22&severity_level_override=1&view=Search>
>>>>  26.0 9.85K 1876 (0) 98%
>>>> This has only started happening today?
>>>>
>>>>
>>>> --
>>>> thanks,
>>>> *Matt Farnell*
>>>> *follow on twitter <http://twitter.com/lepah>*
>>>>
>>>>  --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Google App Engine for Java" group.
>>>> To post to this group, send email to
>>>> google-appengine-java@googlegroups.com.
>>>> To unsubscribe from this group, send email to
>>>> google-appengine-java+unsubscr...@googlegroups.com.
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/google-appengine-java?hl=en.
>>>>
>>>
>>>  --
>>> You received this message because you are subscribed to the Google Groups
>>> "Google App Engine for Java" group.
>>> To post to this group, send email to
>>> google-appengine-java@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> google-appengine-java+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/google-appengine-java?hl=en.
>>>
>>
>>
>>
>> --
>> thanks,
>> *Matt Farnell*
>> *follow on twitter <http://twitter.com/lepah>*
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine for Java" group.
>> To post to this group, send email to
>> google-appengine-java@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-appengine-java+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/google-appengine-java?hl=en.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] warmup requests going crazy (9850 requests in 15 hours)

2011-05-05 Thread Aswath Satrasala
I have the same issue since yesterday.
*Current Load [image:
help]
*  URI  Req/Min current  Requests last 19 hrs  Avg CPU (API) last hr  %
CPU last 19 hrs
/_ah/warmup
 7.0  379  7630 (0)  84%

-Aswath


On Thu, May 5, 2011 at 5:50 AM, Matt Farnell  wrote:

> That url doesn't work, I'm assuming you mean
> http://code.google.com/p/googleappengine/issues/detail?id=4984
>
>
> On Wed, May 4, 2011 at 5:08 PM, Ikai Lan (Google) wrote:
>
>> Can anyone else experiencing this add details here?
>>
>> http://code.google.com/p/googleappengine/issues/list?cursor=4984
>>
>> 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
>>
>>
>>
>> On Wed, May 4, 2011 at 3:33 PM, Matt Farnell  wrote:
>>
>>> Hi there,
>>>
>>> My app is going crazy with warmup requests, here's the dashboard
>>>
>>>  URI  Req/Mincurrent Requestslast 16 hrs Avg CPU (API)last hr % CPUlast
>>> 16 hrs
>>> /_ah/warmup
>>>  26.0 9.85K 1876 (0) 98%
>>> This has only started happening today?
>>>
>>>
>>> --
>>> thanks,
>>> *Matt Farnell*
>>> *follow on twitter *
>>>
>>>  --
>>> You received this message because you are subscribed to the Google Groups
>>> "Google App Engine for Java" group.
>>> To post to this group, send email to
>>> google-appengine-java@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> google-appengine-java+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/google-appengine-java?hl=en.
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine for Java" group.
>> To post to this group, send email to
>> google-appengine-java@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-appengine-java+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/google-appengine-java?hl=en.
>>
>
>
>
> --
> thanks,
> *Matt Farnell*
> *follow on twitter *
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-java@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java]: transactional tasks cannot be named ??

2011-05-03 Thread Aswath Satrasala
Any pointers for this...

Thanks
-Aswath

On Thu, Apr 21, 2011 at 11:43 AM, Santosh kumar  wrote:

> Hi,
>
> When i run mapper, i am getting an exception, please can you suggest why it
> is throwing exception ??
>
> java.lang.IllegalArgumentException: transactional tasks cannot be named:
> TaskOptions[taskName=worker-attempt-1303365412875-0001-m-00-1--45,
> headers={}, method=POST,
> params=[com.google.appengine.api.labs.taskqueue.TaskOptions$StringValueParam@5d66aca3,
> com.google.appengine.api.labs.taskqueue.TaskOptions$StringValueParam@609a998,
> com.google.appengine.api.labs.taskqueue.TaskOptions$StringValueParam@58710f7b],
> url=/admin/mapreduce/mapperCallback, countdownMillis=null,
> etaMillis=nullretryOptions=null]
> at
> com.google.appengine.api.labs.taskqueue.QueueImpl.fillAddRequest(QueueImpl.java:146)
> at
> com.google.appengine.api.labs.taskqueue.QueueImpl.add(QueueImpl.java:352)
> at
> com.google.appengine.api.labs.taskqueue.QueueImpl.add(QueueImpl.java:335)
> at
> com.google.appengine.api.labs.taskqueue.QueueImpl.add(QueueImpl.java:320)
> at
> com.google.appengine.tools.mapreduce.MapReduceServlet.scheduleWorker(MapReduceServlet.java:815)
> at
> com.google.appengine.tools.mapreduce.MapReduceServlet.handleMapperWorker(MapReduceServlet.java:614)
> at
> com.google.appengine.tools.mapreduce.MapReduceServlet.doPost(MapReduceServlet.java:174)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> at
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
> at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
> at
> com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:66)
> at
> com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118)
> at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113)
> at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
> at
> com.veersoft.filter.ResetUserMessagesAndErrorsFilter.doFilter(ResetUserMessagesAndErrorsFilter.java:28)
> at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
> at
> com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:58)
> 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
> com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:122)
> at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
> at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
> at
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
> at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
> at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
> at
> org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
> at
> com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:70)
> at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
> at
> com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:349)
> at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
> at org.mortbay.jetty.Server.handle(Server.java:326)
> at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
> at
> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:938)
> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755)
> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
> at
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
> at
> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
>
> Thanks in advance...
>
> -- Santosh
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-java@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

-- 
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-appen

[appengine-java] admin role and Appengine console VIEWER

2011-04-21 Thread Aswath Satrasala
Hello,
In the Appengine console, I have invited a user 'x...@gmail.com' as a VIEWER
to my app-id.

I am using userService.isUserAdmin() function inside a servlet.  If the
function returns true, I am doing some special processing.

User x...@gmail.com logs into the app-id and access the servlet.

Question: Will userService.isUserAdmin() return true or false?

Regards
-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-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Many /_ah/warmup - Deadline ExceededException

2011-04-20 Thread Aswath Satrasala
Hello App Engine team,

My app-id : vs-accounting.
There are 320 info log messages in the last 23 hrs of type
/_ah/warmup
There are 59 error log messages in the last 23 hrs of type
/_ah/warmup

The application was last deployed on the server a week ago.  Until 23hrs
there were no issues.
Please suggest

Regards
-Aswath



On Wed, Apr 20, 2011 at 10:47 PM, Nischal  wrote:

> When a new instance is spun, it gets the same 30 second limit that other
> http requests get on the appengine. You should see to it that your app loads
> up in under 30s. These errors are usually a result of the app taking more
> than 30s to load.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Many /_ah/warmup - Deadline ExceededException

2011-04-20 Thread Aswath Satrasala
I am also noticing that for no reason, additional instances are getting
created.  Every 2-3 minutes, I see '/_ah/warmup' messages in the info logs

-Aswath

On Wed, Apr 20, 2011 at 5:19 PM, Aswath Satrasala <
aswath.satras...@gmail.com> wrote:

> Hello,
> My app-id has 'Always on' enabled
> Our app-id activity has increased.  I am noticing 2-3 related issues.
> * I am seeing many many "/_ah/warmup " in the logs.  (maybe our app-id
> activity is increased)
> * A lot of these are throwing 'DeadlineExceededException'.
> * Why should that exception be thrown for some and not thrown for few
> /_ah/warmup.
>
> My logs are filled with above messages and errors.I feel something unusual
> here.
>
> -Aswath
>
> 2011-04-20 04:39:18.446 /_ah/warmup 500 48134ms 6953cpu_ms  0kb
>
>1.
>   1.  See 
> details<https://appengine.google.com/logs/log_detail?app_id=vs-accounting&version_id=9.349708795707059392&request_id=0004A15813379630.DB796813&layout=plain>
>
>   0.1.0.3 - - [20/Apr/2011:04:39:18 -0700] "GET /_ah/warmup HTTP/1.1" 500 
> 0 - - "9.349708795707059392.vs-accounting.appspot.com" ms=48135 cpu_ms=6953 
> api_cpu_ms=0 cpm_usd=0.193164 exit_code=104 throttle_code=1
>
>   2.  W 2011-04-20 04:38:59.058
>
>   com.veersoft.listener.VsServletContextListener contextInitialized: 
> 2011-04-20 17:08:59 IST
>
>   3.  C 2011-04-20 04:39:18.426
>
>   Uncaught exception from servlet
>   com.google.apphosting.runtime.HardDeadlineExceededError: This request 
> (b3f5ddbb056640c9) started at 2011/04/20 11:38:31.643 UTC and was still 
> executing at 2011/04/20 11:39:18.417 UTC.
>
>   at 
> com.google.appengine.runtime.Request.process-b3f5ddbb056640c9(Request.java)
>   at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
>   at 
> com.veersoft.listener.VsServletContextListener.registerEntities(VsServletContextListener.java:76)
>
>   at 
> com.veersoft.listener.VsServletContextListener.contextInitialized(VsServletContextListener.java:67)
>   at 
> org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548)
>   at 
> org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
>
>   at 
> org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
>   at 
> org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
>   at 
> org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
>
>   at 
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
>   at 
> com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:437)
>   at 
> com.google.net.rpc.impl.Server$RpcTask.runInContext(Server.java:573)
>
>   at 
> com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:448)
>   at 
> com.google.tracing.TraceContext.runInContext(TraceContext.java:688)
>   at 
> com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:326)
>
>   at 
> com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:318)
>   at 
> com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:446)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>   at java.lang.Thread.run(Thread.java:636)
>
>   4.  W 2011-04-20 04:39:18.438
>
>   A serious problem was encountered with the process that handled this 
> request, causing it to exit. This is likely to cause a new process to be used 
> for the next request to your application. If you see this message frequently, 
> you may be throwing exceptions during the initialization of your application. 
> (Error code 104)
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Many /_ah/warmup - Deadline ExceededException

2011-04-20 Thread Aswath Satrasala
Hello,
My app-id has 'Always on' enabled
Our app-id activity has increased.  I am noticing 2-3 related issues.
* I am seeing many many "/_ah/warmup " in the logs.  (maybe our app-id
activity is increased)
* A lot of these are throwing 'DeadlineExceededException'.
* Why should that exception be thrown for some and not thrown for few
/_ah/warmup.

My logs are filled with above messages and errors.I feel something unusual
here.

-Aswath

2011-04-20 04:39:18.446 /_ah/warmup 500 48134ms 6953cpu_ms  0kb

   1.
  1.  See 
details

  0.1.0.3 - - [20/Apr/2011:04:39:18 -0700] "GET /_ah/warmup
HTTP/1.1" 500 0 - - "9.349708795707059392.vs-accounting.appspot.com"
ms=48135 cpu_ms=6953 api_cpu_ms=0 cpm_usd=0.193164 exit_code=104
throttle_code=1

  2.  W 2011-04-20 04:38:59.058

  com.veersoft.listener.VsServletContextListener
contextInitialized: 2011-04-20 17:08:59 IST

  3.  C 2011-04-20 04:39:18.426

  Uncaught exception from servlet
  com.google.apphosting.runtime.HardDeadlineExceededError: This
request (b3f5ddbb056640c9) started at 2011/04/20 11:38:31.643 UTC and
was still executing at 2011/04/20 11:39:18.417 UTC.
at 
com.google.appengine.runtime.Request.process-b3f5ddbb056640c9(Request.java)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at 
com.veersoft.listener.VsServletContextListener.registerEntities(VsServletContextListener.java:76)
at 
com.veersoft.listener.VsServletContextListener.contextInitialized(VsServletContextListener.java:67)
at 
org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
at 
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at 
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at 
org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
at 
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:437)
at com.google.net.rpc.impl.Server$RpcTask.runInContext(Server.java:573)
at 
com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:448)
at com.google.tracing.TraceContext.runInContext(TraceContext.java:688)
at 
com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:326)
at 
com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:318)
at 
com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:446)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:636)

  4.  W 2011-04-20 04:39:18.438

  A serious problem was encountered with the process that handled
this request, causing it to exit. This is likely to cause a new
process to be used for the next request to your application. If you
see this message frequently, you may be throwing exceptions during the
initialization of your application. (Error code 104)

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] bulkloader error

2011-04-06 Thread Aswath Satrasala
Hello,
I get the following errors while uploading the data to my appid on the cloud
using bulk-loader.
Also any tips on making the uploading/downloading data faster.  It is taking
2-3 hrs for my data to download.

Regards,
-Aswath

Uploading data records.
[INFO] Logging to bulkloader-log-20110407.100130
[INFO] Throttling transfers:
[INFO] Bandwidth: 25 bytes/second
[INFO] HTTP connections: 8/second
[INFO] Entities inserted/fetched/modified: 20/second
[INFO] Batch Size: 10
[INFO] Opening database: bulkloader-progress-20110407.100130.sql3
[INFO] Connecting to accounting-guru.appspot.com/remote_api
Traceback (most recent call last):
  File "\Program Files\Google\google_appengine\appcfg.py", line 71, in

run_file(__file__, globals())
  File "\Program Files\Google\google_appengine\appcfg.py", line 67, in
run_file
execfile(script_path, globals_)
  File "C:\Program
Files\Google\google_appengine\google\appengine\tools\appcfg.p
y", line 3134, in 
main(sys.argv)
  File "C:\Program
Files\Google\google_appengine\google\appengine\tools\appcfg.p
y", line 3125, in main
result = AppCfgApp(argv).Run()
  File "C:\Program
Files\Google\google_appengine\google\appengine\tools\appcfg.p
y", line 2039, in Run
self.action(self)
  File "C:\Program
Files\Google\google_appengine\google\appengine\tools\appcfg.p
y", line 2978, in __call__
return method()
  File "C:\Program
Files\Google\google_appengine\google\appengine\tools\appcfg.p
y", line 2828, in PerformUpload
run_fn(args)
  File "C:\Program
Files\Google\google_appengine\google\appengine\tools\appcfg.p
y", line 2723, in RunBulkloader
sys.exit(bulkloader.Run(arg_dict))
  File "C:\Program
Files\Google\google_appengine\google\appengine\tools\bulkload
er.py", line 4022, in Run
return _PerformBulkload(arg_dict)
  File "C:\Program
Files\Google\google_appengine\google\appengine\tools\bulkload
er.py", line 3890, in _PerformBulkload
return_code = app.Run()
  File "C:\Program
Files\Google\google_appengine\google\appengine\tools\bulkload
er.py", line 3187, in Run
kinds = self.RunPostAuthentication()
  File "C:\Program
Files\Google\google_appengine\google\appengine\tools\bulkload
er.py", line 3295, in RunPostAuthentication
self.request_manager.IncrementId(list(ancestor_path), kind, high_id)
  File "C:\Program
Files\Google\google_appengine\google\appengine\tools\bulkload
er.py", line 1233, in IncrementId
IncrementId(high_id_key)
  File "C:\Program
Files\Google\google_appengine\google\appengine\tools\bulkload
er.py", line , in IncrementId
unused_start, end = datastore.AllocateIds(high_id_key, max=
high_id_key.id())

  File "C:\Program
Files\Google\google_appengine\google\appengine\api\datastore.
py", line 1619, in AllocateIds
return rpc.get_result()
  File "C:\Program
Files\Google\google_appengine\google\appengine\api\apiproxy_s
tub_map.py", line 534, in get_result
return self.__get_result_hook(self)
  File "C:\Program
Files\Google\google_appengine\google\appengine\datastore\data
store_rpc.py", line 1351, in __allocate_ids_hook
self.check_rpc_success(rpc)
  File "C:\Program
Files\Google\google_appengine\google\appengine\datastore\data
store_rpc.py", line 975, in check_rpc_success
rpc.check_success()
  File "C:\Program
Files\Google\google_appengine\google\appengine\api\apiproxy_s
tub_map.py", line 506, in check_success
self.__rpc.CheckSuccess()
  File "C:\Program
Files\Google\google_appengine\google\appengine\api\apiproxy_r
pc.py", line 149, in _WaitImpl
self.request, self.response)
  File "C:\Program
Files\Google\google_appengine\google\appengine\ext\remote_api
\remote_api_stub.py", line 227, in MakeSyncCall
response)
  File "C:\Program
Files\Google\google_appengine\google\appengine\ext\remote_api
\remote_api_stub.py", line 156, in MakeSyncCall
self._MakeRealSyncCall(service, call, request, response)
  File "C:\Program
Files\Google\google_appengine\google\appengine\ext\remote_api
\remote_api_stub.py", line 168, in _MakeRealSyncCall
encoded_response = self._server.Send(self._path, encoded_request)
  File "C:\Program
Files\Google\google_appengine\google\appengine\tools\appengin
e_rpc.py", line 346, in Send
f = self.opener.open(req)
  File "C:\Python25\lib\urllib2.py", line 381, in open
response = self._open(req, data)
  File "C:\Python25\lib\urllib2.py", line 399, in _open
'_open', req)
  File "C:\Python25\lib\urllib2.py", line 360, in _call_chain
result = func(*args)
  File "C:\Python25\lib\urllib2.py", line 1107, in http_open
return self.do_open(httplib.HTTPConnection, req)
  File "C:\Python25\lib\urllib2.py", line 1082, in do_open
raise URLError(err)
urllib2.URLError: 

-- 
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...@go

[appengine-java] entities not persisted

2011-04-01 Thread Aswath Satrasala
Hello,
I did the following

Objectify ofy = ObjectifyService.begin();
I created few entities in a loop (exactly 90). There is no parent for the
entities.
Then I said ofy.put(listOfEntities)

The request was successful.  There was no DeadlineExceededException.
However, only one entity was persisted, instead of ninety.

Any idea, what would have gone wrong.  Can this be a datastore issue?

Appengine team,
Is there a way to trace back in any logs and see what happened.

Thanks,
-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-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] recurring payment datastore design

2011-03-31 Thread Aswath Satrasala
Hello,
My application will be a simple SaaS business model.

I plan to charge my customers recurringly.
- monthly or quarterly.

I have 3 editions of the service
- Free 30day trial
- Standard
- Silver

Anyone has pointers into designing the datastore entities for recurring
payment business model.  I am looking to get some reference design, so that
I can customize it for my requirements.

Thanks
-Aswath
www.AccountingGuru.in

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Appengine mapper - Question

2011-03-28 Thread Aswath Satrasala
Hi,
I am setting up Threadlocal variable the map function.  I am using this
Threadlocal variable further along in the map function and elsewhere in the
other business services that this map function is calling.
Is it safe to do so?  Is the map function executed by only one thread until
the end of the map function

Thanks,
-Aswath
www.AccountingGuru.in

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Import test data to local datastore

2011-03-07 Thread Aswath Satrasala
I have tried this and works fine for me.  Few steps..
- You should have app.yaml in the root folder
- Give the complete path of your application folder as the last argument.
- give random userid and password when prompted.

-Aswath


On Thu, Feb 24, 2011 at 10:25 PM, Kat Bradley wrote:

> I'm aware that this issue has been brought up before, but I've not been
> able to get any resolution on it.  Wondering if anyone has any advice that
> my google-foo is not finding.
>
> I would like to import some test data to the local datastore of my Java
> application.  This would allow me to test bug fixes locally before deploying
> them, and speed up my development process significantly.  I was able to
> download some data into a .csv file from my app using the python-based bulk
> loader (instructions here:
> http://ikaisays.com/2010/06/10/using-the-bulkloader-with-java-app-engine/).
> Now I am trying to push the data to my local app, and not having any
> success.  The command I'm running is as follows:
>
> python2.5 appcfg.py upload_data --application= --kind= type> --filename=data.csv --config_file=config.yaml --url=
> http://localhost:/remote_api/
>
> This prompts me for a username and password.  Various sites have said that
> I should be able to enter any random username, and a blank password.
> However, after I do that, I get the following stack trace:
>
>   File "/usr/lib/python2.5/urllib2.py", line 387, in open
> response = meth(req, response)
>   File "/usr/lib/python2.5/urllib2.py", line 498, in http_response
> 'http', request, response, code, msg, hdrs)
>   File "/usr/lib/python2.5/urllib2.py", line 425, in error
> return self._call_chain(*args)
>   File "/usr/lib/python2.5/urllib2.py", line 360, in _call_chain
> result = func(*args)
>   File "/usr/lib/python2.5/urllib2.py", line 506, in http_error_default
> raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
> HTTPError: HTTP Error 404: Not Found
> [INFO] Authentication Failed
>
> At the console, it prints [WARN] No file found for: /remote_api/  But I
> have the remote api servlet enabled at that url in web.xml, and have been
> able to use it in my production app.
>
> Is bulk uploading like this to a local datastore even possible?  The
> documentation on the bulkloader says that it's impossible to download data
> from a local app, but is silent about uploading.  Is there another way of
> doing this besides the bulk loader?
>
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-java@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] UserService error

2011-03-07 Thread Aswath Satrasala
Hello,
I had a situation, where I encountered an UserService returning a null User.

I can see in my logs, that the end user is logged in and performing some
operations.  He waits for 10-20 seconds and performs another operation.
>From the logs, I can trace that UserService returned a null User.
Any reason or ideas?

*Regards
-Aswath
www.AccountingGuru.in*

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: bulkloader - Authentication failed.

2011-02-22 Thread Aswath Satrasala
Any idea on how to use the bulkloader, if FederatedLogin Authentication is
enabled.

-Aswath

On Mon, Feb 21, 2011 at 3:38 PM, Aswath Satrasala <
aswath.satras...@gmail.com> wrote:

> I figured out this.
> I had modified the Application Setting ->AuthenticationOptions to
> 'Federated Login'.  Hence it was not authenticating.
> I changed back to 'Google Account API', and I am able to download the data.
>
> This is a problem in the production application, as we will not be able to
> use the bulkloader.
>
> Anyone using bulkloader along with 'Federated login' authentication, if you
> have workarounds please let me know
>
> Regards
> -Aswath
> www.AccountingGuru.in.
>
>
>
>
> On Thu, Feb 17, 2011 at 3:07 PM, Aswath Satrasala <
> aswath.satras...@gmail.com> wrote:
>
>> Hello,
>> I am using the bulkloader functionality of appcfg.py.  I was able to use
>> this earlier last week.  But, today, I am constantly
>> getting the following errors.
>>
>> C:\Program Files\Google\google_appengine>appcfg.py --application=vs-stage
>> --url=http://vs-stage.appspot.com/remote_api download_data
>> --filename=Version7.csv
>> Downloading data records.
>> [INFO] Logging to bulkloader-log-20110217.145841
>> [INFO] Throttling transfers:
>> [INFO] Bandwidth: 25 bytes/second
>> [INFO] HTTP connections: 8/second
>> [INFO] Entities inserted/fetched/modified: 20/second
>> [INFO] Batch Size: 10
>> [INFO] Opening database: bulkloader-progress-20110217.145841.sql3
>> [INFO] Opening database: bulkloader-results-20110217.145841.sql3
>> [INFO] Connecting to vs-stage.appspot.com/remote_api
>> Please enter login credentials for vs-stage.appspot.com
>> Email: aswath.satras...@gmail.com
>> Password for aswath.satras...@gmail.com:
>> [INFO] Authentication Failed
>>
>>
>> -Aswath
>> www.AccountingGuru.in
>>
>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: bulkloader - Authentication failed.

2011-02-21 Thread Aswath Satrasala
I figured out this.
I had modified the Application Setting ->AuthenticationOptions to 'Federated
Login'.  Hence it was not authenticating.
I changed back to 'Google Account API', and I am able to download the data.

This is a problem in the production application, as we will not be able to
use the bulkloader.

Anyone using bulkloader along with 'Federated login' authentication, if you
have workarounds please let me know

Regards
-Aswath
www.AccountingGuru.in.



On Thu, Feb 17, 2011 at 3:07 PM, Aswath Satrasala <
aswath.satras...@gmail.com> wrote:

> Hello,
> I am using the bulkloader functionality of appcfg.py.  I was able to use
> this earlier last week.  But, today, I am constantly
> getting the following errors.
>
> C:\Program Files\Google\google_appengine>appcfg.py --application=vs-stage
> --url=http://vs-stage.appspot.com/remote_api download_data
> --filename=Version7.csv
> Downloading data records.
> [INFO] Logging to bulkloader-log-20110217.145841
> [INFO] Throttling transfers:
> [INFO] Bandwidth: 25 bytes/second
> [INFO] HTTP connections: 8/second
> [INFO] Entities inserted/fetched/modified: 20/second
> [INFO] Batch Size: 10
> [INFO] Opening database: bulkloader-progress-20110217.145841.sql3
> [INFO] Opening database: bulkloader-results-20110217.145841.sql3
> [INFO] Connecting to vs-stage.appspot.com/remote_api
> Please enter login credentials for vs-stage.appspot.com
> Email: aswath.satras...@gmail.com
> Password for aswath.satras...@gmail.com:
> [INFO] Authentication Failed
>
>
> -Aswath
> www.AccountingGuru.in
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] bulkloader - Authentication failed.

2011-02-17 Thread Aswath Satrasala
Hello,
I am using the bulkloader functionality of appcfg.py.  I was able to use
this earlier last week.  But, today, I am constantly
getting the following errors.

C:\Program Files\Google\google_appengine>appcfg.py --application=vs-stage
--url=http://vs-stage.appspot.com/remote_api download_data
--filename=Version7.csv
Downloading data records.
[INFO] Logging to bulkloader-log-20110217.145841
[INFO] Throttling transfers:
[INFO] Bandwidth: 25 bytes/second
[INFO] HTTP connections: 8/second
[INFO] Entities inserted/fetched/modified: 20/second
[INFO] Batch Size: 10
[INFO] Opening database: bulkloader-progress-20110217.145841.sql3
[INFO] Opening database: bulkloader-results-20110217.145841.sql3
[INFO] Connecting to vs-stage.appspot.com/remote_api
Please enter login credentials for vs-stage.appspot.com
Email: aswath.satras...@gmail.com
Password for aswath.satras...@gmail.com:
[INFO] Authentication Failed


-Aswath
www.AccountingGuru.in

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] query across all namespaces

2011-02-04 Thread Aswath Satrasala
Hello,

Class Tenant {
...
}

I have the following situation
- I generate a namespace based on certain params
- I set the namespace using NamespaceManager(namespace)
- Create a Tenant

So, I have a Tenant which is belonging to a certain namespace

Now, I want to query the Tenants across all namespaces.  How can I do?

-Aswath
http://www.AccountingGuru.in

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Export to Excel

2011-01-24 Thread Aswath Satrasala
Hello,
My application design is GWT and Servlets.
I have the following situation in order to generate a report.
* Because of DeadlineExceeded exception in AppEngine server, I will not be
able to make one RPC call to fetch and aggregate the data and return to the
Client.
* Hence, I make few RPC calls from GWT using GWT timer and assemble the data
on the GWT client and render the report.
* Now,  the user clicks on 'Export' button, to export the data to Excel.
How do I export the data to Excel?

-Aswath
http://www.AccountingGuru.in

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] GWT - Sending initial objects to the client

2011-01-18 Thread aswath satrasala
Hello,
My application design is GWT embedded in JSP's.  I have few JSP's and few
GWT modules.
I want to send few Objectify objects back to the client for every HTTP
request.
I discovered the following choices.  Two are from this article
http://googlewebtoolkit.blogspot.com/2010/10/using-dynamic-host-page-for-gwt-apps.html
Official support for something along the lines of what Pat Niemeyer
suggestedor
Lombardi
is doing  would provide a great method for
speeding up module startup when using JSPs or Servlets.

3. Sending JSON objects back to the client from Server.(I am still
evaluating a Java-JSON library that works well with Objectify)

Please share your thoughts on the three choices.

-Aswath
http://www.AccountingGuru.in

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] showing up 7 instances

2011-01-17 Thread aswath satrasala
Hello,
I have 7 instances showing up for normal traffic.  Why?  I have seen 5
instances max, but today, I am seeing 7 instances.
What makes the creation of new instance.

-Aswath
http://www.AccountingGuru.in

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Causing a new process to be started

2011-01-09 Thread aswath satrasala
Hello,
I have 'Always On' feature enabled for my application
http://www.AccountingGuru.in

Yet, I see the following message in the Info logs.

This request caused a new process to be started for your application,
and thus caused your application code to be loaded for the first time.
This request may thus take longer and use more CPU than a typical request
for your application

-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.



Re: [appengine-java] Re: persistent and scalable global atomic counter: not possible with GAE?

2011-01-01 Thread aswath satrasala
Hi MG,
I am currently using the following in my application.
http://blog.appenginefan.com/2009/04/efficient-global-counters-revisited.html
.
It does not use Objectify

But, I was planning to use the Objecify Monotic, so as to keep counter
implementation simple and not worry about another library details.  Now,
with your valid points, it is good discussion thread with Objectify team and
find out what they think.

-Aswath
www.AccountingGuru.in

On Sat, Jan 1, 2011 at 10:13 PM, MG  wrote:

> Monotonic in Objectify, as defined here:
>
>
> http://code.google.com/p/objectify-appengine/source/browse/trunk/src/com/googlecode/objectify/helper/Monotonic.java?r=620
>
> is not 100% safe. For example:
>
> 1. Memcache is off, lastMax is 100
> 2. Memcache goes up for 1 sec, five requests get 101, 102, ... 105 numbers
> for them
> 3. Memcache goes off again for 1 sec; requests from #2 are still preparing
> data to insert in the related datastore model
> 4. Memcache goes up, another five requests get 101, 102, ..., 105 numbers
> for them
> 5. now we have duplicate numbers.
>
> MG
>
>
> On Saturday, January 1, 2011 11:08:50 AM UTC-5, aswath wrote:
>>
>> I was seeing your link.  You have used Objectify.  Objectify already
>> provides Monotonic helper class.
>>
>> -Aswath
>> www.accountingguru.in
>>
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Re: persistent and scalable global atomic counter: not possible with GAE?

2011-01-01 Thread aswath satrasala
I was seeing your link.  You have used Objectify.  Objectify already
provides Monotonic helper class.

-Aswath
www.accountingguru.in


On Sat, Jan 1, 2011 at 12:57 AM, MG  wrote:

> OK, so here is our solution: http://bit.ly/ec3Yyw
>
> The main idea: we are combining Datastore sharding counters with atomic
> counters in Memcache to implement sequences. Our Sequence class has one
> (overloaded) static method: long Sequence.next(String sSequenceName). The
> method itself performs three simple steps:
>
> Step 1. Increment both the datastore counter (sharding) and the memcache
> counter (atomic), if the latter is present. If it is, return its new value.
> This step is scalable.
>
> Step 2. If the memcache counter is not present, “serially” synchronize it
> with the datastore counter. This step can be viewed as an analog of 
> lock(Sequence);
> synchronize counters; unlock(Sequence);
>
> Step 3. Repeat step 1.
>
>
> Our resulting sequence is "growing" and unique because:
>
>1. The value of the DB counter is always equal to, or larger, than the
>value of the memcache counter, because the DB (sharding) counter is always
>incremented before the memcache counter.
>2. We return only atomic increments of the memcache counter.
>3. When the memcache counter is initialized, it is set to a value that
>is greater than any possible previous memcache value.
>
> Full source code is available here: http://bit.ly/ec3Yyw
>
> Any feedback?
>
>
> MG
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Readonly permission to a user

2010-11-12 Thread aswath satrasala
Hello,
How can I do the following...

I want to invite another user to my app-id. I want to provide read-only
permissions
for the Datastore Viewer in the Google App Engine dashboard.

Regards
-Aswath
http://vs-accounting.appspot.com

-- 
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] gclid requests

2010-11-08 Thread aswath satrasala
Hello,
I am getting too many gclid requests in my application.
What can be done to turn off these requests.  Is these requests good or bad.
What is the purpose of these requests in my appengine application.

Regards
-aswath

   1.  11-08 02:39AM 07.207 /?gclid=CIqzlt6DkaUCFUV76wodemQlMg 200
3544ms 2450cpu_ms
   2kb Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1;
   GTB6.6),gzip(gfe) See
details

   59.184.147.20 - - [08/Nov/2010:02:39:10 -0800] "GET
/?gclid=CIqzlt6DkaUCFUV76wodemQlMg HTTP/1.1" 200 2147
"http://www.softonoc.com/?epl=TCmB14Mz7zrGt9tpFheLJECOza4IJBROkdzF3-j91bzAKCCZ6puL7CZqwWKiDCEYhLocpCHAO8juxjLDtQeZV7NKsfIx5CoHrzUS-xKlGSE8CQKZOgqLhJAYfLnRzfqAPbpZVIjaNsGNgdEsh1CDakMgkc8isY58wKVIv0GEZsEtSfVA_BFeXTWo4PApsCnduKTvwcuAHjvWSwLSADRwIyN7VY4J5PrQQiaykuG8Sc1FaSQyx14L7bgvYL2HIYGurNLVH3r6iaWVtwzHcPIERs8xbYmhidE0IpOmEdNTDQBoAGhqmtpoU6EhzSiPJkTzJDIxEWnrADCg3v-_AADgfwEAAECA2xcAADk2uyJZUyZZQTE2aFpCRgEAAPA&query=accounting%20software";
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1;
GTB6.6),gzip(gfe)" "vs-accounting.appspot.com" ms=3545 cpu_ms=2450
api_cpu_ms=0 cpm_usd=0.068359 loading_request=1

-- 
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] mapreduce - passing filters

2010-11-07 Thread aswath satrasala
Hello,
I want to perform few aggregations on entities of a kind that are filtered
by the property.
The entities I want to perform the aggregation is small compared to the
complete entity set.
Is there any way to pass the filters to the mapper, so that only those
entities are retrieved and aggregation is performed

*Regards
-Aswath
http://vs-accounting.appspot.com
Accounting for Indian markets.*

-- 
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] request to html - context initialized

2010-11-06 Thread aswath satrasala
Hello,
I am requesting for a HTML resource on my app-id.  I get the following in
the logs.  How can I serve the HTML requests with out starting the context.

-Aswath
http://vs-accounting.appspot.com
Accounting for India Market.

11-06 12:09AM 28.270

com.veersoft.listener.VsServletContextListener contextInitialized:

 11-06 12:09AM 33.288

This request caused a new process to be started for your
application, and thus caused your application code to be
loaded for the first time. This request may thus take longer
and use more CPU than a typical request for your application

-- 
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: Change namespace on existing entities

2010-10-30 Thread aswath satrasala
Good point.  They belong to the same entity group.  The more complete
Objectify class is shown.
public class Payment implements IsSerializable {
@Id
private Long id;
@Parent Key parentPartyKey;
private String comments;
private double amount;
}

public class Invoice IsSerializable {
@Id Long id;
@Parent Key parentPartyKey;
InvoiceType invoiceType;
Status status;
private double amount;
}

In the application,there are situations, where I update the Payment and
Invoice in a transaction.

So, how can this be done in mapreduce.

-Aswath

On Sat, Oct 30, 2010 at 12:26 PM, Didier Durand wrote:

> Hi,
>
> Question from side: do Payment & Invoice belong to the same entity
> group as Party ? I ask this because of the transactional implications
> it will have when you modify keys in Payments & Invoices.
>
> regards
> didier
>
> On Oct 30, 5:04 am, aswath satrasala 
> wrote:
> > Hi,
> > Further, on this... which leads to how changing of the namespace can be
> done
> > using mapreduce.
> >
> > If I recreate entities, then if the keys are stored as references in
> other
> > entities also needs to be recreated.
> > Ex.
> > class Party {
> >   @Long id
> >   Key tenantKey;  // partitioning/filtering
> >   String fname
> >
> > }
> >
> > I have several other entitities dependent on the Party Key.
> > class Invoice {
> >  @Long id
> >  Key partyKey
> >  ...}
> >
> > class Payment {
> >  @Long id
> >  Key partyKey
> >
> > }
> >
> > All invoices/Payments has to be re-created.
> >
> > So, how can this be done using mapreduce jobs.  One option is
> > - Using mapreduce, all the Party entities are recreated.  The originalkey
> > and the newkey is stored in a different mapping table, something like
> this
> > and operates in the empty namespace.
> > class MigrationMappingKeys {
> > @Long id;
> > Key oldKey
> > Key newKey
> >
> > }
> >
> > Then, I run the mapreduce job on the Invoice and Payment, and recreate
> based
> > on the above class.
> >
> > Any other options...?
> > -Aswath
> >
> > On Thu, Oct 28, 2010 at 3:25 PM, Didier Durand  >wrote:
> >
> > > Hi,
> >
> > >http://code.google.com/appengine/docs/java/javadoc/com/google/appengi.
> ..
> > > says
> >
> > > "When a namespace aware class (e.g., Key, Query and MemcacheService)
> > > is constructed, it determines which namespace will be used by calling
> > > get() if it is otherwise unspecified. If get() returns null, the
> > > current namespace is unset and these APIs will use the empty ("")
> > > namespace in its place. "
> >
> > > So, I would guess that you have to recreate / copy your entities after
> > > having set namespace via NameSpaceManager.set() if you want to move
> > > them into a new namespace
> >
> > > regards
> > > didier
> >
> > > On Oct 28, 11:34 am, aswath satrasala 
> > > wrote:
> > > > Hello,
> > > > I have an multi-tenant app-id, and I have designed on partitioning
> the
> > > > entities based on  url parameters.  I am not using the namespace yet.
> >
> > > > For example,
> >
> > > > Tenant {
> > > > @Id name+email;
> >
> > > > }
> >
> > > > class Party {
> > > >   @Long id
> > > >   Key tenantKey;  // partitioning/filtering
> > > >   String fname
> >
> > > > }
> >
> > > > Now, I am planning to use the NamespaceManager for the Party
> entities.  I
> > > > want to use the mapreduce and apply the namespace on the existing
> Party
> > > > entities.
> > > > Can a namespace be changed from empty to certain value on the
> existing
> > > > entity.
> >
> > > > -Aswathhttp://vs-accounting.appspot.com
> >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "Google App Engine for Java" group.
> > > To post to this group, send email to
> > > google-appengine-j...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > google-appengine-java+unsubscr...@googlegroups.com
> 
> >
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/google-appengine-java?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>

-- 
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: Change namespace on existing entities

2010-10-29 Thread aswath satrasala
Hi,
Further, on this... which leads to how changing of the namespace can be done
using mapreduce.

If I recreate entities, then if the keys are stored as references in other
entities also needs to be recreated.
Ex.
class Party {
  @Long id
  Key tenantKey;  // partitioning/filtering
  String fname
}

I have several other entitities dependent on the Party Key.
class Invoice {
 @Long id
 Key partyKey
 ...
}
class Payment {
 @Long id
 Key partyKey
}

All invoices/Payments has to be re-created.

So, how can this be done using mapreduce jobs.  One option is
- Using mapreduce, all the Party entities are recreated.  The originalkey
and the newkey is stored in a different mapping table, something like this
and operates in the empty namespace.
class MigrationMappingKeys {
@Long id;
Key oldKey
Key newKey
}

Then, I run the mapreduce job on the Invoice and Payment, and recreate based
on the above class.

Any other options...?
-Aswath



On Thu, Oct 28, 2010 at 3:25 PM, Didier Durand wrote:

> Hi,
>
>
> http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/NamespaceManager.html
> says
>
> "When a namespace aware class (e.g., Key, Query and MemcacheService)
> is constructed, it determines which namespace will be used by calling
> get() if it is otherwise unspecified. If get() returns null, the
> current namespace is unset and these APIs will use the empty ("")
> namespace in its place. "
>
> So, I would guess that you have to recreate / copy your entities after
> having set namespace via NameSpaceManager.set() if you want to move
> them into a new namespace
>
> regards
> didier
>
> On Oct 28, 11:34 am, aswath satrasala 
> wrote:
> > Hello,
> > I have an multi-tenant app-id, and I have designed on partitioning the
> > entities based on  url parameters.  I am not using the namespace yet.
> >
> > For example,
> >
> > Tenant {
> > @Id name+email;
> >
> > }
> >
> > class Party {
> >   @Long id
> >   Key tenantKey;  // partitioning/filtering
> >   String fname
> >
> > }
> >
> > Now, I am planning to use the NamespaceManager for the Party entities.  I
> > want to use the mapreduce and apply the namespace on the existing Party
> > entities.
> > Can a namespace be changed from empty to certain value on the existing
> > entity.
> >
> > -Aswathhttp://vs-accounting.appspot.com
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] mapreduce job is not aborted

2010-10-28 Thread aswath satrasala
Hello Cyrille,
I am looking at the logs, and I am seeing some requests in the logs every 1
hour.
mapreduce/mapperCallback

Uncaught exception from servlet
java.lang.RuntimeException: Couldn't find MR with job ID: job_1288164365012_0001
at 
com.google.appengine.tools.mapreduce.AppEngineJobContext.getConfigurationFromRequest(AppEngineJobContext.java:157)
at 
com.google.appengine.tools.mapreduce.AppEngineJobContext.(AppEngineJobContext.java:110)


Aswath
On Thu, Oct 28, 2010 at 3:07 PM, aswath satrasala <
aswath.satras...@gmail.com> wrote:

> thanks Cyrille, no jobs are now running.
>
> -Aswath
>
>
> On Thu, Oct 28, 2010 at 1:28 PM, Cyrille Vincey  wrote:
>
>> … I directly DELETE …
>> (makes more sense with all the words)
>>
>> From: Cyrille Vincey 
>> Date: Thu, 28 Oct 2010 09:56:51 +0200
>>
>> To: 
>> Subject: Re: [appengine-java] mapreduce job is not aborted
>>
>> "Abort" button doesn't work indeed.
>> When I want to abort a mapreduce job, I directly mapreduce-related
>> entities in the datastore viewer : MapReduceStat and Shard*DontKnowWhat*.
>>
>>
>> From: aswath satrasala 
>> Reply-To: 
>> Date: Thu, 28 Oct 2010 11:03:52 +0530
>> To: 
>> Subject: [appengine-java] mapreduce job is not aborted
>>
>> Hello,
>> On my app-id vs-accounting.appspot.com, I started a mapreduce job.  It
>> did not run, because the Entity did not had decreasing index.  The status is
>> now showing with the link abort
>> After clicking on the abort, the job is not aborted.  I look at the logs,
>> and it is continuously performing something every minute.
>> Can you help me in aborting the job.
>>
>> Regards
>> Aswath
>> http://vs-accounting.appspot.com
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine for Java" group.
>> To post to this group, send email to
>> google-appengine-j...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-appengine-java+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/google-appengine-java?hl=en.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine for Java" group.
>> To post to this group, send email to
>> google-appengine-j...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-appengine-java+unsubscr...@googlegroups.com
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/google-appengine-java?hl=en.
>>
>
>

-- 
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] mapreduce job is not aborted

2010-10-28 Thread aswath satrasala
thanks Cyrille, no jobs are now running.

-Aswath

On Thu, Oct 28, 2010 at 1:28 PM, Cyrille Vincey  wrote:

> … I directly DELETE …
> (makes more sense with all the words)
>
> From: Cyrille Vincey 
> Date: Thu, 28 Oct 2010 09:56:51 +0200
>
> To: 
> Subject: Re: [appengine-java] mapreduce job is not aborted
>
> "Abort" button doesn't work indeed.
> When I want to abort a mapreduce job, I directly mapreduce-related entities
> in the datastore viewer : MapReduceStat and Shard*DontKnowWhat*.
>
>
> From: aswath satrasala 
> Reply-To: 
> Date: Thu, 28 Oct 2010 11:03:52 +0530
> To: 
> Subject: [appengine-java] mapreduce job is not aborted
>
> Hello,
> On my app-id vs-accounting.appspot.com, I started a mapreduce job.  It did
> not run, because the Entity did not had decreasing index.  The status is now
> showing with the link abort
> After clicking on the abort, the job is not aborted.  I look at the logs,
> and it is continuously performing something every minute.
> Can you help me in aborting the job.
>
> Regards
> Aswath
> http://vs-accounting.appspot.com
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

-- 
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] Change namespace on existing entities

2010-10-28 Thread aswath satrasala
Hello,
I have an multi-tenant app-id, and I have designed on partitioning the
entities based on  url parameters.  I am not using the namespace yet.

For example,

Tenant {
@Id name+email;
}

class Party {
  @Long id
  Key tenantKey;  // partitioning/filtering
  String fname
}

Now, I am planning to use the NamespaceManager for the Party entities.  I
want to use the mapreduce and apply the namespace on the existing Party
entities.
Can a namespace be changed from empty to certain value on the existing
entity.

-Aswath
http://vs-accounting.appspot.com

-- 
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] mapreduce job is not aborted

2010-10-27 Thread aswath satrasala
Hello,
On my app-id vs-accounting.appspot.com, I started a mapreduce job.  It did
not run, because the Entity did not had decreasing index.  The status is now
showing with the link abort
After clicking on the abort, the job is not aborted.  I look at the logs,
and it is continuously performing something every minute.
Can you help me in aborting the job.

Regards
Aswath
http://vs-accounting.appspot.com

-- 
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: Provider org.apache.xalan.processor.TransformerFactoryImpl not found

2010-10-08 Thread aswath satrasala
I noticed that gwt-dev.jar and Sun JDK also contains the TransformerFactory
class.
After more searching, I found the following link, that was discussing this
issue.
http://code.google.com/p/appengine-mapreduce/issues/detail?id=46

-Aswath
http://vs-accounting.appspot.com

On Fri, Oct 8, 2010 at 4:59 PM, aswath satrasala  wrote:

> Sorry, I was not specific to mention when I get the errors.
> I get the errors when I go to the following URL
> http://localhost:/mapreduce/status
>
> -Aswath
>
>
> On Fri, Oct 8, 2010 at 4:41 PM, aswath satrasala <
> aswath.satras...@gmail.com> wrote:
>
>> I create a new GWT-Appengine project using eclipse using Google Plugin.
>> When I try to introduce the mapper jars (appengine-mapper.jar,
>> charts4j.jar, json.jar, hadoop..core.jar)
>> and mapreduce.xml file in a default gwt-appengine project, I get the
>> following
>>
>> Error -- javax.xml.transform.TransformerFactoryConfigurationError: Full
>> stack trace is available in the server logs. Message: Provider
>> org.apache.xalan.processor.TransformerFactoryImpl not found
>>
>>
>> However, I just create a appengine project in eclipse and introduce the
>> mapper jars and mapreduce.xml, then there are no errors.
>>
>>
>> Regards
>> -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: Provider org.apache.xalan.processor.TransformerFactoryImpl not found

2010-10-08 Thread aswath satrasala
Sorry, I was not specific to mention when I get the errors.
I get the errors when I go to the following URL
http://localhost:/mapreduce/status

-Aswath


On Fri, Oct 8, 2010 at 4:41 PM, aswath satrasala  wrote:

> I create a new GWT-Appengine project using eclipse using Google Plugin.
> When I try to introduce the mapper jars (appengine-mapper.jar,
> charts4j.jar, json.jar, hadoop..core.jar)
> and mapreduce.xml file in a default gwt-appengine project, I get the
> following
>
> Error -- javax.xml.transform.TransformerFactoryConfigurationError: Full
> stack trace is available in the server logs. Message: Provider
> org.apache.xalan.processor.TransformerFactoryImpl not found
>
>
> However, I just create a appengine project in eclipse and introduce the
> mapper jars and mapreduce.xml, then there are no errors.
>
>
> Regards
> -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] Provider org.apache.xalan.processor.TransformerFactoryImpl not found

2010-10-08 Thread aswath satrasala
I create a new GWT-Appengine project using eclipse using Google Plugin.
When I try to introduce the mapper jars (appengine-mapper.jar, charts4j.jar,
json.jar, hadoop..core.jar)
and mapreduce.xml file in a default gwt-appengine project, I get the
following

Error -- javax.xml.transform.TransformerFactoryConfigurationError: Full
stack trace is available in the server logs. Message: Provider
org.apache.xalan.processor.TransformerFactoryImpl not found


However, I just create a appengine project in eclipse and introduce the
mapper jars and mapreduce.xml, then there are no errors.


Regards
-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] Unindexed property not shown in local datastore viewer

2010-09-30 Thread aswath satrasala
Hello,
I set the property of an entity as unindexed.  This property is not shown in
the local datastore viewer.

-Aswath
http://vs-accounting.appspot.com

-- 
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] Request uses high amount of CPU

2010-09-30 Thread aswath satrasala
I have few requests in the logs with the following message
6941ms 2235cpu_ms 1885api_cpu_ms - This Request uses high amount of CPU and
may soon exceed it quota.It happens in the following cases
1. Normal request
1. Normal Request that causes a new process to be started

What optimizations can be done for case 1.
What are limits of the above data (6941ms 2235cpu_ms 1885api_cpu_ms)

-Aswath
http://vs-accounting.appspot.com

-- 
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] building indexes

2010-09-03 Thread aswath satrasala
Hi,
* What is the normal time taken to build indexes?
* Is it dependent on the volume of data in the app-id?
* When I upload a new version and give some time for building the indexes,
then this means, the app-id will not be in usable state for some time.
* What is the recommended approach to upload a new version and be able to
server the users immediately?

-Aswath
http://vs-accounting.appspot.com

-- 
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] sharded counter report

2010-08-07 Thread aswath satrasala
Hello,
I am basing my entities design based on the sharded counter example for my
accounting webapp.

Extending the sharded counter case further...
Lets say I have a website of 500 pages.  I want to track the number of hits
of each page and then I want a report like this:
Page1  - Nohits
Page2 -  Nohits
Page3 -  Nohits

Page 500 - Nohits.

Per the sharded counter example, lets say there are 10 shards for each page
counter.  So, there will be 5000 rows in all for 500 pages/counters.
To get a report like above:
* query the Counter class sorted by counter name - max 1000 entities are
returned
* calculate the nohits for the page based on the countername from the
results.
* Use the cursor, then query for further rows until all the rows are read.
* After each query, traverse the results and do the calculation for the
nohits for the pages
* The query will be issued for atleast 5 times and then it is done.

Questions:
* Do you see a 30 second timeout limit of the appengine while performing the
above.
* what if I increase the number of shards from 10 to 100 for each counter.
The number of rows will be (500 * 100 = 5). This means, 50 queries to be
issued.
* Any other better ways to get the above report
* Any datamodel changes can be applied without sacrificing on the throughput
of the appengine transactions.

-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] listproperty usage and suggestions.

2010-07-28 Thread aswath satrasala
Hi,
I have the following class.
GlAccount {
@Id Long id;
String customerid;
Date date;
double balance;
}

Here, I am querying by date and customerid.
If I get back an existing entity, I update the new balance and do put of the
entity
If not, I create a new GlAccount (Date, balance, customerid), and do put().

If I have a large number of customers say, 10, and if I want to store
the customers balance by each date, then the records are growing by 10
every day.

Now, I do not want to use this, instead I am thinking of using the
listproperty to add the Dates.
I watched in the video 'Google I/O 2009, scalable, complex apps' by Bred
Slatkin,  that a listproperty has several advantages, and can also be used
for tuples.
Any suggestions, on how this listproperty can be used, so that I can query
for the balance for a given date and customerid.

-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] 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.



Re: [appengine-java] Re: rename a app-id

2010-07-18 Thread aswath satrasala
Any java tools to do this?

On Sun, Jul 18, 2010 at 6:49 PM, Robert Lancer wrote:

> No, you have to create a new one and transfer everything.
>
> On Jul 18, 12:02 am, aswath satrasala 
> wrote:
> > Hello,
> > Is there any way I can rename my app-id.
> >
> > -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.
>
>

-- 
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: rename a app-id

2010-07-18 Thread aswath satrasala
I do not want to delete the app.  I have user data.

-Aswath

On Sun, Jul 18, 2010 at 6:57 PM, jacek.ambroziak
wrote:

> Not really, but you can delete the app
> and after it is gone
> create a new one with the (available) name you want
>
> On Jul 18, 12:02 am, aswath satrasala 
> wrote:
> > Hello,
> > Is there any way I can rename my app-id.
> >
> > -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.
>
>

-- 
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] rename a app-id

2010-07-17 Thread aswath satrasala
Hello,
Is there any way I can rename my app-id.

-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] any limitation on the versions for a give app-id

2010-07-17 Thread aswath satrasala
I am planning to update the application every month.  Hence, I want to give
a different version no for the new upload to the appengine.
Is there any limit on the number of versions that can be uploaded to
appengine for the given app-id.

-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] times out - while creating too many entities

2010-07-12 Thread aswath satrasala
Hello,
I have situation where I am creating atleast 100 entities in one request.
All the 100 entities has the same parent.
The appengine times out with DeadlineExceeded exception.

Any suggestions on how to avoid the DeadlineExceeded exception.

-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] updating 2-3 entities

2010-06-16 Thread aswath satrasala
Hi All,
I have roughly the following entities for the accounting application

Invoice {
@id
double amount

}

Payment {
@id
double amount

@embedded
InvoiceApplied[]

}

InvoiceApplied {
Long invoiceId
double appliedamount
}

I get the Payment amount, then I apply the payment amount to various
invoices in the embeded 'InvoiceApplied'.  I want to update the status of
the Invoice as 'PAID', if the amount is fully applied for the invoice.

The Invoice and Payment entities are not in the same entitygroup. For
simplicity, I have shown only two entities, but there are 1-2 more entities
which need to be updated as well.  I am not making them as part of the same
entity group (by using a common parent).  I am refraining to create them
with a common parent key for now, because of the limitations of the
writes/sec on the entitygroup.

What choices I have, to guarantee that the data is updated in all the
entities?

-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.



Re: [appengine-java] Need help in writing a query

2010-06-12 Thread aswath satrasala
Hi,
I guess, this may not turn out to be correct always.  If it is done in a
transaction and both of the entities are in the same entity group, then this
will work.

-Aswath

On Sat, Jun 12, 2010 at 8:24 PM, RAVINDER MAAN  wrote:

> Instead of getting these values with query best option is to store this
> values when you add new employee.So create one more dataset with fields
> city, area and employeecount.whenever you add new employee update the count
> .then you can get the count with simple query
> select employeecount from  where city== && area==
>
>
>
> On Sat, Jun 12, 2010 at 8:05 PM, Vik  wrote:
>
>> Hie
>>
>> I have following data set:
>>
>> City,   Area   emp-name
>>
>> and have to write a query which shows number of employees by city and
>> area. So data should display like:
>>
>> Delhirohini 5
>> Delhinehru10
>> Hyd madhapur  6
>> Hyd hitech   24
>> Cheanni   park  20
>>
>>
>> So what the query should be? Please advise
>>
>> Thankx and Regards
>>
>> Vik
>> Founder
>> www.sakshum.com
>> www.sakshum.blogspot.com
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine for Java" group.
>> To post to this group, send email to
>> google-appengine-j...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-appengine-java+unsubscr...@googlegroups.com
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/google-appengine-java?hl=en.
>>
>
>
>
> --
> Regards,
> Ravinder Singh Maan
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] two applications accessing the same datastore

2010-05-18 Thread aswath satrasala
Hello,
I want to create two webapps accessing the same datastore
- Admin webapp
- enduser webapp

I want to separate out these, so that I will not end up creating one big
application and that in turn will have an effect on the startup time of the
application on the appengine.

-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] payment gateway integrations with appengine

2010-05-03 Thread aswath satrasala
Hello,
I looked into google-checkout, but it is currently for US & Europe only.
I am looking to be able to bill the customer in Rupees, and hence would like
to integrate with indian payment gateway systems into the appengine app.
Any experiences on this

Thanks
-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.



Re: [appengine-java] elegant way of implementing sequence generator

2010-04-03 Thread aswath satrasala
Hello Ikai,
I am interested in Sequences, sequence starting from a initial value and
increments.
Can you little bit elaborate here on what is the risk with volatile here
when using memcache.

Regards
-Aswath

On Sat, Mar 6, 2010 at 1:05 AM, Ikai L (Google)  wrote:

> Have you looked into Memcache's INCR?
>
>
> http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/memcache/MemcacheService.html#increment(java.lang.Object
> ,
> long)
>
> This'll do it atomically, but you run the risk of it being volatile,
> so you'll have to account for that in your client code.
>
> On Tue, Mar 2, 2010 at 11:40 PM, legendlink  wrote:
> > hi, i wanted to have a sequence generator that increments by x value
> > everytime it generates a value. if i would create the sequence
> > generator by using the datastore, it is likely that data contention
> > would occurr if there is high access times.
> >
> > i have looked into the sample code of max ross in the google code
> > repository (SequenceExamplesJDO.java) and  think this is limited to
> > increment by 1 only and not increment by x value.
> >
> > if sharding technique is used, my concern is that i might not get the
> > right sequence.
> >
> > what is the best/elegant way of doing sequence generator that
> > increments x value?
> >
> > --
> > 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.
> >
> >
>
>
>
> --
> Ikai Lan
> Developer Programs Engineer, Google App Engine
> http://googleappengine.blogspot.com | http://twitter.com/app_engine
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>

-- 
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] saving keyrange or range of id's

2010-03-15 Thread aswath satrasala
Hello,
What is the use of KeyRange?  Is it useful when doing datamigrations?

I am figuring out how to use the range values in the KeyRange for
webapplications
HttpRequest1:
I get the KeyRange using DataStoreService.allocateIds(kind, num).
startId = KeyRange.getStart();

 HttpRequest2:
I want use the subsequent value (startId +1) in the  KeyRange in this
request.

How can the KeyRange be stored or where can the range of  id's that are
allocated in the KeyRange be stored.

-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.



Re: [appengine-java] Re: entity is not persisting

2010-03-05 Thread aswath satrasala
I looked in to the DB Viewer, and as well, I was trying to retrieve the
entity elsewhere immediately, and I got the message

pm.currentTransaction().begin();
log.info("Getting global tenant");
Key key = KeyFactory.createKey(Tenant.class.getSimpleName(),
GlobalTenant.globalTenantName);
tenant = pm.getObjectById(Tenant.class, key.getName());
log.info(tenant.getName());
pm.currentTransaction().commit();

and here is the log...
 [java] javax.jdo.JDOObjectNotFoundException: Could not retrieve entity
of kind Tenant with key Tenant("GB1Tenant90")
 [java] NestedThrowables:
 [java] org.datanucleus.exceptions.NucleusObjectNotFoundException: Could
not retrieve entity of kind Tenant with key Tenant("GB1Tenant90")
 [java] 6 Mar, 2010 6:26:26 AM org.datanucleus.state.LifeCycleState
changeState
 [java] FINE: Object "com.veersoft.party.ten...@270fc4"
(id="com.veersoft.party.Tenant:ag12cy1hY2NvdW50aW5nchcLEgZUZW5hbnQiC0dCMVRlbmFudDkwDA")
has a lifecycle change : "P_CLEAN"->"HOLLOW"
 [java] 6 Mar, 2010 6:26:26 AM org.datanucleus.ConnectionManagerImpl$1
managedConnectionPostClose


-Aswath

On Fri, Mar 5, 2010 at 7:27 PM, datanucleus wrote:

> Yes it does persist, the log says so. And your evidence for saying it
> doesn't is what exactly ? Looked in the DB viewer ?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] entity is not persisting

2010-03-05 Thread aswath satrasala
Hello,
I am trying to persist a simple class and does not persist.
pm.currentTransaction().begin();
Tenant tenant = new Tenant();
tenant.setName(globalTenantName);
pm.makePersistent(tenant);
pm.currentTransaction().commit();

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Tenant {

@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
@Extension(vendorName = "datanucleus", key="gae.encoded-pk",
value="true")
private String id;

@Persistent
@Extension(vendorName = "datanucleus", key="gae.pk-name", value="true")
private String name;

@Persistent private String ownerPartyKeyEncoded;

@Persistent private String organizationPartyKeyEncoded;

@Persistent  private List secGrpList = new
ArrayList();

@Persistent  private Date lastModifiedDate;

@Persistent
private String lastModifiedByPartyKey;
}

-Aswath
Here is the log
5 Mar, 2010 1:01:34 PM org.datanucleus.ConnectionManagerImpl
allocateConnection
 [java] FINE: Connection added to the pool :
org.datanucleus.store.appengine.datastoreconnectionfactoryimpl$datastoremanagedconnect...@19ae493
 [java] 5 Mar, 2010 1:01:34 PM org.datanucleus.ObjectManagerImpl
performReachabilityAtCommit
 [java] FINE: Performing check of objects for
"persistence-by-reachability" (commit) ...
 [java] 5 Mar, 2010 1:01:34 PM org.datanucleus.ObjectManagerImpl
performReachabilityAtCommit
 [java] FINE: Performing reachability algorithm on object with id
"org.datanucleus.identity.identityrefere...@1342f5b"
 [java] 5 Mar, 2010 1:01:34 PM org.datanucleus.state.JDOStateManagerImpl
runReachability
 [java] FINE: Object "com.veersoft.party.ten...@14a616" (id="")
lifecycle state "P_NEW" added to the list of reachables on commit.
 [java] 5 Mar, 2010 1:01:34 PM
org.datanucleus.store.fieldmanager.ReachabilityFieldManager storeObjectField
 [java] FINE: Performing reachability on SCO container field
"com.veersoft.party.Tenant.secGrpList"
 [java] 5 Mar, 2010 1:01:34 PM
org.datanucleus.store.fieldmanager.ReachabilityFieldManager storeObjectField
 [java] FINE: Performing reachability on SCO container field
"com.veersoft.party.Tenant.partys"
 [java] 5 Mar, 2010 1:01:34 PM
org.datanucleus.store.fieldmanager.ReachabilityFieldManager storeObjectField
 [java] FINE: Performing reachability on field
"com.veersoft.party.Tenant.lastModifiedDate" which is null
 [java] 5 Mar, 2010 1:01:34 PM org.datanucleus.ObjectManagerImpl
performReachabilityAtCommit
 [java] FINE: Completed check of objects for
"persistence-by-reachability" (commit).
 [java] 5 Mar, 2010 1:01:34 PM org.datanucleus.state.LifeCycleState
changeState
 [java] FINE: Object "com.veersoft.party.ten...@14a616"
(id="org.datanucleus.identity.identityrefere...@1342f5b") has a lifecycle
change : "P_NEW"->"HOLLOW"

-- 
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: owned relationship ? - could it be a bug

2010-03-04 Thread aswath satrasala
Hello GAE team,
Can you please look into this and let me know what is wrong in the test
case.  Similar tests fail are happening in my other test cases with similar
relations.

Thanks
-Aswath

On Mon, Feb 22, 2010 at 2:57 PM, aswath satrasala <
aswath.satras...@gmail.com> wrote:

> I am creating two instances of B. In the first instance, I am making it as
> a child of A.  In the second instance, it is by itself.  The second instance
> cannot persist itself.  Hence, I am raising this issue and thinking it as a
> bug.
>
> Is the owned-relationship at the class level?
> I think it is at the entity level.
>
> Can someone from Google team, please confirm on this.
>
> -Aswath
>
>
> On Mon, Feb 22, 2010 at 2:26 PM, Payam  wrote:
>
>> Hmm...
>>
>> If JDO does not allow unowned relationships, then when you are trying
>> to persist B inside A, then trying to persist B by itself, are you not
>> declaring that B is actually unowned? In this case, A can not actually
>> hold onto B directly and can only hold its Key instead. When I read
>> the documentation, I understood "owned" relationships as an Object
>> (e.g. B) is always found in another object (e.g. A) and never by
>> itself.
>>
>> Do you think that could be it? Although its weird that the 2nd
>> transaction works when you move it around. Does it actually store two
>> different Bs?
>> These are all ideas. Not sure honestly...
>>
>> On Feb 21, 10:24 pm, aswath satrasala 
>> wrote:
>> > Hello Payam
>> > Thanks for looking into this.  Please see inline
>> >
>> >
>> >
>> >
>> >
>> > On Sun, Feb 21, 2010 at 3:25 PM, Payam  wrote:
>> > > Hello Aswath,
>> >
>> > > What you are doing seems really odd to me. From my understanding a
>> > > Datastore Key consists of multiple components.
>> > > "A complete key includes several pieces of information, including the
>> > > application ID, the kind, and an entity ID" - GAE Docs
>> >
>> > > If you use encoded key strings, you can get access to these other
>> > > pieces of information:
>> > > @PrimaryKey
>> > > @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
>> > > @Extension(vendorName="datanucleus", key="gae.encoded-pk",
>> > > value="true")
>> > > private String encodedKey;
>> >
>> > > @Persistent
>> > > @Extension(vendorName="datanucleus", key="gae.pk-name", value="true")
>> > > private String keyName;
>> >
>> > > @Persistent
>> > > @Extension(vendorName="datanucleus", key="gae.pk-id", value="true")
>> > > private Long keyId;
>> >
>> > > In this case, you have access to the name ID (keyName) and numeric ID
>> > > (keyID) of the encoded key. Therefore, from my understanding, you can
>> > > not change the name ID after you have persisted your first object. The
>> > > first object determines the name ID for all remaining objects (from my
>> > > understanding). This is why when you try to change it for the second
>> > > object, you get an exception.
>> >
>> > Your understanding is not documented.  Please see 'encodedStrings'
>> inhttp://code.google.com/appengine/docs/java/datastore/creatinggettinga..
>> ..
>> >
>> >
>> >
>> > > Perhaps, you can better explain why you are using the "gae.pk-name"
>> > > extension for the name. The context of your code is not clear!
>> >
>> > "When using encoded key strings, you can provide access to an object's
>> > string or numeric ID with an additional field:"
>> > I am using the gae-pk-name, so that I can identity the entity uniquely.
>> > - if it is associated with a parent, I do, KeyFactory.createKey
>> (parentkey,
>> > kind, name)  and then access the entity.
>> > - if it is not associated with the parent, I do
>> KeyFactory.createKey(kind,
>> > name)  and then access the entity.  I use this entity to store default
>> > values for the entity in my application.
>> >
>> > Thanks,
>> > -Aswath
>> >
>> > Thanks!
>> >
>> >
>> >
>> >
>> >
>> > > On Feb 16, 11:38 pm, aswath satrasala 
>> > > wrote:
>> > > > any help on this please...
>> >
>> > > > Thanks.
>> >
&g

Re: [appengine-java] Re: owned relationship ? - could it be a bug

2010-02-22 Thread aswath satrasala
I am creating two instances of B. In the first instance, I am making it as a
child of A.  In the second instance, it is by itself.  The second instance
cannot persist itself.  Hence, I am raising this issue and thinking it as a
bug.

Is the owned-relationship at the class level?
I think it is at the entity level.

Can someone from Google team, please confirm on this.

-Aswath

On Mon, Feb 22, 2010 at 2:26 PM, Payam  wrote:

> Hmm...
>
> If JDO does not allow unowned relationships, then when you are trying
> to persist B inside A, then trying to persist B by itself, are you not
> declaring that B is actually unowned? In this case, A can not actually
> hold onto B directly and can only hold its Key instead. When I read
> the documentation, I understood "owned" relationships as an Object
> (e.g. B) is always found in another object (e.g. A) and never by
> itself.
>
> Do you think that could be it? Although its weird that the 2nd
> transaction works when you move it around. Does it actually store two
> different Bs?
> These are all ideas. Not sure honestly...
>
> On Feb 21, 10:24 pm, aswath satrasala 
> wrote:
> > Hello Payam
> > Thanks for looking into this.  Please see inline
> >
> >
> >
> >
> >
> > On Sun, Feb 21, 2010 at 3:25 PM, Payam  wrote:
> > > Hello Aswath,
> >
> > > What you are doing seems really odd to me. From my understanding a
> > > Datastore Key consists of multiple components.
> > > "A complete key includes several pieces of information, including the
> > > application ID, the kind, and an entity ID" - GAE Docs
> >
> > > If you use encoded key strings, you can get access to these other
> > > pieces of information:
> > > @PrimaryKey
> > > @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
> > > @Extension(vendorName="datanucleus", key="gae.encoded-pk",
> > > value="true")
> > > private String encodedKey;
> >
> > > @Persistent
> > > @Extension(vendorName="datanucleus", key="gae.pk-name", value="true")
> > > private String keyName;
> >
> > > @Persistent
> > > @Extension(vendorName="datanucleus", key="gae.pk-id", value="true")
> > > private Long keyId;
> >
> > > In this case, you have access to the name ID (keyName) and numeric ID
> > > (keyID) of the encoded key. Therefore, from my understanding, you can
> > > not change the name ID after you have persisted your first object. The
> > > first object determines the name ID for all remaining objects (from my
> > > understanding). This is why when you try to change it for the second
> > > object, you get an exception.
> >
> > Your understanding is not documented.  Please see 'encodedStrings'
> inhttp://code.google.com/appengine/docs/java/datastore/creatinggettinga..
> ..
> >
> >
> >
> > > Perhaps, you can better explain why you are using the "gae.pk-name"
> > > extension for the name. The context of your code is not clear!
> >
> > "When using encoded key strings, you can provide access to an object's
> > string or numeric ID with an additional field:"
> > I am using the gae-pk-name, so that I can identity the entity uniquely.
> > - if it is associated with a parent, I do, KeyFactory.createKey
> (parentkey,
> > kind, name)  and then access the entity.
> > - if it is not associated with the parent, I do
> KeyFactory.createKey(kind,
> > name)  and then access the entity.  I use this entity to store default
> > values for the entity in my application.
> >
> > Thanks,
> > -Aswath
> >
> > Thanks!
> >
> >
> >
> >
> >
> > > On Feb 16, 11:38 pm, aswath satrasala 
> > > wrote:
> > > > any help on this please...
> >
> > > > Thanks.
> >
> > > > On Fri, Feb 12, 2010 at 3:18 PM, aswath satrasala <
> >
> > > > aswath.satras...@gmail.com> wrote:
> > > > > Hello Ikia
> > > > > As suggested by you in the thread 'Incorrect number of entities
> > > returned',
> > > > > I have attached the complete files in my previous email.
> > > > > Please let me know, what am I doing wrong here.
> >
> > > > > Thanks
> > > > > -Aswath
> >
> > > > > On Tue, Feb 9, 2010 at 3:06 PM, aswath satrasala <
> > > > > aswath.satras...@gmail.com> wrote:
> >
> > > > >>

Re: [appengine-java] Re: owned relationship ? - could it be a bug

2010-02-21 Thread aswath satrasala
Hello Payam
Thanks for looking into this.  Please see inline

On Sun, Feb 21, 2010 at 3:25 PM, Payam  wrote:

> Hello Aswath,
>
> What you are doing seems really odd to me. From my understanding a
> Datastore Key consists of multiple components.
> "A complete key includes several pieces of information, including the
> application ID, the kind, and an entity ID" - GAE Docs
>
> If you use encoded key strings, you can get access to these other
> pieces of information:
> @PrimaryKey
> @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
> @Extension(vendorName="datanucleus", key="gae.encoded-pk",
> value="true")
> private String encodedKey;
>
> @Persistent
> @Extension(vendorName="datanucleus", key="gae.pk-name", value="true")
> private String keyName;
>
> @Persistent
> @Extension(vendorName="datanucleus", key="gae.pk-id", value="true")
> private Long keyId;
>
> In this case, you have access to the name ID (keyName) and numeric ID
> (keyID) of the encoded key. Therefore, from my understanding, you can
> not change the name ID after you have persisted your first object. The
> first object determines the name ID for all remaining objects (from my
> understanding). This is why when you try to change it for the second
> object, you get an exception.
>
Your understanding is not documented.  Please see 'encodedStrings' in
http://code.google.com/appengine/docs/java/datastore/creatinggettinganddeletingdata.html#Keys.


>
> Perhaps, you can better explain why you are using the "gae.pk-name"
> extension for the name. The context of your code is not clear!
>
"When using encoded key strings, you can provide access to an object's
string or numeric ID with an additional field:"
I am using the gae-pk-name, so that I can identity the entity uniquely.
- if it is associated with a parent, I do, KeyFactory.createKey (parentkey,
kind, name)  and then access the entity.
- if it is not associated with the parent, I do KeyFactory.createKey(kind,
name)  and then access the entity.  I use this entity to store default
values for the entity in my application.

Thanks,
-Aswath


Thanks!

>
>
> On Feb 16, 11:38 pm, aswath satrasala 
> wrote:
> > any help on this please...
> >
> > Thanks.
> >
> > On Fri, Feb 12, 2010 at 3:18 PM, aswath satrasala <
> >
> >
> >
> > aswath.satras...@gmail.com> wrote:
> > > Hello Ikia
> > > As suggested by you in the thread 'Incorrect number of entities
> returned',
> > > I have attached the complete files in my previous email.
> > > Please let me know, what am I doing wrong here.
> >
> > > Thanks
> > > -Aswath
> >
> > > On Tue, Feb 9, 2010 at 3:06 PM, aswath satrasala <
> > > aswath.satras...@gmail.com> wrote:
> >
> > >> Hello Ikai,
> > >> Attached is the zip file that contains three files
> > >> A.java
> > >> B.java
> > >> BTest.java
> >
> > >> Please load in your environment and test it.
> >
> > >> Thanks.
> > >> -Aswath
> >
> > >> On Fri, Feb 5, 2010 at 4:36 PM, aswath satrasala <
> > >> aswath.satras...@gmail.com> wrote:
> >
> > >>> B list is missing from class A in my previous posting.  Here is the
> > >>> complete A class...
> >
> > >>> @PersistenceCapable(identityType = IdentityType.APPLICATION)
> > >>> public class A {
> > >>> @PrimaryKey
> > >>> @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
> > >>> @Extension(vendorName = "datanucleus", key="gae.encoded-pk",
> > >>> value="true")
> > >>> private String id;
> >
> > >>> @Persistent
> > >>> @Extension(vendorName = "datanucleus", key="gae.pk-name",
> > >>> value="true")
> > >>> private String name;
> >
> > >>> @Persistent
> > >>> private List bList ;
> >
> > >>> }
> >
> > >>> On Fri, Feb 5, 2010 at 4:32 PM, aswath satrasala <
> > >>> aswath.satras...@gmail.com> wrote:
> >
> > >>>> This is a similar posting I had posted earlier "incorrect number of
> > >>>> entities returned".  Hopefully, this posting may be more clean and I
> will
> > >>>> get some replies.
> > >>>> I have two clas

Re: [appengine-java] Re: vs-accounting.appspot.com - datastore viewer error

2010-02-20 Thread aswath satrasala
I got it resolved.
Thanks Toby for your support.

-Aswath

On Fri, Feb 19, 2010 at 9:32 PM, Toby Reyelts  wrote:

> You still have phone entities that are empty.
>
>
> On Fri, Feb 19, 2010 at 8:40 AM, aswath satrasala <
> aswath.satras...@gmail.com> wrote:
>
>> Hello Toby
>> I am still not able to use the 'Datastore Viewer'.
>> It simply displays message
>>
>> Server Error
>>
>> A server error has occurred.
>>
>> I cleaned up my entities that are using PhoneNumber, Email etc.
>>
>> -Aswath
>>
>> On Sat, Feb 6, 2010 at 1:06 AM, Toby Reyelts  wrote:
>>
>>> You have an "empty" property of type e-mail, and that makes the datastore
>>> viewer unhappy. You need to either use a different type that can be
>>> non-empty (like String), or have non-empty e-mails.
>>>
>>>
>>> On Thu, Feb 4, 2010 at 10:25 PM, aswath satrasala <
>>> aswath.satras...@gmail.com> wrote:
>>>
>>>> My application is running fine.
>>>>
>>>> I am still getting the datastore viewer error.What can we do in this
>>>> scenario.  How can we get support?
>>>>
>>>> -Aswath
>>>>
>>>>
>>>> On Mon, Feb 1, 2010 at 12:36 PM, aswath satrasala <
>>>> aswath.satras...@gmail.com> wrote:
>>>>
>>>>> Hello GAE team,
>>>>> I am still not able to use the DataStore viewer for my app-id
>>>>> 'vs-accounting'
>>>>>
>>>>> Thanks
>>>>> -Aswath
>>>>>
>>>>>
>>>>> On Thu, Jan 28, 2010 at 11:08 AM, aswath satrasala <
>>>>> aswath.satras...@gmail.com> wrote:
>>>>>
>>>>>> Local file:
>>>>>> 
>>>>>>
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>>
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>>
>>>>>> 
>>>>>> >>>>> source="auto">
>>>>>>
>>>>>> 
>>>>>> 
>>>>>>
>>>>>>     
>>>>>> 
>>>>>> 
>>>>>>
>>>>>> 
>>>>>>
>>>>>>
>>>>>> Production:
>>>>>> Party   partys_INTEGER_IDX ▲
>>>>>> Includes ancestors
>>>>>>   *Serving*
>>>>>> PartyRole   partyRoles_INTEGER_IDX ▲
>>>>>> Includes ancestors
>>>>>>   *Serving*
>>>>>> SecurityGroup   secGrpList_INTEGER_IDX ▲
>>>>>> Includes ancestors
>>>>>>   *Serving*
>>>>>> Tenant   tenants_INTEGER_IDX ▲
>>>>>> Includes ancestors
>>>>>>
>>>>>> 12hrs ago , the secGrpList_INTEGER_IDX  was not shown on the
>>>>>> production admin console.  Now, it is showing up.
>>>>>>
>>>>>> The datastore viewer is still responding back error page.
>>>>>>
>>>>>> -Aswath
>>>>>>
>>>>>>
>>>>>> On Thu, Jan 28, 2010 at 2:48 AM, Ikai L (Google) 
>>>>>> wrote:
>>>>>>
>>>>>>> What does you local indexes file look like? Can you post the indexes
>>>>>>> listed in your production admin console?
>>>>>>>
>>>>>>> On Tue, Jan 26, 2010 at 11:24 PM, aswath satrasala <
>>>>>>> aswath.satras...@gmail.com> wrote:
>>>>>>>
>>>>>>>> Hello GAE team,
>>>>>>>> Further observations made while testing the app.  I am not able to
>>>>>>>> write entities to the datastore.  Upon examining the logs, I found the
>>>>>>>> following error.
>>>>>>>>
>>>>>>>> com.veersoft.action.CreateTenantAction doCreate: 
>>>>>>>> com.google.appengine.api.datastore.DatastoreNeedIndexException:
>>>>>>>>
>>>>>>>> no matching index found..
>>>>>>>> 
>>>>>>>> 
>>>>>>>>
>>>>>

Re: [appengine-java] Re: vs-accounting.appspot.com - datastore viewer error

2010-02-19 Thread aswath satrasala
Hello Toby
I am still not able to use the 'Datastore Viewer'.
It simply displays message
Server Error

A server error has occurred.

I cleaned up my entities that are using PhoneNumber, Email etc.

-Aswath

On Sat, Feb 6, 2010 at 1:06 AM, Toby Reyelts  wrote:

> You have an "empty" property of type e-mail, and that makes the datastore
> viewer unhappy. You need to either use a different type that can be
> non-empty (like String), or have non-empty e-mails.
>
>
> On Thu, Feb 4, 2010 at 10:25 PM, aswath satrasala <
> aswath.satras...@gmail.com> wrote:
>
>> My application is running fine.
>>
>> I am still getting the datastore viewer error.What can we do in this
>> scenario.  How can we get support?
>>
>> -Aswath
>>
>>
>> On Mon, Feb 1, 2010 at 12:36 PM, aswath satrasala <
>> aswath.satras...@gmail.com> wrote:
>>
>>> Hello GAE team,
>>> I am still not able to use the DataStore viewer for my app-id
>>> 'vs-accounting'
>>>
>>> Thanks
>>> -Aswath
>>>
>>>
>>> On Thu, Jan 28, 2010 at 11:08 AM, aswath satrasala <
>>> aswath.satras...@gmail.com> wrote:
>>>
>>>> Local file:
>>>> 
>>>>
>>>> 
>>>> 
>>>> 
>>>> 
>>>>
>>>> 
>>>> 
>>>> 
>>>> 
>>>>
>>>> 
>>>> 
>>>>
>>>> 
>>>> 
>>>>
>>>> 
>>>> 
>>>> 
>>>>
>>>> 
>>>>
>>>>
>>>> Production:
>>>> Party   partys_INTEGER_IDX ▲
>>>> Includes ancestors
>>>>   *Serving*
>>>> PartyRole   partyRoles_INTEGER_IDX ▲
>>>> Includes ancestors
>>>>   *Serving*
>>>> SecurityGroup   secGrpList_INTEGER_IDX ▲
>>>> Includes ancestors
>>>>   *Serving*
>>>> Tenant   tenants_INTEGER_IDX ▲
>>>> Includes ancestors
>>>>
>>>> 12hrs ago , the secGrpList_INTEGER_IDX  was not shown on the production
>>>> admin console.  Now, it is showing up.
>>>>
>>>> The datastore viewer is still responding back error page.
>>>>
>>>> -Aswath
>>>>
>>>>
>>>> On Thu, Jan 28, 2010 at 2:48 AM, Ikai L (Google) wrote:
>>>>
>>>>> What does you local indexes file look like? Can you post the indexes
>>>>> listed in your production admin console?
>>>>>
>>>>> On Tue, Jan 26, 2010 at 11:24 PM, aswath satrasala <
>>>>> aswath.satras...@gmail.com> wrote:
>>>>>
>>>>>> Hello GAE team,
>>>>>> Further observations made while testing the app.  I am not able to
>>>>>> write entities to the datastore.  Upon examining the logs, I found the
>>>>>> following error.
>>>>>>
>>>>>> com.veersoft.action.CreateTenantAction doCreate: 
>>>>>> com.google.appengine.api.datastore.DatastoreNeedIndexException:
>>>>>>
>>>>>> no matching index found..
>>>>>> 
>>>>>> 
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> 
>>>>>>
>>>>>> The application is fine on the local develpment server.
>>>>>>
>>>>>> -Aswath
>>>>>>
>>>>>>
>>>>>> On Tue, Jan 26, 2010 at 8:51 PM, aswath satrasala <
>>>>>> aswath.satras...@gmail.com> wrote:
>>>>>>
>>>>>>> Hello,
>>>>>>> My app-id is vs-accounting.
>>>>>>>
>>>>>>> I login into appengine.google.com. I choose the above application.
>>>>>>> Then I click on the datastore viewer.
>>>>>>> I get the error
>>>>>>>
>>>>>>>  Server Error
>>>>>>>
>>>>>>> A server error has occurred.
>>>>>>>
>>>>>>> Return to Applications screen » <https://appengine.google.com/>
>>>>>>>
>>>>>>> -Aswath
>>>>>>>
>>>>>>

[appengine-java] Re: owned relationship ? - could it be a bug

2010-02-16 Thread aswath satrasala
any help on this please...

Thanks.

On Fri, Feb 12, 2010 at 3:18 PM, aswath satrasala <
aswath.satras...@gmail.com> wrote:

> Hello Ikia
> As suggested by you in the thread 'Incorrect number of entities returned',
> I have attached the complete files in my previous email.
> Please let me know, what am I doing wrong here.
>
> Thanks
> -Aswath
>
>
> On Tue, Feb 9, 2010 at 3:06 PM, aswath satrasala <
> aswath.satras...@gmail.com> wrote:
>
>> Hello Ikai,
>> Attached is the zip file that contains three files
>> A.java
>> B.java
>> BTest.java
>>
>> Please load in your environment and test it.
>>
>> Thanks.
>> -Aswath
>>
>>
>> On Fri, Feb 5, 2010 at 4:36 PM, aswath satrasala <
>> aswath.satras...@gmail.com> wrote:
>>
>>> B list is missing from class A in my previous posting.  Here is the
>>> complete A class...
>>>
>>>
>>> @PersistenceCapable(identityType = IdentityType.APPLICATION)
>>> public class A {
>>> @PrimaryKey
>>> @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
>>> @Extension(vendorName = "datanucleus", key="gae.encoded-pk",
>>> value="true")
>>> private String id;
>>>
>>> @Persistent
>>> @Extension(vendorName = "datanucleus", key="gae.pk-name",
>>> value="true")
>>> private String name;
>>>
>>> @Persistent
>>> private List bList ;
>>>
>>> }
>>>
>>> On Fri, Feb 5, 2010 at 4:32 PM, aswath satrasala <
>>> aswath.satras...@gmail.com> wrote:
>>>
>>>> This is a similar posting I had posted earlier "incorrect number of
>>>> entities returned".  Hopefully, this posting may be more clean and I will
>>>> get some replies.
>>>> I have two classes
>>>> 1) A
>>>> 2) B
>>>> A is in 1 to many relationship with B
>>>> @PersistenceCapable(identityType = IdentityType.APPLICATION)
>>>> public class A {
>>>> @PrimaryKey
>>>> @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
>>>> @Extension(vendorName = "datanucleus", key="gae.encoded-pk",
>>>> value="true")
>>>> private String id;
>>>>
>>>> @Persistent
>>>> @Extension(vendorName = "datanucleus", key="gae.pk-name",
>>>> value="true")
>>>> private String name;
>>>> }
>>>>
>>>> @PersistenceCapable(identityType = IdentityType.APPLICATION)
>>>> public class B {
>>>> @PrimaryKey
>>>> @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
>>>> @Extension(vendorName = "datanucleus", key = "gae.encoded-pk", value
>>>> = "true")
>>>> private String id;
>>>>
>>>> @Persistent
>>>> @Extension(vendorName = "datanucleus", key = "gae.pk-name", value =
>>>> "true")
>>>> private String name;
>>>> }
>>>>
>>>> public class BTest extends JDOTestCase {
>>>>
>>>> public void testB() throws Exception {
>>>> A a = new A();
>>>> a.setName("a");
>>>> B b = new B();
>>>> b.setName("b");
>>>> a.getBList().add(b);
>>>>
>>>> beginTxn();
>>>> pm.makePersistent(a);
>>>> a = pm.getObjectById(A.class, a.getId());
>>>> assertEquals(1, a.getBList().size());
>>>> commitTxn();
>>>>
>>>> B b1 = new B();
>>>> b1.setName("b1");
>>>> beginTxn();
>>>> pm.makePersistent(b1);
>>>> b1 = pm.getObjectById(B.class, b1.getId());
>>>> b1.getId();
>>>> commitTxn();
>>>> }
>>>> }
>>>>
>>>> The test fails at the last line "b1.getId()"
>>>> If any of B entity is in relation with A earlier, then another entity of
>>>> B cannot be persisted by itself.
>>>>
>>>> If I move the 2nd transaction to the beginning, the test passes.
>>>>
>>>> -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.



  1   2   >