Re: [appengine-java] Re: Is the any limitation on entity group size?

2010-04-13 Thread John Patterson
The datastore can only count up to 1000 results of a query - for your  
model you could use an ancestor query.


You are probably better off keeping a counter in the parent and  
updating it every time you add or remove a child.  Keep in mind that  
all writes to the entire group must be executed serially which limits  
the number of transactions per second (~5?)


On 14 Apr 2010, at 11:43, ailinykh wrote:


For example, I want to know a number of children. I guess if I just
call list.size()
it could be expensive. What are other ways?

Thank you,
 Andrey

On Apr 12, 4:18 pm, "Ikai L (Google)"  wrote:
No, it should be fine UNLESS you want to load all these child  
objects in a
single request. As a rule of thumb, load as little data as  
possible. You may
need to denormalize (the datastore isn't relational anyway) for  
additional

read performance.

For a better answer, you may want to describe what it is you are  
trying to

do.





On Mon, Apr 12, 2010 at 6:57 AM, ailinykh  wrote:

Hello, everybody!
I have objects with owned one to many relationship. Child table is
supposed to grow, each parent eventually will have thousands or even
more child objects.
May it cause any performance issues? Is there any best practice to
handle this situation?



Thank you,
 Andrey



--
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.comappengine-java%2B 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 Enginehttp://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-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-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: Is the any limitation on entity group size?

2010-04-13 Thread ailinykh
For example, I want to know a number of children. I guess if I just
call list.size()
it could be expensive. What are other ways?

Thank you,
  Andrey

On Apr 12, 4:18 pm, "Ikai L (Google)"  wrote:
> No, it should be fine UNLESS you want to load all these child objects in a
> single request. As a rule of thumb, load as little data as possible. You may
> need to denormalize (the datastore isn't relational anyway) for additional
> read performance.
>
> For a better answer, you may want to describe what it is you are trying to
> do.
>
>
>
>
>
> On Mon, Apr 12, 2010 at 6:57 AM, ailinykh  wrote:
> > Hello, everybody!
> > I have objects with owned one to many relationship. Child table is
> > supposed to grow, each parent eventually will have thousands or even
> > more child objects.
> > May it cause any performance issues? Is there any best practice to
> > handle this situation?
>
> > Thank you,
> >  Andrey
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google App Engine for Java" group.
> > To post to this group, send email to
> > google-appengine-j...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-appengine-java+unsubscr...@googlegroups.com > unsubscr...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-appengine-java?hl=en.
>
> --
> Ikai Lan
> Developer Programs Engineer, Google App 
> Enginehttp://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.



[appengine-java] Re: ordering a query

2010-04-13 Thread datanucleus
Specify ordering in one call
setOrdering("nom ASC, prenom ASC");

This doesn't fix the issue with accented letters though

-- 
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: JDO files

2010-04-13 Thread datanucleus
package-{datastore}.xml
is there for exactly that purpose.
e.g package-appengine.xml, package-hsqldb.xml, package-oracle.xml
See the DataNucleus docs

-- 
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: Unit Test and JDO: The type com.google.appengine.tools.development.ApiProxyLocalImpl is not visible

2010-04-13 Thread Nick
I got it working by using the localProxy from
org.datanucleus.store.appengine.LocalDatastoreDelegate

On Apr 13, 2:21 pm, Nick  wrote:
> Thanks for the reply.
>
> I have followed those instructions, and I am able to run those tests
> with no problems.
>
> However, I can not set up tests for JDO.
>
> On Apr 13, 11:45 am, Wayne Fay  wrote:
>
>
>
> > > message, "The type
> > > com.google.appengine.tools.development.ApiProxyLocalImpl is not
> > > visible".
>
> > Did you follow the 
> > instructions?http://code.google.com/appengine/docs/java/tools/localunittesting.html
>
> > Wayne

-- 
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] ordering a query

2010-04-13 Thread Vincent
Hy, I want to order a query by 'nom' asc and 'prenom' asc :
try {
Query query = null;
query = pm.newQuery(AkroreUser.class);
query.setRange(fromIncl, toExcl);
query.setOrdering("nom ascending");
query.setOrdering("prenom ascending");
result = new ArrayList((List)
query.execute());
} finally {
pm.close();
}
I did also add the index :





It works fine, but only with english letters and not with french ones.
' e ' comes before ' i ', but  ' é ' comes afer ' i '. Is there a way
to fix that? (''é ' should be considered like ' e ')
Thanks.

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



[appengine-java] JDO files

2010-04-13 Thread doom777
I want to make my model portable across different JDO implementations.
For that, I somtimes need to specify different Metadata for RDBMD and
Appengine. How can I do that?

-- 
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] LocalServiceTestHelper is not supported

2010-04-13 Thread Mark
Hi Folks,

I'm stumped and I haven't found any references to a solution for this
one.  I added to my project the example code you'll find here:
http://code.google.com/appengine/docs/java/tools/localunittesting.html

Eclipse is complaining about the reference to LocalServiceTestHelper
with this message:
com.google.appengine.tools.development.testing.LocalServiceTestHelper
is not supported by Google App Engine's Java runtime environment

In addition, the attributes such as "Before", "After", etc. are not
working - the error message is:
org.junit.After is not supported by Google App Engine's Java runtime
environment

Thanks,
Mark

-- 
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] Object hierarchy and GAE datastore

2010-04-13 Thread korey_sed
I have three Classes (User, Person, Company) that are all subclasses
of BaseClass.

Company has a list of employees
Person may have a user

@PersistenceCapable(detachable="true")
@Inheritance(strategy = InheritanceStrategy.SUBCLASS_TABLE)
public abstract class BaseObject {

  @PrimaryKey
  @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
  Key id;
}

@PersistenceCapable(detachable="true")
public class Company  extends BaseObject {

  @Persistent(mappedBy = "employer")
  @Order(extensions = @Extension(vendorName="datanucleus", key="list-
ordering", value="lastName asc, firstName asc"))
  List employees;
}

@PersistenceCapable(detachable="true")
public class Person extends BaseObject {

  @Persistent
  Company employer;

//  @Persistent(mappedBy = "person")
//  User user;
}

@PersistenceCapable(detachable="true")
public class User extends BaseObject {
  @Persistent
  Person person;
}

Now I can create a company, persist it, then create a person, set its
employer, and persist it.  But I cannot create a user and set its
person.  GAE thinks that I am trying to make User the parent of
person, but it actually the other way around.
"Detected attempt to establish User(7) as the parent of Company(5)/
Person(6) but the entity identified by Company(5)/Person(6) is already
a child of Company(5)."

I had to comment out the User back reference in Person since with it,
GAE things that Person has more than one parent.  This is odd as well,
but I can live without it if i have to.  I am just trying to avoid
doing this with not-owned relationship between user and person.

what am i doing wrong? or is this just a bug?

Thanks.

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



[appengine-java] Re: Blob Store service createUploadUrl() and a Dispatcher Servlet

2010-04-13 Thread Rahul Ravikumar
I am seeing the problem on DevAppServer.

On Apr 13, 3:08 pm, Don Schwarz  wrote:
> Are you seeing this problem in the DevAppServer or when deployed to
> our servers?  (Or both?)
>
> On Tue, Apr 13, 2010 at 4:27 PM, Rahul Ravikumar  wrote:
> > Are there any workarounds for this issue?
>
> > On Apr 12, 7:48 pm, Rahul Ravikumar  wrote:
> >> I am using DevAppServer -
>
> >> I have filed an issue 
> >> :http://code.google.com/p/googleappengine/issues/detail?id=3083
>
> >> You can reproduce the problem using a dispatch servlet and the
> >> blobstore service together. The blobstore service does not seem to
> >> handle upload in such cases.
>
> >> Thanks,
> >> Rahul
>
> >> On Apr 12, 7:21 pm, Don Schwarz  wrote:
>
> >> > It should always dispatch to the more specific URL pattern, which in
> >> > this case will be the upload servlet.
>
> >> > Are you seeing this behavior in the DevAppServer or when deployed to
> >> > our servers?  Can you file an issue in the issue tracker with an
> >> > appengine-web.xml and web.xml for a reproducible test case?
>
> >> > Thanks,
> >> > Don
>
> >> > On Mon, Apr 12, 2010 at 9:14 PM, Rahul Ravikumar  
> >> > wrote:
> >> > > I have a central dispatcher servlet that has a servlet mapping of :
>
> >> > >  
> >> > >        dispatcher
> >> > >        /
> >> > >  
>
> >> > > When i try to use the blob store service's createUploadUrl("/
> >> > > uploadComplete") it maps to a URL for e.g '/_ah/upload/
> >> > > agp0d2VldG15cGljchsLEhVfX0Jsb2JVcGxvYWRTZXNzaW9uX18YEgw'.
>
> >> > > Before the Blob store service can handle the upload and redirect to /
> >> > > uploadComplete; my dispatcher gets called and i am therefore not being
> >> > > able to upload anything.
>
> >> > > Is there a servlet/ filter that i can map to /_ah/upload/* in my
> >> > > web.xml ?
>
> >> > > How do i avoid the dispatcher servlet from getting called before the
> >> > > Blob store service can do its thing?
>
> >> > > --
> >> > > 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 
> >> > > athttp://groups.google.com/group/google-appengine-java?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Google App Engine for Java" group.
> > To post to this group, send email to google-appengine-j...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > google-appengine-java+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/google-appengine-java?hl=en.

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



[appengine-java] Re: Works on development server but it doesn't on GAE (Sessions).

2010-04-13 Thread TiagoP
Sorry for the duplicate post!!

On 13 Abr, 23:45, TiagoP  wrote:
> Can anyone help me here please?
>
> On 13 Abr, 17:13, TiagoP  wrote:
>
>
>
> > Yes, they are enabled.
>
> > What I realized now is that the _ah_SESSION variable is not being
> > created,
> >  not even on the development server (although it works).
>
> > On 13 Abr, 17:10, Peter Ondruska  wrote:
>
> > > Have you enabled sessions? 
> > > Seehttp://code.google.com/appengine/docs/java/config/appconfig.html#Enab...
>
> > > On Apr 13, 5:52 pm, TiagoP  wrote:
>
> > > > Hi,
>
> > > > I have this code that works just fine on the development server but
> > > > when I deploy the application, the session isn't created.
>
> > > > What am I doing wrong?
>
> > > > HttpSession session = req.getSession(true);
> > > > session.setAttribute("loggedIn", new String("true"));

-- 
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: Works on development server but it doesn't on GAE (Sessions).

2010-04-13 Thread TiagoP
Can anyone help me here please?

On 13 Abr, 17:13, TiagoP  wrote:
> Yes, they are enabled.
>
> What I realized now is that the _ah_SESSION variable is not being
> created,
>  not even on the development server (although it works).
>
> On 13 Abr, 17:10, Peter Ondruska  wrote:
>
>
>
> > Have you enabled sessions? 
> > Seehttp://code.google.com/appengine/docs/java/config/appconfig.html#Enab...
>
> > On Apr 13, 5:52 pm, TiagoP  wrote:
>
> > > Hi,
>
> > > I have this code that works just fine on the development server but
> > > when I deploy the application, the session isn't created.
>
> > > What am I doing wrong?
>
> > > HttpSession session = req.getSession(true);
> > > session.setAttribute("loggedIn", new String("true"));

-- 
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: Works on development server but it doesn't on GAE (Sessions).

2010-04-13 Thread TiagoP
Can anyone help me please?

Thanks

On 13 Abr, 17:10, Peter Ondruska  wrote:
> Have you enabled sessions? 
> Seehttp://code.google.com/appengine/docs/java/config/appconfig.html#Enab...
>
> On Apr 13, 5:52 pm, TiagoP  wrote:
>
>
>
> > Hi,
>
> > I have this code that works just fine on the development server but
> > when I deploy the application, the session isn't created.
>
> > What am I doing wrong?
>
> > HttpSession session = req.getSession(true);
> > session.setAttribute("loggedIn", new String("true"));

-- 
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: Blob Store service createUploadUrl() and a Dispatcher Servlet

2010-04-13 Thread Don Schwarz
Are you seeing this problem in the DevAppServer or when deployed to
our servers?  (Or both?)

On Tue, Apr 13, 2010 at 4:27 PM, Rahul Ravikumar  wrote:
> Are there any workarounds for this issue?
>
> On Apr 12, 7:48 pm, Rahul Ravikumar  wrote:
>> I am using DevAppServer -
>>
>> I have filed an issue 
>> :http://code.google.com/p/googleappengine/issues/detail?id=3083
>>
>> You can reproduce the problem using a dispatch servlet and the
>> blobstore service together. The blobstore service does not seem to
>> handle upload in such cases.
>>
>> Thanks,
>> Rahul
>>
>> On Apr 12, 7:21 pm, Don Schwarz  wrote:
>>
>> > It should always dispatch to the more specific URL pattern, which in
>> > this case will be the upload servlet.
>>
>> > Are you seeing this behavior in the DevAppServer or when deployed to
>> > our servers?  Can you file an issue in the issue tracker with an
>> > appengine-web.xml and web.xml for a reproducible test case?
>>
>> > Thanks,
>> > Don
>>
>> > On Mon, Apr 12, 2010 at 9:14 PM, Rahul Ravikumar  
>> > wrote:
>> > > I have a central dispatcher servlet that has a servlet mapping of :
>>
>> > >  
>> > >        dispatcher
>> > >        /
>> > >  
>>
>> > > When i try to use the blob store service's createUploadUrl("/
>> > > uploadComplete") it maps to a URL for e.g '/_ah/upload/
>> > > agp0d2VldG15cGljchsLEhVfX0Jsb2JVcGxvYWRTZXNzaW9uX18YEgw'.
>>
>> > > Before the Blob store service can handle the upload and redirect to /
>> > > uploadComplete; my dispatcher gets called and i am therefore not being
>> > > able to upload anything.
>>
>> > > Is there a servlet/ filter that i can map to /_ah/upload/* in my
>> > > web.xml ?
>>
>> > > How do i avoid the dispatcher servlet from getting called before the
>> > > Blob store service can do its thing?
>>
>> > > --
>> > > 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 
>> > > athttp://groups.google.com/group/google-appengine-java?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine for Java" group.
> To post to this group, send email to google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>

-- 
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] Filter on float value in JDO query

2010-04-13 Thread Ikai L (Google)
Try this:

query.setFilter("pointsEarned < 0f");

This test case below worked for me:

import
com.google.appengine.tools.development.testing.LocalDatastoreServiceTestConfig;
import
com.google.appengine.tools.development.testing.LocalServiceTestHelper;

import junit.framework.Assert;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import java.util.List;

import javax.jdo.PersistenceManager;
import javax.jdo.Query;




public class TestEntityTest {
  private final LocalServiceTestHelper helper =
new LocalServiceTestHelper(new LocalDatastoreServiceTestConfig());

  @Before
  public void setUp() {
  helper.setUp();
  }

  @After
  public void tearDown() {
  helper.tearDown();
  }

  @SuppressWarnings("unchecked")
  @Test
  public void testFloatValue() {

TestEntity t = new TestEntity();

t.setFloatValue(1.0f);

PersistenceManager pm = PMF.get().getPersistenceManager();
pm.makePersistent(t);

Query query = pm.newQuery(TestEntity.class);
query.setFilter("floatValue > 0f");
List results = (List) query.execute();

Assert.assertEquals("Should have a single value", 1, results.size());

TestEntity negativeFloat = new TestEntity();
negativeFloat.setFloatValue(-1.0f);
pm.makePersistent(negativeFloat);

query = pm.newQuery(TestEntity.class);
results = (List) query.execute();

Assert.assertEquals("Should have two values, one positive one negative",
2, results.size());


query = pm.newQuery(TestEntity.class);
query.setFilter("floatValue > 0f");
results = (List) query.execute();

Assert.assertEquals("Should have one positive value", 1,
results.size());

query = pm.newQuery(TestEntity.class);
query.setFilter("floatValue < 0f");
results = (List) query.execute();

Assert.assertEquals("Should have one negative value", 1,
results.size());

pm.close();

  }


}


On Thu, Apr 8, 2010 at 4:22 AM, Bert  wrote:

> Hi,
>
> I'm trying to execute following query, which should return 3 values
> but returns 0.
> I think it's because pointsEarned is a float, but I don't know how to
> solve it.
>
> Query query = pm.newQuery(Answer.class);
> query.setFilter("pointsEarned < 0");
> List answers = (List) query.execute();
>
> There are 3 Answer entities in the datastore with pointsEarned = -1.0
>
> Is there anyway to query like this < on a float field?
>
> 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-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.



[appengine-java] Re: Blob Store service createUploadUrl() and a Dispatcher Servlet

2010-04-13 Thread Rahul Ravikumar
Are there any workarounds for this issue?

On Apr 12, 7:48 pm, Rahul Ravikumar  wrote:
> I am using DevAppServer -
>
> I have filed an issue 
> :http://code.google.com/p/googleappengine/issues/detail?id=3083
>
> You can reproduce the problem using a dispatch servlet and the
> blobstore service together. The blobstore service does not seem to
> handle upload in such cases.
>
> Thanks,
> Rahul
>
> On Apr 12, 7:21 pm, Don Schwarz  wrote:
>
> > It should always dispatch to the more specific URL pattern, which in
> > this case will be the upload servlet.
>
> > Are you seeing this behavior in the DevAppServer or when deployed to
> > our servers?  Can you file an issue in the issue tracker with an
> > appengine-web.xml and web.xml for a reproducible test case?
>
> > Thanks,
> > Don
>
> > On Mon, Apr 12, 2010 at 9:14 PM, Rahul Ravikumar  
> > wrote:
> > > I have a central dispatcher servlet that has a servlet mapping of :
>
> > >  
> > >        dispatcher
> > >        /
> > >  
>
> > > When i try to use the blob store service's createUploadUrl("/
> > > uploadComplete") it maps to a URL for e.g '/_ah/upload/
> > > agp0d2VldG15cGljchsLEhVfX0Jsb2JVcGxvYWRTZXNzaW9uX18YEgw'.
>
> > > Before the Blob store service can handle the upload and redirect to /
> > > uploadComplete; my dispatcher gets called and i am therefore not being
> > > able to upload anything.
>
> > > Is there a servlet/ filter that i can map to /_ah/upload/* in my
> > > web.xml ?
>
> > > How do i avoid the dispatcher servlet from getting called before the
> > > Blob store service can do its thing?
>
> > > --
> > > 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 
> > > athttp://groups.google.com/group/google-appengine-java?hl=en.

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



Re: [appengine-java] Strange characters showing in incoming emails

2010-04-13 Thread Esteban Ignacio Masoero
Hi:

I think I'm experiencing the same problem. Strangely, I'm sending unicode
(spanish) characters, specially the 'ñ' (spanish N), and I receive them well
in the body part but not in the subject part of the email, where they appear
as a '?'.
I noticed this issue
http://code.google.com/p/googleappengine/issues/detail?id=2288 was created,
but I'm not really sure where it targets my problem.

David, did you finally solve your problem? any ideas about this?

Thanks,

Esteban


On Tue, Dec 1, 2009 at 10:02 AM, david ruescas  wrote:

> Ive done some more testing and it seems the problem is not limited to
> character 0008, but that in general strange unencoded characters
> occasionally show up, apparently without following any pattern. Anyone
> else encountering this issue?
>
> Thank you
>
> David
>
> On 11/30/09, david ruescas  wrote:
> > I get occasional characters that look like this
> >
> > http://www.fileformat.info/info/unicode/char/0008/index.htm
> >
> > when processing incoming emails. I think its the backspace 0008
> > character, at least thats how they show up in the app engine log. Any
> > idea where these characters are coming from?
> >
> > Thankyou,
> >
> > David
> >
>
> --
>
> 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] Implementing a Custom User System on Top of App Engine User System

2010-04-13 Thread Ikai L (Google)
You can't avoid the extra datastore query. Since we use a key-value store,
store additional details inside a UserDetail class. Instead of referencing
the User in a property (this creates a 1:N relationship between Usersa and
UserDetail), create a Key using KeyFactory.Builder (
http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/KeyFactory.Builder.html)
with the User's ID. This guarantees a 1:1 relationship with the original
Google Account. You can then retrieve this UserDetail entity using a
retrieve by Key (pm.getObjectById()) which is very cheap to do.

On Tue, Apr 13, 2010 at 3:09 AM, klonq  wrote:

> I'm an old school Perl programmer from way back and thinking about
> getting back into the web_dev game. So I've been reading up on app
> engine and have decided to go with Java because I know even less about
> Python than I do Java.
>
> But my question is this, how would one go about implementing a user
> system on top of the app engine user system?
>
> Say for instance you wanted to use google's login/out system with
> google accounts and the session objects already established in
> UserServiceFactory but also wanted the user id to reference extra data
> unique to your system while minimizing db queries and processing.
> Unfortunately it is not possible to extend
> com.google.appengine.api.users (cannot subclass a final class).
>
> Has anyone come up with a clever way of doing this that they want to
> share?
>
> --
> 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.



[appengine-java] Updating JPA Entities on AppEngine

2010-04-13 Thread laserjim
Hey,

So, I define some entity Foo, and create a hundred thousand instances
of it.  Now I want to add a variable of entity type Bar, and want to
specify a default value.  Null may be a valid value, but is not the
default.

One solution I've seen around the intertubes is to write a script that
iterates through all the objects in the datastore and manually
performs the update operations on the untyped records.  This seems non-
ideal.  Too much developer overhead for minor changes, not clean, and
not very scalable.

Are there better solutions, or is this basically the de-facto
standard?

Thanks!

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



Re: [appengine-java] Datastore Statistics shows different numbers then Quota Details

2010-04-13 Thread Ikai L (Google)
Your quota also includes space for indexes. That's likely the cause of the
discrepancy.

On Tue, Apr 13, 2010 at 6:50 AM, dmitrygusev  wrote:

> Hi,
>
> In quota details I can see that I'm using 31% of free quota limit:
>
> Total Stored Data   31% 0.31 of 1.00 GBytes
>
> However if I go to Datastore Statistics I see that the Size of all
> entities it only 70 MBytes
>
> What uses 310-70=240 MBytes of my database quota?
>
> Also in Datastore Statistics I can see that more than the half of my
> entities size (57%) used by metadata:
>
> Property Type   Size
> Key 10 MBytes
> Integer 7 MBytes
> Blob5 MBytes
> Date/Time   5 MBytes
> Boolean 3 MBytes
> String  31 KBytes
> Text14 KBytes
> NULL2 KBytes
> Metadata40 MBytes
>
> What is metadata here?
>
> --
> 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.



[appengine-java] Re: Unit Test and JDO: The type com.google.appengine.tools.development.ApiProxyLocalImpl is not visible

2010-04-13 Thread Nick
Thanks for the reply.

I have followed those instructions, and I am able to run those tests
with no problems.

However, I can not set up tests for JDO.


On Apr 13, 11:45 am, Wayne Fay  wrote:
> > message, "The type
> > com.google.appengine.tools.development.ApiProxyLocalImpl is not
> > visible".
>
> Did you follow the 
> instructions?http://code.google.com/appengine/docs/java/tools/localunittesting.html
>
> Wayne

-- 
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] javax.persistence.Persistence is a restricted class.

2010-04-13 Thread Toby Reyelts
You can get this error if you have jars in your JDK's lib/ext folder. The
dev_appserver generally rejects any classes that are found there, because
that feature doesn't make sense under App Engine. (I.E. you just put your
jars in WEB-INF/lib instead).

On Tue, Apr 13, 2010 at 10:00 AM, hallmit  wrote:

> hi folks,
>
> I've had a very strange issue when I'm deploying my web app in local
> server(jetty). I got this message:
>
> Caused by: java.lang.NoClassDefFoundError:
> javax.persistence.Persistence 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)
>
> The offending code is :
>   _emf =
> Persistence.createEntityManagerFactory(aPersistenceUnitName);
>
> But javax.persistence.Persistence is not a restricted class because I
> have already used it in other application. I don't understand why I'm
> getting this message. my business classes are embedded in a .jar
> archive that I put in WEB-INF/lib.
> I copied all jars from ${sdk.dir}/lib/user to my WEB-INF/lib too.
>
> I use:
> sdk 1.3.1
>
> any ideas?
>
> --
> 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] Re: Works on development server but it doesn't on GAE (Sessions).

2010-04-13 Thread TiagoP
Yes, they are enabled.

What I realized now is that the _ah_SESSION variable is not being
created,
 not even on the development server (although it works).



On 13 Abr, 17:10, Peter Ondruska  wrote:
> Have you enabled sessions? 
> Seehttp://code.google.com/appengine/docs/java/config/appconfig.html#Enab...
>
> On Apr 13, 5:52 pm, TiagoP  wrote:
>
>
>
> > Hi,
>
> > I have this code that works just fine on the development server but
> > when I deploy the application, the session isn't created.
>
> > What am I doing wrong?
>
> > HttpSession session = req.getSession(true);
> > session.setAttribute("loggedIn", new String("true"));

-- 
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: Works on development server but it doesn't on GAE (Sessions).

2010-04-13 Thread Peter Ondruska
Have you enabled sessions? See
http://code.google.com/appengine/docs/java/config/appconfig.html#Enabling_Sessions

On Apr 13, 5:52 pm, TiagoP  wrote:
> Hi,
>
> I have this code that works just fine on the development server but
> when I deploy the application, the session isn't created.
>
> What am I doing wrong?
>
> HttpSession session = req.getSession(true);
> session.setAttribute("loggedIn", new String("true"));

-- 
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] Works on development server but it doesn't on GAE (Sessions).

2010-04-13 Thread TiagoP
Hi,

I have this code that works just fine on the development server but
when I deploy the application, the session isn't created.

What am I doing wrong?

HttpSession session = req.getSession(true);
session.setAttribute("loggedIn", new String("true"));

-- 
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] Unit Test and JDO: The type com.google.appengine.tools.development.ApiProxyLocalImpl is not visible

2010-04-13 Thread Wayne Fay
> message, "The type
> com.google.appengine.tools.development.ApiProxyLocalImpl is not
> visible".

Did you follow the instructions?
http://code.google.com/appengine/docs/java/tools/localunittesting.html

Wayne

-- 
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: Error message after updating AppEngine in my project

2010-04-13 Thread Esteban Ignacio Masoero
Some posted this issue:
http://code.google.com/p/googleappengine/issues/detail?id=3051


On Tue, Mar 30, 2010 at 11:02 PM, Rahul  wrote:

> Ikai,
>
> It doesn't break anything and neither does it stops from deploying but
> it just looks ugly and we might miss the real error if any during the
> deployment.
>
> Thanks,
> Rahul
>
> On Mar 30, 8:43 pm, "Ikai L (Google)"  wrote:
> > Geo, what is the issue? Does it actually break anything? We'll
> investigate
> > on our part, but if it doesn't actually prevent you from writing code
> > there's absolutely no reason to downgrade.
> >
> >
> >
> > On Tue, Mar 30, 2010 at 2:19 PM, Geo  wrote:
> > > Thanks Ikai, for looking into the root cause.  I am confronting this
> > > issue, and I am relatively new to the GAE  Eclipse plugin.  One of the
> > > post before said that they were able to solve the issue by switching
> > > back to 1.3.1, since I got this update using the eclipse software
> > > manager,
> >
> > > how do I switch back now?
> >
> > > Thanks,
> >
> > > Geo
> >
> > > On Mar 30, 12:31 pm, "Ikai L (Google)"  wrote:
> > > > I'll have to try to reproduce this. In the meantime, use svn export:
> >
> > > >http://svnbook.red-bean.com/en/1.0/re10.html
> >
> > > > If it turns out the
> > > .metadata
> > > > directory IS causing problems, we'll investigate what's causing this
> and
> > > > either issue a fix or possibly document a better workaround.
> >
> > > > On Tue, Mar 30, 2010 at 12:09 AM, Spanishgringo <
> freeman...@gmail.com
> > > >wrote:
> >
> > > > > Same problem for me as well. :(  Back to 1.3.1 until someone can
> share
> > > > > a fix...
> >
> > > > > On Mar 30, 12:28 am, julianc 
> wrote:
> > > > > > Similar problem here. Upgraded to 1.3.2 error, switched back to
> > > > > > 1.3.1 ... everything fine again.
> >
> > > > > > Mar 29, 2010 11:24:44 PM
> > > > > > com.google.appengine.tools.info.LocalVersionFactory getVersion
> > > > > > INFO: Could not find API version from
> ../project/war/WEB-INF/lib/.svn
> > > > > > java.util.zip.ZipException: error in opening zip file
> > > > > > at java.util.zip.ZipFile.open(Native Method)
> > > > > > at java.util.zip.ZipFile.(ZipFile.java:114)
> > > > > > at java.util.jar.JarFile.(JarFile.java:133)
> > > > > > at java.util.jar.JarFile.(JarFile.java:97)
> > > > > > at
> >
> > >
> com.google.appengine.tools.util.ApiVersionFinder.findApiVersion(ApiVersionF
> > > > > inder.java:
> > > > > > 37)
> > > > > > at
> >
> > >
> com.google.appengine.tools.info.LocalVersionFactory.getVersion(LocalVersion
> > > > > Factory.java:
> > > > > > 65)
> > > > > > at
> >
> > >
> com.google.appengine.tools.info.UpdateCheck.getLocalVersion(UpdateCheck.jav
> > > > > a:
> > > > > > 112)
> > > > > > at
> >
> > >
> com.google.appengine.tools.info.UpdateCheck.checkForUpdates(UpdateCheck.jav
> > > > > a:
> > > > > > 91)
> > > > > > at
> >
> > >
> com.google.appengine.tools.info.UpdateCheck.doNagScreen(UpdateCheck.java:
> > > > > > 164)
> > > > > > at
> >
> > >
> com.google.appengine.tools.info.UpdateCheck.maybePrintNagScreen(UpdateCheck
> > > > > .java:
> > > > > > 132)
> > > > > > at
> com.google.appengine.tools.development.DevAppServerMain
> > > > > > $StartAction.apply(DevAppServerMain.java:150)
> > > > > > at com.google.appengine.tools.util.Parser
> > > > > > $ParseResult.applyArgs(Parser.java:48)
> > > > > > at
> >
> > >
> com.google.appengine.tools.development.DevAppServerMain.(DevAppServer
> > > > > Main.java:
> > > > > > 113)
> > > > > > at
> >
> > >
> com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMa
> > > > > in.java:
> > > > > > 89)
> > > > > > Mar 29, 2010 11:24:44 PM
> > > com.google.apphosting.utils.jetty.JettyLogger
> > > > > > info
> > > > > > INFO: Logging to JettyLogger(null) via
> > > > > > com.google.apphosting.utils.jetty.JettyLogger
> > > > > > Mar 29, 2010 11:24:44 PM
> > > > > > com.google.apphosting.utils.config.AppEngineWebXmlReader
> > > > > > readAppEngineWebXml
> > > > > > INFO: Successfully processed
> ../project/war/WEB-INF/appengine-web.xml
> > > > > > Mar 29, 2010 11:24:44 PM
> > > > > > com.google.apphosting.utils.config.AbstractConfigXmlReader
> > > > > > readConfigXml
> >
> > > > > > On Mar 29, 7:04 pm, "Ikai L (Google)"  wrote:
> >
> > > > > > > Not sure why this should be happening as the deploy script
> should
> > > be
> > > > > > > ignoring this, but is it possible for you to do an "svn export"
> to
> > > > > another
> > > > > > > directory prior to a deploy?
> >
> > > > > --
> > > > > 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
> 
> >
>

[appengine-java] Unit Test and JDO: The type com.google.appengine.tools.development.ApiProxyLocalImpl is not visible

2010-04-13 Thread Nick
I would like to write local unit tests for jdo.

I am following the following tutorial but I get an Eclipse error
message, "The type
com.google.appengine.tools.development.ApiProxyLocalImpl is not
visible".

 - http://blog.appenginefan.com/2009/05/jdo-and-unit-tests.html

I have tried all suggested workarounds from these related posts:

 -
http://groups.google.com/group/google-appengine-java/browse_thread/thread/5bd9829e85c90c90/ef146cbc1c2900fd?lnk=gst&q=ApiProxyLocalImpl#ef146cbc1c2900fd

 -
http://groups.google.com/group/google-appengine-java/browse_thread/thread/9a5ca03a216cd0a9/050b7303b9acd3c9?lnk=gst&q=ApiProxyLocalImpl#050b7303b9acd3c9

 - 
http://groups.google.com/group/google-appengine/browse_thread/thread/6b4c50f151e55470

This issue seems to be unresolved, and affecting many people.  Please
help!

Thanks!!



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



[appengine-java] Re: JPA: Query contains stale data (bug or future)?

2010-04-13 Thread danblack
Can anyone help me?

On Apr 9, 6:47 pm, Denis Chernyshov  wrote:
> Here is my full log.
>
> 09.04.2010 12:20:15 org.datanucleus.ObjectManagerImpl 
> FINE: Object Manager "org.datanucleus.objectmanageri...@1dfa916" opened for
> datastore "org.datanucleus.store.appengine.datastoremana...@13a1505"
> 09.04.2010 12:20:15 org.datanucleus.ObjectManagerImpl initialiseLevel1Cache
> FINE: Level 1 Cache of type "weak" initialised
> 09.04.2010 12:20:15 org.datanucleus.transaction.Transaction 
> FINE: Transaction created [DataNucleus Transaction, ID=Xid=, enlisted
> resources=[]]
> 09.04.2010 12:20:15 org.datanucleus.TransactionImpl internalBegin
> FINE: Transaction begun for ObjectManager
> org.datanucleus.objectmanageri...@1dfa916 (optimistic=true)
> 09.04.2010 12:20:15
> org.datanucleus.store.appengine.jpa.DatastoreEntityTransactionImpl begin
> FINE: Started new datastore transaction: 2
> 09.04.2010 12:20:15 org.datanucleus.ObjectManagerImpl getObjectFromCache
> FINE: Object with id
> "ru.englishvocabulary.model.test.Container:Container(756)" not found in
> Level 1 cache [cache size = 0]
> 09.04.2010 12:20:15 org.datanucleus.ObjectManagerImpl putObjectIntoCache
> FINE: Object "ru.englishvocabulary.model.test.contai...@a80631"
> (id="ru.englishvocabulary.model.test.Container:Container(756)") added to
> Level 1 cache (loadedFlags="[NY]")
> 09.04.2010 12:20:15 org.datanucleus.transaction.Transaction enlistResource
> FINE: Running enlist operation on resource:
> org.datanucleus.store.appengine.datastorexaresou...@787691, error code
> TMNOFLAGS and transaction: [DataNucleus Transaction, ID=Xid=, enlisted
> resources=[]]
> 09.04.2010 12:20:15 org.datanucleus.ConnectionManagerImpl allocateConnection
> FINE: Connection added to the pool :
> org.datanucleus.store.appengine.datastoreconnectionfactoryimpl$datastoremanagedconnect...@1392dd5
> 09.04.2010 12:20:15
> org.datanucleus.store.appengine.DatastorePersistenceHandler get
> FINE: Getting entity of kind Container with key Container(756)
> 09.04.2010 12:20:15 org.datanucleus.state.LifeCycleState changeState
> FINE: Object "ru.englishvocabulary.model.test.contai...@a80631"
> (id="ru.englishvocabulary.model.test.Container:Container(756)") has a
> lifecycle change : "HOLLOW"->"P_NONTRANS"
>
> // My Item
> 09.04.2010 12:20:15 org.datanucleus.ObjectManagerImpl getObjectFromCache
> FINE: Object with id
> "ru.englishvocabulary.model.test.Item:Container(756)/Item(761)" not found in
> Level 1 cache [cache size = 1]
> 09.04.2010 12:20:15 org.datanucleus.ObjectManagerImpl putObjectIntoCache
> FINE: Object "ru.englishvocabulary.model.test.i...@e61a90"
> (id="ru.englishvocabulary.model.test.Item:Container(756)/Item(761)") added
> to Level 1 cache (loadedFlags="[NYN]")
> 09.04.2010 12:20:15 org.datanucleus.state.LifeCycleState changeState
> FINE: Object "ru.englishvocabulary.model.test.i...@e61a90"
> (id="ru.englishvocabulary.model.test.Item:Container(756)/Item(761)") has a
> lifecycle change : "HOLLOW"->"P_NONTRANS"
> 09.04.2010 12:20:15 org.datanucleus.ConnectionManagerImpl allocateConnection
> FINE: Connection found in the pool :
> org.datanucleus.store.appengine.datastoreconnectionfactoryimpl$datastoremanagedconnect...@1392dd5
> 09.04.2010 12:20:15 org.datanucleus.ConnectionManagerImpl allocateConnection
> FINE: Connection found in the pool :
> org.datanucleus.store.appengine.datastoreconnectionfactoryimpl$datastoremanagedconnect...@1392dd5
> 09.04.2010 12:20:15
> org.datanucleus.store.appengine.DatastorePersistenceHandler get
> FINE: Getting entity of kind Item with key Container(756)/Item(761)
>
> //  Change my item
> 09.04.2010 12:20:15 org.datanucleus.state.LifeCycleState changeState
> FINE: Object "ru.englishvocabulary.model.test.i...@e61a90"
> (id="ru.englishvocabulary.model.test.Item:Container(756)/Item(761)") has a
> lifecycle change : "P_NONTRANS"->"P_DIRTY"
> 09.04.2010 12:20:15 org.datanucleus.ObjectManagerImpl enlistInTransaction
> FINE: Object "ru.englishvocabulary.model.test.i...@e61a90"
> (id="com.google.appengine.api.datastore.Key:Container(756)/Item(761)")
> enlisted in transactional cache
> 09.04.2010 12:20:15 ru.englishvocabulary.bl.local.test.LocalService
> changeItems
> SEVERE: changed item: i...@e61a90 [key=Container(756)/Item(761), value=xxx]
> 09.04.2010 12:20:15 org.datanucleus.ConnectionManagerImpl allocateConnection
> FINE: Connection found in the pool :
> org.datanucleus.store.appengine.datastoreconnectionfactoryimpl$datastoremanagedconnect...@1392dd5
> 09.04.2010 12:20:15 org.datanucleus.sco.backed.List 
> FINE: Object "ru.englishvocabulary.model.test.contai...@a80631" field
> "items" is replaced by a SCO wrapper of type
> "org.datanucleus.sco.backed.List" [cache-values=true, lazy-loading=true,
> queued-operations=true, allow-nulls=false]
> 09.04.2010 12:20:15 org.datanucleus.sco.backed.List loadFromStore
> FINE: Object "ru.englishvocabulary.model.test.contai...@a80631" field
> "items" loading contents to SCO wrapper from the datastore
> 09.04.2010 12:

[appengine-java] Re: Serialization of lists for the datastore

2010-04-13 Thread Jochen Schnaidt
Update: The serialization is a bug in RPC. I got a workaround for it
but the javax.jdo.JDOException still occurs. :-(

On Apr 13, 3:22 pm, Jochen Schnaidt  wrote:
> Hi,
> I’m building an application with GWT and GAE and have a problem saving
> data in the datastore. In my application I generate a list which
> consists of lists of strings, looks this way: List>
> trackList;
>
> It compiles but gives me a warning:
>
> [WARN] Warnings in
> generated://D271BF8A9063BFFBB6E2618C9E23EF15/eventManagement/shared/HandleEventService_TypeSerializer.java'
> [WARN] Line 31: Referencing deprecated class
> 'com.google.gwt.user.client.ui.ChangeListenerCollection'
> And 3 other deprecated classes
>
> When I run the application and call the method for saving data I get
> the following error:
>
> javax.jdo.JDOException: Error creating the MetaDataManager for API
> "JDO" :
> NestedThrowables:
> java.lang.reflect.InvocationTargetException
>
> I think the problem is that the compiler uses old GWT classes for
> serialization and not the classes of the GAE. Right?
>
> Any idea how I could fix this problem?
>
> Thanks a lot. Greetings

-- 
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] Does AppEngine really include JPA Support

2010-04-13 Thread Al Sutton
>From http://code.google.com/appengine/docs/java/datastore/usingjpa.html;

"The App Engine Java SDK includes an implementation of JPA 1.0 for the
App Engine datastore."

But from a couple of days work I've already found the following things
which don't comply with the JPA spec;

- Strings can't be used for @Id values (unless you use a GAE specific
extension).
- Longs can't be used for @Id values for items in a List.
- Maps seem totally broken. Trying the example from 9.1.27 of the JPA
spec (ejb-3_0-fr-spec-persistence.pdf) generates a method about FK
maps being not supported.

Did I miss something, or does AppEngine actually not contain an
implementation of JPA, but contains a semi-functional work in progress
which only provides some features of JPA?

Al.

-- 
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] javax.persistence.Persistence is a restricted class.

2010-04-13 Thread hallmit
hi folks,

I've had a very strange issue when I'm deploying my web app in local
server(jetty). I got this message:

Caused by: java.lang.NoClassDefFoundError:
javax.persistence.Persistence 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)

The offending code is :
   _emf =
Persistence.createEntityManagerFactory(aPersistenceUnitName);

But javax.persistence.Persistence is not a restricted class because I
have already used it in other application. I don't understand why I'm
getting this message. my business classes are embedded in a .jar
archive that I put in WEB-INF/lib.
I copied all jars from ${sdk.dir}/lib/user to my WEB-INF/lib too.

I use:
sdk 1.3.1

any ideas?

-- 
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] Serialization of lists for the datastore

2010-04-13 Thread Jochen Schnaidt
Hi,
I’m building an application with GWT and GAE and have a problem saving
data in the datastore. In my application I generate a list which
consists of lists of strings, looks this way: List>
trackList;

It compiles but gives me a warning:

[WARN] Warnings in
generated://D271BF8A9063BFFBB6E2618C9E23EF15/eventManagement/shared/HandleEventService_TypeSerializer.java'
[WARN] Line 31: Referencing deprecated class
'com.google.gwt.user.client.ui.ChangeListenerCollection'
And 3 other deprecated classes

When I run the application and call the method for saving data I get
the following error:

javax.jdo.JDOException: Error creating the MetaDataManager for API
"JDO" :
NestedThrowables:
java.lang.reflect.InvocationTargetException

I think the problem is that the compiler uses old GWT classes for
serialization and not the classes of the GAE. Right?

Any idea how I could fix this problem?

Thanks a lot. Greetings

-- 
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] bouncycastle add provider failure

2010-04-13 Thread mbattula
Hi,
I have tried to add the bouncycastle JCE provider in the code.But at
runtime it is throwing  java.security.AccessControlException.
is it  because of my coding mistake or 'Security.addProvider' is
forbidden by GAE.

the stack trace is here:

java.security.AccessControlException: access denied
(java.security.SecurityPermission putProviderProperty.BC)
at
java.security.AccessControlContext.checkPermission(AccessControlContext.java:
264)
at
java.security.AccessController.checkPermission(AccessController.java:
427)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:
532)
at com.google.appengine.tools.development.DevAppServerFactory
$CustomSecurityManager.checkPermission(DevAppServerFactory.java:151)
at java.lang.SecurityManager.checkSecurityAccess(SecurityManager.java:
1698)
at java.security.Provider.check(Provider.java:348)
at java.security.Provider.put(Provider.java:302)
at org.bouncycastle.jce.provider.BouncyCastleProvider.(Unknown
Source)
at
com.atp.smartstore.controller.SSAdminApiAction.verifyURL3(SSAdminApiAction.java:
368)
at
com.atp.smartstore.controller.SSAdminApiAction.setPutCert(SSAdminApiAction.java:
168)
at
com.atp.smartstore.controller.SmartStoreHandler.parseQueryString(SmartStoreHandler.java:
61)
at
com.atp.smartstore.controller.SmartStoreHandler.doGet(SmartStoreHandler.java:
32)
at
com.atp.smartstore.controller.SmartStoreHandler.doPut(SmartStoreHandler.java:
72)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:716)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
487)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1093)
at
com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:
51)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1084)
at
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:
43)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1084)
at
com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:
121)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1084)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
360)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:
216)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
181)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
712)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
405)
at
com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:
70)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
139)
at com.google.appengine.tools.development.JettyContainerService
$ApiProxyHandler.handle(JettyContainerService.java:352)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
139)
at org.mortbay.jetty.Server.handle(Server.java:313)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
506)
at org.mortbay.jetty.HttpConnection
$RequestHandler.content(HttpConnection.java:844)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:
396)
at org.mortbay.thread.BoundedThreadPool
$PoolThread.run(BoundedThreadPool.java:442)

-- 
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] Implementing a Custom User System on Top of App Engine User System

2010-04-13 Thread klonq
I'm an old school Perl programmer from way back and thinking about
getting back into the web_dev game. So I've been reading up on app
engine and have decided to go with Java because I know even less about
Python than I do Java.

But my question is this, how would one go about implementing a user
system on top of the app engine user system?

Say for instance you wanted to use google's login/out system with
google accounts and the session objects already established in
UserServiceFactory but also wanted the user id to reference extra data
unique to your system while minimizing db queries and processing.
Unfortunately it is not possible to extend
com.google.appengine.api.users (cannot subclass a final class).

Has anyone come up with a clever way of doing this that they want to
share?

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



Re: [appengine-java] Re: How to exclude the optional jars for deployment?

2010-04-13 Thread John Patterson


On 13 Apr 2010, at 19:56, Jake wrote:



I mean, the latest SDK (1.3.2) isn't even in the central repository
yet :)


If it helps you can add this:



twig
http://mvn.twig-persist.googlecode.com/hg


which is kept up-to-date with the latest app engine libs

BTW, I am using maven with GPE with no problems.  I do not add the App  
Engine "Library" so none of the optional jars are copied into my lib  
folder.  The only trick was to specify -Dappengine.sdk.root ... and  
strangely it keeps removing the -javaagent argument every time I run it.


--
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: Any examples on how to use the data store low level Java API?

2010-04-13 Thread Didier Durand
Hi Fred,

The most detailed samples that I found up to now are in this book:
http://www.amazon.com/Programming-Google-App-Engine-Infrastructure/dp/059652272X/ref=sr_1_1?ie=UTF8&s=books&qid=1271167954&sr=8-1

Many chapters devoted to Datastore in all its aspects. The definite
reading for your needs!
regards
didier

On Apr 9, 11:31 am, Fred Janon  wrote:
> Hi,
>
> Are there any examples on how to use the low level data store API,
> other than the short example on the Javadoc? Especially on how to use
> the predefined types like email, GeoPt, address... Is the source code
> available for these objects? I am interested in the compare method for
> these objects.
>
> Thanks
>
> Fred

-- 
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] Datastore Statistics shows different numbers then Quota Details

2010-04-13 Thread dmitrygusev
Hi,

In quota details I can see that I'm using 31% of free quota limit:

Total Stored Data   31% 0.31 of 1.00 GBytes

However if I go to Datastore Statistics I see that the Size of all
entities it only 70 MBytes

What uses 310-70=240 MBytes of my database quota?

Also in Datastore Statistics I can see that more than the half of my
entities size (57%) used by metadata:

Property Type   Size
Key 10 MBytes
Integer 7 MBytes
Blob5 MBytes
Date/Time   5 MBytes
Boolean 3 MBytes
String  31 KBytes
Text14 KBytes
NULL2 KBytes
Metadata40 MBytes

What is metadata here?

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



[appengine-java] Re: How to exclude the optional jars for deployment?

2010-04-13 Thread Jake
I tried using GPE 1.3 here:
http://groups.google.com/group/google-appengine-java/browse_thread/thread/2212abc544b3cef5/
However, I never managed to get it working properly and gave up after
a few hours.  I currently use plain maven with an Ant script to run
the command line GAE tools.  I'll probably dive back into the plugin
at some point, but I'm not sure it has flexibility as its main focus.
I mean, the latest SDK (1.3.2) isn't even in the central repository
yet :)

Jake

On Apr 12, 11:19 am, Rajeev Dayal  wrote:
> +[Keith]
>
> @Jake: Actually, version 1.3 of the Google Plugin for Eclipse is far more
> maven-friendly. What problems are you running into? 
> Seehttp://code.google.com/eclipse/docs/faq.html#gwt_with_mavenfor more
> information.
>
> On Fri, Apr 9, 2010 at 7:22 PM, Jake  wrote:
> > Or you could forgo the plugin and use maven to build/upload your
> > projects.  Then, you determine the jars to be included.  This was the
> > primary reason that I wanted the plugin to support maven, but that
> > became non-trivial and the documentation wasn't very helpful.
>
> > Jake
>
> > On Apr 9, 10:05 am, Rajeev Dayal  wrote:
> > > Unfortunately, there is no great way to disable all of the JDO-related
> > > features on a given App Engine project. If you could, file a feature
> > request
> > > for this in the issue tracker.
>
> > > The best way to exclude these jars would be to remove them from your
> > > war/WEB-INF/lib directory, and when the plugin complains that they're
> > > missing, add them to the list of exclusions of jars that are on the build
> > > path but are not required to be on the server's runtime classpath.
> > > Unfortunately, you'll have to re-do this step if you switch SDKs.
>
> > > On Fri, Apr 9, 2010 at 4:39 AM, dflorey  wrote:
> > > > I don't need JDO etc. in my app as I'm using the native datastore.
> > > > What is the easiest way to exclude these jars from deploy to app
> > > > engine?
> > > > Would be very nice if the Google Plugin would provide some options for
> > > > disabling datanucleus. I have to disable the builder etc. for each
> > > > project manually.
>
> > > > --
> > > > 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] Persistence, parents and keys

2010-04-13 Thread gemma
Hello!

I'm currently writing an app where the datamodel has a set of Category
objects with SubCategory children which represents a classification
tree.  I've now gotten to the stage where I'm attempting to apply
these Category and SubCategory objects as attributes of an Item
object, but am getting an error that says that once an object has been
persisted, you can't create or modify its parent.

That's cool, I'm happy to change my Item class so that instead of
having persistent Category and SubCategory items directly as
attributes they have the string repesentation of the Category and
SubCategory keys - but is this an acceptable design approach?

Any thoughts would be greatly appreciated.

Thanks!
Gemma

-- 
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: java.lang.RuntimeException: java.io.NotSerializableException: + objectify framework

2010-04-13 Thread Nacho Coloma
Aditya, you need to post (at least) your stack trace to get help.

On Apr 12, 9:30 am, Aditya Rathi  wrote:
> I have not modified anything in DWR. But the same code was working with JDO;
> I have migrated it to Objectify keeping the action layer unchanged.
>
> This is working fine on my local environment.
>
> On Mon, Apr 12, 2010 at 12:47 PM, Shawn Brown 
> wrote:
>
> > > I am using dwr and objectify framework to get the arraylist of string
> > > from datastore.
> > > But I am getting error.
>
> > > java.lang.RuntimeException: java.io.NotSerializableException
>
> > Well beyond that have you really gotten dwr to work in appengine.  If
> > so, it must be a pretty old version.
>
> > AFAIK, dwr uses threads and file writes.  Have you modified dwr to avoid
> > those?
>
> > Shawn
>
> > --
> > 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.