[appengine-java] Different Sleeping time on different app engine applications

2010-01-08 Thread Miroslav Genov

Hello,

Currently I have same code deployed on two instances on the app engine. 
The issue that I'm encountering is that the first instance is forced to 
sleep after 30-40 seconds in time, whether the second instance is not 
sleeping. The strange thing is that both of them are using same version 
of my code. Any idea what is difference ?




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




[appengine-java] memcache and session on GAE

2010-01-08 Thread nicanor.babula
Hi everyone.

How memcache works on GAE? Let me explain:
Do I get one memcache instance per app instance or there is one
memcache instance for all instastances of my app?
My app uses google accounts to handle users. I am thinking that it
might be faster reading the current user data from the memcache
instead of calling userService.getCurrentUser(). It would be a good
approach?

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




Re: [appengine-java] memcache and session on GAE

2010-01-08 Thread Prashant Gupta
2010/1/8 nicanor.babula nicanor.bab...@gmail.com

 Hi everyone.

 How memcache works on GAE? Let me explain:
 Do I get one memcache instance per app instance or there is one
 memcache instance for all instastances of my app?

one instance for all app instances.

 My app uses google accounts to handle users. I am thinking that it
 might be faster reading the current user data from the memcache
 instead of calling userService.getCurrentUser(). It would be a good
 approach?

no! memcache data is not persistent, your memcache data could be removed any
time for any reason, like limited memory, cache age, etc. I suggest you to
go through docs.





Thanks,
 Cristian.

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




-- 

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

To post to this group, send email to google-appengine-j...@googlegroups.com.

To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] memcache and session on GAE

2010-01-08 Thread Nicanor Cristian

On 01/08/2010 10:58 AM, Prashant Gupta wrote:



2010/1/8 nicanor.babula nicanor.bab...@gmail.com 
mailto:nicanor.bab...@gmail.com


Hi everyone.

How memcache works on GAE? Let me explain:
Do I get one memcache instance per app instance or there is one
memcache instance for all instastances of my app?

one instance for all app instances.

so if one app instance does:
memcacheService.put(loggedUser, userData1);

and later another app instance does:
(UserData) memcacheService.get(loggedUser);
The latter instance will get the same data that the first instance put?


My app uses google accounts to handle users. I am thinking that it
might be faster reading the current user data from the memcache
instead of calling userService.getCurrentUser(). It would be a good
approach?

no! memcache data is not persistent, your memcache data could be 
removed any time for any reason, like limited memory, cache age, etc. 
I suggest you to go through docs.

I don't want to use it for persistence. I use the datastore for persistence.
Once a user logs in I want to write to the memcache the logged user data 
in order to read it later (during one login session).


Thanks,
Cristian.

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






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


-- 

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

To post to this group, send email to google-appengine-j...@googlegroups.com.

To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Unable to run on local server after an upgrade to 1.2.8

2010-01-08 Thread Ice13ill
i have the same error:

Initializing AppEngine server
The server is running at http://localhost:/
Jan 8, 2010 11:37:15 AM com.google.apphosting.utils.jetty.JettyLogger
warn
WARNING: EXCEPTION
java.lang.NullPointerException
at java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:
881)
at
com.google.appengine.tools.development.LocalHttpRequestEnvironment.init
(LocalHttpRequestEnvironment.java:45)
at com.google.appengine.tools.development.JettyContainerService
$ApiProxyHandler.handle(JettyContainerService.java:348)
at org.mortbay.jetty.handler.HandlerWrapper.handle
(HandlerWrapper.java:139)
...

I just installed gwt 2.0 and gae 1.3.0. i created a project and hit
Run (like shown in the Get started guide)
I cannot run the application (i'm using mozzila firefox i nubuntu
9.04)

Can anyone help ?


On Dec 11 2009, 10:42 pm, Ikai L (Google) ika...@google.com wrote:
 Are you seeing this error on a new project? Can you provide steps to
 reproduce?

 2009/12/10 Viðar Svansson vidarsv...@gmail.com



  This seems to only happen if you are logged in.

  On Thu, Dec 10, 2009 at 12:58 PM, pjesi vidarsv...@gmail.com wrote:
   Hi

   I am getting a strange error after upgrading to 1.2.8:

   10.12.2009 12:54:47 com.google.apphosting.utils.jetty.JettyLogger warn
   WARNING: EXCEPTION
   java.lang.NullPointerException
          at java.util.concurrent.ConcurrentHashMap.put(Unknown Source)
          at
   com.google.appengine.tools.development.LocalHttpRequestEnvironment.init
   (LocalHttpRequestEnvironment.java:45)
          at com.google.appengine.tools.development.JettyContainerService
   $ApiProxyHandler.handle(JettyContainerService.java:348)
          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 org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
          at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:
   211)
          at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:
   381)
          at org.mortbay.io.nio.SelectChannelEndPoint.run
   (SelectChannelEndPoint.java:396)
          at org.mortbay.thread.BoundedThreadPool$PoolThread.run
   (BoundedThreadPool.java:442)
   10.12.2009 12:54:47 com.google.apphosting.utils.jetty.JettyLogger warn

   This results in a blank page when I visithttp://localhost:8080/

   Any idead?

   Viðar

  --

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

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




Re: [appengine-java] memcache and session on GAE

2010-01-08 Thread Prashant Gupta
2010/1/8 Nicanor Cristian nicanor.bab...@gmail.com

  On 01/08/2010 10:58 AM, Prashant Gupta wrote:



 2010/1/8 nicanor.babula nicanor.bab...@gmail.com

 Hi everyone.

 How memcache works on GAE? Let me explain:
 Do I get one memcache instance per app instance or there is one
 memcache instance for all instastances of my app?

 one instance for all app instances.

 so if one app instance does:
 memcacheService.put(loggedUser, userData1);

 and later another app instance does:
 (UserData) memcacheService.get(loggedUser);
 The latter instance will get the same data that the first instance put?

yeah.


  My app uses google accounts to handle users. I am thinking that it
 might be faster reading the current user data from the memcache
 instead of calling userService.getCurrentUser(). It would be a good
 approach?

 no! memcache data is not persistent, your memcache data could be removed
 any time for any reason, like limited memory, cache age, etc. I suggest you
 to go through docs.

 I don't want to use it for persistence. I use the datastore for
 persistence.
 Once a user logs in I want to write to the memcache the logged user data in
 order to read it later (during one login session).

yes you can do this but memcache doesn't guarantee to keep the data for you
when you come back to see it. so, you must use a persistent storage i.e.
datasore,  to make sure that you will get your data back next time. what you
can do is to save your data to datastore and memcache both, next time if you
do not find your data in memcache you can get it from datastore and save it
to memcache again for next time !





 Thanks,
 Cristian.

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






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



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


-- 

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

To post to this group, send email to google-appengine-j...@googlegroups.com.

To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] memcache and session on GAE

2010-01-08 Thread Prashant Gupta
here is a small example :


@PersistenceCapable
public class Property implements Serializable{
 @PrimaryKey
@Persistent
private String Key;
 @Persistent(serialized = true, defaultFetchGroup = true)
private Object Value;
 @Persistent
private Long Expiry;

private Property(String key, Object value, long expirationDeltaMillis){
this.Key = key;
this.Value = value;
if(expirationDeltaMillis  0)
this.Expiry = new Date().getTime() + expirationDeltaMillis;
}
 public static T T get(String key) {
Property property = WCMSHelper.getObjectById(Property.class, key);
if (property != null
 (property.Expiry == null || property.Expiry = new Date().getTime()))
return (T) property.Value;
else
return null;
}

public static void put(String key, Object value) {
Property.put(key, value, -1);
}
 public static void put(String key, Object value,
long expirationDeltaMillis) {
Property property = new Property(key, value, expirationDeltaMillis);
*pmf*.makePersistent(property);
*cache*.put(property.Key, property);
}

}




2010/1/8 Prashant Gupta nextprash...@gmail.com



 2010/1/8 Nicanor Cristian nicanor.bab...@gmail.com

  On 01/08/2010 10:58 AM, Prashant Gupta wrote:



 2010/1/8 nicanor.babula nicanor.bab...@gmail.com

 Hi everyone.

 How memcache works on GAE? Let me explain:
 Do I get one memcache instance per app instance or there is one
 memcache instance for all instastances of my app?

 one instance for all app instances.

 so if one app instance does:
 memcacheService.put(loggedUser, userData1);

 and later another app instance does:
 (UserData) memcacheService.get(loggedUser);
 The latter instance will get the same data that the first instance put?

 yeah.


  My app uses google accounts to handle users. I am thinking that it
 might be faster reading the current user data from the memcache
 instead of calling userService.getCurrentUser(). It would be a good
 approach?

 no! memcache data is not persistent, your memcache data could be removed
 any time for any reason, like limited memory, cache age, etc. I suggest you
 to go through docs.

 I don't want to use it for persistence. I use the datastore for
 persistence.
 Once a user logs in I want to write to the memcache the logged user data
 in order to read it later (during one login session).

 yes you can do this but memcache doesn't guarantee to keep the data for you
 when you come back to see it. so, you must use a persistent storage i.e.
 datasore,  to make sure that you will get your data back next time. what you
 can do is to save your data to datastore and memcache both, next time if you
 do not find your data in memcache you can get it from datastore and save it
 to memcache again for next time !





 Thanks,
 Cristian.

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






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



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



-- 

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

To post to this group, send email to google-appengine-j...@googlegroups.com.

To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Unable to update

2010-01-08 Thread sree
i am using appengine-java-sdk-1.3.0.
when i deploy the application, i am getting the following exception

Creating staging directory
Scanning for jsp files.
Compiling jsp files.
Compiling java files.
Scanning files on local disk.
Scanned 250 files.
Initiating update.
java.net.SocketException: No buffer space available (maximum
connections reached?): connect

Debugging information may be found in C:\Documents and Settings\.
\Local Settings\Temp\appengine-deploy4954.log

Unable to update:
java.net.SocketException: No buffer space available (maximum
connections reached?): connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.init(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient
(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown
Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown
Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream
(Unknown Source)
at com.google.appengine.tools.admin.ServerConnection.connect
(ServerConnection.java:333)
at com.google.appengine.tools.admin.ServerConnection.send
(ServerConnection.java:127)
at com.google.appengine.tools.admin.ServerConnection.post
(ServerConnection.java:81)
at com.google.appengine.tools.admin.AppVersionUpload.send
(AppVersionUpload.java:522)
at com.google.appengine.tools.admin.AppVersionUpload.beginTransaction
(AppVersionUpload.java:339)
at com.google.appengine.tools.admin.AppVersionUpload.doUpload
(AppVersionUpload.java:111)
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)

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




[appengine-java] Error creating EntityManagerFactory bean occasionally

2010-01-08 Thread Wong
Having problem in creating EntityManagerFactory bean occasionally on
the production server.

There is only one entityManagerFactory bean defined in my setup.

bean id=entityManagerFactory
class=org.springframework.orm.jpa.LocalEntityManagerFactoryBean
property name=persistenceUnitName value=transactions-
optional /
/bean

I have a cron to ping a URL every 3 minutes which just print out a
short text to solve the issue of slowness on first time access after
idle for a period of times.

As per the exception message:
Application code attempted to create a EntityManagerFactory named
transactions-optional, but one with this name already exists!
Instances of EntityManagerFactory are extremely slow to create and it
is usually not necessary to create one with a given name more than
once.  Instead, create a singleton and share it throughout your code.
If you really do need to create a duplicate EntityManagerFactory (such
as for a unittest suite), set the
appengine.orm.disable.duplicate.emf.exception system property to avoid
this error.

Any idea what is the cause? How to create a singleton for
EntityManagerFactory? I am using Spring MVC 3.0

Below is the full stack trace:

Nested in org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'personService': Injection of
persistence methods failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'entityManagerFactory' defined in URL [file:/
base/data/home/apps/mobisociety/1.339019164908347042/WEB-INF/guestbook-
infrastructure.xml]: Invocation of init method failed; nested
exception is javax.persistence.PersistenceException: Provider error.
Provider:
org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider:
java.lang.IllegalStateException: Application code attempted to create
a EntityManagerFactory named transactions-optional, but one with this
name already exists!  Instances of EntityManagerFactory are extremely
slow to create and it is usually not necessary to create one with a
given name more than once.  Instead, create a singleton and share it
throughout your code.  If you really do need to create a duplicate
EntityManagerFactory (such as for a unittest suite), set the
appengine.orm.disable.duplicate.emf.exception system property to avoid
this error.
at
org.datanucleus.store.appengine.jpa.DatastoreEntityManagerFactory.checkForRepeatedAllocation
(DatastoreEntityManagerFactory.java:136)
at
org.datanucleus.store.appengine.jpa.DatastoreEntityManagerFactory.init
(DatastoreEntityManagerFactory.java:64)
at
org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider.createEntityManagerFactory
(DatastorePersistenceProvider.java:35)
at javax.persistence.Persistence.createFactory(Persistence.java:172)
at javax.persistence.Persistence.createEntityManagerFactory
(Persistence.java:112)
at
org.springframework.orm.jpa.LocalEntityManagerFactoryBean.createNativeEntityManagerFactory
(LocalEntityManagerFactoryBean.java:92)
at
org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet
(AbstractEntityManagerFactoryBean.java:288)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
$5.run(AbstractAutowireCapableBeanFactory.java:1445)
at java.security.AccessController.doPrivileged(Native Method)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods
(AbstractAutowireCapableBeanFactory.java:1443)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean
(AbstractAutowireCapableBeanFactory.java:1392)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean
(AbstractAutowireCapableBeanFactory.java:512)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean
(AbstractAutowireCapableBeanFactory.java:450)
at org.springframework.beans.factory.support.AbstractBeanFactory
$1.getObject(AbstractBeanFactory.java:289)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton
(DefaultSingletonBeanRegistry.java:222)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean
(AbstractBeanFactory.java:286)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:188)
at
org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findDefaultEntityManagerFactory
(PersistenceAnnotationBeanPostProcessor.java:506)
at
org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findEntityManagerFactory
(PersistenceAnnotationBeanPostProcessor.java:472)
at
org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor
$PersistenceElement.resolveEntityManager
(PersistenceAnnotationBeanPostProcessor.java:597)
at

[appengine-java] Re: Error creating EntityManagerFactory bean occasionally

2010-01-08 Thread Wong

I suspect the cause of the problem is the ping cron every 3 minutes. I
also get the following warning:

This request used a high amount of CPU, and was roughly 1.2 times
over the average request CPU limit. High CPU requests have a small
quota, and if you exceed this quota, your app will be temporarily
disabled.

The ping cron is very simple task. It accesses an URL which output a
short text


Full stack trace:
#

0.1.0.1 - - [08/Jan/2010:07:22:05 -0800] GET /ping HTTP/1.1 200 45 -
- mobisociety.appspot.com

#
I 01-08 07:21AM 43.585

javax.servlet.ServletContext log: Initializing Spring root
WebApplicationContext

#
W 01-08 07:21AM 47.796

org.springframework.security.config.method.GlobalMethodSecurityBeanDefinitionParser
parse: Expressions were enabled for method security but no
SecurityExpressionHandler was configured. All hasPermision()
expressions will evaluate to false.

#
I 01-08 07:22AM 03.596

javax.servlet.ServletContext log:
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter INFO: loaded (conf
ok)

#
I 01-08 07:22AM 03.689

javax.servlet.ServletContext log: Initializing Spring FrameworkServlet
'dispatcher'

#
E 01-08 07:22AM 05.397

org.apache.jasper.runtime.JspFactoryImpl internalGetPageContext:
Exception initializing page context
java.lang.ExceptionInInitializerError
at com.google.appengine.api.memcache.MemcacheServicePb
$MemcacheSetResponse.clinit(MemcacheServicePb.java:2649)
at com.google.appengine.api.memcache.MemcacheServiceImpl.put
(MemcacheServiceImpl.java:315)
at com.google.appengine.api.memcache.MemcacheServiceImpl.put
(MemcacheServiceImpl.java:376)
at com.google.apphosting.runtime.jetty.SessionManager.createSession
(SessionManager.java:334)
at com.google.apphosting.runtime.jetty.SessionManager
$AppEngineSession.init(SessionManager.java:135)
at com.google.apphosting.runtime.jetty.SessionManager.newSession
(SessionManager.java:265)
at com.google.apphosting.runtime.jetty.SessionManager.newSession
(SessionManager.java:50)
at org.mortbay.jetty.servlet.AbstractSessionManager.newHttpSession
(AbstractSessionManager.java:413)
at org.mortbay.jetty.Request.getSession(Request.java:1005)
at org.mortbay.jetty.Request.getSession(Request.java:977)
at org.apache.jasper.runtime.PageContextImpl._initialize
(PageContextImpl.java:147)
at org.apache.jasper.runtime.PageContextImpl.initialize
(PageContextImpl.java:122)
at org.apache.jasper.runtime.JspFactoryImpl.internalGetPageContext
(JspFactoryImpl.java:104)
at org.apache.jasper.runtime.JspFactoryImpl.access$000
(JspFactoryImpl.java:37)
at org.apache.jasper.runtime.JspFactoryImpl
$PrivilegedGetPageContext.run(JspFactoryImpl.java:151)
at
com.google.apphosting.runtime.security.shared.intercept.java.security.AccessController_.doPrivileged
(AccessController_.java:34)
at org.apache.jasper.runtime.JspFactoryImpl.getPageContext
(JspFactoryImpl.java:59)
at org.apache.jsp.ping_jsp._jspService(ping_jsp.java:33)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
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.handle
(ServletHandler.java:362)
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 org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:268)
at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:126)
at org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite
(NormalRewrittenUrl.java:195)
at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite
(RuleChain.java:159)
at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:
141)
at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest
(UrlRewriter.java:90)
at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter
(UrlRewriteFilter.java:417)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1084)
at
org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal
(OpenEntityManagerInViewFilter.java:113)
at org.springframework.web.filter.OncePerRequestFilter.doFilter
(OncePerRequestFilter.java:76)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1084)
at org.springframework.security.web.FilterChainProxy.doFilter
(FilterChainProxy.java:144)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate
(DelegatingFilterProxy.java:237)
at 

[appengine-java] Re: Unable to run on local server after an upgrade to 1.2.8

2010-01-08 Thread Ice13ill
is there a problem if i have the  java 1.6.0_14 installed? do i need a
new one ?

On Jan 8, 1:37 pm, Ice13ill andrei.fifi...@gmail.com wrote:
 i have the same error:

 Initializing AppEngine server
 The server is running athttp://localhost:/
 Jan 8, 2010 11:37:15 AM com.google.apphosting.utils.jetty.JettyLogger
 warn
 WARNING: EXCEPTION
 java.lang.NullPointerException
         at java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:
 881)
         at
 com.google.appengine.tools.development.LocalHttpRequestEnvironment.init
 (LocalHttpRequestEnvironment.java:45)
         at com.google.appengine.tools.development.JettyContainerService
 $ApiProxyHandler.handle(JettyContainerService.java:348)
         at org.mortbay.jetty.handler.HandlerWrapper.handle
 (HandlerWrapper.java:139)
         ...

 I just installed gwt 2.0 and gae 1.3.0. i created a project and hit
 Run (like shown in the Get started guide)
 I cannot run the application (i'm using mozzila firefox i nubuntu
 9.04)

 Can anyone help ?

 On Dec 11 2009, 10:42 pm, Ikai L (Google) ika...@google.com wrote:

  Are you seeing this error on a new project? Can you provide steps to
  reproduce?

  2009/12/10 Viðar Svansson vidarsv...@gmail.com

   This seems to only happen if you are logged in.

   On Thu, Dec 10, 2009 at 12:58 PM, pjesi vidarsv...@gmail.com wrote:
Hi

I am getting a strange error after upgrading to 1.2.8:

10.12.2009 12:54:47 com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: EXCEPTION
java.lang.NullPointerException
       at java.util.concurrent.ConcurrentHashMap.put(Unknown Source)
       at
com.google.appengine.tools.development.LocalHttpRequestEnvironment.init
(LocalHttpRequestEnvironment.java:45)
       at com.google.appengine.tools.development.JettyContainerService
$ApiProxyHandler.handle(JettyContainerService.java:348)
       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 org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
       at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:
211)
       at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:
381)
       at org.mortbay.io.nio.SelectChannelEndPoint.run
(SelectChannelEndPoint.java:396)
       at org.mortbay.thread.BoundedThreadPool$PoolThread.run
(BoundedThreadPool.java:442)
10.12.2009 12:54:47 com.google.apphosting.utils.jetty.JettyLogger warn

This results in a blank page when I visithttp://localhost:8080/

Any idead?

Viðar

   --

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

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




[appengine-java] Re: Purge _ah_SESSION ???

2010-01-08 Thread Jorge
I found another issue with the /_ah/sessioncleanup servlet. On almost
every run, a huge amount of cpu usage is reported!

Example:
01-08 07:40AM 53.487 /_ah/sessioncleanup?clear 200 12275ms 7365cpu_ms
3845api_cpu_ms 0kb

Jorge Gonzalez

On Jan 7, 8:15 pm, Jorge athenas...@gmail.com wrote:
 The /_ah/sessioncleanup servlet works ok, but it cleans only 100
 expired sessions at a time, so one needs to run it often enough to
 avoid expired sessions to accumulate and no so often that it won't
 have too few sessions to purge.

 Kind of complicated!!

 Someone knows of a better solution?

 Jorge Gonzalez

 On Jan 7, 4:13 am, m seleron seler...@gmail.com wrote:

  Hi,

  I am sorry for not understanding easily.

  I retrieved this Group

  Is this thread 
  usefulhttp://groups.google.com/group/google-appengine-java/browse_thread/th...

  You may find more useful information .
  Please look for it.

  Thanks.

   Where should I look for this sessionCleanupServlet?

   On Jan 7, 6:01 am, m seleron seler...@gmail.com wrote:

Hi,

Though it is likely already to have tried.
You might solve the problem by examining sessionCleanupServlet.

thanks.

On 1月7日, 午後1:18, Jorge athenas...@gmail.com wrote:

 Is there a way to delete old _ah_SESSION entities? I found a post
 about deleting all sessions, both from the datastore and from
 memcache, but I am looking a clean  way to delete past sessions and
 preserve the active ones.

 Thanks,

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




[appengine-java] how to get session id under a Class which doesn't extend HttpServlet?

2010-01-08 Thread Prashant Gupta
Hi,

I am trying to implement my own user management system, for that I need some
way to make session id available to all classes independent of whether it
extends HttpServlet or not. I know there is some way to do that but I am not
able to find it. Any kind of help would be appreciated.

Thanks.
-- 

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

To post to this group, send email to google-appengine-j...@googlegroups.com.

To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Data Nucleus Enhancer Exception

2010-01-08 Thread Alexander Fenske
The problem is not only an eclipse problem because it happens in
netbeans too. I think this is a java problem. Sometimes java does not
compile the right classes. If you have this error again go the the
corresponding class file (not java file) and remove it. And if you
recompile you will see that the file is now much bigger than before.
Until know i do not find a better way to solve this problem. I hope in
later versions the problem is not there any more.
-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.




[appengine-java] jsp work directory

2010-01-08 Thread siliconeagle
does anyone know where the jsp work directory is on the dev server?
-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.




Re: [appengine-java] multiple contains() clauses on the same table

2010-01-08 Thread Max Ross (Google)
Thanks for the report, looks like a bug.  Multiple contains() clauses are
fine but I didn't properly account for the case where one of the clauses is
on the primary key of the object.  The fix should be straightforward but let
me see if I can get you a workaround.

Max

On Thu, Jan 7, 2010 at 7:06 PM, siliconeagle rrmu...@gmail.com wrote:

 Basically i have 3 fields in the same table to select by
 using .contains() clauses - one is the primary key field

 so :keyList (java.util.SetKey) , :feedTypes (java.util.SetInteger)
  :contentTypes(java.util.SetInteger) with values i need to select
 with.

 The Feed object (and the relevant fields) is
 @PersistenceCapable(identityType = IdentityType.APPLICATION)
 public class Feed {

@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key id;
  ...
@Persistent
private int typeFeed ;
@Persistent
private int typeContent = CONTENT_TYPE_NOTCHECKED;
 
 }

 so i try this
 Query query1 = pm.newQuery(Feed.class);
 query1.setFilter(:keyList.contains(id)  :feedTypes.contains
 (typeFeed)   :contentTypes.contains(typeContent));
 query1.setRange(0,500);
 MapString, Collection paramsf = new HashMapString, Collection();
 paramsf.put(keyList, feedIds);
 paramsf.put(feedTypes, feedTypes);
 paramsf.put(contentTypes, contentTypes);
 feeds = (ListFeed) query1.executeWithMap(paramsf);

 and i get
 javax.jdo.JDOFatalUserException: Batch lookup by primary key is only
 supported if no other filters and no sort orders are defined.

 Is there any way around it - from other posts it looks like subqueries
 an the IN syntax arent supported.




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




-- 

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

To post to this group, send email to google-appengine-j...@googlegroups.com.

To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Increased reliability issues on AppEngine for the past 48h

2010-01-08 Thread Jerome
I forgot to add that as you can see on the graph that is attached to
the previous email, our request/sec rate which has been at about 5
queries/sec for the past few weeks is now showing spikes at 10 queries
per sec, followed by drops to 0 queries per sec. There is no logical
way to explain this, we should still have a pretty much constant 5
reqs/sec rate.

The error rate spikes do not correlate to the reqs/sec unexpected
spikes though.

Let me know if I can provide additional data for review.

Thanks

Jerome

On Jan 8, 6:54 pm, Jerome Mouton jerome.mou...@gmail.com wrote:
 Hello,

 Our AppEngine application has been experiencing an increase rate of
 bogus exceptions for the past 48+ hours. See the attached image for
 our requests/seconds and errors/seconds for the last 6 hours. We have
 been seeing the exact same pattern for the past 2 days.

 This is an app with billing enabled, and we have way (over 10x) below
 our billing quotas.
 The only change we can figure out that started at about the same time
 as this increase rate of error was the usage of the XMPP API being
 more frequent than before, but the exceptions are not related to the
 XMPP API calls, they are the one of the following:

 - com.google.appengine.api.datastore.DatastoreTimeoutException: Unknown
   on servlets data store JDO queries that are expected to be (and most
 of the time are) extremely fast; when it fails, the servlet shows
 times in this area: 4135ms 187cpu_ms 12api_cpu_ms

 - com.google.apphosting.api.ApiProxy$ApiDeadlineExceededException: The
 API call datastore_v3.RunQuery() took too long to respond and was
 cancelled.
   on servlets data store JDO queries that are expected to be (and most
 of the time are) extremely fast; when it fails, the servlet shows
 times in this area: 5464ms 194cpu_ms

 - Request was aborted after waiting too long to attempt to service
 your request. Most likely, this indicates that you have reached your
 simultaneous dynamic request limit. This is almost always due to
 excessively high latency in your app. Please 
 seehttp://code.google.com/appengine/docs/quotas.htmlfor more details.

 Is this reliability degradation for the past 48 hours seen by other
 users? If a Googler needs our appId for review, please drop me an
 email.

 Thank you.

 Jerome

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




Re: [appengine-java] jpa query

2010-01-08 Thread Rusty Wright

Just out of curiosity, what happens when you do it with a parameter?  Also note 
that I've simplified your query; I'm looking at the DataNucleus example for an 
implicit parameter (http://xrl.in/47e5).

Query query = pm.newQuery(select from com.testing.model.Usertest.class where 
username = :nameParam);
List results = (List) query.execute(test);


asianCoolz wrote:

may i know is this correct jpa query?

  Query query = entityManager.createQuery(select c from
com.testing.model.Usertest c where c.username = 'test' );

after i did query.getResultList(). It's zero.  Please point out where
i did 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-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.




Re: [appengine-java] Re: Increased reliability issues on AppEngine for the past 48h

2010-01-08 Thread Don Schwarz
What's your app id?  (privately if you'd like)

On Fri, Jan 8, 2010 at 11:58 AM, Jerome jerome.mou...@gmail.com wrote:

 I forgot to add that as you can see on the graph that is attached to
 the previous email, our request/sec rate which has been at about 5
 queries/sec for the past few weeks is now showing spikes at 10 queries
 per sec, followed by drops to 0 queries per sec. There is no logical
 way to explain this, we should still have a pretty much constant 5
 reqs/sec rate.

 The error rate spikes do not correlate to the reqs/sec unexpected
 spikes though.

 Let me know if I can provide additional data for review.

 Thanks

 Jerome

 On Jan 8, 6:54 pm, Jerome Mouton jerome.mou...@gmail.com wrote:
  Hello,
 
  Our AppEngine application has been experiencing an increase rate of
  bogus exceptions for the past 48+ hours. See the attached image for
  our requests/seconds and errors/seconds for the last 6 hours. We have
  been seeing the exact same pattern for the past 2 days.
 
  This is an app with billing enabled, and we have way (over 10x) below
  our billing quotas.
  The only change we can figure out that started at about the same time
  as this increase rate of error was the usage of the XMPP API being
  more frequent than before, but the exceptions are not related to the
  XMPP API calls, they are the one of the following:
 
  - com.google.appengine.api.datastore.DatastoreTimeoutException: Unknown
on servlets data store JDO queries that are expected to be (and most
  of the time are) extremely fast; when it fails, the servlet shows
  times in this area: 4135ms 187cpu_ms 12api_cpu_ms
 
  - com.google.apphosting.api.ApiProxy$ApiDeadlineExceededException: The
  API call datastore_v3.RunQuery() took too long to respond and was
  cancelled.
on servlets data store JDO queries that are expected to be (and most
  of the time are) extremely fast; when it fails, the servlet shows
  times in this area: 5464ms 194cpu_ms
 
  - Request was aborted after waiting too long to attempt to service
  your request. Most likely, this indicates that you have reached your
  simultaneous dynamic request limit. This is almost always due to
  excessively high latency in your app. Please seehttp://
 code.google.com/appengine/docs/quotas.htmlfor more details.
 
  Is this reliability degradation for the past 48 hours seen by other
  users? If a Googler needs our appId for review, please drop me an
  email.
 
  Thank you.
 
  Jerome
 
   20100108-appengine_issue.png
  80KViewDownload

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




-- 

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

To post to this group, send email to google-appengine-j...@googlegroups.com.

To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] jsp work directory

2010-01-08 Thread Rusty Wright

What do you mean by work directory?


siliconeagle wrote:

does anyone know where the jsp work directory is on the dev server?

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




Re: [appengine-java] multiple contains() clauses on the same table

2010-01-08 Thread Max Ross (Google)
I'm really sorry but I've been unable to construct an equivalent query that
avoids this bug.  If the size of keyList isn't too large I'd recommend
executing a batch get to retrieve all those objects by id and then applying
the rest of your filter in-memory.

Sorry for the trouble.

Max

On Fri, Jan 8, 2010 at 9:48 AM, Max Ross (Google)
maxr+appeng...@google.commaxr%2bappeng...@google.com
 wrote:

 Thanks for the report, looks like a bug.  Multiple contains() clauses are
 fine but I didn't properly account for the case where one of the clauses is
 on the primary key of the object.  The fix should be straightforward but let
 me see if I can get you a workaround.

 Max

 On Thu, Jan 7, 2010 at 7:06 PM, siliconeagle rrmu...@gmail.com wrote:

 Basically i have 3 fields in the same table to select by
 using .contains() clauses - one is the primary key field

 so :keyList (java.util.SetKey) , :feedTypes (java.util.SetInteger)
  :contentTypes(java.util.SetInteger) with values i need to select
 with.

 The Feed object (and the relevant fields) is
 @PersistenceCapable(identityType = IdentityType.APPLICATION)
 public class Feed {

@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key id;
  ...
@Persistent
private int typeFeed ;
@Persistent
private int typeContent = CONTENT_TYPE_NOTCHECKED;
 
 }

 so i try this
 Query query1 = pm.newQuery(Feed.class);
 query1.setFilter(:keyList.contains(id)  :feedTypes.contains
 (typeFeed)   :contentTypes.contains(typeContent));
 query1.setRange(0,500);
 MapString, Collection paramsf = new HashMapString, Collection();
 paramsf.put(keyList, feedIds);
 paramsf.put(feedTypes, feedTypes);
 paramsf.put(contentTypes, contentTypes);
 feeds = (ListFeed) query1.executeWithMap(paramsf);

 and i get
 javax.jdo.JDOFatalUserException: Batch lookup by primary key is only
 supported if no other filters and no sort orders are defined.

 Is there any way around it - from other posts it looks like subqueries
 an the IN syntax arent supported.




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





-- 

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

To post to this group, send email to google-appengine-j...@googlegroups.com.

To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Purge _ah_SESSION ???

2010-01-08 Thread Jorge
And worst.

#
01-08 10:11AM 36.094 /_ah/sessioncleanup?clear 500 10275ms 17617cpu_ms
13845api_cpu_ms 4kb
See details

0.1.0.1 - - [08/Jan/2010:10:11:46 -0800] GET /_ah/sessioncleanup?
clear HTTP/1.1 500 4868 - - wcondominios.appspot.com

#
W 01-08 10:11AM 46.311

/_ah/sessioncleanup
com.google.appengine.api.datastore.DatastoreTimeoutException: Unknown


Jorge Gonzalez

On Jan 8, 11:13 am, Jorge athenas...@gmail.com wrote:
 I found another issue with the /_ah/sessioncleanup servlet. On almost
 every run, a huge amount of cpu usage is reported!

 Example:
 01-08 07:40AM 53.487 /_ah/sessioncleanup?clear 200 12275ms 7365cpu_ms
 3845api_cpu_ms 0kb

 Jorge Gonzalez

 On Jan 7, 8:15 pm, Jorge athenas...@gmail.com wrote:

  The /_ah/sessioncleanup servlet works ok, but it cleans only 100
  expired sessions at a time, so one needs to run it often enough to
  avoid expired sessions to accumulate and no so often that it won't
  have too few sessions to purge.

  Kind of complicated!!

  Someone knows of a better solution?

  Jorge Gonzalez

  On Jan 7, 4:13 am, m seleron seler...@gmail.com wrote:

   Hi,

   I am sorry for not understanding easily.

   I retrieved this Group

   Is this thread 
   usefulhttp://groups.google.com/group/google-appengine-java/browse_thread/th...

   You may find more useful information .
   Please look for it.

   Thanks.

Where should I look for this sessionCleanupServlet?

On Jan 7, 6:01 am, m seleron seler...@gmail.com wrote:

 Hi,

 Though it is likely already to have tried.
 You might solve the problem by examining sessionCleanupServlet.

 thanks.

 On 1月7日, 午後1:18, Jorge athenas...@gmail.com wrote:

  Is there a way to delete old _ah_SESSION entities? I found a post
  about deleting all sessions, both from the datastore and from
  memcache, but I am looking a clean  way to delete past sessions and
  preserve the active ones.

  Thanks,

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




Re: [appengine-java] multiple contains() clauses on the same table

2010-01-08 Thread Max Ross (Google)
Issued filed:
http://code.google.com/p/datanucleus-appengine/issues/detail?id=185

On Fri, Jan 8, 2010 at 10:12 AM, Max Ross (Google) 
maxr+appeng...@google.com maxr%2bappeng...@google.com wrote:

 I'm really sorry but I've been unable to construct an equivalent query that
 avoids this bug.  If the size of keyList isn't too large I'd recommend
 executing a batch get to retrieve all those objects by id and then applying
 the rest of your filter in-memory.

 Sorry for the trouble.

 Max


 On Fri, Jan 8, 2010 at 9:48 AM, Max Ross (Google) 
 maxr+appeng...@google.com maxr%2bappeng...@google.com wrote:

 Thanks for the report, looks like a bug.  Multiple contains() clauses are
 fine but I didn't properly account for the case where one of the clauses is
 on the primary key of the object.  The fix should be straightforward but let
 me see if I can get you a workaround.

 Max

 On Thu, Jan 7, 2010 at 7:06 PM, siliconeagle rrmu...@gmail.com wrote:

 Basically i have 3 fields in the same table to select by
 using .contains() clauses - one is the primary key field

 so :keyList (java.util.SetKey) , :feedTypes (java.util.SetInteger)
  :contentTypes(java.util.SetInteger) with values i need to select
 with.

 The Feed object (and the relevant fields) is
 @PersistenceCapable(identityType = IdentityType.APPLICATION)
 public class Feed {

@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key id;
  ...
@Persistent
private int typeFeed ;
@Persistent
private int typeContent = CONTENT_TYPE_NOTCHECKED;
 
 }

 so i try this
 Query query1 = pm.newQuery(Feed.class);
 query1.setFilter(:keyList.contains(id)  :feedTypes.contains
 (typeFeed)   :contentTypes.contains(typeContent));
 query1.setRange(0,500);
 MapString, Collection paramsf = new HashMapString, Collection();
 paramsf.put(keyList, feedIds);
 paramsf.put(feedTypes, feedTypes);
 paramsf.put(contentTypes, contentTypes);
 feeds = (ListFeed) query1.executeWithMap(paramsf);

 and i get
 javax.jdo.JDOFatalUserException: Batch lookup by primary key is only
 supported if no other filters and no sort orders are defined.

 Is there any way around it - from other posts it looks like subqueries
 an the IN syntax arent supported.




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






-- 

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

To post to this group, send email to google-appengine-j...@googlegroups.com.

To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] [ANN] DataNucleus AccessPlatform 2.0 released

2010-01-08 Thread Max Ross (Google)
Congrats on the release Andy!

The App Engine DataNucleus plugin is not going to work out-of-the-box with
DN 2.0 so please wait until we (Google) update our stuff.  This is going to
take some time for us but we will get it taken care of.

Max

On Fri, Jan 8, 2010 at 9:44 AM, Rusty Wright rwright.li...@gmail.comwrote:

 If we're getting the DataNucleus jars by way of maven dependencies, do you
 recommend that we wait until Google updates their stuff before we use 2.0 or
 can we start using your 2.0 version now?



 datanucleus wrote:

 The next generation of DataNucleus AccessPlatform has now been
 released. This includes much internal restructuring and API changes to
 simplify future directions, as well as many feature additions,
 including support for more datastore types. Of the things that impact
 on GAE/J usage : non-tx persist/delete operations are now atomic, L2
 cached is enabled by default, support for singleton PMF/EMF pattern,
 preview for many JPA2 features, full support for JDO2.3 features, auto-
 generation of primary key classes during enhancement, support for
 persistence of JodaTime types, ability to cache query compilations and
 query results, and many other things.

 Obviously, the current version of the GAE/J DataNucleus plugin doesn't
 support this version of DataNucleus yet, but if any of the items
 listed above would be desirable to your project then I suggest that
 you star the following issue

 http://code.google.com/p/datanucleus-appengine/issues/detail?id=103colspec=ID%20Stars%20Type%20Status%20Priority%20FoundIn%20TargetRelease%20Owner%20Summary


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




-- 

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

To post to this group, send email to google-appengine-j...@googlegroups.com.

To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] multiple contains() clauses on the same table

2010-01-08 Thread Max Ross (Google)
Fixed in trunk.

On Fri, Jan 8, 2010 at 10:31 AM, Max Ross (Google) 
maxr+appeng...@google.com maxr%2bappeng...@google.com wrote:

 Issued filed:
 http://code.google.com/p/datanucleus-appengine/issues/detail?id=185


 On Fri, Jan 8, 2010 at 10:12 AM, Max Ross (Google) 
 maxr+appeng...@google.com maxr%2bappeng...@google.com wrote:

 I'm really sorry but I've been unable to construct an equivalent query
 that avoids this bug.  If the size of keyList isn't too large I'd recommend
 executing a batch get to retrieve all those objects by id and then applying
 the rest of your filter in-memory.

 Sorry for the trouble.

 Max


 On Fri, Jan 8, 2010 at 9:48 AM, Max Ross (Google) 
 maxr+appeng...@google.com maxr%2bappeng...@google.com wrote:

 Thanks for the report, looks like a bug.  Multiple contains() clauses are
 fine but I didn't properly account for the case where one of the clauses is
 on the primary key of the object.  The fix should be straightforward but let
 me see if I can get you a workaround.

 Max

 On Thu, Jan 7, 2010 at 7:06 PM, siliconeagle rrmu...@gmail.com wrote:

 Basically i have 3 fields in the same table to select by
 using .contains() clauses - one is the primary key field

 so :keyList (java.util.SetKey) , :feedTypes (java.util.SetInteger)
  :contentTypes(java.util.SetInteger) with values i need to select
 with.

 The Feed object (and the relevant fields) is
 @PersistenceCapable(identityType = IdentityType.APPLICATION)
 public class Feed {

@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key id;
  ...
@Persistent
private int typeFeed ;
@Persistent
private int typeContent = CONTENT_TYPE_NOTCHECKED;
 
 }

 so i try this
 Query query1 = pm.newQuery(Feed.class);
 query1.setFilter(:keyList.contains(id)  :feedTypes.contains
 (typeFeed)   :contentTypes.contains(typeContent));
 query1.setRange(0,500);
 MapString, Collection paramsf = new HashMapString, Collection();
 paramsf.put(keyList, feedIds);
 paramsf.put(feedTypes, feedTypes);
 paramsf.put(contentTypes, contentTypes);
 feeds = (ListFeed) query1.executeWithMap(paramsf);

 and i get
 javax.jdo.JDOFatalUserException: Batch lookup by primary key is only
 supported if no other filters and no sort orders are defined.

 Is there any way around it - from other posts it looks like subqueries
 an the IN syntax arent supported.




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







-- 

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

To post to this group, send email to google-appengine-j...@googlegroups.com.

To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Empty DataNucleus Enhancer Log

2010-01-08 Thread David Fuelling
Is there a special trick to viewing the DataNucelus enhancer log in
Windows Vista?  In my {$USER}\AppData\Local\Temp directory I see new
files like enhance5972975064635271229.log get created whenever the
enhancer runs, but they're always empty.

Am I looking in the wrong spot?  Also, I have my logging.properties
file set to FINE, but this seems to have no effect on the contents
of the enhancer log files (assuming I'm looking in the right spot).

Thanks!

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




[appengine-java] Re: App Engine SDK 1.3.0 maven repo

2010-01-08 Thread James Cooper
Here's an article that documents how to deploy the App Engine JARs to
your own maven repo:

http://www.bitmechanic.com/blog/?p=30

-- James

On Dec 22 2009, 1:32 pm, Andreas Källberg andreas.kallb...@gmail.com
wrote:
 Is someone going to do something about this?
 It's has been wrong for some time now.
 And also, another 
 typo:http://www.mvnsearch.org/maven2/com/google/appengine/orm/datanucleus-...
 It's a space in the version folder name :-(

 Please, there are a significant number ofmavenusers out here that
 would appreciate this...

 .../Andreas

 On 15 Dec, 20:11, Rusty Wright rwright.li...@gmail.com wrote:

  Here I am, yet anothermavenuser whining about some new release not being 
  correct in themavenrepo.

  The appengine-api-1.0-labs directory has a1.3.0 directory, but in it are 
  jars named with 1.2.8:

 http://www.mvnsearch.org/maven2/com/google/appengine/appengine-api-1

  George Moschovitis wrote:
   This is a long awaited feature.

   Some problems though:

   - Instead of the serve() helper I would expect access to the blobs
   through a url, something like:
    http://my-app.appenginebs.com/blob-key
   - No support for organization in directories
   - A method to manipulate the uploaded blobs is missing (for example
   cropping/resizing big images)
   - No free quota

   -g.

   On Dec 15, 6:00 am, Jason (Google) apija...@google.com wrote:
   Hi Everyone. We just released version1.3.0 of the App Engine SDK for
   both Python and Java. The most notable change is the new experimental
   Blobstore API which allows billed apps to store files up to 50 MB. The
   release also includes some performance tweaks to the Java runtime.

   Blog 
   post:http://googleappengine.blogspot.com/2009/12/app-engine-sdk-130-releas...

   Release notes:
   Python:http://code.google.com/p/googleappengine/wiki/SdkReleaseNotes
   Java:http://code.google.com/p/googleappengine/wiki/SdkForJavaReleaseNotes

   Cheers!
   - Jason

   --

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




[appengine-java] Re: jsp work directory

2010-01-08 Thread siliconeagle
the directory where the jsps are translated into java files and
compiled. like in tomcat.

On Jan 8, 6:03 pm, Rusty Wright rwright.li...@gmail.com wrote:
 What do you mean by work directory?

 siliconeagle wrote:
  does anyone know where the jsp work directory is on the dev server?
-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.




[appengine-java] Re: multiple contains() clauses on the same table

2010-01-08 Thread siliconeagle
No worries, when do you think it might be fixed? just out of interest,
no pressure ;)

On Jan 8, 6:12 pm, Max Ross (Google) maxr+appeng...@google.com
wrote:
 I'm really sorry but I've been unable to construct an equivalent query that
 avoids this bug.  If the size of keyList isn't too large I'd recommend
 executing a batch get to retrieve all those objects by id and then applying
 the rest of your filter in-memory.

 Sorry for the trouble.

 Max

 On Fri, Jan 8, 2010 at 9:48 AM, Max Ross (Google)
 maxr+appeng...@google.commaxr%2bappeng...@google.com

  wrote:
  Thanks for the report, looks like a bug.  Multiple contains() clauses are
  fine but I didn't properly account for the case where one of the clauses is
  on the primary key of the object.  The fix should be straightforward but let
  me see if I can get you a workaround.

  Max

  On Thu, Jan 7, 2010 at 7:06 PM, siliconeagle rrmu...@gmail.com wrote:

  Basically i have 3 fields in the same table to select by
  using .contains() clauses - one is the primary key field

  so :keyList (java.util.SetKey) , :feedTypes (java.util.SetInteger)
   :contentTypes(java.util.SetInteger) with values i need to select
  with.

  The Feed object (and the relevant fields) is
  @PersistenceCapable(identityType = IdentityType.APPLICATION)
  public class Feed {

        �...@primarykey
        �...@persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
         private Key id;
   ...
        �...@persistent
         private int typeFeed ;
        �...@persistent
         private int typeContent = CONTENT_TYPE_NOTCHECKED;
  
  }

  so i try this
  Query query1 = pm.newQuery(Feed.class);
  query1.setFilter(:keyList.contains(id)  :feedTypes.contains
  (typeFeed)   :contentTypes.contains(typeContent));
  query1.setRange(0,500);
  MapString, Collection paramsf = new HashMapString, Collection();
  paramsf.put(keyList, feedIds);
  paramsf.put(feedTypes, feedTypes);
  paramsf.put(contentTypes, contentTypes);
  feeds = (ListFeed) query1.executeWithMap(paramsf);

  and i get
  javax.jdo.JDOFatalUserException: Batch lookup by primary key is only
  supported if no other filters and no sort orders are defined.

  Is there any way around it - from other posts it looks like subqueries
  an the IN syntax arent supported.

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




[appengine-java] Re: multiple contains() clauses on the same table

2010-01-08 Thread siliconeagle
That would be great as i am just taking a guess at what is the
smallest select set at the moment and filtering the rest in memory.

thanks for the response.

regards,
rob

On Jan 8, 5:48 pm, Max Ross (Google) maxr+appeng...@google.com
wrote:
 Thanks for the report, looks like a bug.  Multiple contains() clauses are
 fine but I didn't properly account for the case where one of the clauses is
 on the primary key of the object.  The fix should be straightforward but let
 me see if I can get you a workaround.

 Max

 On Thu, Jan 7, 2010 at 7:06 PM, siliconeagle rrmu...@gmail.com wrote:
  Basically i have 3 fields in the same table to select by
  using .contains() clauses - one is the primary key field

  so :keyList (java.util.SetKey) , :feedTypes (java.util.SetInteger)
   :contentTypes(java.util.SetInteger) with values i need to select
  with.

  The Feed object (and the relevant fields) is
  @PersistenceCapable(identityType = IdentityType.APPLICATION)
  public class Feed {

        �...@primarykey
        �...@persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
         private Key id;
   ...
        �...@persistent
         private int typeFeed ;
        �...@persistent
         private int typeContent = CONTENT_TYPE_NOTCHECKED;
  
  }

  so i try this
  Query query1 = pm.newQuery(Feed.class);
  query1.setFilter(:keyList.contains(id)  :feedTypes.contains
  (typeFeed)   :contentTypes.contains(typeContent));
  query1.setRange(0,500);
  MapString, Collection paramsf = new HashMapString, Collection();
  paramsf.put(keyList, feedIds);
  paramsf.put(feedTypes, feedTypes);
  paramsf.put(contentTypes, contentTypes);
  feeds = (ListFeed) query1.executeWithMap(paramsf);

  and i get
  javax.jdo.JDOFatalUserException: Batch lookup by primary key is only
  supported if no other filters and no sort orders are defined.

  Is there any way around it - from other posts it looks like subqueries
  an the IN syntax arent supported.

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




[appengine-java] Persist/query test.test1.Test and test.test2.Test

2010-01-08 Thread w
I have two persistable classes: test.test1.Test and test.test2.Test,
but I can't persist/query objects of these classes right. There is a
simple example shows wrong behavior:

test.TestServlet.java:

package test;

import java.io.IOException;

import javax.jdo.JDOHelper;
import javax.jdo.PersistenceManager;
import javax.jdo.PersistenceManagerFactory;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class TestServlet extends HttpServlet {

  public void doGet(HttpServletRequest request, HttpServletResponse
response) throws IOException {
PersistenceManager pm = pmFactory.getPersistenceManager();
pm.makePersistent(new test.test1.Test(1, test1));
pm.close();

pm = pmFactory.getPersistenceManager();
pm.makePersistent(new test.test2.Test(1, test2));
pm.close();

pm = pmFactory.getPersistenceManager();
response.getWriter().println(RESULT:   + pm.getObjectById
(test.test1.Test.class, 1));
pm.close();
  }

  public static final PersistenceManagerFactory pmFactory =
JDOHelper.getPersistenceManagerFactory(transactions-optional);

}

test.test1.TestServlet.java and test.test2.TestServlet.java are the
same except package name, so I missed it:

import javax.jdo.annotations.*;

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

  public Test(String id, String data) {
this.id = id; this.data = data;
  }

  public String toString() {
return getClass().getName() + : id= + id +  data= + data;
  }

  @PrimaryKey
  private String id;

  @Persistent
  private String data;

}

Surprising result I got is following:

RESULT:  test.test1.Test: id=1 data=test2

Expected result:

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




[appengine-java] No JDO support for datanucleus ObjectStringConverter?

2010-01-08 Thread inetdevboy
I wrote a datanucleus javaTypes plugin (for joda-time LocalDate) based
on the org.datanuclues.store.types.ObjectStringConverter interface.
You probably know that this interface allows non-basic types to
declare their ability to marshal themselves to/from a String
representation for persistence.  In my case it'd be particularly
helpful because the String representation's natural sort order matches
the sort order of the class itself, so it'd be indexable.

The datanucleus layer seems to find and register the plugin, because I
get this FINE debug line when I include my plugin:

Jan 8, 2010 8:47:42 PM org.datanucleus.store.types.TypeManager
addJavaType
FINE: Adding support for Java type org.joda.time.LocalDate
(persistent=true, DFG=true, embedded=true)

But when it tries to persist a field of type LocalDate I still get the
following stack, with or without my plugin:

java.lang.IllegalArgumentException: eventDate: org.joda.time.LocalDate
is not a supported property type.
at
com.google.appengine.api.datastore.DataTypeUtils.checkSupportedSingleValue
(DataTypeUtils.java:145)
at
com.google.appengine.api.datastore.DataTypeUtils.checkSupportedValue
(DataTypeUtils.java:127)
at com.google.appengine.api.datastore.Entity.setProperty(Entity.java:
280)
at
org.datanucleus.store.appengine.DatastoreFieldManager.storeObjectField
(DatastoreFieldManager.java:798)
at org.datanucleus.state.AbstractStateManager.providedObjectField
(AbstractStateManager.java:1037)
at com.inetdevboy.model.Event.jdoProvideField(Event.java)
at com.inetdevboy.model.Event.jdoProvideFields(Event.java)
[more]...

I'd really like to avoid having to declare separate persistence fields
with lifecycle listeners to accommodate every LocalDate field.  Is
there a lever in the existing GAE implementation I haven't pulled to
engage my plugin?

BTW, I'm aware that there's an existing JodaTime datanucleus plugin,
but it appears to require DataNucleus 2, and my implementation is
essentially the same as theirs, just without the ORM support.

Please help!

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




[appengine-java] Unauthorized sender for mail (when accessing GAE from Google Apps account)

2010-01-08 Thread therealjz
When sending mail, I get the following error: utils.Utils sendMail:
javax.mail.SendFailedException: Send failure
(javax.mail.MessagingException: Illegal Arguments
(java.lang.IllegalArgumentException: Unauthorized Sender: Unauthorized
sender)

The from address is set to the email address that I use to log into
GAE. I am accessing GAE through the account I use for Google Apps. I
tried adding another developer to the app and use that email as as the
from address but still received the same error.

Any ideas?

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




[appengine-java] Re: jpa query

2010-01-08 Thread asianCoolz
thank you for your response Rusty.  I already tried with parameter.
return 0, that is why i retry with simply statement select c from
com.testing.model.Usertest c where c.username = 'test'  .   the
example in datanucleus website is using pm. while i'm using jpa
entitymanager.
-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.




[appengine-java] Re: how to get session id under a Class which doesn't extend HttpServlet?

2010-01-08 Thread Elias Mårtenson
On 9 Jan, 01:27, Prashant Gupta nextprash...@gmail.com wrote:

 I am trying to implement my own user management system, for that I need some
 way to make session id available to all classes independent of whether it
 extends HttpServlet or not. I know there is some way to do that but I am not
 able to find it. Any kind of help would be appreciated.

One way to do it is to use a servlet filter to make the user
information available through a ThreadLocal instance. That way you can
have a single static method that returns the user wherever you are.
-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.




[appengine-java] Re: Handling incoming emails, broken due incorrect attachment size.

2010-01-08 Thread de Witte
Can anyone verify this, problem still exists and is a show stopper.

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




Re: [appengine-java] Re: App Engine SDK 1.3.0 maven repo

2010-01-08 Thread Rusty Wright

Those instructions seem a bit more than what is needed in my opinion.  I just 
used the maven command to install the jars in my local repository ~/.m2 
(actually some place different on my Windows pc).  I use the following copy.cmd 
file on my pc; all of the jar files it references are in the same directory:

rem PATH=C:\Program Files\Apache Software Foundation\apache-maven-2.0.9\bin

start mvn install:install-file -DgroupId=com.google.appengine 
-DartifactId=appengine-api-1.0-labs -Dversion=1.3.0 -Dpackaging=jar 
-DcreateChecksum=true  -Dfile=appengine-api-1.0-labs-1.3.0.jar 
-DgeneratePom=true

pause

start mvn install:install-file -DgroupId=com.google.appengine 
-DartifactId=appengine-api-1.0-sdk -Dversion=1.3.0 -Dpackaging=jar 
-DcreateChecksum=true  -Dfile=appengine-api-1.0-sdk-1.3.0.jar -DgeneratePom=true

pause

start mvn install:install-file -DgroupId=com.google.appengine 
-DartifactId=appengine-api-1.0-stubs -Dversion=1.3.0 -Dpackaging=jar 
-DcreateChecksum=true  -Dfile=appengine-api-1.0-stubs.jar -DgeneratePom=true

pause

start mvn install:install-file -DgroupId=com.google.appengine.orm 
-DartifactId=datanucleus-appengine -Dversion=1.0.4.1.final -Dpackaging=jar 
-DcreateChecksum=true  -Dfile=datanucleus-appengine-1.0.4.1.final.jar 
-DgeneratePom=true

I run it in a dos window and it creates a new window for each maven line.  On 
windows each maven line has to be one long line; on Unix you can use 
backslashes and wrap them.


James Cooper wrote:

Here's an article that documents how to deploy the App Engine JARs to
your own maven repo:

http://www.bitmechanic.com/blog/?p=30

-- James

On Dec 22 2009, 1:32 pm, Andreas Källberg andreas.kallb...@gmail.com
wrote:

Is someone going to do something about this?
It's has been wrong for some time now.
And also, another 
typo:http://www.mvnsearch.org/maven2/com/google/appengine/orm/datanucleus-...
It's a space in the version folder name :-(

Please, there are a significant number ofmavenusers out here that
would appreciate this...

.../Andreas

On 15 Dec, 20:11, Rusty Wright rwright.li...@gmail.com wrote:


Here I am, yet anothermavenuser whining about some new release not being 
correct in themavenrepo.
The appengine-api-1.0-labs directory has a1.3.0 directory, but in it are jars 
named with 1.2.8:
http://www.mvnsearch.org/maven2/com/google/appengine/appengine-api-1
George Moschovitis wrote:

This is a long awaited feature.
Some problems though:
- Instead of the serve() helper I would expect access to the blobs
through a url, something like:
 http://my-app.appenginebs.com/blob-key
- No support for organization in directories
- A method to manipulate the uploaded blobs is missing (for example
cropping/resizing big images)
- No free quota
-g.
On Dec 15, 6:00 am, Jason (Google) apija...@google.com wrote:

Hi Everyone. We just released version1.3.0 of the App Engine SDK for
both Python and Java. The most notable change is the new experimental
Blobstore API which allows billed apps to store files up to 50 MB. The
release also includes some performance tweaks to the Java runtime.
Blog 
post:http://googleappengine.blogspot.com/2009/12/app-engine-sdk-130-releas...
Release notes:
Python:http://code.google.com/p/googleappengine/wiki/SdkReleaseNotes
Java:http://code.google.com/p/googleappengine/wiki/SdkForJavaReleaseNotes
Cheers!
- Jason

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




[appengine-java] Re: custom vs. generated keys / storage?

2010-01-08 Thread phraktle

could someone from Google weigh in on this?

thanks,
  Viktor

On Jan 6, 12:43 pm, phraktle phrak...@gmail.com wrote:
 Hi,

 I'm using the low-level DS API, thus short names for kinds, etc, and
 my keys are already quite compact. The encoded version is in fact
 significantly longer than my ownkey. So it would optimal, if DS did
 not try to second-guess and bloat my PKs. How do you know that DS
 doesn't actually store both versions? Do you know how to decode the DSkey?

 Regards,
   Viktor

 On Jan 5, 5:54 am, jd jdpatter...@gmail.com wrote:



  The encoded EntityKey is a representation that includes yourkey
  name, entity kind, ancestors and app id - encoded into a form that is
  safe to use in urls etc.  Keeping your keys small and kinds small
  (i.e. using short class names) will reduce storage space of keys in
  the DS.  In Twig (i.e. not JDO) you can keep the names of your classes
  as you like and then override typetoKind(Type) to return abbreviated
  names.  I found that this saves a significant amount of space in my
  app that has many relations between entities.

 http://code.google.com/p/twig-persist/

  On Jan 4, 5:01 pm, phraktle phrak...@gmail.com wrote:

   Hi,

   I'm generating my own entity keys, with new Entity(Foo, myId). I
   noticed that in the DataStore viewer, these entities still seem to
   have a defaultkey:

   Decoded entitykey: Foo: name=myId
   Entitykey:
   ahFzY2FyYWJyZWNvbW1lbmRlcnJACxIVUHJvZHVjdFJlY29tbWVuZGF0aW9uIiU1OTg1MEMzMzM
wOUZGRjV8MjAxMDAxMDQwMTAzNTN8cHJvZF8wDA

   So the Entitykey here still seems to be generated by GAE. Why is
   this needed? I do have a primarykeyalready. So does it get stored as
   simply another indexed column? Does this impact storage space too? I
   don't need the GAE entitykeyat all, and would prefer not having to
   pay for its storage either :)

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