[appengine-java] Re: Recommended scope for DatastoreService

2009-11-04 Thread Max Ross (Google)
That sounds reasonable to me.

On Wed, Nov 4, 2009 at 6:50 PM, Roy Smith wrote:

> Hi Max
>
> Thx for the answer, especially the correction on the transaction
> implementation.
>
> The solution I'd arrived at is to use Guice to instantiate my DsS with a
> scope of @RequestScoped. Do you see any problems with that approach?
>
> best
> Roy
>
>
> On Wed, Nov 4, 2009 at 7:02 PM, Max Ross (Google) <
> maxr+appeng...@google.com > wrote:
>
>> A DatastoreService instance is extremely lightweight so feel free to
>> create them as-needed.  In addition, transactions are not tied to a specific
>> DatastoreService instance but rather to the thread that started the
>> transaction.  Finally, assume that all classes in the api are _not_
>> threadsafe unless explicitly documented otherwise.
>>
>> Hope this helps,
>> Max
>>
>>
>> On Wed, Nov 4, 2009 at 4:35 AM, Roy wrote:
>>
>>>
>>> Should I be creating a DatastoreService for each "session", or are
>>> they inexpensive enough that I can have one for each Kind? I realise
>>> that for transactions, the latter doesn't work.
>>>
>>> A related question is how threadsafe is an instance of
>>> DatastoreService?
>>>
>>>
>>>
>>>
>>
>>
>>
>
> >
>

--~--~-~--~~~---~--~~
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: Master/Detail relations and redundant data handling

2009-11-04 Thread Rusty Wright

Thinking out loud here:

When you use that encoded string format you can use it wherever you'd use Key.  
The apparent advantage of using the encoded string format is that your dto 
isn't exposing GAE's Key.  With the encoded string your service layer can be 
oblivious about GAE's Key, without any extra code in your dao; otherwise, to 
hide the Key from the service layer it seems to me that you'd need to convert 
the Key to String via the KeyFactory methods.  Even then it seems a bit dodgy; 
if you're using your persistence layer's dtos in your view layer, which seems 
to be fashionable these days, then your jsp is probably going to want to use 
the primary key, for the value in the selects, check boxes, etc.

So one way to answer your question would be to say that you should (could) use 
String whenever your service layer, or above, uses a dto's primary key.

My question is, what's the down side to using the encoded string in all of your 
dtos?  My inclination is to just forget about Key and use the encoded string 
everywhere.

My other question is, do other databases support String for a primary key?  
I've always used something that's autoincremented, for example, a sequence, and 
those are always longs and their ilk.


James H wrote:
> Rusty, Thanks for the code sample!  How do you decide when to use key
> type of "Key" vs "String"?
> 
> On Nov 4, 1:45 pm, James H  wrote:
>> Datanucleus, both suggestions worked but I like the "embeddedOnly"
>> best in order to avoid a dummy key on every FK class!
>>
>> Bryce, I no longer get the error above...I just added
>> embeddedOnly="true" to the PersistanceCapable tag in BookFk class.
>> You're right, I could use the collection technique on the FKs but I
>> wonder the pros/cons of such collections on what could be very large
>> collections.  For example, say Baylor with 25,000 members?  Guess its
>> a matter of using "owned" for small Sets versus "unowned" for large
>> Sets of data.  Regardless, your FK pattern will save a whole lot of
>> code management!!!
>>
>> Any further feedback welcome...I'll continue testing!
>>
>> On Nov 4, 12:12 pm, datanucleus  wrote:
>>
>>
>>
 Needs a PK either way. Pick a field, any field.
>>> Or just set "embeddedOnly" as true ... if you really never want to
>>> persist one of those in its own right- Hide quoted text -
>> - Show quoted text -
> > 

--~--~-~--~~~---~--~~
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: Recommended scope for DatastoreService

2009-11-04 Thread Roy Smith
Hi Max

Thx for the answer, especially the correction on the transaction
implementation.

The solution I'd arrived at is to use Guice to instantiate my DsS with a
scope of @RequestScoped. Do you see any problems with that approach?

best
Roy


On Wed, Nov 4, 2009 at 7:02 PM, Max Ross (Google)

> wrote:

> A DatastoreService instance is extremely lightweight so feel free to create
> them as-needed.  In addition, transactions are not tied to a specific
> DatastoreService instance but rather to the thread that started the
> transaction.  Finally, assume that all classes in the api are _not_
> threadsafe unless explicitly documented otherwise.
>
> Hope this helps,
> Max
>
>
> On Wed, Nov 4, 2009 at 4:35 AM, Roy wrote:
>
>>
>> Should I be creating a DatastoreService for each "session", or are
>> they inexpensive enough that I can have one for each Kind? I realise
>> that for transactions, the latter doesn't work.
>>
>> A related question is how threadsafe is an instance of
>> DatastoreService?
>>
>>
>>
>>
>
> >
>

--~--~-~--~~~---~--~~
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] blacklists

2009-11-04 Thread sklop

Hi,
I am interested in using a blasklist service such as uribl with my GAE
application.  It seems as though this requires a DNS lookup to do.
What is the best way to do this?  Is it possible from my application?

Thanks in advanced!

--~--~-~--~~~---~--~~
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] JDO/JPA Snippets That Work - Unindexed Properties

2009-11-04 Thread Max Ross (Google)
http://gae-java-persistence.blogspot.com/2009/11/unindexed-properties.html

--~--~-~--~~~---~--~~
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: SimpleDS: an alternative for Datastore persistence

2009-11-04 Thread Fedearne

-> Nacho

SimpleDS looks great,but why have you decided to tie it to Spring?

~Morten

On 3 Nov., 20:01, Vince Bonfanti  wrote:
> Great! Since someone else is now using this besides me, I've added
> more comments. Also, I've added some testcases and fixed an issue when
> invoking put() with entities that contain partial keys. If your
> entities don't have complete keys when invoking put(), you should go
> get the latest code.
>
> Let me know if you run into any problems, or have suggestions for 
> improvements.
>
> Vince
>
>
>
> On Mon, Nov 2, 2009 at 10:47 PM, Roy Smith  
> wrote:
> > Hi Vince
> > Thanks for sharing.
> > I've modified my persistence framework to incorporate your class and it
> > works very well.
> > kind regards
> > Roy
--~--~-~--~~~---~--~~
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: Java namespace for entity in bulkloader?

2009-11-04 Thread Stuart Moffatt
Nick,


> Pretty much, except kind() is a method for Model classes, not loaders. Like
> this:
>
> class Foo(db.Model):
>   @classmethod
>   def kind(self):
> return 'my.Foo'
>
>

The above kind() method makes more sense (in the model instead of the
loader). Was not aware of it as the docs don't give much of a hint (
http://code.google.com/appengine/docs/python/datastore/modelclass.html#Model_kind)
as to other uses. Thanks for pointing it out.

As above, and specify the kind you declared in the Python module on the
> command line and in the loader.
>
>
Just to clarify, my loader will look like this:


class Foo(db.Model):
  name = db.StringProperty()
  data = db.IntegerProperty()

  @classname
  def kind(self, entity):
return 'my.Foo'

class FooLoader(bulkloader.Loader):
 def __init__(self):
  bulkloader.Loader.__init__(self, 'my.Foo',
[('name', str),
('data', int)
])


and my command line will have --kind=my.Foo

Correct?


>
>
>> And if that's not enough  it would be good to see the query syntax
>> in the runtime application (e.g. "SELECT * from package.MyName" with the
>> right python import statements).
>>
>
> If you're using GQL, you need to use the kind name, not the class name (so
> in this example it would be "SELECT * FROM my.Foo").
>

Yes, GQL is how I will access, so I will use the full Kind name. It also
seems that in Java if I use:

  Query q = new Query(Foo.class)

that the resulting query will be generate a statement with "SELECT * FROM
my.Foo"

I will give this a shot (later tonight) and post my results to the list.

Unfortunately, I pushed all of my data without the kind() method in the
model exposing the full name of my corresponding Java class. I don't think
there is any way fix the data in the store, except to delete it all and
start again with the updated model and bulk loader. Correct?

Stuart

--~--~-~--~~~---~--~~
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: Java namespace for entity in bulkloader?

2009-11-04 Thread Nick Johnson (Google)
On Wed, Nov 4, 2009 at 11:31 PM, Stuart Moffatt wrote:

> Nick,
>
>
> > Can you clarify what you mean by 'java loader' and 'hosted mode'?
>
> My java loader is a servlet which loads a CSV from disk, processes it and
> persists entities to the datastore. The CSV has the values for the
> properties I want my entity to have. The CSV and the data it points to is in
> WEB-INF, so I can get away with loading large sets in hosted mode and
> smaller sets in production (because  of the static file limit and request
> timeout it is not possible to load all of my data in production using this
> method). The Kind is created when I persist that first entity. This is
> functionally similar to a python bulk loader, except it is a one-off
> servlet, and does not come with all of the configuration and transport
> mechanism options that provided by the python SDK.
>
>
> > In the Python SDK, entities are named after the unqualified name of the
> class, by default - so a 'Film' gets loaded with an entity name of 'Film'.
> You can specify a custom entity type name with the kind() method. I'm still
> not hugely familiar with Java, so I'm not sure under which conditions it
> will use qualified and unqualified names - basically, you need to match
> those with your Python loaders.
>
> At one point I tried to convince bulkloader.py (using
> --kind=package.MyClass) and my custom bulk loader
> (bulkloader.Loader.__init__(self, 'package.MyClass')) to accept the full
> java package name, but even when I used namespaces in the python model, this
> did not work.
>

> Perhaps a python example for the kind() method you mention? Am I correct in
> assuming that I should provide a  kind() method in my custom bulk loader
> which overrides the default in much the same way as handle_entity() or
> generate_key() gives you a hook into those functions?
>

Pretty much, except kind() is a method for Model classes, not loaders. Like
this:

class Foo(db.Model):
  @classmethod
  def kind(self):
return 'my.Foo'


>
> In other words, should I try this?
>
> 
> class MyClass(db.Model):
>   name = db.StringProperty()
>   other_property = db.StringProperty()
>
> class MyClass(bulkloader.Loader):
>  def __init__(self):
>   bulkloader.Loader.__init__(self, 'MyClass',
> [('name', str),
> ('other_property', str)
> ])
>
>  def kind(self, entity):
>   return 'package.MyClass'
> 
>
>
> I understand if you can't provide a Java example, no worries. In lieu of
> that, could you provide a full example of customizing the python model's
> namespace using the kind() method in a custom bulkloader, along with the
> command line syntax to push it (with appcfg.py using the custom loader).
>

As above, and specify the kind you declared in the Python module on the
command line and in the loader.



> And if that's not enough  it would be good to see the query syntax in
> the runtime application (e.g. "SELECT * from package.MyName" with the right
> python import statements).
>

If you're using GQL, you need to use the kind name, not the class name (so
in this example it would be "SELECT * FROM my.Foo").

-Nick


>
> Thanks for your help on this.
>
> Stuart
>



-- 
Nick Johnson, Developer Programs Engineer, App Engine
Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number:
368047

--~--~-~--~~~---~--~~
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: Java namespace for entity in bulkloader?

2009-11-04 Thread Stuart Moffatt
Nick,

> Can you clarify what you mean by 'java loader' and 'hosted mode'?

My java loader is a servlet which loads a CSV from disk, processes it and
persists entities to the datastore. The CSV has the values for the
properties I want my entity to have. The CSV and the data it points to is in
WEB-INF, so I can get away with loading large sets in hosted mode and
smaller sets in production (because  of the static file limit and request
timeout it is not possible to load all of my data in production using this
method). The Kind is created when I persist that first entity. This is
functionally similar to a python bulk loader, except it is a one-off
servlet, and does not come with all of the configuration and transport
mechanism options that provided by the python SDK.

> In the Python SDK, entities are named after the unqualified name of the
class, by default - so a 'Film' gets loaded with an entity name of 'Film'.
You can specify a custom entity type name with the kind() method. I'm still
not hugely familiar with Java, so I'm not sure under which conditions it
will use qualified and unqualified names - basically, you need to match
those with your Python loaders.

At one point I tried to convince bulkloader.py (using
--kind=package.MyClass) and my custom bulk loader
(bulkloader.Loader.__init__(self, 'package.MyClass')) to accept the full
java package name, but even when I used namespaces in the python model, this
did not work.

Perhaps a python example for the kind() method you mention? Am I correct in
assuming that I should provide a  kind() method in my custom bulk loader
which overrides the default in much the same way as handle_entity() or
generate_key() gives you a hook into those functions?

In other words, should I try this?


class MyClass(db.Model):
  name = db.StringProperty()
  other_property = db.StringProperty()

class MyClass(bulkloader.Loader):
 def __init__(self):
  bulkloader.Loader.__init__(self, 'MyClass',
[('name', str),
('other_property', str)
])

 def kind(self, entity):
  return 'package.MyClass'



I understand if you can't provide a Java example, no worries. In lieu of
that, could you provide a full example of customizing the python model's
namespace using the kind() method in a custom bulkloader, along with the
command line syntax to push it (with appcfg.py using the custom loader). And
if that's not enough  it would be good to see the query syntax in the
runtime application (e.g. "SELECT * from package.MyName" with the right
python import statements).

Thanks for your help on this.

Stuart

--~--~-~--~~~---~--~~
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: Java namespace for entity in bulkloader?

2009-11-04 Thread Nick Johnson (Google)
On Wed, Nov 4, 2009 at 10:43 PM, Stuart Moffatt wrote:

> Nick,
>
> I've used a java loader in hosted mode (to spare the expense of doing it in
> production) for all of my entities. When I load them locally, /_ah/admin
> reports the simple name of the entity, with the right data. But my java code
> needs to query with the full package name.
>

Can you clarify what you mean by 'java loader' and 'hosted mode'?


>
> For instance, these work in hosted mode after entities loaded via Java
> loader
>
>- Query q = new Query(MyClass.class) // automatically passes full
>package name
>- Query q = new Query("package.MyClass") // manually pass full package
>name
>
> But these do not work in hosted mode after entities loaded via Java loader
>
>- Query q = new Query("SELECT * FROM MyClass") // simple name fails to
>map to package name
>- Query q = new Query(MyClass.class.getSimpleName()) // simple name
>fails to map to package name
>
> I am hoping I have explained this correctly. I got so confused yesterday
> trying to distinguish between:
>
>- working / not working (ie JDO error)
>- combined with hosted/production
>- combined with python/java loaders
>
> In your example at
> http://blog.notdot.net/2009/9/Advanced-Bulk-Loading-Part-5-Bulk-Loading-for-Java
>  what
> is the corresponding java package name for the python model "Film"? Do
> s pushed via the bulk loader get returned when your Java code queries
> for Film.class or "SELECT * FROM Film"?
>

In the Python SDK, entities are named after the unqualified name of the
class, by default - so a 'Film' gets loaded with an entity name of 'Film'.
You can specify a custom entity type name with the kind() method. I'm still
not hugely familiar with Java, so I'm not sure under which conditions it
will use qualified and unqualified names - basically, you need to match
those with your Python loaders.

-Nick


> I guess I am looking for validation (ie, working code) that entities pushed
> with a python bulkloader can be queried properly using Java. Like I said, I
> have probably got either the Query syntax wrong in the servlet or the
> annotations wrong in the class.
>
> If you add some Java code to the Film example, it would help immensely.
>
> Stuart
>
>
> On Wed, Nov 4, 2009 at 4:24 PM, Nick Johnson (Google) <
> nick.john...@google.com> wrote:
>
>> Hi Stuart,
>>
>> I'm not sure why this would be happening. Your best option might be to
>> insert a record using Java, then check how it shows up in the admin console,
>> and make sure to use the exact same name for the kind you use in the Java
>> loader.
>>
>> -Nick Johnson
>>
>>
>> On Wed, Nov 4, 2009 at 6:25 PM, Stuart Moffatt 
>> wrote:
>>
>>> Maybe I didn't word my problem very well.
>>>
>>> Let me describe it again:
>>>
>>> Data push:
>>> 1. I am bulkloading data to an app using python appcfg and custom
>>> bulkloaders.
>>> 2. The custom bulk loaders are pushing data from a CSV.
>>> 3. The models of the data being pushed have simple names in python (no
>>> package namespace)
>>> 4. The entities all get successfully uploaded.
>>>
>>> Data query:
>>> 1. The application that uses the data pushed via bulk loading is in
>>> Java
>>> 2. Because it's in Java, there is a package namespace for where my
>>> entity classes exist
>>> 3. App Engine is supposed to ignore the long package namespace and
>>> just pick up the simple name (ie, the name of the class)
>>> 4. These simple names are supposed to match the simple names of the
>>> data that was pushed via bulk loading.
>>>
>>> The problem:
>>> 1. Queries for the simple name via the admin interface return data as
>>> expected
>>> 2. Queries for the simple name via Java code do NOT return data as
>>> expected. Instead I get a JDO error about the class not being found
>>> (sorry, don't have my code in front of me to list the trace).
>>> Basically, it seems that a query for a simple name throws an error
>>> when that simple class name exists in a fully named package.
>>>
>>> I am using JDO annotations in my classes as per the tutorials. Is
>>> there some magic that I am missing? Perhaps I am doing something wrong
>>> with my annotations?
>>>
>>> I would rather post details, but wanted to get a handle on the general
>>> problem before I bog down the list with a stack trace and entity code.
>>>
>>> Stuart
>>>
>>> On Nov 3, 5:06 pm, Stuart Moffatt  wrote:
>>> > I am using Nick's excellent tutorials on bulk loading, and was able to
>>> > push a huge pile of entities up to production. Problem is, they looked
>>> > like this:
>>> >
>>> > MySpecialEntity
>>> >
>>> > in my custom python bulkloader class and in production.
>>> >
>>> > The gotcha is my application is Java, and queries for:
>>> >
>>> > SELECT FROM org.domain.app.MySpecialEntity
>>> >
>>> > fail because the Javanamespacewas not part of the python bulkloader.
>>> >
>>> > Anyone know a workaround?
>>> >
>>> > Stuart
>>>
>>
>>
>>
>> --
>> Nick Johnson, Developer Programs Engineer, App Engine
>>

[appengine-java] Re: Java namespace for entity in bulkloader?

2009-11-04 Thread Stuart Moffatt
Typo (I think):

   - Query q = new Query("package.MyClass") // manually pass full package
   name

should be:

   - Query q = new Query("SELECT * FROM package.MyClass") // manually pass
   full package name


Stuart

On Wed, Nov 4, 2009 at 4:43 PM, Stuart Moffatt wrote:

> Nick,
>
> I've used a java loader in hosted mode (to spare the expense of doing it in
> production) for all of my entities. When I load them locally, /_ah/admin
> reports the simple name of the entity, with the right data. But my java code
> needs to query with the full package name.
>
> For instance, these work in hosted mode after entities loaded via Java
> loader
>
>- Query q = new Query(MyClass.class) // automatically passes full
>package name
>- Query q = new Query("package.MyClass") // manually pass full package
>name
>
> But these do not work in hosted mode after entities loaded via Java loader
>
>- Query q = new Query("SELECT * FROM MyClass") // simple name fails to
>map to package name
>- Query q = new Query(MyClass.class.getSimpleName()) // simple name
>fails to map to package name
>
> I am hoping I have explained this correctly. I got so confused yesterday
> trying to distinguish between:
>
>- working / not working (ie JDO error)
>- combined with hosted/production
>- combined with python/java loaders
>
> In your example at
> http://blog.notdot.net/2009/9/Advanced-Bulk-Loading-Part-5-Bulk-Loading-for-Java
>  what
> is the corresponding java package name for the python model "Film"? Do
> s pushed via the bulk loader get returned when your Java code queries
> for Film.class or "SELECT * FROM Film"?
>
> I guess I am looking for validation (ie, working code) that entities pushed
> with a python bulkloader can be queried properly using Java. Like I said, I
> have probably got either the Query syntax wrong in the servlet or the
> annotations wrong in the class.
>
> If you add some Java code to the Film example, it would help immensely.
>
> Stuart
>
>
> On Wed, Nov 4, 2009 at 4:24 PM, Nick Johnson (Google) <
> nick.john...@google.com> wrote:
>
>> Hi Stuart,
>>
>> I'm not sure why this would be happening. Your best option might be to
>> insert a record using Java, then check how it shows up in the admin console,
>> and make sure to use the exact same name for the kind you use in the Java
>> loader.
>>
>> -Nick Johnson
>>
>>
>> On Wed, Nov 4, 2009 at 6:25 PM, Stuart Moffatt 
>> wrote:
>>
>>> Maybe I didn't word my problem very well.
>>>
>>> Let me describe it again:
>>>
>>> Data push:
>>> 1. I am bulkloading data to an app using python appcfg and custom
>>> bulkloaders.
>>> 2. The custom bulk loaders are pushing data from a CSV.
>>> 3. The models of the data being pushed have simple names in python (no
>>> package namespace)
>>> 4. The entities all get successfully uploaded.
>>>
>>> Data query:
>>> 1. The application that uses the data pushed via bulk loading is in
>>> Java
>>> 2. Because it's in Java, there is a package namespace for where my
>>> entity classes exist
>>> 3. App Engine is supposed to ignore the long package namespace and
>>> just pick up the simple name (ie, the name of the class)
>>> 4. These simple names are supposed to match the simple names of the
>>> data that was pushed via bulk loading.
>>>
>>> The problem:
>>> 1. Queries for the simple name via the admin interface return data as
>>> expected
>>> 2. Queries for the simple name via Java code do NOT return data as
>>> expected. Instead I get a JDO error about the class not being found
>>> (sorry, don't have my code in front of me to list the trace).
>>> Basically, it seems that a query for a simple name throws an error
>>> when that simple class name exists in a fully named package.
>>>
>>> I am using JDO annotations in my classes as per the tutorials. Is
>>> there some magic that I am missing? Perhaps I am doing something wrong
>>> with my annotations?
>>>
>>> I would rather post details, but wanted to get a handle on the general
>>> problem before I bog down the list with a stack trace and entity code.
>>>
>>> Stuart
>>>
>>> On Nov 3, 5:06 pm, Stuart Moffatt  wrote:
>>> > I am using Nick's excellent tutorials on bulk loading, and was able to
>>> > push a huge pile of entities up to production. Problem is, they looked
>>> > like this:
>>> >
>>> > MySpecialEntity
>>> >
>>> > in my custom python bulkloader class and in production.
>>> >
>>> > The gotcha is my application is Java, and queries for:
>>> >
>>> > SELECT FROM org.domain.app.MySpecialEntity
>>> >
>>> > fail because the Javanamespacewas not part of the python bulkloader.
>>> >
>>> > Anyone know a workaround?
>>> >
>>> > Stuart
>>>
>>
>>
>>
>> --
>> Nick Johnson, Developer Programs Engineer, App Engine
>> Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number:
>> 368047
>>
>
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To po

[appengine-java] Re: Java namespace for entity in bulkloader?

2009-11-04 Thread Stuart Moffatt
Nick,

I've used a java loader in hosted mode (to spare the expense of doing it in
production) for all of my entities. When I load them locally, /_ah/admin
reports the simple name of the entity, with the right data. But my java code
needs to query with the full package name.

For instance, these work in hosted mode after entities loaded via Java
loader

   - Query q = new Query(MyClass.class) // automatically passes full package
   name
   - Query q = new Query("package.MyClass") // manually pass full package
   name

But these do not work in hosted mode after entities loaded via Java loader

   - Query q = new Query("SELECT * FROM MyClass") // simple name fails to
   map to package name
   - Query q = new Query(MyClass.class.getSimpleName()) // simple name fails
   to map to package name

I am hoping I have explained this correctly. I got so confused yesterday
trying to distinguish between:

   - working / not working (ie JDO error)
   - combined with hosted/production
   - combined with python/java loaders

In your example at
http://blog.notdot.net/2009/9/Advanced-Bulk-Loading-Part-5-Bulk-Loading-for-Java
what
is the corresponding java package name for the python model "Film"? Do
s pushed via the bulk loader get returned when your Java code queries
for Film.class or "SELECT * FROM Film"?

I guess I am looking for validation (ie, working code) that entities pushed
with a python bulkloader can be queried properly using Java. Like I said, I
have probably got either the Query syntax wrong in the servlet or the
annotations wrong in the class.

If you add some Java code to the Film example, it would help immensely.

Stuart


On Wed, Nov 4, 2009 at 4:24 PM, Nick Johnson (Google) <
nick.john...@google.com> wrote:

> Hi Stuart,
>
> I'm not sure why this would be happening. Your best option might be to
> insert a record using Java, then check how it shows up in the admin console,
> and make sure to use the exact same name for the kind you use in the Java
> loader.
>
> -Nick Johnson
>
>
> On Wed, Nov 4, 2009 at 6:25 PM, Stuart Moffatt wrote:
>
>> Maybe I didn't word my problem very well.
>>
>> Let me describe it again:
>>
>> Data push:
>> 1. I am bulkloading data to an app using python appcfg and custom
>> bulkloaders.
>> 2. The custom bulk loaders are pushing data from a CSV.
>> 3. The models of the data being pushed have simple names in python (no
>> package namespace)
>> 4. The entities all get successfully uploaded.
>>
>> Data query:
>> 1. The application that uses the data pushed via bulk loading is in
>> Java
>> 2. Because it's in Java, there is a package namespace for where my
>> entity classes exist
>> 3. App Engine is supposed to ignore the long package namespace and
>> just pick up the simple name (ie, the name of the class)
>> 4. These simple names are supposed to match the simple names of the
>> data that was pushed via bulk loading.
>>
>> The problem:
>> 1. Queries for the simple name via the admin interface return data as
>> expected
>> 2. Queries for the simple name via Java code do NOT return data as
>> expected. Instead I get a JDO error about the class not being found
>> (sorry, don't have my code in front of me to list the trace).
>> Basically, it seems that a query for a simple name throws an error
>> when that simple class name exists in a fully named package.
>>
>> I am using JDO annotations in my classes as per the tutorials. Is
>> there some magic that I am missing? Perhaps I am doing something wrong
>> with my annotations?
>>
>> I would rather post details, but wanted to get a handle on the general
>> problem before I bog down the list with a stack trace and entity code.
>>
>> Stuart
>>
>> On Nov 3, 5:06 pm, Stuart Moffatt  wrote:
>> > I am using Nick's excellent tutorials on bulk loading, and was able to
>> > push a huge pile of entities up to production. Problem is, they looked
>> > like this:
>> >
>> > MySpecialEntity
>> >
>> > in my custom python bulkloader class and in production.
>> >
>> > The gotcha is my application is Java, and queries for:
>> >
>> > SELECT FROM org.domain.app.MySpecialEntity
>> >
>> > fail because the Javanamespacewas not part of the python bulkloader.
>> >
>> > Anyone know a workaround?
>> >
>> > Stuart
>>
>
>
>
> --
> Nick Johnson, Developer Programs Engineer, App Engine
> Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number:
> 368047
>

--~--~-~--~~~---~--~~
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: Java namespace for entity in bulkloader?

2009-11-04 Thread Nick Johnson (Google)
Hi Stuart,

I'm not sure why this would be happening. Your best option might be to
insert a record using Java, then check how it shows up in the admin console,
and make sure to use the exact same name for the kind you use in the Java
loader.

-Nick Johnson

On Wed, Nov 4, 2009 at 6:25 PM, Stuart Moffatt wrote:

> Maybe I didn't word my problem very well.
>
> Let me describe it again:
>
> Data push:
> 1. I am bulkloading data to an app using python appcfg and custom
> bulkloaders.
> 2. The custom bulk loaders are pushing data from a CSV.
> 3. The models of the data being pushed have simple names in python (no
> package namespace)
> 4. The entities all get successfully uploaded.
>
> Data query:
> 1. The application that uses the data pushed via bulk loading is in
> Java
> 2. Because it's in Java, there is a package namespace for where my
> entity classes exist
> 3. App Engine is supposed to ignore the long package namespace and
> just pick up the simple name (ie, the name of the class)
> 4. These simple names are supposed to match the simple names of the
> data that was pushed via bulk loading.
>
> The problem:
> 1. Queries for the simple name via the admin interface return data as
> expected
> 2. Queries for the simple name via Java code do NOT return data as
> expected. Instead I get a JDO error about the class not being found
> (sorry, don't have my code in front of me to list the trace).
> Basically, it seems that a query for a simple name throws an error
> when that simple class name exists in a fully named package.
>
> I am using JDO annotations in my classes as per the tutorials. Is
> there some magic that I am missing? Perhaps I am doing something wrong
> with my annotations?
>
> I would rather post details, but wanted to get a handle on the general
> problem before I bog down the list with a stack trace and entity code.
>
> Stuart
>
> On Nov 3, 5:06 pm, Stuart Moffatt  wrote:
> > I am using Nick's excellent tutorials on bulk loading, and was able to
> > push a huge pile of entities up to production. Problem is, they looked
> > like this:
> >
> > MySpecialEntity
> >
> > in my custom python bulkloader class and in production.
> >
> > The gotcha is my application is Java, and queries for:
> >
> > SELECT FROM org.domain.app.MySpecialEntity
> >
> > fail because the Javanamespacewas not part of the python bulkloader.
> >
> > Anyone know a workaround?
> >
> > Stuart
>



-- 
Nick Johnson, Developer Programs Engineer, App Engine
Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number:
368047

--~--~-~--~~~---~--~~
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: Master/Detail relations and redundant data handling

2009-11-04 Thread James H

Rusty, Thanks for the code sample!  How do you decide when to use key
type of "Key" vs "String"?

On Nov 4, 1:45 pm, James H  wrote:
> Datanucleus, both suggestions worked but I like the "embeddedOnly"
> best in order to avoid a dummy key on every FK class!
>
> Bryce, I no longer get the error above...I just added
> embeddedOnly="true" to the PersistanceCapable tag in BookFk class.
> You're right, I could use the collection technique on the FKs but I
> wonder the pros/cons of such collections on what could be very large
> collections.  For example, say Baylor with 25,000 members?  Guess its
> a matter of using "owned" for small Sets versus "unowned" for large
> Sets of data.  Regardless, your FK pattern will save a whole lot of
> code management!!!
>
> Any further feedback welcome...I'll continue testing!
>
> On Nov 4, 12:12 pm, datanucleus  wrote:
>
>
>
> > > Needs a PK either way. Pick a field, any field.
>
> > Or just set "embeddedOnly" as true ... if you really never want to
> > persist one of those in its own right- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
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: AppEngine Java stability concerns

2009-11-04 Thread Rusty Wright

Could you have an automated message (monthly, weekly, whatever) that's posted 
to the GAE groups that informs people about this downtime notify group?


Max Ross (Google) wrote:
> Hi Jerome,
> 
> There is planned maintenance going on right now.  I'd strongly encourage 
> you to subscribe to the App Engine Downtime Notify group where you can 
> learn about these things in advance:
> 
> http://groups.google.com/group/google-appengine-downtime-notify
> 
> Thanks,
> Max
> 
> On Tue, Nov 3, 2009 at 6:18 PM, Jerome  > wrote:
> 
> 
> Hello,
> 
> Our app has been running on AppEngine Java for 2 months. We are now
> ramping up on traffic and have enabled the billing feature. We are
> seeing on a daily basis short (1-2 minutes) outages. Most of the time,
> this is on the datastore, but these short outages sometimes affect
> other areas as well, like for instance serving static content.
> 
> Today, we are seeing a data store in anomaly. This has been going on
> for over an our now:
> Uncaught exception from servlet
> com.google.apphosting.api.ApiProxy$CapabilityDisabledException: The
> API call datastore_v3.Put() is temporarily unavailable.
> We are completely dead in the water...
> 
> My 2 questions are:
> - how/where can we report short outages that are usually not reflected
> on the AppEngine system status?
> - what is the AppEngine team plan to ensure a reliable service
> 
> Jerome
> 
> 
> 
> 
> > 

--~--~-~--~~~---~--~~
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: Error while uploading app to GAE

2009-11-04 Thread Jason (Google)
Did your path always include the one "\" delimiter with all of the other
separators being "/"?

- Jason

On Mon, Nov 2, 2009 at 7:45 PM, Vik  wrote:

> Hie
>
> Today all of a sudden when i tried to deploy my app to GAE throws errors:
> An internal error occurred during: "Deploying SakshumWebProduction to
> Google".
> Received IOException parsing the input stream for
> D:/eclipse/vskumar/workspace/SakshumWebProduction/war\WEB-INF/web.xml
>
> The contents of web.xml are just fine. here it is:
> 
>  "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
> "http://java.sun.com/dtd/web-app_2_3.dtd";>
>
> http://java.sun.com/xml/ns/javaee"; version="2.5">
> 
> sakshumweb
> vik.sakshum.sakshumweb.SakshumWebServlet
> 
> 
> sakshumweb
> /sakshumweb/ui/page
> 
> 
> index.html
> 
> 
>
> 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-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: Is it possible to set up a URL say example.com to one of the applications/ services I hosted on my domain.

2009-11-04 Thread Jason (Google)
To clarify, HTTPS is only supported *for your App Engine-deployed app* if
it's being served off of appspot.com.

- Jason

On Wed, Nov 4, 2009 at 11:56 AM, Jason (Google)  wrote:

> Naked domains aren't currently supported, but if your domain is registered
> with Google Apps, then you can add your application directly to it and
> assign it a subdomain, e.g. www.example.com. Note that HTTPS is only
> supported for appspot.com, not Google Apps domains.
>
> - Jason
>
>
> On Mon, Nov 2, 2009 at 8:14 PM, VSSS  wrote:
>
>>
>> Hi All,
>>
>> I want to set up a URL say www.example.com or example.com to one of
>> the services I hosted on my domain.
>> Is it possible to do URL forwarding for naked domains? I was able to
>> perform URL forwarding for other URL's such as site1.example.com. But,
>> is it possible to do it for www.example.com or example.com.
>>
>> If yes, could you point me to some resources.
>>
>> Thanks,
>> Shyam
>> >>
>>
>

--~--~-~--~~~---~--~~
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: Is it possible to set up a URL say example.com to one of the applications/ services I hosted on my domain.

2009-11-04 Thread Jason (Google)
Naked domains aren't currently supported, but if your domain is registered
with Google Apps, then you can add your application directly to it and
assign it a subdomain, e.g. www.example.com. Note that HTTPS is only
supported for appspot.com, not Google Apps domains.

- Jason

On Mon, Nov 2, 2009 at 8:14 PM, VSSS  wrote:

>
> Hi All,
>
> I want to set up a URL say www.example.com or example.com to one of
> the services I hosted on my domain.
> Is it possible to do URL forwarding for naked domains? I was able to
> perform URL forwarding for other URL's such as site1.example.com. But,
> is it possible to do it for www.example.com or example.com.
>
> If yes, could you point me to some resources.
>
> Thanks,
> Shyam
> >
>

--~--~-~--~~~---~--~~
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: App Engine Refactoring / Adaptable Design

2009-11-04 Thread Jason (Google)
Unfortunately, the solution I proposed does not allow for adding additional
filters when querying for all Campaigns with FundingOganization "ABC". If
this is a requirement, you'll have to consider several options -- either
doing the filtering in memory, which is reasonable if you only expect a
handful of matched Campaigns, or including the criterion field in the table
so you can query on it directly, which may muddle your schema.

Since App Engine's datastore doesn't support joins, most data models won't
be completely normalized, which probably feels strange if you're coming from
the RDBMS mindset. But storage is cheap and you can usually ignore the added
redundancy if the data fields in question are not expected to change often.

- Jason

On Mon, Nov 2, 2009 at 3:27 PM, Hans  wrote:

>
> thanks Jason - I'll need to think more about how this would work in my
> case.
>
> It sounds like I'll be able to query that new kind (return all the
> Campaign keys for a FundingOrganization of "ABC") to get a collection
> of keys. But then if I wanted to extract only the entities from that
> result that meet certain criteria (Campaign.Duration > 30) , I'll need
> to do that outside of the query language.
>
> I'm sure my questions reflect a newness to OOD. I do appreciate your
> response.
>
> Hans
>
> On Nov 2, 3:27 pm, "Jason (Google)"  wrote:
> > Hi Hans. Aside from the article on modeling entity relationships and the
> JDO
>
> ...
>
> >
> > It sounds like you want to add a new kind (as opposed to a new property
> for
> > an existing kind) and establish a relationship with this new kind
> > (FundingOrganization) and an existing kind (Campaign). For many-to-many
> > relationships such as this, one approach you can take is similar to what
> you
> > might do for an RDBMS schema: introduce a new table (kind) to model the
> > relationship between FundingOrganization and Campaign entities. This
> third
> > kind would have only two properties, one storing a FundingOrganization
> Key
> > and the other a Campaign Key, then you can use it to query for all
> > FundingOrganization entities associated with a given Campaign and vice
> > versa. This approach doesn't require you to modify your Campaign kind at
> > all, so you don't necessarily need to make it aware of the
> > FundingOrganization kind, which was one of your requirements.
> >
> > Let me know if this answers your question or if you have any other
> > questions.
> >
> > - Jason
> >
> > On Thu, Oct 29, 2009 at 1:55 PM, Hans  wrote:
> >
> > > Hoping someone might help me with a somewhat OT question.
> >
> > > I developed an object model for a GAE/J application that worked fairly
>
> ...
>
> > > Can someone point this rookie to intro material/URLs for building and
> > > refactoring designs that lend themselves to these type of changes? I'm
> > > looking for info on adaptable design, especially when you're using a
> > > datastore and not using a RDBMS, junction tables, etc.
> >
> > > thanks,
> > > Hans
> >
> >
> >
>

--~--~-~--~~~---~--~~
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: Master/Detail relations and redundant data handling

2009-11-04 Thread James H

Datanucleus, both suggestions worked but I like the "embeddedOnly"
best in order to avoid a dummy key on every FK class!

Bryce, I no longer get the error above...I just added
embeddedOnly="true" to the PersistanceCapable tag in BookFk class.
You're right, I could use the collection technique on the FKs but I
wonder the pros/cons of such collections on what could be very large
collections.  For example, say Baylor with 25,000 members?  Guess its
a matter of using "owned" for small Sets versus "unowned" for large
Sets of data.  Regardless, your FK pattern will save a whole lot of
code management!!!

Any further feedback welcome...I'll continue testing!

On Nov 4, 12:12 pm, datanucleus  wrote:
> > Needs a PK either way. Pick a field, any field.
>
> Or just set "embeddedOnly" as true ... if you really never want to
> persist one of those in its own right
--~--~-~--~~~---~--~~
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: error 500 from server when starting the guestbook demo app

2009-11-04 Thread Jason (Google)
It looks like your system may not have Java configured correctly or
otherwise can't invoke the javac compiler needed to compile your
application.

java.io.IOException: Cannot run program "javac.exe": CreateProcess error=2

You may want to search the web for similar error messages, which might help
you determine the source of the issue. Are you using the Eclipse plugin or
the command line to start your app?

- Jason

On Mon, Nov 2, 2009 at 11:18 AM, Tomas  wrote:

>
> Hi I'm Tomas  - a newbe.
>
> I get error 500 from server when "trying a demo application" to
> according to instructions:
> http://code.google.com/appengine/docs/java/gettingstarted/installing.html
> Response from localserver:8080 look here:
>
> http://docs.google.com/Doc?docid=0Afhb3u6SCF24ZGN2cjN2cTNfM2ZwODkyN2Yy&hl=en
>
> what' wrong?
>
> >
>

--~--~-~--~~~---~--~~
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: NullPointerException when adding relationship keys

2009-11-04 Thread Jason (Google)
It looks like you're retrieving an existing object from the datastore,
adding a tag, and then re-persisting. Does this Set have any items in it
before you call add? Even if it's instantiated before you persist the
original entity, App Engine's JDO/JPA layer will return null for empty
lists, so this could be your issue. Just change your addNewTag method
slightly:

public void addNewTag(Key tagKey) {
  if (selectedTags == null) {
selectedTags = new HashSet();
  }

  selectedTags.add(tagKey);
}

- Jason

On Sun, Nov 1, 2009 at 1:43 PM, dataStorm  wrote:

>
> Hello, can someone help me with this, I am trying to follow this post
> http://code.google.com/appengine/docs/java/datastore/relationships.html
> to
> create relationship between LINKS and TAGS.
>
> I am getting an error:
>
> Caused by:
>
> java.lang.NullPointerException
>at com.linkytty.Linkstore.addNewTag(Linkstore.java:101)
>at com.linkytty.TagLinker.doPost(TagLinker.java:52)
>
>
> This happens when I try to add a key using ".add()"  :
>
> public void addNewTag(Key tagKey) {
>
> selectedTags.add(tagKey);
>
> }
>
>
> addNewTag() is called from my
>
> PersistenceManager pm = PMF.get().getPersistenceManager();
> Linkstore linkObject = pm.getObjectById(Linkstore.class, objectKey);
> linkObject.addNewTag(objectKey);
>
> I've logged my "objectKey" and etc. and it seems that it gets those
> right
> (
> String linkKeyId = req.getParameter("key");
> linkKeyID : aghsaW5reXR0eXIPCxIJTGlua3N0b3JlGAUM
>
> Key objectKey = KeyFactory.stringToKey(linkKeyId);
> objectKey: Linkstore(5)
> )
>
> My Classes:
>
> the class that creates links:
>
>
> public class Linkstore {
>
>@PrimaryKey
>@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
> private Key linkid;
>
>@Persistent(defaultFetchGroup = "true")
>private Set selectedTags;
>
>
> //STUFF HERE
>
>public Linkstore(User author, String linkcontent, String
> linkcomment,
> Date
> date) {
>this.author = author;
>this.linkcontent = linkcontent;
>this.linkcomment = linkcomment;
>
>this.date = date;
>
>selectedTags = new HashSet();
>
>}
>
>public Key getId() {
>
>return linkid;
>
>}
>
>public String getKeyAsString() {
>if (linkid == null)
>return null;
>return KeyFactory.keyToString(linkid);
>}
>
>// STUFF HERE
>
>
>public void addNewTag(Key tagKey) {
>
>selectedTags.add(tagKey);
>
>}
>
> }
>
> The class that captures the post:
>
>
>public void doPost(HttpServletRequest req, HttpServletResponse resp)
>throws IOException {
>
>String linkKeyId = req.getParameter("key");
>Key objectKey = KeyFactory.stringToKey(linkKeyId);
>
>String tagStringKey = req.getParameter("tagkey");
>Key tagObjectKey = KeyFactory.stringToKey(tagStringKey);
>
>PersistenceManager pm = PMF.get().getPersistenceManager();
>Linkstore linkObject = pm.getObjectById(Linkstore.class,
> objectKey);
>
>linkObject.addNewTag(objectKey);
>
>resp.sendRedirect("/");
>}
>
>
> ///
> Does the "@Persistent(defaultFetchGroup = "true")" make any
> difference?
>
>
> 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-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: Problem with using Federated Login (OpenID + OAuth)

2009-11-04 Thread Jason (Google)
Hi Pradheep. The library that you are using is attempting to spawn a new
thread which is not permitted by App Engine's sandbox. You will have to
either disable multithreading via configuration, if the library exposes
this, or use another library.

The "Google Accounts API" that is referenced in the paragraph that you
quoted from our documentation is referring to the Google Accounts service
that App Engine exposes:

http://code.google.com/appengine/docs/java/users/

This App Engine API only returns the user's nickname and email address,
however, so you'll need to use a different mechanism if other profile
information is necessary.

- Jason

On Sun, Nov 1, 2009 at 8:24 PM, Pradheep A R  wrote:

>
>
>  Hello everyone,
>
>  I am sure i am asking something that some one here knows the answer.
>
>  I am trying to implement the OpenID client to authenticate my users
> in
>  the Google App Engine website and then use Google Accounts API to
>  access their profile (All i want is to show their profile pics, show
>  their contacts when they want to notify some information to their
>  friends when they use my websitewww.letsvoteonline.com)
>  I am using OpenID for Java library for this purpose. The problem here
>  is i am getting the following exception.
>
>  java.security.AccessControlException: access denied
>  (java.lang.RuntimePermission modifyThreadGroup)
> at java.security.AccessControlContext.checkPermission(Unknown
> Source)
> at java.security.AccessController.checkPermission(Unknown
> Source)
> at java.lang.SecurityManager.checkPermission(Unknown Source)
> at com.google.appengine.tools.development.DevAppServerFactory
>  $CustomSecurityManager.checkPermission(DevAppServerFactory.java:151)
> at com.google.appengine.tools.development.DevAppServerFactory
>  $CustomSecurityManager.checkAccess(DevAppServerFactory.java:176)
> at java.lang.ThreadGroup.checkAccess(Unknown Source)
> at java.lang.Thread.init(Unknown Source)
> at java.lang.Thread.(Unknown Source)
> at
> org.apache.commons.httpclient.MultiThreadedHttpConnectionManager
>  $ReferenceQueueThread.(MultiThreadedHttpConnectionManager.java:1039)
> at
>
> org.apache.commons.httpclient.MultiThreadedHttpConnectionManager.storeRefer
> enceToConnection
>  (MultiThreadedHttpConnectionManager.java:164)
> at
>
> org.apache.commons.httpclient.MultiThreadedHttpConnectionManager.access
>  $900(MultiThreadedHttpConnectionManager.java:64)
> at
> org.apache.commons.httpclient.MultiThreadedHttpConnectionManager
>  $ConnectionPool.createConnection
>  (MultiThreadedHttpConnectionManager.java:750)
> at
>
> org.apache.commons.httpclient.MultiThreadedHttpConnectionManager.doGetConne
> ction
>  (MultiThreadedHttpConnectionManager.java:469)
> at
>
> org.apache.commons.httpclient.MultiThreadedHttpConnectionManager.getConnect
> ionWithTimeout
>  (MultiThreadedHttpConnectionManager.java:394)
> at
> org.apache.commons.httpclient.HttpMethodDirector.executeMethod
>  (HttpMethodDirector.java:152)
> at org.apache.commons.httpclient.HttpClient.executeMethod
>  (HttpClient.java:396)
> at org.apache.commons.httpclient.HttpClient.executeMethod
>  (HttpClient.java:324)
> at org.openid4java.util.HttpCache.head(HttpCache.java:296)
> at
> org.openid4java.discovery.yadis.YadisResolver.retrieveXrdsLocation
>  (YadisResolver.java:360)
> at org.openid4java.discovery.yadis.YadisResolver.discover
>  (YadisResolver.java:229)
> at org.openid4java.discovery.yadis.YadisResolver.discover
>  (YadisResolver.java:221)
> at org.openid4java.discovery.yadis.YadisResolver.discover
>  (YadisResolver.java:179)
> at org.openid4java.discovery.Discovery.discover
> (Discovery.java:134)
> at org.openid4java.discovery.Discovery.discover
> (Discovery.java:114)
> at org.openid4java.consumer.ConsumerManager.discover
>  (ConsumerManager.java:527)
> at letsvote.webapps.Letsvote_test1Servlet.authRequest
>  (Letsvote_test1Servlet.java:170)
> at letsvote.webapps.Letsvote_test1Servlet.doGet
>  (Letsvote_test1Servlet.java:93)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:
> 693)
> 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.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)
>   

[appengine-java] Re: PDF Generator Library

2009-11-04 Thread Jason (Google)
Great news, Eugene! Can you please submit it to the open source projects
page by following the instructions at the bottom of
http://groups.google.com/group/google-appengine/web/google-app-engine-open-source-projects
?

- Jason

On Sun, Nov 1, 2009 at 8:55 PM, edragoev  wrote:

>
> Hello Jason,
>
>
> I took Francois tweaks and also added support for PNG files that
> doesn't depend on the AWT classes.
>
> We have new GAE compatible Open Source version now:
>
> http://pdfjet.com/os/download.html
>
>
> Best Regards,
>
> Eugene
>
> P.S. The PNG decoder I wrote currently supports Truecolor PNG files
> with Bit Depth 8 and paletted PNG files with Bit Depth 4 and 8.
> Currently there is no support for grayscale images. If there is
> interest we may add support for more types of PNG files and possibly
> GIF support.
>
>
> On Oct 7, 4:14 pm, "Jason (Google)"  wrote:
> > Hi mably. Can you describe the tweaks you need to make in more detail?
> I'd
> > like to add this to the "Will it play in App Engine" page.
> >
> > Thanks,
> > - Jason
> >
> > On Tue, Oct 6, 2009 at 6:44 AM, mably  wrote:
> >
> > > The PDFJet library seems to works fine on GAE after a few tweaks to
> > > replace files by streams.
> >
> > > It's a quite low-level library but should be ok for simple tasks.
> >
> > >http://www.pdfjet.com/os/edition.html
> >
> > > On 28 sep, 19:09, "Jason (Google)"  wrote:
> > > > You're correct. As far as I know, no one has been able to use
> > > JasperReports
> > > > within App Engine because of the reliance on iText which in turn
> requires
> > > > several AWT classes that aren't currently on the JRE class white
> list.
> >
> > > > - Jason
> >
> > > > On Thu, Sep 24, 2009 at 10:12 AM, mably  wrote:
> >
> > > > > Are you sure that JasperReports works fine on GAE ?
> >
> > > > > I thought it was using iText which doesn't seem to run on GAE (it
> > > > > needs an unsupported patch).
> >
> > > > > Mian Rashid a écrit :
> > > > > > Use can use Jasper Report and there is also designer tool
> available
> > > > > > for that is IReport.
> >
> > > > > > On Sep 23, 6:57 pm, mably  wrote:
> > > > > > > Does anybody know of a java PDF generator library working with
> > > Google
> > > > > > > App Engine ?  Even a low-level one.
> >
> > > > > > > Any help would be greatly appreciated.
> >
> > > > > > > Thanx in advance.
> >
> > > > > > > Francois
> > > > > > > Bordeaux, FRANCE
>
> >
>

--~--~-~--~~~---~--~~
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: does usage of buffered writer in servlet make sense

2009-11-04 Thread Jason (Google)
If you're calling print or println many times in your servlet, then it makes
sense, although the resource savings you net may not be significant.

In general, it's acceptable to use the default PrintWriter.

- Jason

On Mon, Nov 2, 2009 at 7:18 AM, Raphael André Bauer <
raphael.andre.ba...@gmail.com> wrote:

>
> hey,
>
>
> i am wondering if it makes sense to wrap the printwriter of a servlet
> into a bufferedwriter. depending on the underlaying implementation
> that can make sense imho, but i am not sure about the google app
> engine... any recommendations?
>
>
> thanks!
>
>
> raphael
>
> >
>

--~--~-~--~~~---~--~~
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: Recommended scope for DatastoreService

2009-11-04 Thread Max Ross (Google)
A DatastoreService instance is extremely lightweight so feel free to create
them as-needed.  In addition, transactions are not tied to a specific
DatastoreService instance but rather to the thread that started the
transaction.  Finally, assume that all classes in the api are _not_
threadsafe unless explicitly documented otherwise.

Hope this helps,
Max

On Wed, Nov 4, 2009 at 4:35 AM, Roy  wrote:

>
> Should I be creating a DatastoreService for each "session", or are
> they inexpensive enough that I can have one for each Kind? I realise
> that for transactions, the latter doesn't work.
>
> A related question is how threadsafe is an instance of
> DatastoreService?
>
>
> >
>

--~--~-~--~~~---~--~~
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] Cannot retrieve value of the newly created attribute in a JDO

2009-11-04 Thread delightwjk

Hi All,

I created a JDO class, which had some attributes, and I created some
CRUD operations, all of them worked correctly.

Then I added a new attribute in the JDO class, and then set value to
it and persisted it as usual when I executed CRUD operations. The
problem is that I cannot retrieve the value of the new attribute in
program, the value is always null. But when I check the value in
"Datastore" -> "Data Viewer", the value is correct. So i'm wondering
why it cannot be retrieved in application. Is there some cache
mechanism?

Thanks in advance!
Jiakuan

--~--~-~--~~~---~--~~
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] Recommended scope for DatastoreService

2009-11-04 Thread Roy

Should I be creating a DatastoreService for each "session", or are
they inexpensive enough that I can have one for each Kind? I realise
that for transactions, the latter doesn't work.

A related question is how threadsafe is an instance of
DatastoreService?


--~--~-~--~~~---~--~~
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] How to use JSON on server-side?

2009-11-04 Thread Nguyễn Kim Kha

I'm newbie...

I want to use JSON on server-side to do something... But I can't...

Please help me!

--~--~-~--~~~---~--~~
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] Cron job fired up twice

2009-11-04 Thread Stefan Roman

Hi All,

My crontab is defined in the following way:



  
/cron/sendnotifs
Send notification at 9 every Mon, Tue, Wed, Thu, Fri
every mon,tue,wed,thu,fri 09:00
Europe/Sarajevo
  
  
/cron/sendnotifs
Send notification at 10 every Sat, Sun
every sat,sun 10:00
Europe/Sarajevo
  


The problem is that it is fired up twice. Unfortunately I don't know
how big is the problem because I don't receive notifications every
time when cron hits the /cron/sendnotifs URL, but if the conditions
for notification in my app are met, I receive two notifications. That
leads me to the conclusion that cron was started twice.

Today, cron was executed at 9 as it suppouse to, and at 09:05:09.

Where is the problem? Am I missing something?

Thanks in advance for any help.

--~--~-~--~~~---~--~~
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] problem with using session.getAttribute()

2009-11-04 Thread gaurav

in my application a servlet stores the user's details when she starts
with the application as follows

User user=new User();
HttpSession session=req.getSession();
user.setUser(userName);
user.setRole("user");
session.setAttribute("user", user);
RequestDispatcher rd=req.getRequestDispatcher("/HomePage.jsp");
rd.forward(req, resp);

After this servlet stored the User object in session, every jsp in the
application receives the User object from session using a helper class

public class UserIdentifier
{
public static String getUser(HttpServletRequest req)
{
HttpSession session=req.getSession(false);
User userObj=(User)session.getAttribute("user");
String role=userObj.getRole(); // HERE IS THE ERROR
String user=null;
if(role.equals("admin"))
{
user=(String)session.getAttribute("user2");
if(user==null)
{
return null;
}
}
if(role.equals("user"))
{
user=userObj.getUser();
}
return user;
}
}

The User class is serializable and true is present in appengine-web.xml

it works fine on my local machine but when i deployed to app engine,
it throws a nullpointer exception on the line where i called
userObj.getRole();
it indicates that userObj is null,  i dont understand why it is not
able to pick the User object from the session


--~--~-~--~~~---~--~~
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: JSF 1.2 - Session-scoped managed Bean not Behaving as Expected

2009-11-04 Thread 软件梦工厂

I have the same problem with JSF 2.0,and I am looking for some
solutions ,too.

On Sep 5, 11:52 am, Traveler1980  wrote:
> Hi All,
>
> I recently upgraded an app that I'm working on from MyFaces 1.1.6 to
> JSF (Mojarra) 1.2_13 with Facelets.  I used the jars (el and jsf) from
> this example -->http://code.google.com/p/jsfongap/
>
> Everything is working fine when running my app locally; however, when
> I deploy,session-scoped managed beans are being recreated on every
> page turn - almost as if they are request-scoped.
>
> To give a simple example, let 's say I have this bean defined in faces-
> config:
> 
>                 user
>                 foo.bar.User
>                 session
> 
>
> And the bean is used on page 1 of an application as follows:
> 
>
> And the value is then output on a second page like:   value="#{user.firstName}"/>
>
> Regardless of what I type on the first page, the value is not retained
> and displayed on the second page.  I did a simple test where I logged
> user.toString().  I expected the output from toString() to be the same
> for the entiresession.  My expectation was met on my development
> server, but when deployed I saw this:
>
> First Page submit -
> 09-04 08:44PM 37.206
> foo.bar.actions.impl.UserAction execute: foo.bar.u...@1515d5c
>
> Second Page Submit -
> 09-04 08:44PM 46.579
> foo.bar.actions.impl.UserAction execute: foo.bar.u...@60999e
>
> Big surprise.  Different objects!!  In fact, a new instance of User is
> created for every page turn.
>
> Has anyone else noticed this odd behavior?  Is it possible that I've
> missed something?  I will probably end up going back to MyFaces 1.1.
>
> Thanks in advance for the help.
> Jamie

--~--~-~--~~~---~--~~
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: Master/Detail relations and redundant data handling

2009-11-04 Thread datanucleus

> Needs a PK either way. Pick a field, any field.

Or just set "embeddedOnly" as true ... if you really never want to
persist one of those in its own right
--~--~-~--~~~---~--~~
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: Master/Detail relations and redundant data handling

2009-11-04 Thread datanucleus

> BookFk is an embedded class intended to be used by entities like
> Chapter and others.

Needs a PK either way. Pick a field, any field.
--~--~-~--~~~---~--~~
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: Problem deploying app - Version not ready

2009-11-04 Thread JedIrv

Thanks, Jason.  Indeed it did work when I tried it yesterday, though
my recollection is that I tried it a few times over a couple of days
last week, so it gave the impression of something less transient going
on.  But, indeed it works now!

Thanks,

Jed

On Nov 2, 3:10 pm, "Jason (Google)"  wrote:
> Hi Jed. There was some deployment latency late last week, but this didn't
> last very long, and everything should be up and running smoothly. Please let
> me know if you continue to see this error and make sure to provide your
> application ID in future posts.
>
> - Jason
>
> On Thu, Oct 29, 2009 at 4:04 PM, JedIrv  wrote:
>
> > Hello,
>
> > I'm in my first days of experimenting with Google App Engine and am
> > getting an error when I try to deploy using the eclipse plugin.  My
> > initial deploy went smoothly a couple of days ago, and several updates
> > as well, but trying to redeploy now, I see the console output indicate
> > some sort of connection issue develops:
>
> > .
> > .
> > .
> > Deploying new version.
> > Will check again in 1 seconds.
> > Will check again in 2 seconds.
> > ...(falls back to waiting twice as long until it gets to 128)...
> > Will check again in 128 seconds.
> > Rolling back the update.
> > javaj.lang.RuntimeException:  Version not ready.
>
> > the stack trace in the log has this:
>
> > Unable to update:
> > java.lang.RuntimeException: Version not ready.
> >    at com.google.appengine.tools.admin.AppVersionUpload.commit
> > (AppVersionUpload.java:361)
> >    at com.google.appengine.tools.admin.AppVersionUpload.doUpload
> > (AppVersionUpload.java:114)
> >    at com.google.appengine.tools.admin.AppAdminImpl.update
> > (AppAdminImpl.java:56)
> >    at
> > com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy
> > (AppEngineBridgeImpl.java:271)
> >    at
> > com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace
> > (DeployProjectJob.java:148)
> >    at org.eclipse.core.internal.resources.InternalWorkspaceJob.run
> > (InternalWorkspaceJob.java:38)
> >    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>
> > yet, my admin console log page indicates the update went ok (or at
> > least no problem is indicated).  Checking the url reveals the update
> > did not succeed.
>
> > Any help would be greatly appreciated!
>
> > Jed
--~--~-~--~~~---~--~~
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: Master/Detail relations and redundant data handling

2009-11-04 Thread James H

BookFk is an embedded class intended to be used by entities like
Chapter and others.  It is NOT intended to be a standalone entity or
have a Primary Key.  So, when I try your fix I get the following
compile error:

SEVERE: Class struts2.example4.BookFk has application-identity and no
objectid-class specified yet has 0 primary key fields. Unable to use
SingleFieldIdentity.

This pattern was submitted by Bryce as a way of better handling
redundant data related to FK fields such as Chapter.book in this case.

On Nov 4, 10:59 am, datanucleus  wrote:
> Why is BookFK trying to use Datastore Identity ? (as the message says)
>
> "identityType=IdentityType.APPLICATION" would be recommended
--~--~-~--~~~---~--~~
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: Java namespace for entity in bulkloader?

2009-11-04 Thread Stuart Moffatt

Maybe I didn't word my problem very well.

Let me describe it again:

Data push:
1. I am bulkloading data to an app using python appcfg and custom
bulkloaders.
2. The custom bulk loaders are pushing data from a CSV.
3. The models of the data being pushed have simple names in python (no
package namespace)
4. The entities all get successfully uploaded.

Data query:
1. The application that uses the data pushed via bulk loading is in
Java
2. Because it's in Java, there is a package namespace for where my
entity classes exist
3. App Engine is supposed to ignore the long package namespace and
just pick up the simple name (ie, the name of the class)
4. These simple names are supposed to match the simple names of the
data that was pushed via bulk loading.

The problem:
1. Queries for the simple name via the admin interface return data as
expected
2. Queries for the simple name via Java code do NOT return data as
expected. Instead I get a JDO error about the class not being found
(sorry, don't have my code in front of me to list the trace).
Basically, it seems that a query for a simple name throws an error
when that simple class name exists in a fully named package.

I am using JDO annotations in my classes as per the tutorials. Is
there some magic that I am missing? Perhaps I am doing something wrong
with my annotations?

I would rather post details, but wanted to get a handle on the general
problem before I bog down the list with a stack trace and entity code.

Stuart

On Nov 3, 5:06 pm, Stuart Moffatt  wrote:
> I am using Nick's excellent tutorials on bulk loading, and was able to
> push a huge pile of entities up to production. Problem is, they looked
> like this:
>
> MySpecialEntity
>
> in my custom python bulkloader class and in production.
>
> The gotcha is my application is Java, and queries for:
>
> SELECT FROM org.domain.app.MySpecialEntity
>
> fail because the Javanamespacewas not part of the python bulkloader.
>
> Anyone know a workaround?
>
> Stuart
--~--~-~--~~~---~--~~
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: UnsupportedDatastoreFeatureException

2009-11-04 Thread IlyaE

Ok i figured it out now. I was trying to refer to the classname
ContactInfo in my filter rather than the object name in my User class
contactInfo. The difference in case for the leading 'C' was the
culprit.

On Nov 4, 10:19 am, IlyaE  wrote:
> If i change my authenticate filter to
>                 query.setFilter("ContactInfo.email == emailParam && password 
> ==
> passwordParam");
>
> I now get this error.
> javax.jdo.JDOUserException: Identifier ContactInfo.email is unresolved
> (not a static field)
>
> On Nov 3, 9:32 pm, "Max Ross (Google)" 
> wrote:
>
>
>
> > Andy has pinpointed the issue.  You most likely don't have a field on your
> > MyUser class named "email" but the error isn't being triggered on the first
> > query because your second call to setFilter() is overwriting the reference
> > to the nonexistent field.  You'll need to pass the entire filter to
> > setfilter() and you most likely want 'contactInfo.email' instead of 'email'
>
> > Hope this helps,
> > Max
> > On Tue, Nov 3, 2009 at 12:00 PM, datanucleus 
> > wrote:
>
> > > Multiple calls to setFilter will overwrite the previous value. Do you
> > > really want to 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-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: Master/Detail relations and redundant data handling

2009-11-04 Thread datanucleus

Why is BookFK trying to use Datastore Identity ? (as the message says)

"identityType=IdentityType.APPLICATION" would be recommended
--~--~-~--~~~---~--~~
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: Master/Detail relations and redundant data handling

2009-11-04 Thread James H

Rusty, where did you get that quote?  It sounds familiar...  Hell
yeah, GAE is all about wrestling with persistence since it is
Hierarchial instead of Relational and the distributed transactional
nature.  That changes an app tremendously.  Among my concerns are
being able to move an app out of GAE into a regular relational-based
container.  Sure, you can do it...but you're left with a Hierarchial
design in a relational environment...

Bryce, I'm getting this error when I try to add a Chapter...any
ideas?  Also see code below.

Attempt to handle persistence for object using datastore-identity yet
StoreManager for this datastore doesn't support that identity type
org.datanucleus.exceptions.NucleusUserException: Attempt to handle
persistence for object using datastore-identity yet StoreManager for
this datastore doesn't support that identity type
at org.datanucleus.state.AbstractStateManager.
(AbstractStateManager.java:128)
at org.datanucleus.state.JDOStateManagerImpl.
(JDOStateManagerImpl.java:215)
at org.datanucleus.jdo.JDOAdapter.newStateManager(JDOAdapter.java:
119)
at
org.datanucleus.state.StateManagerFactory.newStateManagerForEmbedded
(StateManagerFactory.java:131)
at
org.datanucleus.store.appengine.DatastoreFieldManager.getEmbeddedStateManager
(DatastoreFieldManager.java:356)
at
org.datanucleus.store.appengine.DatastoreFieldManager.storeEmbeddedField
(DatastoreFieldManager.java:811)
at
org.datanucleus.store.appengine.DatastoreFieldManager.storeObjectField
(DatastoreFieldManager.java:769)
at org.datanucleus.state.AbstractStateManager.providedObjectField
(AbstractStateManager.java:1037)
at struts2.example4.Chapter.jdoProvideField(Chapter.java)
at struts2.example4.Chapter.jdoProvideFields(Chapter.java)
at org.datanucleus.state.JDOStateManagerImpl.provideFields
(JDOStateManagerImpl.java:2715)
at
org.datanucleus.store.appengine.DatastorePersistenceHandler.insertPreProcess
(DatastorePersistenceHandler.java:318)
at
org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObjects
(DatastorePersistenceHandler.java:236)
at
org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObject
(DatastorePersistenceHandler.java:225)
at org.datanucleus.state.JDOStateManagerImpl.internalMakePersistent
(JDOStateManagerImpl.java:3185)
at org.datanucleus.state.JDOStateManagerImpl.makePersistent
(JDOStateManagerImpl.java:3161)
at org.datanucleus.ObjectManagerImpl.persistObjectInternal
(ObjectManagerImpl.java:1298)
at org.datanucleus.sco.SCOUtils.validateObjectForWriting
(SCOUtils.java:1476)
at
org.datanucleus.store.mapped.scostore.ElementContainerStore.validateElementForWriting
(ElementContainerStore.java:380)
at
org.datanucleus.store.mapped.scostore.FKListStore.validateElementForWriting
(FKListStore.java:609)
at org.datanucleus.store.mapped.scostore.FKListStore.internalAdd
(FKListStore.java:344)
at org.datanucleus.store.mapped.scostore.AbstractListStore.add
(AbstractListStore.java:105)
at org.datanucleus.sco.backed.List.add(List.java:649)
at org.apache.jsp.example4_jsp.addChapter(example4_jsp.java:21)
at org.apache.jsp.example4_jsp._jspService(example4_jsp.java:88)

/** Example from GAE/J forum Bryce show use of embedded class BookFk.
*/
@PersistenceCapable(identityType=IdentityType.APPLICATION,
detachable="true")
public class Book {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key bookId;

@Persistent
private String bookTitle;
@Persistent
private String isbn;
@Persistent
private List chapters;

public Book(String bookTitle, String isbn) {
this.bookTitle = bookTitle;
this.isbn = isbn;
}

public Key getBookId() { return bookId; }

public String getBookTitle() { return bookTitle; }
public void setBookTitle(String val) { bookTitle = val; }

public String getIsbn() { return isbn; }
public void setIsbn(String val) { isbn = val; }

public List getChapters() { return chapters; }
public void setChapters(List val) { chapters = val; }
}

@PersistenceCapable(identityType=IdentityType.APPLICATION,
detachable="true")
public class Chapter {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key chapterId;

@Persistent
private String chapterTitle;
@Persistent
private Integer numPages;

@Persistent
@Embedded
private BookFk bookFk;

public Chapter(String chapterTitle, Integer numPages, Book book) {
this.chapterTitle = chapterTitle;
this.numPages = numPages;
bookFk = new BookFk(book);
}

public Key getChapterId() { return chapterId; }

public String getChapterTitle() { return chapterTitle; }
   

[appengine-java] Re: UnsupportedDatastoreFeatureException

2009-11-04 Thread IlyaE

If i change my authenticate filter to
query.setFilter("ContactInfo.email == emailParam && password ==
passwordParam");

I now get this error.
javax.jdo.JDOUserException: Identifier ContactInfo.email is unresolved
(not a static field)




On Nov 3, 9:32 pm, "Max Ross (Google)" 
wrote:
> Andy has pinpointed the issue.  You most likely don't have a field on your
> MyUser class named "email" but the error isn't being triggered on the first
> query because your second call to setFilter() is overwriting the reference
> to the nonexistent field.  You'll need to pass the entire filter to
> setfilter() and you most likely want 'contactInfo.email' instead of 'email'
>
> Hope this helps,
> Max
> On Tue, Nov 3, 2009 at 12:00 PM, datanucleus wrote:
>
>
>
>
>
> > Multiple calls to setFilter will overwrite the previous value. Do you
> > really want to 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-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 mimi-mapping element in web.xml is not working

2009-11-04 Thread Brandon

Hi,

To make the appengine serve *.htc static files with the contentType:
"text/x-component" in response headers, I add an element into my
web.xml as follows:


htc
text/x-component


But it does not work. The contentType is not added in the response
headers on my local development server. Did I miss something? Please
help. Thx.
--~--~-~--~~~---~--~~
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] App engine layout - servers around the world?

2009-11-04 Thread barak

I was wondering - say a user from South Africa and a user from the U.S
hits a webapp deployed on GAE. Do those users expirience the same
speed of loading the site, downloaing images, etc., or GAE servers
located in one data center (for example, California), and the
"nearest" users will enjoy from faster download?

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-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: thanking uuuuuuuuu

2009-11-04 Thread Ashen

here u can find Netbeans plugin for App Engine
http://kenai.com/projects/nbappengine/pages/NBInstall

On Nov 3, 5:52 pm, "raju k alias (billa)" 
wrote:
> Thank for the java version
>
> Is there any plugin for netbeans IDE
--~--~-~--~~~---~--~~
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] Jdo: detaching objects vs. merging transient objects

2009-11-04 Thread a.maza

I've used the merging of transient objects approach for a while as
described in 
http://timepedia.blogspot.com/2009/04/google-appengine-and-gwt-now-marriage.html
and it works quite fine. I only subsituted the proposed implementation
of copying fields by dozer.

However, I am still thinking to move to the "detaching objects"
approach and played around with it a bit. So far, the detaching
objects approachs seems more cumbersome to me...

I would be happy to hear some thoughts...

regards,
andr
--~--~-~--~~~---~--~~
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: Problems with JDO Query.setCandidates(Collection)

2009-11-04 Thread datanucleus

> App Engine's DataNucleus plugin doesn't support the setCandidates method

Jason/Max, DataNucleus can do all of that for you, I'm sure I've
mentioned this before.
Here I'll even donate you some code that you can plug into your
JDOQLQuery.performExecute() method


if (candidateCollection != null)
{
// Supplied collection of instances, so evaluate in-memory
if (candidateCollection.isEmpty())
{
return Collections.EMPTY_LIST;
}
else
{
ClassLoaderResolver clr = om.getClassLoaderResolver();
List candidates = new ArrayList(candidateCollection);
JavaQueryEvaluator resultMapper = new JDOQLEvaluator
(this, candidates, compilation,
parameters, clr);
return resultMapper.execute(true, true, true, true,
true);
}
}


So the query will be executed in memory using the user-supplied
instances.

No excuses now ;-)

--Andy (DataNucleus)
--~--~-~--~~~---~--~~
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: How not to Retain Values in development server?

2009-11-04 Thread Tito George

If i am adding a new column to existing table, how do i migrate
existing values?
Okie.
I have a table called User with columns First_Name, Last_name, email.
And in some point i am adding a new column say DoB.
When i query the existing values, i am getting exception like entity
DoB is not present. So i need to go back and delete all the existing
data available and then recreate java file. Is there any workaround
atleast in local env.

On Nov 2, 9:38 pm, Tito George  wrote:
> When ever i modify the PersistenceCapable classes i am getting error
> due to mismatch in the persisted data. Is there any way for not
> retaining data between sessions. In the jdoconfig i can see a property
> like -- .
> What is this for, i tried setting it to false, but is not working.
> Values are retained.
>
> Tito
--~--~-~--~~~---~--~~
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: DeadlineExceededException while executing a server method.

2009-11-04 Thread Sanjith Chungath
yeah I realized that. Since I was trying to read a big .csv file, I spit it
to three parts and read it thrice.

thanks for the reply Jason.

-Sanjith.

On Wed, Nov 4, 2009 at 12:56 AM, Jason (Google)  wrote:

> Hi Sanjith. All App Engine requests must return within 30 seconds or this
> exception will be thrown. If you have a larger task, you can divide it into
> several parts and execute these in separate tasks, but each task must also
> return in 30 seconds or less.
>
> - Jason
>
>
> On Sat, Oct 31, 2009 at 11:12 AM, Sanjith Chungath wrote:
>
>> in another word, is there a way to execute a server action through a
>> normal server call or by tasks which can run more than 30 seconds?
>>
>> -Sanjith
>>
>>
>> On Sat, Oct 31, 2009 at 12:40 AM, Sanjith Chungath wrote:
>>
>>> Hi all,
>>> While executing a server method which talks to another system and
>>> get details from there, I get a DeadlineExceededException at the
>>> appengine. I don't have much control on the time taken by the other system.
>>> I just call a method from an interface of that system and wait for the
>>> response. What is the best practice in these situations? Below are the
>>> exceptions that I got at server.
>>>
>>> javax.servlet.ServletContext log: Exception while dispatching incoming RPC 
>>> call
>>> com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public 
>>> abstract java.lang.String 
>>> com.sanchu.clicks.client.GreetingService.greetServer(java.lang.String)' 
>>> threw an unexpected exception: 
>>> com.google.apphosting.api.DeadlineExceededException: This request 
>>> (e737f449255620d0) started at 2009/10/29 18:30:43.480 UTC and was still 
>>> executing at 2009/10/29 18:31:12.207 UTC.
>>> at 
>>> com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:360)
>>> at 
>>> com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:546)
>>> at 
>>> com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:166)
>>> at 
>>> com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:86)
>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
>>> 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.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:35)
>>> 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 
>>> 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.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:238)
>>> 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.headerComplete(HttpConnection.java:830)
>>> at 
>>> com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76)
>>> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
>>> at 
>>> com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:139)
>>> at 
>>> com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:239)
>>> at 
>>> com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:5135)
>>> at 
>>> com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:5133)
>>> at 
>>> com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java:24)
>>> at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:363)
>>> at com.google.net.rpc.impl.Server$2.run(Server.java:814)
>>> at 
>>> com.google.tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java:56)
>>> at 
>>> com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan(LocalTraceSpanBuilder.java:516)
>>> at com.google.net.rpc.impl.Server.startRpc(Server.java:769)
>>> at com.google.net.rpc.impl.Server.processRequ

[appengine-java] Re: read file

2009-11-04 Thread Sanjith Chungath
yes, i was able to read a file directly from a folder "data/abc.csv" using
normal java APIs. I didn't configure it as a resource or static file.

-Sanjith.

On Tue, Nov 3, 2009 at 4:15 AM, Jason (Google)  wrote:

> You should be able to read it if you put it in your war directory and
> configure it as a resource file. I believe the second step is done
> automatically -- all files are configured as both resource and static by
> default, though you can override it by following the instructions at
> http://code.google.com/appengine/docs/java/config/appconfig.html#Static_Files_and_Resource_Files
> .
>
> You should be able to read resource files using the same APIs that you use
> to read files from disk in other Java application environments.
>
> - Jason
>
> On Thu, Oct 29, 2009 at 2:21 PM, Andreas Blomqvist <
> blomqvist.andr...@gmail.com> wrote:
>
>> stupid question, but anyway
>>
>> I want to include a myData.csv file and read it from my app. Where do I
>> put it ? and what is the path to the file when I read it in the code?
>>
>> 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-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: Downloading and Uploading All Data for JAVA application...

2009-11-04 Thread Sanjith Chungath
oh great. thanks for the information Jason.

What shld i exactly do to deploy remote_api in a java application. am not
much familiar with Python :(

-Sanjith.

On Tue, Nov 3, 2009 at 5:42 AM, Jason (Google)  wrote:

> This isn't available for Java just yet, but you can use the Python bulk
> loader tool with your Java deployed apps. You may have to deploy remote_api
> to a new version of your application using the Python SDK, but all versions
> share the same datastore, so you can still download the original data stored
> by your Java code, and similarly, any new entities you add this way can be
> accessed using your Java code as well.
>
> - Jason
>
> On Fri, Oct 30, 2009 at 11:33 AM, Sanjith Chungath wrote:
>
>> Hi All,
>>I found a topic "Downloading and Uploading All Data" under
>> Python-->Tools in "google-appengine-docs-20090921'. I have java sdk
>> downloaded and installed. So i dont have the file bulkloader.py with me.
>>
>>- Is similar feature/ tool available for java?
>>- I can download the python SDK and use it, but is it possible to use
>>it in a Java application?
>>
>> -Sanjith
>>
>>
>>
>
> >
>

--~--~-~--~~~---~--~~
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] JSF2 and Scala - Problem with scala logger

2009-11-04 Thread baranda

Hi,

I am a daring person and I have written an JSF2 web application in
Scala (built with maven). Everything is working fine in the dev server
and when I deploy I can see the first page. However, if there is a
validation problem or I want to navigate to another page I get a blank
page.

On the logs, I only can see this as a warning:

11-04 02:04AM 38.475

EXCEPTION
javax.servlet.ServletException: java.lang.SecurityException: Google
App Engine does not support subclasses of java.util.logging.Logger:
scala/runtime/Equality$1EqualityLogger
at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle
(AppVersionHandlerMap.java:240)
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.headerComplete
(HttpConnection.java:830)
at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable
(RpcRequestParser.java:76)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
at
com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest
(JettyServletEngineAdapter.java:139)
at com.google.apphosting.runtime.JavaRuntime.handleRequest
(JavaRuntime.java:239)
at com.google.apphosting.base.RuntimePb$EvaluationRuntime
$6.handleBlockingRequest(RuntimePb.java:5135)
at com.google.apphosting.base.RuntimePb$EvaluationRuntime
$6.handleBlockingRequest(RuntimePb.java:5133)
at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest
(BlockingApplicationHandler.java:24)
at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:
363)
at com.google.net.rpc.impl.Server$2.run(Server.java:814)
at com.google.tracing.LocalTraceSpanRunnable.run
(LocalTraceSpanRunnable.java:56)
at com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan
(LocalTraceSpanBuilder.java:516)
at com.google.net.rpc.impl.Server.startRpc(Server.java:769)
at com.google.net.rpc.impl.Server.processRequest(Server.java:351)
at com.google.net.rpc.impl.ServerConnection.messageReceived
(ServerConnection.java:437)
at com.google.net.rpc.impl.RpcConnection.parseMessages
(RpcConnection.java:319)
at com.google.net.rpc.impl.RpcConnection.dataReceived
(RpcConnection.java:290)
at com.google.net.async.Connection.handleReadEvent(Connection.java:
436)
at com.google.net.async.EventDispatcher.processNetworkEvents
(EventDispatcher.java:762)
at com.google.net.async.EventDispatcher.internalLoop
(EventDispatcher.java:207)
at com.google.net.async.EventDispatcher.loop(EventDispatcher.java:
101)
at com.google.net.rpc.RpcService.runUntilServerShutdown
(RpcService.java:251)
at com.google.apphosting.runtime.JavaRuntime$RpcRunnable.run
(JavaRuntime.java:396)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.SecurityException: Google App Engine does not
support subclasses of java.util.logging.Logger: scala/runtime/Equality
$1EqualityLogger
at com.google.appengine.runtime.Request.process-fe7fd4d84408e047
(Request.java)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at scala.runtime.BoxesRunTime.equals(Unknown Source)
at scala.collection.immutable.$colon$colon.readObject(List.scala:480)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at java.io.ObjectStreamClass.invokeReadObject(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
   

[appengine-java] all data suddenly disappeared from datastore

2009-11-04 Thread Prashant
Hi,

I had around 250,000 entities of a type, yesterday i wrote a cron to delete
them. Today, I notices that entities are not getting deleted, so, I stopped
the cron and started deleting entities manually, after deleting a number of
entities (around 50k), suddenly all the entities of all the types
disappeared !!! Where did other entities go??? Did Google vacuumed my
DataStore? Was I doing anything against ToC

--~--~-~--~~~---~--~~
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: What defines a "single transaction" in JDO?

2009-11-04 Thread leszek

Sequence:
tx.begin();
,,, persist Entity group A
tx.commit();
tx.begin();
.. persist Entity group B
tx.commit();

works without any problem as designed.

You have to provide more details to tell something.


--~--~-~--~~~---~--~~
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: Local server works, Appspot fails with java.lang.StackOverflowError when Spring AOP is enabled

2009-11-04 Thread Kris

Hi Toby,

I've just realised that I probably over-wrote the app with a new
version yesterday.  Did you get what you need? (If not, I can easily
re-deploy and resend the ID.)

Cheers,
Kris

On Oct 19, 8:30 pm, Toby Reyelts  wrote:
> Kris,
>
> Can you send us your app id (privately if you wish) ?
>
>
>
> On Mon, Oct 19, 2009 at 3:57 PM, Kris  wrote:
>
> > I'm also getting this StackOverflowError, but the app engine log view
> > is truncated, so I can't see the initial cause.  Is there any way to
> > see the whole log message, so I can try to help track it down/produce
> > a test case?
>
> > Cheers,
> > Kris
>
> > On Oct 7, 4:36 pm, Toby Reyelts  wrote:
> > > Unfortunately this is an issue that will be very difficult for us to
> > solve
> > > unless you can provide us with a simple reproducing app that we can use
> > to
> > > debug. If the issue is important to you, that is the most important thing
> > > you can do to help us.On Wed, Oct 7, 2009 at 6:57 AM, Dave Cheong <
> > d...@davecheong.com> wrote:
>
> > > > Hi there,
>
> > > > I'm having the same problem and was wondering if you or anyone else
> > > > out there have found a solution.
> > > > I'm currently using GAE/J 1.2.5 and Spring 2.5.
>
> > > > Like the previous author, everything works locally but I get a
> > > > StackOverflowError on Appspot. However, if I comment out ...
>
> > > > 
>
> > > > ... things work on Appspot.
>
> > > > Any help provided is much appreciated.
>
> > > > thanks,
> > > > dave
>
> > > > On Aug 26, 3:38 pm, Gabriel Moreira  wrote:
> > > > > My app is using Spring 3.0.
>
> > > > > If i disable Spring AOP, my app runs fine both on local and appspot.
>
> > > > > But when i enable Spring AOP (tested with advice or aspects), in
> > local
> > > > > runtime everything is fine and works, but in appspot im getting this
> > > > > error:
>
> > > > > java.lang.StackOverflowError
> > > > > at java.lang.String.endsWith(Unknown Source)
> > > > > at sun.security.provider.PolicyFile.canonPath(Unknown Source)
> > > > > at java.io.FilePermission$1.run(Unknown Source)
> > > > > at java.io.FilePermission$1.run(Unknown Source)
> > > > > at java.security.AccessController.doPrivileged(Native Method)
> > > > > at java.io.FilePermission.init(Unknown Source)
> > > > > at java.io.FilePermission.(Unknown Source)
> > > > > at
> > > > sun.net.www.protocol.file.FileURLConnection.getPermission(Unknown
> > > > > Source)
> > > > > at sun.misc.URLClassPath.check(Unknown Source)
> > > > > at sun.misc.URLClassPath$FileLoader.getResource(Unknown
> > Source)
> > > > > at sun.misc.URLClassPath$FileLoader.findResource(Unknown
> > Source)
> > > > > at sun.misc.URLClassPath.findResource(Unknown Source)
> > > > > at java.net.URLClassLoader$2.run(Unknown Source)
> > > > > at java.security.AccessController.doPrivileged(Native Method)
> > > > > at java.net.URLClassLoader.findResource(Unknown Source)
> > > > > at
> > > > com.google.apphosting.runtime.security.UserClassLoader.findResource
> > > > > (UserClassLoader.java:631)
> > > > > at java.lang.ClassLoader.getResource(Unknown Source)
> > > > > at
> > com.google.apphosting.runtime.security.UserClassLoader$4.run
> > > > > (UserClassLoader.java:665)
> > > > > at
> > com.google.apphosting.runtime.security.UserClassLoader$4.run
> > > > > (UserClassLoader.java:659)
> > > > > at java.security.AccessController.doPrivileged(Native Method)
> > > > > at
> > > > com.google.apphosting.runtime.security.UserClassLoader.findResource
> > > > > (UserClassLoader.java:659)
> > > > > at java.lang.ClassLoader.getResource(Unknown Source)
> > > > > at
> > com.google.apphosting.runtime.security.UserClassLoader$4.run
> > > > > (UserClassLoader.java:665)
> > > > > at
> > com.google.apphosting.runtime.security.UserClassLoader$4.run
> > > > > (UserClassLoader.java:659)
> > > > > at java.security.AccessController.doPrivileged(Native Method)
> > > > > at
> > > > com.google.apphosting.runtime.security.UserClassLoader.findResource
> > > > > (UserClassLoader.java:659)
> > > > > at java.lang.ClassLoader.getResource(Unknown Source)
> > > > > at
> > com.google.apphosting.runtime.security.UserClassLoader$4.run
> > > > > (UserClassLoader.java:665)
> > > > > at
> > com.google.apphosting.runtime.security.UserClassLoader$4.run
> > > > > (UserClassLoader.java:659)
> > > > > at java.security.AccessController.doPrivileged(Native Method)
> > > > > at
> > > > > com.google.apphosting.runtime.security.UserClassLoader.findResour...
>
> > > > > My applicationContext.xml:
>
> > > > > 
> > > > > http://www.springframework.org/schema/beans";
> > > > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> > > > > xmlns:aop="http://www.springframework.org/schema/aop";
> > > > > xmlns:context="http://www.springframework.org/

[appengine-java] Re: thanking uuuuuuuuu

2009-11-04 Thread leszek

http://groups.google.co.uk/group/google-appengine-java/browse_frm/thread/b2d502bc03c83155#
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---