[appengine-java] XSLT Version

2009-10-31 Thread moissinac

XSLT is supported, but which?
Is XSLT supported? Directly? With help of an external library?

--~--~-~--~~~---~--~~
You received this message 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: struts 2.1.8 met AccessControlException with app engine's local server

2009-10-31 Thread zhiw...@gmail.com

now i have to use 2.1.6 in my computer and replace the lib to 2.1.8
when i update to app engine server

On Oct 31, 10:56 pm, "zhiw...@gmail.com"  wrote:
> when i use struts 2.1.8 and app engine sdk 1.2.6(1.2.5 also the
> same)  ,   when web app start, it throw the exception
>
> java.security.AccessControlException: access denied
> (java.io.FilePermission jar:file:\F:\mysrc\Guestbook\build\web\WEB-INF
> \lib\struts2-core-2.1.8.1.jar read)
>         at java.security.AccessControlContext.checkPermission
> (AccessControlContext.java:323)
>         at java.security.AccessController.checkPermission
> (AccessController.java:546)
>         at java.lang.SecurityManager.checkPermission(SecurityManager.java:
> 532)
>         at com.google.appengine.tools.development.DevAppServerFactory
> $CustomSecurityManager.checkPermission(DevAppServerFactory.java:139)
>         at java.lang.SecurityManager.checkRead(SecurityManager.java:871)
>         at java.util.zip.ZipFile.(ZipFile.java:109)
>         at java.util.jar.JarFile.(JarFile.java:133)
>         at java.util.jar.JarFile.(JarFile.java:70)  ..
>
> the exception happend  in local server  .  but  when i update my app
> to app engine server.  it runs well  .
>
> struts 2.1.6 didn't appear this,   but version 2.1.8 fixed some things
> that make struts-convention-plugin can work on app engine and also
> have offical json plugin.  so i have to  use v 2.1.8.
>
>     i have read the   'Will it play in App Engine ' ,it does not have
> a solution.
>  how can make struts 2.1.8 work well on local server?     thanks  in
> advance!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: struts 2.1.8 met AccessControlException with app engine's local server

2009-10-31 Thread zhiw...@gmail.com

now i have to use 2.1.6 in my computer and replace the lib to 2.1.8
when i update to app engine server

On Oct 31, 10:56 pm, "zhiw...@gmail.com"  wrote:
> when i use struts 2.1.8 and app engine sdk 1.2.6(1.2.5 also the
> same)  ,   when web app start, it throw the exception
>
> java.security.AccessControlException: access denied
> (java.io.FilePermission jar:file:\F:\mysrc\Guestbook\build\web\WEB-INF
> \lib\struts2-core-2.1.8.1.jar read)
>         at java.security.AccessControlContext.checkPermission
> (AccessControlContext.java:323)
>         at java.security.AccessController.checkPermission
> (AccessController.java:546)
>         at java.lang.SecurityManager.checkPermission(SecurityManager.java:
> 532)
>         at com.google.appengine.tools.development.DevAppServerFactory
> $CustomSecurityManager.checkPermission(DevAppServerFactory.java:139)
>         at java.lang.SecurityManager.checkRead(SecurityManager.java:871)
>         at java.util.zip.ZipFile.(ZipFile.java:109)
>         at java.util.jar.JarFile.(JarFile.java:133)
>         at java.util.jar.JarFile.(JarFile.java:70)  ..
>
> the exception happend  in local server  .  but  when i update my app
> to app engine server.  it runs well  .
>
> struts 2.1.6 didn't appear this,   but version 2.1.8 fixed some things
> that make struts-convention-plugin can work on app engine and also
> have offical json plugin.  so i have to  use v 2.1.8.
>
>     i have read the   'Will it play in App Engine ' ,it does not have
> a solution.
>  how can make struts 2.1.8 work well on local server?     thanks  in
> advance!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: struts 2.1.8 met AccessControlException with app engine's local server

2009-10-31 Thread zhiw...@gmail.com

now i have to use 2.1.6 in my computer and replace the lib to 2.1.8
when i update to app engine server

On Oct 31, 10:56 pm, "zhiw...@gmail.com"  wrote:
> when i use struts 2.1.8 and app engine sdk 1.2.6(1.2.5 also the
> same)  ,   when web app start, it throw the exception
>
> java.security.AccessControlException: access denied
> (java.io.FilePermission jar:file:\F:\mysrc\Guestbook\build\web\WEB-INF
> \lib\struts2-core-2.1.8.1.jar read)
>         at java.security.AccessControlContext.checkPermission
> (AccessControlContext.java:323)
>         at java.security.AccessController.checkPermission
> (AccessController.java:546)
>         at java.lang.SecurityManager.checkPermission(SecurityManager.java:
> 532)
>         at com.google.appengine.tools.development.DevAppServerFactory
> $CustomSecurityManager.checkPermission(DevAppServerFactory.java:139)
>         at java.lang.SecurityManager.checkRead(SecurityManager.java:871)
>         at java.util.zip.ZipFile.(ZipFile.java:109)
>         at java.util.jar.JarFile.(JarFile.java:133)
>         at java.util.jar.JarFile.(JarFile.java:70)  ..
>
> the exception happend  in local server  .  but  when i update my app
> to app engine server.  it runs well  .
>
> struts 2.1.6 didn't appear this,   but version 2.1.8 fixed some things
> that make struts-convention-plugin can work on app engine and also
> have offical json plugin.  so i have to  use v 2.1.8.
>
>     i have read the   'Will it play in App Engine ' ,it does not have
> a solution.
>  how can make struts 2.1.8 work well on local server?     thanks  in
> advance!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: struts 2.1.8 met AccessControlException with app engine's local server

2009-10-31 Thread zhiw...@gmail.com

now i have to use 2.1.6 in my computer and replace the lib to 2.1.8
when i update to app engine server

On Oct 31, 10:56 pm, "zhiw...@gmail.com"  wrote:
> when i use struts 2.1.8 and app engine sdk 1.2.6(1.2.5 also the
> same)  ,   when web app start, it throw the exception
>
> java.security.AccessControlException: access denied
> (java.io.FilePermission jar:file:\F:\mysrc\Guestbook\build\web\WEB-INF
> \lib\struts2-core-2.1.8.1.jar read)
>         at java.security.AccessControlContext.checkPermission
> (AccessControlContext.java:323)
>         at java.security.AccessController.checkPermission
> (AccessController.java:546)
>         at java.lang.SecurityManager.checkPermission(SecurityManager.java:
> 532)
>         at com.google.appengine.tools.development.DevAppServerFactory
> $CustomSecurityManager.checkPermission(DevAppServerFactory.java:139)
>         at java.lang.SecurityManager.checkRead(SecurityManager.java:871)
>         at java.util.zip.ZipFile.(ZipFile.java:109)
>         at java.util.jar.JarFile.(JarFile.java:133)
>         at java.util.jar.JarFile.(JarFile.java:70)  ..
>
> the exception happend  in local server  .  but  when i update my app
> to app engine server.  it runs well  .
>
> struts 2.1.6 didn't appear this,   but version 2.1.8 fixed some things
> that make struts-convention-plugin can work on app engine and also
> have offical json plugin.  so i have to  use v 2.1.8.
>
>     i have read the   'Will it play in App Engine ' ,it does not have
> a solution.
>  how can make struts 2.1.8 work well on local server?     thanks  in
> advance!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: Persist HashMap with sdk1.2.2 ?

2009-10-31 Thread Rusty Wright

Whoops, sorry; ignore my remark about UserStats not being persistable; I looked 
again at your code and saw that it has a key.  I was confused and thinking that 
you're persisting the List, not an item in the List.  But I think the problem 
with it becoming a root object still remains.


Rusty Wright wrote:
> 1) In the case of result.isEmpty(), I don't see where you're adding the 
> new UserStats to the result list.
> 
> 2) When you do pm.makePersistent( stats ) I think you're going to have a 
> problem adding the new stats to the List, because that 
> makePersistent is going make a new stats a root/parent object.  But then 
> I don't see how you can do a makePersistent on stats since it doesn't 
> have a Key field; I thought you can/should only call makePersistent on 
> objects that have a primary key field (your classes, annotated with 
> @PersistenceCapable).
> 
> 3) Constructing queries with string concatenation like that is a 
> security hole, an invitation to sql injection attacks.  Use parameters.  
> http://xrl.in/3i9x
> 
> 4) I'm wondering if you're approaching this thinking about things the 
> "old" relational database way, with tables.  Instead, map out your 
> domain objects as java objects, and don't think about tables at all.  
> Wipe sql tables from your mind when using Google App Engine.  Use pencil 
> and paper and draw diagrams showing what's inside of what or what needs 
> what (for example, uml diagrams).  Whenever you have an object that's 
> not inside another object stop and analyze things and see if there is 
> some way it could/should go inside another object; this can be hard at 
> first if you're still thinking about tables and joins (I'm still 
> figuring this out).  At the moment my thinking is that the only time you 
> should have an object not be inside another object, *when you persist 
> it* (whereupon it becomes a root object), is an object that moves 
> around; sometimes it's in object A, sometimes object B, etc.  Then you 
> have to store in the containing outer object the inner object's Key 
> instead of th
> e object.  For example, in your case, I'm wondering if instead of having 
> a List of UserStats, have a List of User, and each user has a UserStats 
> object in it.
> 
> I'm still trying to figure this out so I could be wrong about this.
> 
> 
> barak wrote:
>> Here it is:
>>
>> PersistenceManager pm = PMF.get().getPersistenceManager();
>>
>> List result = (List) pm.newQuery( "select from "
>> + UserStats.class.getName() + " where id == '" + session.getId() +
>> "'" ).execute();
>>
>> if( result.isEmpty() )
>> stats = new UserStats( session.getId(), System.currentTimeMillis
>> () );
>> else
>> stats = result.get( 0 );
>>
>> Integer counter = stats.getQueries().get( query );
>>
>> if( counter == null )
>> counter = new Integer( 1 );
>> else
>>counter = new Integer( counter.intValue() + 1 );
>>
>> stats.getQueries().put( query, counter );
>>
>> try
>> {
>> pm.makePersistent( stats );
>> }
>> finally
>> {
>> pm.close();
>> }
>>
>> On Oct 30, 8:47 pm, "Jason (Google)"  wrote:
>>> Can you post the code that you're using to re-persist the updated 
>>> HashMap?
>>>
>>> - Jason
>>>
>>>
>>>
>>> On Thu, Oct 29, 2009 at 6:07 AM, barak  wrote:
>>>
 Thanks, did that and the map is indeed serialized now. But now, the
 enitity is fetched, seems like the state is not always kept.
 For example, I would like to store some attribute from an HttpSession
 using the UserStats instance. Every time a user in a session press
 some button, a instance is fetched (using the session id as an
 identifier) and update a counter in the HashMap. The problem I faced
 is even that the object is found by the JDO, the counter updated and
 the object persisted again, next fetch does not return the instance
 with the updated counter. Can you help please debugging this?
 This is the data object:
 @PersistenceCapable(identityType = IdentityType.APPLICATION)
 public class UserStats
 {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private 
 Key key;
@Persistent
private String  id;
@Persistent
 private Longtime;
@Persistent( serialized ="true" )
 private HashMapqueries;
 public UserStats( String id, Long time )
{
this.id = id;
this.time = time;
queries = new HashMap();
}
public Key getKey()
{
return key;
}
public String getId()
{
return id;
}
public void setId( String id )
{
this.id = id;
}
 

[appengine-java] Re: Persist HashMap with sdk1.2.2 ?

2009-10-31 Thread Rusty Wright

1) In the case of result.isEmpty(), I don't see where you're adding the new 
UserStats to the result list.

2) When you do pm.makePersistent( stats ) I think you're going to have a 
problem adding the new stats to the List, because that 
makePersistent is going make a new stats a root/parent object.  But then I 
don't see how you can do a makePersistent on stats since it doesn't have a Key 
field; I thought you can/should only call makePersistent on objects that have a 
primary key field (your classes, annotated with @PersistenceCapable).

3) Constructing queries with string concatenation like that is a security hole, 
an invitation to sql injection attacks.  Use parameters.  http://xrl.in/3i9x

4) I'm wondering if you're approaching this thinking about things the "old" 
relational database way, with tables.  Instead, map out your domain objects as 
java objects, and don't think about tables at all.  Wipe sql tables from your 
mind when using Google App Engine.  Use pencil and paper and draw diagrams 
showing what's inside of what or what needs what (for example, uml diagrams).  
Whenever you have an object that's not inside another object stop and analyze 
things and see if there is some way it could/should go inside another object; 
this can be hard at first if you're still thinking about tables and joins (I'm 
still figuring this out).  At the moment my thinking is that the only time you 
should have an object not be inside another object, *when you persist it* 
(whereupon it becomes a root object), is an object that moves around; sometimes 
it's in object A, sometimes object B, etc.  Then you have to store in the 
containing outer object the inner object's Key instead of th
e object.  For example, in your case, I'm wondering if instead of having a List 
of UserStats, have a List of User, and each user has a UserStats object in it.

I'm still trying to figure this out so I could be wrong about this.


barak wrote:
> Here it is:
> 
> PersistenceManager pm = PMF.get().getPersistenceManager();
> 
> List result = (List) pm.newQuery( "select from "
> + UserStats.class.getName() + " where id == '" + session.getId() +
> "'" ).execute();
> 
> if( result.isEmpty() )
> stats = new UserStats( session.getId(), System.currentTimeMillis
> () );
> else
> stats = result.get( 0 );
> 
> Integer counter = stats.getQueries().get( query );
> 
> if( counter == null )
> counter = new Integer( 1 );
> else
>counter = new Integer( counter.intValue() + 1 );
> 
> stats.getQueries().put( query, counter );
> 
> try
> {
>   pm.makePersistent( stats );
> }
> finally
> {
>   pm.close();
> }
> 
> On Oct 30, 8:47 pm, "Jason (Google)"  wrote:
>> Can you post the code that you're using to re-persist the updated HashMap?
>>
>> - Jason
>>
>>
>>
>> On Thu, Oct 29, 2009 at 6:07 AM, barak  wrote:
>>
>>> Thanks, did that and the map is indeed serialized now. But now, the
>>> enitity is fetched, seems like the state is not always kept.
>>> For example, I would like to store some attribute from an HttpSession
>>> using the UserStats instance. Every time a user in a session press
>>> some button, a instance is fetched (using the session id as an
>>> identifier) and update a counter in the HashMap. The problem I faced
>>> is even that the object is found by the JDO, the counter updated and
>>> the object persisted again, next fetch does not return the instance
>>> with the updated counter. Can you help please debugging this?
>>> This is the data object:
>>> @PersistenceCapable(identityType = IdentityType.APPLICATION)
>>> public class UserStats
>>> {
>>>@PrimaryKey
>>>@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
>>>private Key key;
>>>@Persistent
>>>private String  id;
>>>@Persistent
>>> private Longtime;
>>>@Persistent( serialized ="true" )
>>> private HashMapqueries;
>>> public UserStats( String id, Long time )
>>>{
>>>this.id = id;
>>>this.time = time;
>>>queries = new HashMap();
>>>}
>>>public Key getKey()
>>>{
>>>return key;
>>>}
>>>public String getId()
>>>{
>>>return id;
>>>}
>>>public void setId( String id )
>>>{
>>>this.id = id;
>>>}
>>> public Long getTime()
>>>{
>>>return time;
>>>}
>>>public void setTime( Long time )
>>>{
>>>this.time = time;
>>> }
>>>public HashMap getQueries()
>>>{
>>>return queries;
>>>}
>>>public void setQueries( HashMap queries )
>>>{
>>>this.queries = queries;
>>>}
>>> }
>>> On Oct 29, 10:38 am, Patrizio Munzi  wrote:
>>>

[appengine-java] Re: Does Google App Engine support Apache Mina?

2009-10-31 Thread ArtemGr

On 31 окт, 19:10, asianCoolz  wrote:
> anyone tried out apache mina with GAE?  any update

There's no chance.
MINA uses NIO and sockets directly.
--~--~-~--~~~---~--~~
You received this message 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: Dev server datastore deadlock

2009-10-31 Thread stumpy

I removed the thread dump doc because the servlet code denomstrates
the problem.


On Oct 29, 8:20 pm, "Jason (Google)"  wrote:
> Thanks for the snippet. The thread dump isn't appearing for me in the Google
> Doc -- can you try posting it again and verifying that it's publicly
> viewable?
>
> - Jason
>
> On Wed, Oct 28, 2009 at 2:27 AM, stumpy  wrote:
>
> > The thread dump is a bit cryptic so I reduced the problem down to a
> > small servlet that fails.
>
> > Use the servlet below in the development environment and set up aync
> > requests to it and a deadline will occur e.g. using 2 or more looped
> > curls from the terminal.
>
> > public void doGet(HttpServletRequest req, HttpServletResponse resp)
> > throws IOException {
> >        DatastoreService ds = DatastoreServiceFactory.getDatastoreService();
> >        Transaction t = ds.beginTransaction();
> >        try {
> >                Key key = KeyFactory.createKey("entity_kind", 1);
> >                Entity e = new Entity(key);
> >                e.setProperty("property_bytes", new Blob(new
> > byte[100]));
> >                ds.put(t, e);
> >                t.commit();
> >        } catch (Throwable th) {
> >                if (t.isActive()) {
> >                        t.rollback();
> >                }
> >        }
> > }
>
> > On Oct 27, 6:12 pm, stumpy  wrote:
> > >http://docs.google.com/Doc?docid=0AV6jRtzB1ZNYZGNtNWdxemZfNjNkYjVkajl...
--~--~-~--~~~---~--~~
You received this message 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: managing root / parent objects

2009-10-31 Thread Rusty Wright

Yes, that's the point.  My thinking is that (correct me if I'm wrong) if I 
store the object's key, when I fetch the outer containing object that has its 
key, I'll need to use the key to fetch the object.  By cloning it, I don't need 
to do that, I just fetch the outer object and the inner object will get fetched 
along with it (assuming it's in the default fetch group).  Whenever I want the 
outer object I'll also want its inner objects.

If I store the key in the outer object, when I fetch the outer object it seems 
to me that I'll then need to fetch the contained object.  And I'll have two 
fields on the outer object; using my FavoriteFood example, I'll need a field 
favoriteFoodKey, type Key, which is persisted, and a favoriteFood, type 
FavoriteFood, which is transient, and not persisted.  Then my jsp would use the 
getter for the favoriteFood field.

This is why I'm asking; it seems a bit complicated.  Perhaps there's a simpler 
way that I could use.

In my case, there isn't a lot of data so the duplication of objects isn't a big 
issue.


John Patterson wrote:
> Why are you cloning instead of setting the original object?  JDO will 
> store the clone as a separate entity in the datastore.
> 
> 2009/11/1 Rusty Wright  >
> 
> 
> I'm trying to figure out the best way to manage root objects that
> are used with different objects.  For a semi concrete example,
> suppose you have a web page with a drop down list of Favorite Foods,
> and a User object may have a reference to a FavoriteFood, and other
> objects will have references to FavoriteFood objects as well.
> 
> It seems to me that if individual FavoriteFood objects don't change,
> but the list (table) of FavoriteFood objects can grow, you could
> make them Cloneable and use the clone, making it a child, for example:
> 
>  FavoriteFood fav = favoriteFoodDao.findByStringId(stringId);
>  user.addFavoriteFood(fav.clone());
> 
> Google's examples usually (always?) store the subordinate object's
> Key rather than a clone of the object.
> 
> I can see problems with using clones; even though I'm sure they
> won't, they may change.  Similarly, items may need to be deleted
> from the master FavoriteFood list/table.  There may be other
> problems that I haven't thought of.
> 
> Anyhow, I'm wondering if others have gone done this road or
> investigated it and can offer advise.
> 
> 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: Persist HashMap with sdk1.2.2 ?

2009-10-31 Thread barak

Here it is:

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

List result = (List) pm.newQuery( "select from "
+ UserStats.class.getName() + " where id == '" + session.getId() +
"'" ).execute();

if( result.isEmpty() )
stats = new UserStats( session.getId(), System.currentTimeMillis
() );
else
stats = result.get( 0 );

Integer counter = stats.getQueries().get( query );

if( counter == null )
counter = new Integer( 1 );
else
   counter = new Integer( counter.intValue() + 1 );

stats.getQueries().put( query, counter );

try
{
pm.makePersistent( stats );
}
finally
{
pm.close();
}

On Oct 30, 8:47 pm, "Jason (Google)"  wrote:
> Can you post the code that you're using to re-persist the updated HashMap?
>
> - Jason
>
>
>
> On Thu, Oct 29, 2009 at 6:07 AM, barak  wrote:
>
> > Thanks, did that and the map is indeed serialized now. But now, the
> > enitity is fetched, seems like the state is not always kept.
>
> > For example, I would like to store some attribute from an HttpSession
> > using the UserStats instance. Every time a user in a session press
> > some button, a instance is fetched (using the session id as an
> > identifier) and update a counter in the HashMap. The problem I faced
> > is even that the object is found by the JDO, the counter updated and
> > the object persisted again, next fetch does not return the instance
> > with the updated counter. Can you help please debugging this?
>
> > This is the data object:
>
> > @PersistenceCapable(identityType = IdentityType.APPLICATION)
> > public class UserStats
> > {
> >       �...@primarykey
> >       �...@persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
> >        private Key                                                     key;
>
> >       �...@persistent
> >        private String                                          id;
>
> >       �...@persistent
> >         private Long                                            time;
>
> >       �...@persistent( serialized ="true" )
> >         private HashMap        queries;
>
> >         public UserStats( String id, Long time )
> >        {
> >                this.id = id;
>
> >                this.time = time;
>
> >                queries = new HashMap();
> >        }
>
> >        public Key getKey()
> >        {
> >                return key;
> >        }
>
> >        public String getId()
> >        {
> >                return id;
> >        }
>
> >        public void setId( String id )
> >        {
> >                this.id = id;
> >        }
>
> >         public Long getTime()
> >        {
> >                return time;
> >        }
>
> >        public void setTime( Long time )
> >        {
> >                this.time = time;
> >         }
>
> >        public HashMap getQueries()
> >        {
> >                return queries;
> >        }
>
> >        public void setQueries( HashMap queries )
> >        {
> >                this.queries = queries;
> >        }
> > }
>
> > On Oct 29, 10:38 am, Patrizio Munzi  wrote:
> > > HashMap isn't supported as a persistable type.
> > > The only way you've got to persist it is serialize it:
> >http://gae-java-persistence.blogspot.com/2009/10/serialized-fields.html
> > > 1KViewDownload- 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: DeadlineExceededException while executing a server method.

2009-10-31 Thread Sanjith Chungath
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.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 
> c

[appengine-java] Re: any plans for deferred.defer in Java?

2009-10-31 Thread Vince Bonfanti
This looked like an interesting problem, and I already had most of the
pieces in place, so here's my first attempt, which is implemented in a
single class (also attached, along with some test files):


http://code.google.com/p/gaevfs/source/browse/trunk/src/com/newatlanta/appengine/taskqueue/Deferred.java

I'm more than happy to contribute this for inclusion in the SDK.

Some caveats:

   1) Because of issue #2097
(http://code.google.com/p/googleappengine/issues/detail?id=2097), this
doesn't work on the development server (it does work in production).
So go star that issue!

   2) I've only done minimal testing on the production server (see the
attached test files).

   3) This post is the only documentation that's currently available.

First, add the following your your web.xml:


Deferred

com.newatlanta.appengine.taskqueue.Deferred


Deferred
/_ah/queue/deferred


Second, define the "deferred" queue within queue.xml (use whatever
rate you want):


deferred
10/s


Next, create a class that implements the
com.newatlanta.appengine.taskqueue.Deferred.Deferrable interface; the
"doTask()" method of this class is where you implement your task
logic.

Then, invoke the com.newatlanta.appengine.taskqueue.Deferred.defer()
method to queue up your task:

TestDeferred testDeferred = new TestDeferred(); // implements Deferrable
Deferred.defer( testDeferred, "one", "two", "three", 1, 2, 3 );

(Note that it would be possible to pass arguments as attributes to
your Deferrable instance, rather than using varargs; I'm not sure it
makes much difference which you choose).

Just as for the Python implementation, if the arguments size exceeds
10KB, the arguments are stored in a datastore entity, which is then
deleted when the task is executed. Also, your doTask() method can
throw a PermanentTaskFailure exception to halt retries; any other
exceptions cause the task to be retried.

Let me know if you find this useful, have any questions or encounter
any problems.

Vince

On Fri, Oct 30, 2009 at 6:13 PM, Jason (Google)  wrote:
> Hi David. This may be coming to Java eventually, but it hasn't been started
> yet. If you or anyone else is interested in contributing, let me know.
>
> - Jason
>
> On Wed, Oct 28, 2009 at 7:52 AM, David Chandler 
> wrote:
>>
>> Re: http://code.google.com/appengine/articles/deferred.html
>>
>> Will this be coming to AppEngine for Java?
>>
>> David Chandler
>> http://turbomanage.wordpress.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
-~--~~~~--~~--~--~---



TestDeferred.java
Description: Binary data


testDeferred.jsp
Description: Binary data


Deferred.java
Description: Binary data


[appengine-java] Re: managing root / parent objects

2009-10-31 Thread John Patterson
Why are you cloning instead of setting the original object?  JDO will store
the clone as a separate entity in the datastore.

2009/11/1 Rusty Wright 

>
> I'm trying to figure out the best way to manage root objects that are used
> with different objects.  For a semi concrete example, suppose you have a web
> page with a drop down list of Favorite Foods, and a User object may have a
> reference to a FavoriteFood, and other objects will have references to
> FavoriteFood objects as well.
>
> It seems to me that if individual FavoriteFood objects don't change, but
> the list (table) of FavoriteFood objects can grow, you could make them
> Cloneable and use the clone, making it a child, for example:
>
>  FavoriteFood fav = favoriteFoodDao.findByStringId(stringId);
>  user.addFavoriteFood(fav.clone());
>
> Google's examples usually (always?) store the subordinate object's Key
> rather than a clone of the object.
>
> I can see problems with using clones; even though I'm sure they won't, they
> may change.  Similarly, items may need to be deleted from the master
> FavoriteFood list/table.  There may be other problems that I haven't thought
> of.
>
> Anyhow, I'm wondering if others have gone done this road or investigated it
> and can offer advise.
>
> 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] Maximum data size of image sent to service is not 1Mb, but 512Kb?

2009-10-31 Thread Esteban Ignacio Masoero
Hi there:

I am using the ImagesService as this page (
http://code.google.com/intl/en/appengine/docs/java/images/overview.html )
says, using exactly the code posted there, and found out that with images
between 512Kb (aprox.) and 1Mb, a strange error occurs. Moreover, the
exception thrown does not have the same text description (I asume this in
particular has to do with the differences that still exist between
development and production environment).

Image: .png, 581Kb
Development: Caused by: java.lang.IllegalArgumentException: Failed to read
image at
com.google.appengine.api.images.ImagesServiceImpl.applyTransform(ImagesServiceImpl.java:65)
(...)
Production: Caused by: java.lang.IllegalArgumentException: Unknown at
com.google.appengine.api.images.ImagesServiceImpl.applyTransform(ImagesServiceImpl.java:65)
(...)

This error is different that the one that occurs when an > 1Mb image is
processed, which correctly says "The request to API call images.Transform()
was too large.".

I tried with an .png/466Kb image, and it worked fine in both environments.

I think we have two different issues here, the different error messages in
dev/prod environments, and the apparently real restriction size, which seems
to be < 512Kb aprox.
Has anyone had the same problem? What can google guys say about this?

Thanks in advance,

Esteban

PD = the 581Kb png image was edited with mspaint to reach that size, would
that have something to do with it? (I succesfully visualized in firefox
browser, so think it's ok, but I mention it just in case)

--~--~-~--~~~---~--~~
You received this message 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] managing root / parent objects

2009-10-31 Thread Rusty Wright

I'm trying to figure out the best way to manage root objects that are used with 
different objects.  For a semi concrete example, suppose you have a web page 
with a drop down list of Favorite Foods, and a User object may have a reference 
to a FavoriteFood, and other objects will have references to FavoriteFood 
objects as well.

It seems to me that if individual FavoriteFood objects don't change, but the 
list (table) of FavoriteFood objects can grow, you could make them Cloneable 
and use the clone, making it a child, for example:

  FavoriteFood fav = favoriteFoodDao.findByStringId(stringId);
  user.addFavoriteFood(fav.clone());

Google's examples usually (always?) store the subordinate object's Key rather 
than a clone of the object.

I can see problems with using clones; even though I'm sure they won't, they may 
change.  Similarly, items may need to be deleted from the master FavoriteFood 
list/table.  There may be other problems that I haven't thought of.

Anyhow, I'm wondering if others have gone done this road or investigated it and 
can offer advise.

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: datanucleus.DetachAllOnCommit?

2009-10-31 Thread Rusty Wright

Ok, thanks.  No need to get defensive; I wasn't blaming detachAllOnCommit or 
DataNucleus, which is why I posted the question here rather than the 
DataNucleus forums.

I'll add an issue to the googleappengine Issue Tracker about this.


datanucleus wrote:
> So ask the question (of Google) why is "StreamingQueryResult".size
> trying to find the next result when the PM (and ObjectManager) has
> already been closed (by Spring). When a "query result" (of which
> StreamingQueryResult is one example) is handed to the user it should
> have registered a callback to be informed when an owning PM is being
> closed, and so to have the opportunity to read in all results when
> that happens, so that it doesn't need to subsequently. Nothing to do
> with detachAllOnCommit.
> > 

--~--~-~--~~~---~--~~
You received this message 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: PreparedQuery.countEntities() clarifications

2009-10-31 Thread Pion

One more thing ... The Admin Console -> Datastore -> Statistics says,
"Statistics are updated at least once per day." on the top right
corner the page.

It explains the differences between real-time query about the size and
the Admin Console Statistics.

On Oct 30, 6:58 pm, Pion  wrote:
> Interesting ...
>
> I have two kinds of entity.
>
> I tried the 2nd entity. It matches. Then, I tried the first entity
> again. Now they all match!  Maybe there was a lag on "The Admin
> Console -> Datastore -> Statistic"
>
> Thanks Yasuo.
>
> On Oct 30, 6:44 pm, Yasuo Higa  wrote:
>
> > Hi Pion,
>
> > > It still returns 6218 entities while The Admin Console -> Datastore ->
> > > Statistic shows 5029.
>
> > It is unusual.
> > I think the admin console uses Statistics API.
> > The Statistic data may be wrong or ...
>
> > Could you try an another sample?
>
> > Thanks,
>
> > Yasuo Higa
--~--~-~--~~~---~--~~
You received this message 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: PreparedQuery.countEntities() clarifications

2009-10-31 Thread Pion

One more thing ... The Admin Console -> Datastore -> Statistics says,
"Statistics are updated at least once per day." on the top right
corner the page.

It explains the differences between real-time query about the size and
the Admin Console Statistics.

On Oct 30, 6:58 pm, Pion  wrote:
> Interesting ...
>
> I have two kinds of entity.
>
> I tried the 2nd entity. It matches. Then, I tried the first entity
> again. Now they all match!  Maybe there was a lag on "The Admin
> Console -> Datastore -> Statistic"
>
> Thanks Yasuo.
>
> On Oct 30, 6:44 pm, Yasuo Higa  wrote:
>
> > Hi Pion,
>
> > > It still returns 6218 entities while The Admin Console -> Datastore ->
> > > Statistic shows 5029.
>
> > It is unusual.
> > I think the admin console uses Statistics API.
> > The Statistic data may be wrong or ...
>
> > Could you try an another sample?
>
> > Thanks,
>
> > Yasuo Higa
--~--~-~--~~~---~--~~
You received this message 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: Inequality operator is !=, but can we add <>

2009-10-31 Thread Dave Cheong

And

public void myMethod2() {
Query query = entityManager.createQuery("select o from Myclass
o where o.title = :p1 and o.myProperty <> :p2");
// bind params
   query.getResultList();
   // exception thrown unexpectedly also
}

On Nov 1, 3:32 am, Dave Cheong  wrote:
> The relevant code snippets are:
>
> In MyServiceImpl -
>
> @Repository
> @Transactional
> public MyServiceImpl ... {
>
>     protected EntityManager entityManager;
>
>     public void myMethod() {
>         Query query = entityManager.createQuery("select o from Myclass
> o where o.title = :p1 and o.myProperty != :p2");
>         // bind params
>        query.getResultList();
>        // exception thrown unexpectedly
>     }
>
>     @PersistenceContext
>     public void setEntityManager(EntityManager entityManager) {
>         this.entityManager = entityManager;
>     }
>
> }
>
> In applicationContext.xml -
>
>     
>     
> class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean"
>           p:persistenceUnitName="main"/>
>
>     
>      class="org.springframework.orm.jpa.JpaTransactionManager"
>           p:entityManagerFactory-ref="entityManagerFactory"/>
>
> In persistence.xml -
>
>     
>
> org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider< /
> provider>
>         
>              value="true"/>
>              value="true"/>
>              value="appengine"/>
>         
>     
>
> Any help you provide is appreciated.
>
> thanks,
> dave
>
> On Nov 1, 3:23 am, Dave Cheong  wrote:
>
>
>
> > What I'm saying is I'm using EMF and writing JPQL and "<>" is not
> > working, which it should since it is the valid operator for
> > inequality. Are you saying it works for you?
>
> > dave
>
> > On Nov 1, 12:27 am, datanucleus  wrote:
>
> > > > 1). I can't seem to get "!=" working either.
>
> > > I have no such problems with JDOQL, but then you're using it in GAE/J
> > > with an old version of DataNucleus.
>
> > > > 2) If I have mapped my objects using JPA annotations, will the query
> > > > engine default to JDOQL vs JPQL?
>
> > > The type of metadata specification ... JDO XML, JDO Annotations, JPA
> > > XML, JPA Annotations ... has nothing to do with the persistence API
> > > being used (in DataNucleus). If you create a PMF then you use JDO API,
> > > if you create an EMF then you use JPA API. JPA API only allows JPQL
> > > queries (you can't use JDOQL). JDO API allows JDOQL or JPQL queries,
> > > using the API to define what you're using; see the JDO javadocs.
--~--~-~--~~~---~--~~
You received this message 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: Inequality operator is !=, but can we add <>

2009-10-31 Thread Dave Cheong

The relevant code snippets are:

In MyServiceImpl -

@Repository
@Transactional
public MyServiceImpl ... {

protected EntityManager entityManager;

public void myMethod() {
Query query = entityManager.createQuery("select o from Myclass
o where o.title = :p1 and o.myProperty != :p2");
// bind params
   query.getResultList();
   // exception thrown unexpectedly
}

@PersistenceContext
public void setEntityManager(EntityManager entityManager) {
this.entityManager = entityManager;
}

}

In applicationContext.xml -







In persistence.xml -


 
org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider








Any help you provide is appreciated.

thanks,
dave


On Nov 1, 3:23 am, Dave Cheong  wrote:
> What I'm saying is I'm using EMF and writing JPQL and "<>" is not
> working, which it should since it is the valid operator for
> inequality. Are you saying it works for you?
>
> dave
>
> On Nov 1, 12:27 am, datanucleus  wrote:
>
>
>
> > > 1). I can't seem to get "!=" working either.
>
> > I have no such problems with JDOQL, but then you're using it in GAE/J
> > with an old version of DataNucleus.
>
> > > 2) If I have mapped my objects using JPA annotations, will the query
> > > engine default to JDOQL vs JPQL?
>
> > The type of metadata specification ... JDO XML, JDO Annotations, JPA
> > XML, JPA Annotations ... has nothing to do with the persistence API
> > being used (in DataNucleus). If you create a PMF then you use JDO API,
> > if you create an EMF then you use JPA API. JPA API only allows JPQL
> > queries (you can't use JDOQL). JDO API allows JDOQL or JPQL queries,
> > using the API to define what you're using; see the JDO javadocs.
--~--~-~--~~~---~--~~
You received this message 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] AccessControlException on DatastoreService.put() method

2009-10-31 Thread Pion

I got the AccessControlException on the following code snippet:

public void add(List iriList, List nameList,
List imageList) {
// deleted for brevity

 try {
 datastore.put(eList);   // The log 
below shows this line as at
com.col.server.MDsIri.add(MDsIri.java:74)
 } catch (IllegalArgumentException exIA) {
 
logger.severe("IllegalArgumentException when trying to
datastore.put. Exception message: " + exIA.getMessage());
 } catch (ConcurrentModificationException  
exCM) {
 
logger.severe("ConcurrentModificationException when trying to
datastore.put. Exception message: " + exCM.getMessage());
 } catch (Exception ex) {
 logger.severe("Exception when trying 
to datastore.put. Exception
message: " + ex.getMessage()); // the log (last line) below says that
the message is unknown
 }
}
// deleted for brevity
}

I follow the guideline that the eList has only 500 entities at most as
mentioned on 
http://code.google.com/appengine/docs/java/datastore/overview.html#Quotas_and_Limits.
Also, I don't call any thread or system threads as mentioned on
http://code.google.com/appengine/docs/java/runtime.html#The_Sandbox.

I did not get the error below on my Development Server.

I don't know how to interpret the error because the exception/error
message is Unknown(last line of the log).

I appreciate any help.

Log from the Google Apple Engine Admin Console -> Main -> Logs
10-31 09:06AM 07.119
com.google.appengine.repackaged.com.google.common.base.FinalizableReferenceQueue
$SystemLoader loadFinalizer: Not allowed to access system class
loader.
I 10-31 09:06AM 07.145
com.google.appengine.repackaged.com.google.common.base.internal.Finalizer
getInheritableThreadLocalsField: Couldn't access
Thread.inheritableThreadLocals. Reference finalizer threads will
inherit thread local values.
I 10-31 09:06AM 07.148
com.google.appengine.repackaged.com.google.common.base.FinalizableReferenceQueue
: Failed to start reference finalizer thread. Reference cleanup
will only occur when new references are created.
java.lang.reflect.InvocationTargetException
at com.google.appengine.runtime.Request.process-69e6389d93ef7f72
(Request.java)
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(Method.java:40)
at
com.google.appengine.repackaged.com.google.common.base.FinalizableReferenceQueue.
(FinalizableReferenceQueue.java:124)
at
com.google.appengine.repackaged.com.google.common.labs.misc.InterningPools
$WeakInterningPool.(InterningPools.java:104)
at
com.google.appengine.repackaged.com.google.common.labs.misc.InterningPools.newWeakInterningPool
(InterningPools.java:48)
at
com.google.appengine.repackaged.com.google.io.protocol.ProtocolSupport.
(ProtocolSupport.java:55)
at com.google.apphosting.api.DatastorePb$PutRequest.freeze
(DatastorePb.java:8452)
at com.google.apphosting.api.DatastorePb$PutRequest$1.
(DatastorePb.java:8367)
at com.google.apphosting.api.DatastorePb$PutRequest.
(DatastorePb.java:8364)
at com.google.appengine.api.datastore.DatastoreServiceImpl.put
(DatastoreServiceImpl.java:155)
at com.google.appengine.api.datastore.DatastoreServiceImpl.put
(DatastoreServiceImpl.java:147)
at com.col.server.MDsIri.add(MDsIri.java:74) // please see the code
snippet above
at com.col.server.tool.DsWriter.writeIri(DsWriter.java:73)
at com.col.server.CAdmin.doIriWriteIri(CAdmin.java:165)
at com.col.server.CAdmin.doGet(CAdmin.java:60)
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.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.servle

[appengine-java] Re: Inequality operator is !=, but can we add <>

2009-10-31 Thread Dave Cheong

What I'm saying is I'm using EMF and writing JPQL and "<>" is not
working, which it should since it is the valid operator for
inequality. Are you saying it works for you?

dave

On Nov 1, 12:27 am, datanucleus  wrote:
> > 1). I can't seem to get "!=" working either.
>
> I have no such problems with JDOQL, but then you're using it in GAE/J
> with an old version of DataNucleus.
>
> > 2) If I have mapped my objects using JPA annotations, will the query
> > engine default to JDOQL vs JPQL?
>
> The type of metadata specification ... JDO XML, JDO Annotations, JPA
> XML, JPA Annotations ... has nothing to do with the persistence API
> being used (in DataNucleus). If you create a PMF then you use JDO API,
> if you create an EMF then you use JPA API. JPA API only allows JPQL
> queries (you can't use JDOQL). JDO API allows JDOQL or JPQL queries,
> using the API to define what you're using; see the JDO javadocs.
--~--~-~--~~~---~--~~
You received this message 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 Google App Engine support Apache Mina?

2009-10-31 Thread asianCoolz

anyone tried out apache mina with GAE?  any update
--~--~-~--~~~---~--~~
You received this message 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] struts 2.1.8 met AccessControlException with app engine's local server

2009-10-31 Thread zhiw...@gmail.com

when i use struts 2.1.8 and app engine sdk 1.2.6(1.2.5 also the
same)  ,   when web app start, it throw the exception

java.security.AccessControlException: access denied
(java.io.FilePermission jar:file:\F:\mysrc\Guestbook\build\web\WEB-INF
\lib\struts2-core-2.1.8.1.jar read)
at java.security.AccessControlContext.checkPermission
(AccessControlContext.java:323)
at java.security.AccessController.checkPermission
(AccessController.java:546)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:
532)
at com.google.appengine.tools.development.DevAppServerFactory
$CustomSecurityManager.checkPermission(DevAppServerFactory.java:139)
at java.lang.SecurityManager.checkRead(SecurityManager.java:871)
at java.util.zip.ZipFile.(ZipFile.java:109)
at java.util.jar.JarFile.(JarFile.java:133)
at java.util.jar.JarFile.(JarFile.java:70)  ..

the exception happend  in local server  .  but  when i update my app
to app engine server.  it runs well  .

struts 2.1.6 didn't appear this,   but version 2.1.8 fixed some things
that make struts-convention-plugin can work on app engine and also
have offical json plugin.  so i have to  use v 2.1.8.

i have read the   'Will it play in App Engine ' ,it does not have
a solution.
 how can make struts 2.1.8 work well on local server? thanks  in
advance!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: Inequality operator is !=, but can we add <>

2009-10-31 Thread datanucleus

> 1). I can't seem to get "!=" working either.

I have no such problems with JDOQL, but then you're using it in GAE/J
with an old version of DataNucleus.


> 2) If I have mapped my objects using JPA annotations, will the query
> engine default to JDOQL vs JPQL?

The type of metadata specification ... JDO XML, JDO Annotations, JPA
XML, JPA Annotations ... has nothing to do with the persistence API
being used (in DataNucleus). If you create a PMF then you use JDO API,
if you create an EMF then you use JPA API. JPA API only allows JPQL
queries (you can't use JDOQL). JDO API allows JDOQL or JPQL queries,
using the API to define what you're using; see the JDO javadocs.
--~--~-~--~~~---~--~~
You received this message 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: Inequality operator is !=, but can we add <>

2009-10-31 Thread Dave Cheong

Just to clarify, I'm using Spring to load up my persistence layer, and
my persistence.xml is


 
org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider







which means it is DataNucleus that is providing my
EntityManagerFactory and hence EntityManager, so any JPA Queries that
get created from this should default to JPQL syntax. No?

thanks,
dave

On Oct 31, 11:56 pm, Dave Cheong  wrote:
> Thanks for the prompt reply. Couple of quick questions to follow up:
>
> 1) I can't seem to get "!=" working either. Getting a -
>
> org.datanucleus.store.query.QueryCompilerSyntaxException: Portion of
> expression could not be parsed: != :p_1
>
> for query
>
> SELECT o
> FROM MyClass o
> WHERE o.title = :p_0
> AND o.myProperty != :p_1
>
> 2) If I have mapped my objects using JPA annotations, will the query
> engine default to JDOQL vs JPQL? I'm currently using the JPQ
> EntityManager to create by Query ala:
>
> Query query = entityManager.createQuery(queryString)
> // bind parameters
>
> Shouldn't that automatically make my Queries compile to JPQL?
>
> Also, if using EntityManager, I won't be able to go:
>
> pm.newQuery("javax.jdo.query.JPQL", "SELECT p FROM Person p WHERE
> p.lastName = 'Jones'");
>
> ... as your link above suggests.
>
> Am I on the wrong track here? Please help.
>
> Thanks,
> dave
>
> On Oct 31, 11:30 pm, datanucleus  wrote:
>
>
>
> > > If you want to use JPQL, or SQL
>
> > Except that GAE/J won't support SQL, but does support JPQL
--~--~-~--~~~---~--~~
You received this message 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: Inequality operator is !=, but can we add <>

2009-10-31 Thread Dave Cheong

Thanks for the prompt reply. Couple of quick questions to follow up:

1) I can't seem to get "!=" working either. Getting a -

org.datanucleus.store.query.QueryCompilerSyntaxException: Portion of
expression could not be parsed: != :p_1

for query

SELECT o
FROM MyClass o
WHERE o.title = :p_0
AND o.myProperty != :p_1

2) If I have mapped my objects using JPA annotations, will the query
engine default to JDOQL vs JPQL? I'm currently using the JPQ
EntityManager to create by Query ala:

Query query = entityManager.createQuery(queryString)
// bind parameters

Shouldn't that automatically make my Queries compile to JPQL?

Also, if using EntityManager, I won't be able to go:

pm.newQuery("javax.jdo.query.JPQL", "SELECT p FROM Person p WHERE
p.lastName = 'Jones'");

... as your link above suggests.


Am I on the wrong track here? Please help.

Thanks,
dave


On Oct 31, 11:30 pm, datanucleus  wrote:
> > If you want to use JPQL, or SQL
>
> Except that GAE/J won't support SQL, but does support JPQL
--~--~-~--~~~---~--~~
You received this message 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: Inequality operator is !=, but can we add <>

2009-10-31 Thread datanucleus

> If you want to use JPQL, or SQL

Except that GAE/J won't support SQL, but does support JPQL
--~--~-~--~~~---~--~~
You received this message 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: Inequality operator is !=, but can we add <>

2009-10-31 Thread datanucleus

> Is there any remote possibility of adding "<>" as the inequality
> operator too? The behaviour can be exactly the same.

JDOQL is defined by a spec, to follow Java syntax, hence "!=".
Consequently NO DataNucleus will not be supporting invalid JDOQL
syntax.

If you want to use JPQL, or SQL **with the JDO API** then you can do
so, as defined in the DataNucleus docs.
http://www.datanucleus.org/products/accessplatform/jdo/api.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] Inequality operator is !=, but can we add <>

2009-10-31 Thread Dave Cheong

Hi all,

In JPA and SQL, the inequality operator is "<>", but I believe in JDO
it is "!=". AppEngine supports "!=" but does not support "<>".

Is there any remote possibility of adding "<>" as the inequality
operator too? The behaviour can be exactly the same.

thanks,
dave
--~--~-~--~~~---~--~~
You received this message 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: datanucleus.DetachAllOnCommit?

2009-10-31 Thread datanucleus

So ask the question (of Google) why is "StreamingQueryResult".size
trying to find the next result when the PM (and ObjectManager) has
already been closed (by Spring). When a "query result" (of which
StreamingQueryResult is one example) is handed to the user it should
have registered a callback to be informed when an owning PM is being
closed, and so to have the opportunity to read in all results when
that happens, so that it doesn't need to subsequently. Nothing to do
with detachAllOnCommit.
--~--~-~--~~~---~--~~
You received this message 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: JDO/JPA Snippets That Work - Executing Keys-Only Queries

2009-10-31 Thread Rusty Wright

Maybe he forgot to precede it with the usual "if 
(em.getTransaction().isActive())"?


David Fuelling wrote:
> Hi Max,
> 
> I asked this question in the comments of your blog post, but I'll post
> it here as well for the "group" folks:
> 
> Why is the transaction rolled-back at the end of the each
> keysOfBooksPublishedBetween() function call?  Also, it is necessary to
> wrap the "get by key" query in a transaction, and if so why is that?
> 
> Thanks!
> 
> David
> 
> On Oct 6, 6:00 pm, Max Ross  wrote:
>> Welcome to Episode 4 of JDO/JPA Snippets That Work.  Today we're going to
>> look at keys-only queries.
>>
>> Keys Only Queries
>>
>> If you use the low-level datastore api you may have noticed that the
>> com.google.appengine.api.datastore.Query class has a setKeysOnly() method.
>> If you call this method before you execute the query the datastore will
>> return com.google.appengine.api.datastore.Entity instances that have their
>> keys filled in but none of their properties.  This can reduce consumption of
>> your Datastore Data Received from API quota, especially if you've got some
>> large entities, but, more importantly, it can also reduce consumption of
>> your Datastore CPU Time quota.  How?  Well, if the fulfillment of your query
>> requires an index or a merge join your query actually executes in two
>> stages:  First it scans the index to find the keys of the entities that
>> match and then it issues additional scans to retrieve the entities uniquely
>> identified by the matching keys.  If your query is keys-only we can skip
>> that second step entirely.  That means faster queries!
>>
>> Now, JPA and JDO don't know anything about keys-only queries, but they do
>> give you the flexibility to either return your entire object or some subset
>> of the fields on your object.  If you construct this subset to only contain
>> the primary key of your object, the App Engine implementation of JPA and JDO
>> will use a keys-only query.  Let's look at some examples:
>>
>> JPA:
>> @Entity
>> public class Book {
>> @Id
>> @GeneratedValue(strategy=GenerationType.IDENTITY)
>> private Key id;
>>
>> private Date dateOfPublication;
>>
>> // getters and setters
>>
>> }
>>
>> Now let's implement a method that returns the Keys of all Books published
>> betweeen 2 years (we'll assume someone else is creating and closing an
>> EntityManager named 'em' for us):
>>
>> public List keysOfBooksPublishedBetween(EntityManager em, Date from,
>> Date to) {
>> em.getTransaction().begin();
>> try {
>> Query q = em.createQuery("select id from " + Book.class.getName()
>> + " where dateOfPublication >= :from AND dateOfPublication <=
>> :to");
>> q.setParameter("from", from);
>> q.setParameter("to", to);
>> return (List) q.getResultList();
>> } finally {
>> em.getTransaction().rollback();
>> }
>>
>> }
>>
>> JDO:
>>
>> @PersistenceCapable(identityType = IdentityType.APPLICATION, detachable =
>> "true")
>> public class Book {
>>
>> @PrimaryKey
>> @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
>> private Key id;
>>
>> private Date dateOfPublication;
>>
>> // getters and setters
>>
>> }
>>
>> Now let's implement a method that returns the Keys of all Books published
>> betweeen 2 years (we'll assume someone else is creating and closing a
>> PersistenceManager named 'pm' for us):
>>
>> public List keysOfBooksPublishedBetween(PersistenceManager pm, Date
>> from, Date to) {
>> pm.currentTransaction().begin();
>> try {
>> Query q = pm.newQuery("select id from " + Book.class.getName()
>> + " where dateOfPublication >= :from && dateOfPublication <=
>> :to");
>> return (List) q.execute(from, to);
>> } finally {
>> pm.currentTransaction().rollback();
>> }}
>>
>> 
>> Notice how we are only selecting the 'id' field from our Book class.  This
>> is crucial.  If you select any other fields your query will end up fetching
>> entire entities and the optimization will be lost.
>>
>> Max
> > 

--~--~-~--~~~---~--~~
You received this message 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] datanucleus.DetachAllOnCommit?

2009-10-31 Thread Rusty Wright

I'm setting datanucleus.DetachAllOnCommit in my jdoconfig.xml file.  Why am I 
getting "Object Manager has been closed" when I do a query that finds all 
entities of a specific class?  Is it because I'm not using a transaction?  
Previously, before I added datanucleus.DetachAllOnCommit, my dao was doing a 
"return (getPersistenceManager().detachCopy(result));" for all find (read-only) 
queries and didn't get any errors.

=

http://java.sun.com/xml/ns/jdo/jdoconfig";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:noNamespaceSchemaLocation="http://java.sun.com/xml/ns/jdo/jdoconfig";>







=
//dao class, extends org.springframework.orm.jdo.support.JdoDaoSupport

public List findAll() {
final Query query = newQuery();

@SuppressWarnings("unchecked")
final List results = (List) (query.execute());

return (results);
}

private Query newQuery() {
return (getPersistenceManager().newQuery(this.entityClass));
}

=

@Before
public void insertUser() throws Exception {
final int entityCountBefore = this.testUtils.entityCounter(User.class);

Assert.assertEquals("entityCount was not 0", 0, entityCountBefore);

final User user1 = new User(this.userName, Long.valueOf(999L));

this.persistedUser1 = this.userDao.makePersistent(user1);

this.log.debug("user1: {}, persistedUser1: {}", user1, 
this.persistedUser1);

final User user2 = new User(this.userName + "-2", Long.valueOf(999L));

this.persistedUser2 = this.userDao.makePersistent(user2);

final int entityCountAfter = this.testUtils.entityCounter(User.class);

this.log.debug("entityCountAfter: {}", 
Integer.valueOf(entityCountAfter));

Assert.assertEquals("entityCount was not 2", 2, entityCountAfter);
}

@Test
public void findAll() {
final Collection results = this.userDao.findAll();

Assert.assertNotNull("results should not be null", results);

// blows up on this statement, line 138
Assert.assertTrue("results should not be empty", !results.isEmpty());

Assert.assertTrue("results should have 2 entries", results.size() == 2);

final User result = results.iterator().next();

this.log.debug("result: {}", result);
}

=

org.datanucleus.exceptions.NucleusUserException: Object Manager has been closed
at 
org.datanucleus.ObjectManagerImpl.assertIsOpen(ObjectManagerImpl.java:3876)
at 
org.datanucleus.ObjectManagerImpl.getFetchPlan(ObjectManagerImpl.java:376)
at org.datanucleus.store.query.Query.getFetchPlan(Query.java:497)
at 
org.datanucleus.store.appengine.query.DatastoreQuery$5.apply(DatastoreQuery.java:508)
at 
org.datanucleus.store.appengine.query.DatastoreQuery$5.apply(DatastoreQuery.java:507)
at 
org.datanucleus.store.appengine.query.StreamingQueryResult.resolveNext(StreamingQueryResult.java:137)
at 
org.datanucleus.store.appengine.query.StreamingQueryResult.size(StreamingQueryResult.java:174)
at 
org.datanucleus.store.query.AbstractQueryResult.isEmpty(AbstractQueryResult.java:312)
at 
com.objecteffects.waitlist.db.impl.dao.jdo.UserDaoTest.findAll(UserDaoTest.java:138)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at 
org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at 
org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82)
at 
org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
at 
org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:240)
at 
org.junit.runners.BlockJUnit4ClassRunner.ru