[appengine-java] Re: 1.2.5 memcache error

2009-09-08 Thread kayjean

I find some useful infomation about this topic.It works

search title test unit doesn't work more

kayjean


On 9月8日, 上午11時07分, kayjean kayj...@gmail.com wrote:
 I try to upgrade eclipse sdk to 1.2.5 , something wrong ??

 java.lang.NoSuchMethodError: com.google.apphosting.api.ApiProxy
 $Environment.getDefaultNamespace()Ljava/lang/String;
         at com.google.appengine.api.NamespaceManager.get
 (NamespaceManager.java:56)
         at com.google.appengine.api.memcache.MemcacheServiceImpl.setNamespace
 (MemcacheServiceImpl.java:181)
         at com.google.appengine.api.memcache.MemcacheServiceImpl.init
 (MemcacheServiceImpl.java:145)
         at
 com.google.appengine.api.memcache.MemcacheServiceFactory.getMemcacheService
 (MemcacheServiceFactory.java:25)
         at com.google.appengine.api.memcache.stdimpl.GCache.init
 (GCache.java:75)
         at com.google.appengine.api.memcache.stdimpl.GCacheFactory.createCache
 (GCacheFactory.java:63)

 thanks

 kayjean
--~--~-~--~~~---~--~~
You received this message 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] http://localhost:8080/_ah/admin encoding problem ?

2009-09-08 Thread kayjean

How to set the encoding of http://localhost:8080/_ah/admin ? Default
encoding is ASCII.

I can't read the chinese content in appengine-generated using
http://localhost:8080/_ah/admin

kayjean
--~--~-~--~~~---~--~~
You received this message 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] FetchGroup / detach broken

2009-09-08 Thread dflorey

Hi,
I tried to optimize my code by using FetchGroups. But this is not
working as expected.
Example from docs, Employee/ContactInfo. Make both detachable. Add
ContactInfo to a separate FetchGroup, add it to the FetchPlan and try
to load the Employee with its contactInfos. They will not get loaded/
detached when detaching the Employee-Object.
Works fine when adding the ContactInfo to the default fetch group.
--~--~-~--~~~---~--~~
You received this message 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: deploy a java web service application on Google App Engine.

2009-09-08 Thread Sena Gbeckor-Kove

You can't run JBoss on App engine. Look into the Web Service API's.

S


---

Sena Gbeckor-Kove
CTO/Founder - imKon

Mobile: +31 62 434 1290
s...@imkon.com|www.imkon.com

Asia (Singapore) :
35 Selegie Road, #09-14/15 Parklane Shopping Mall, 188307 Singapore,  
Singapore


Europe (London) :
145-157 St John's St, EC1V 4PY London, UK

On 7 Sep 2009, at 11:56, shradha wrote:



How to deploy a  java web service application on Google App Engine.
Can I configure jboss over it
Plz reply to this mail on shradha.ambe...@patni.com as well
--~--~-~--~~~---~--~~
You received this message 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
-~--~~~~--~~--~--~---





smime.p7s
Description: S/MIME cryptographic signature


[appengine-java] Startup takes forever

2009-09-08 Thread David Given

If I make a request to my app, and (I assume) AppEngine decides it needs 
to start up a new servlet instance for me, then warming up the server 
can take about 5000ms. Is this normal?

For example, the first two items in my log for a request will be:

09-08 12:57AM 30.917 [standard notification of incoming request]
09-08 12:57AM 35.344 
com.google.appengine.repackaged.com.google.common.base.FinalizableReferenceQueue$SystemLoader
 
loadFinalizer: Not allowed to access system class loader.

Note the five second difference between the two timestamps. This all 
happens before my app has even started running any code. As this only 
happens the first time, it's not really a problem, but does cause nasty 
red warning banners in my logs.

Possibly related, the first time I do a database request in one of these 
new servers, I'm getting the following scary backtrace. Everything 
*works* --- it's just a warning. Can I safely ignore it or is this a 
symptom of something wrong with my code?

09-08 12:57AM 35.361
com.google.appengine.repackaged.com.google.common.base.FinalizableReferenceQueue
 
init: 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-5d48060cebaffe54(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.init(FinalizableReferenceQueue.java:124)
at 
com.google.appengine.repackaged.com.google.common.labs.misc.InterningPools$WeakInterningPool.clinit(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.clinit(ProtocolSupport.java:55)
at 
com.google.apphosting.api.DatastorePb$GetRequest.freeze(DatastorePb.java:7233)
at 
com.google.apphosting.api.DatastorePb$GetRequest$1.init(DatastorePb.java:7177)
at 
com.google.apphosting.api.DatastorePb$GetRequest.clinit(DatastorePb.java:7174)
at 
com.google.appengine.api.datastore.DatastoreServiceImpl.get(DatastoreServiceImpl.java:90)
at 
com.google.appengine.api.datastore.DatastoreServiceImpl.get(DatastoreServiceImpl.java:69)
at 
com.google.appengine.api.datastore.DatastoreServiceImpl.get(DatastoreServiceImpl.java:57)
at 
com.cowlark.stellation2.server.db.GAEPersistenceInterface.atomicallyModify(GAEPersistenceInterface.java:130)
at 
com.cowlark.stellation2.server.db.GAEPersistenceInterface.lock(GAEPersistenceInterface.java:160)
at com.cowlark.stellation2.server.db.ServerDB.lock(ServerDB.java:110)
at 
com.cowlark.stellation2.server.RPCServiceImpl.ping(RPCServiceImpl.java:81)
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.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:527)
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:237)
at 

[appengine-java] regording to change the port number

2009-09-08 Thread mahesh

 hi,

  i am running the sample application in googleappengine with java
using eclipse. the application is not running in default port number
like 8080.But it is running in unused port number.i want to know how
to change the port number in dev app server.i am not running in any
other servers like tomcat,jboss etc.I am getting the following error
since i am not able to change the port number.please guide me with the
solution.

Could not open the requested socket: Address already in use: bind
Try overriding --address and/or --port.

--~--~-~--~~~---~--~~
You received this message 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: regording to change the port number

2009-09-08 Thread Sreekanth Raju R
right click on the project, go to Run As/ Run Configurations

under 'Web Application' select the project and change the port number.

--~--~-~--~~~---~--~~
You received this message 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] Is it possible to host a Restful Web Service on GAE.

2009-09-08 Thread shradha

hi,
Since SOAP web service is not working on Google App Engine. Is it
possible to host a Restful Web Service on GAE.
Can we use Restlet API for that
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Entity ID and keyName identification scope

2009-09-08 Thread iker98

One detail I haven't read about is the different scope of the
identification function of ID and keyName.
According to my tests the ID generation counter has datastore scope,
not kind scope like we are used to with RDBs. Otherwise the keyName
identifies an entity in a kind.

Am I right with my conclusions? Is there some way to set one ID
generator for each kind?

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: GAE takes 28 sec to read just 200 records

2009-09-08 Thread Vik
hie any updates on this please?
Thankx and Regards

Vik
Founder
www.sakshum.com
www.sakshum.blogspot.com


On Sat, Sep 5, 2009 at 8:07 PM, Vik vik@gmail.com wrote:

 Hie
 yeah I did that..

 and what I get are two different values from this block

 At first time of app startup
 vik.sakshum.sakshumweb.jsp.model.jdo.PMF clinit: Loading PMF in
 com.google.apphosting.runtime.security.userclassloa...@1f7cdc7

 and in another flow
 vik.sakshum.sakshumweb.jsp.model.jdo.PMF clinit: Loading PMF in
 com.google.apphosting.runtime.security.userclassloa...@1e6f0ef


 So, it means it is trying to load it in two different class loaders. So,
 how should I fix it?

 Thankx and Regards

 Vik
 Founder
 www.sakshum.com
 www.sakshum.blogspot.com


 On Sat, Sep 5, 2009 at 5:14 AM, Jason (Google) apija...@google.comwrote:

 Based on one of your recent posts, it seems like multiple
 PersistenceManagerFactory instances are being created by different
 classloaders. Since this is an expensive operation, this could explain why
 you're experiencing such slow performance. Did you follow Toby's suggestion
 in the last post?
 -
 1)  Are you maybe loading that singleton class in different classloaders?
 Try logging the classloader object reference that tries to create the
 PersistenceManagerFactory. You can add a static initializer ABOVE
 pmfInstance.

 static {
   logger.log(Level.SEVERE, Loading PMF in  +
 PMF.class.getClassLoader());
 }
 -

 - Jason

 On Thu, Sep 3, 2009 at 10:03 AM, Vik vik@gmail.com wrote:

 Hie
 Strange to hear that if it is creating PMF again

 Should it do it just once when i logged in? In the logging process I do
 get an instance of PMF. So, why it is doing that again?
 Any advise what may be going wrong here?


 Thankx and Regards

 Vik
 Founder
 www.sakshum.com
 www.sakshum.blogspot.com


 On Thu, Sep 3, 2009 at 10:25 PM, datanucleus 
 andy_jeffer...@yahoo.comwrote:


 17.  I09-03 09:46AM 31.994
 
 vik.sakshum.sakshumweb.jsp.model.jdo.PMF clinit: Loading PMF in
  com.google.apphosting.runtime.security.userclassloa...@8fcc7b
 
 18.  I09-03 09:46AM 41.622

 Don't you think it's a strange way to benchmark things by including
 known one-off operations like creating a PMF ?
 Personally that ought to be included in application startup timings,
 rather than time taken to read 200 records.







 



--~--~-~--~~~---~--~~
You received this message 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] Restlet authentication doesn't work in GAE

2009-09-08 Thread patrizio.munzi

Hi all,

I've got the following exception when using Restlet authentication
into GAE...
Could anybody give me some information about that, so that I can take
the right direction...

--
SEVERE: Unhandled exception or error intercepted
java.security.AccessControlException: access denied
(javax.security.auth.AuthPermission modifyPrincipals)
at java.security.AccessControlContext.checkPermission(Unknown
Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at
com.google.appengine.tools.development.DevAppServerFactory
$CustomSecurityManager.checkPermission(DevAppServerFactory.java:139)
at javax.security.auth.Subject$SecureSet.add(Unknown Source)
at java.util.Collections$SynchronizedCollection.add(Unknown
Source)
at org.restlet.security.SecretVerifier.verify(SecretVerifier.java:
114)
at
org.restlet.security.ChallengeAuthenticator.authenticate
(ChallengeAuthenticator.java:134)
at
org.restlet.security.Authenticator.beforeHandle(Authenticator.java:
107)
at org.restlet.routing.Filter.handle(Filter.java:199)
at org.restlet.routing.Filter.doHandle(Filter.java:156)
at org.restlet.routing.Filter.handle(Filter.java:201)
at org.restlet.routing.Router.doHandle(Router.java:321)
at org.restlet.routing.Router.handle(Router.java:520)
at org.restlet.routing.Filter.doHandle(Filter.java:156)
at org.restlet.routing.Filter.handle(Filter.java:201)
at org.restlet.routing.Filter.doHandle(Filter.java:156)
at org.restlet.routing.Filter.handle(Filter.java:201)
at org.restlet.routing.Filter.doHandle(Filter.java:156)
at
org.restlet.engine.application.StatusFilter.doHandle(StatusFilter.java:
152)
at org.restlet.routing.Filter.handle(Filter.java:201)
at org.restlet.routing.Filter.doHandle(Filter.java:156)
at org.restlet.routing.Filter.handle(Filter.java:201)
at org.restlet.engine.ChainHelper.handle(ChainHelper.java:111)
at
org.restlet.engine.application.ApplicationHelper.handle
(ApplicationHelper.java:72)
at org.restlet.Application.handle(Application.java:344)
at org.restlet.routing.Filter.doHandle(Filter.java:156)
at org.restlet.routing.Filter.handle(Filter.java:201)
at org.restlet.routing.Router.doHandle(Router.java:321)
at org.restlet.routing.Router.handle(Router.java:520)
at org.restlet.routing.Filter.doHandle(Filter.java:156)
at org.restlet.routing.Filter.handle(Filter.java:201)
at org.restlet.routing.Router.doHandle(Router.java:321)
at org.restlet.routing.Router.handle(Router.java:520)
at org.restlet.routing.Filter.doHandle(Filter.java:156)
at org.restlet.routing.Filter.handle(Filter.java:201)
at org.restlet.engine.ChainHelper.handle(ChainHelper.java:111)
at org.restlet.Component.handle(Component.java:403)
at org.restlet.Server.handle(Server.java:350)
at org.restlet.engine.ServerHelper.handle(ServerHelper.java:71)
at
org.restlet.engine.http.HttpServerHelper.handle(HttpServerHelper.java:
149)
at org.restlet.ext.servlet.ServerServlet.service
(ServerServlet.java:967)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1093)
at
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter
(TransactionCleanupFilter.java:43)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1084)
at
com.google.appengine.tools.development.StaticFileFilter.doFilter
(StaticFileFilter.java:121)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1084)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
360)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:
216)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
181)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
712)
at org.mortbay.jetty.webapp.WebAppContext.handle
(WebAppContext.java:405)
at
com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle
(DevAppEngineWebAppContext.java:54)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
139)
at
com.google.appengine.tools.development.JettyContainerService
$ApiProxyHandler.handle(JettyContainerService.java:313)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
139)
at org.mortbay.jetty.Server.handle(Server.java:313)
at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
506)
at
org.mortbay.jetty.HttpConnection$RequestHandler.content
(HttpConnection.java:844)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:
205)
at 

[appengine-java] Re: Appengine Jetty Stuck at checking for update

2009-09-08 Thread Don Schwarz
You can disable this check in a few different ways.  If you're running from
Eclipse then the easiest thing to do is probably to create a file named
.appcfg_no_nag in your home directory (i.e. the value of the user.home
Java system property).  The contents of this file do not matter.

On Tue, Sep 8, 2009 at 6:56 AM, Ali Pakkan ali1...@gmail.com wrote:


 I have the same issue.

 In Eclipses's preferences, update check is disabled. But it still
 tries to update.. And when behind firewall, it gets stuck.

 To be sure, i ve captured a trace as follows:

 GET /api/updatecheck?
 runtime=javarelease=1.2.5timestamp=1251760260api_versions=['1.0']
 HTTP/1.1
 User-Agent: Java/1.6.0_13
 Host: appengine.google.com
 Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
 Connection: keep-alive

 HTTP/1.1 200 OK
 Content-Type: text/html; charset=utf-8
 Cache-Control: no-cache
 Expires: Fri, 01 Jan 1990 00:00:00 GMT
 Date: Tue, 08 Sep 2009 11:43:07 GMT
 Server: Google Frontend
 Transfer-Encoding: chunked

 3d
 release: 1.2.5
 timestamp: 1251760260
 api_versions: ['1.0']


 aLi

 On Aug 13, 11:43 pm, Jason (Google) apija...@google.com wrote:
  It is possible to disable the update check -- check out the Google
  preference panel in Eclipse's preferences. That said, since update checks
  are throttled, this may not be the source of the issue. Have you tried
  launching the Jetty server outside of Eclipse, by any chance? This would
  help narrow down the source of the issue.
  - Jason
 
 
 
  On Mon, Aug 10, 2009 at 8:00 PM, abhinav abhinav.l...@gmail.com wrote:
 
   Hi,
 
   I am using appengine sdk with eclipse. When I am using it in my office
   which has a firewall and no direct access to internet it takes a long
   time to start the jetty server. This is probably because of the
   default update check that appengine dev app server is doing at
   startup. How can I disable this from eclipse ???
 
   --
   Abhinav
 


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



[appengine-java] Re: Is it possible to host a Restful Web Service on GAE.

2009-09-08 Thread patrizio.munzi

Yes,

I've done something similar even though very simple.

On Sep 8, 1:56 pm, shradha shradh...@gmail.com wrote:
 hi,
 Since SOAP web service is not working on Google App Engine. Is it
 possible to host a Restful Web Service on GAE.
 Can we use Restlet API for that
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: Appengine Jetty Stuck at checking for update

2009-09-08 Thread Miguel Méndez
I think that there is some confusion here.  The update configuration UI
exposed by the Google Plugin for Eclipse is for the plugin.  However, the
DevAppServer has its own checks.  If you are not using GWT then you should
be able to add the --disable_update_check flag as a command line argument.
If you are using GWT then you can add a .appcfg_no_nag file in your home
directory.

HTH,

On Tue, Sep 8, 2009 at 7:56 AM, Ali Pakkan ali1...@gmail.com wrote:


 I have the same issue.

 In Eclipses's preferences, update check is disabled. But it still
 tries to update.. And when behind firewall, it gets stuck.

 To be sure, i ve captured a trace as follows:

 GET /api/updatecheck?
 runtime=javarelease=1.2.5timestamp=1251760260api_versions=['1.0']
 HTTP/1.1
 User-Agent: Java/1.6.0_13
 Host: appengine.google.com
 Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
 Connection: keep-alive

 HTTP/1.1 200 OK
 Content-Type: text/html; charset=utf-8
 Cache-Control: no-cache
 Expires: Fri, 01 Jan 1990 00:00:00 GMT
 Date: Tue, 08 Sep 2009 11:43:07 GMT
 Server: Google Frontend
 Transfer-Encoding: chunked

 3d
 release: 1.2.5
 timestamp: 1251760260
 api_versions: ['1.0']


 aLi

 On Aug 13, 11:43 pm, Jason (Google) apija...@google.com wrote:
  It is possible to disable the update check -- check out the Google
  preference panel in Eclipse's preferences. That said, since update checks
  are throttled, this may not be the source of the issue. Have you tried
  launching the Jetty server outside of Eclipse, by any chance? This would
  help narrow down the source of the issue.
  - Jason
 
 
 
  On Mon, Aug 10, 2009 at 8:00 PM, abhinav abhinav.l...@gmail.com wrote:
 
   Hi,
 
   I am using appengine sdk with eclipse. When I am using it in my office
   which has a firewall and no direct access to internet it takes a long
   time to start the jetty server. This is probably because of the
   default update check that appengine dev app server is doing at
   startup. How can I disable this from eclipse ???
 
   --
   Abhinav
 



-- 
Miguel

--~--~-~--~~~---~--~~
You received this message 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] JDOs not updating.

2009-09-08 Thread Glyph

I'm using JDO.  Trying to update an object once it's been saved.  It
appears to save, but when the persistence manager is closed and then a
new one is opened, the object does not not have the saved values in
it.  It contains the original values that were inserted.

Below is a simple JDO(MyJDO), and a simple RemoteServiceServlet
(MyDataServiceImpl).

I've stepped through it and watched the update happen.  The values are
being set correctly.
getObjectById(MyJDO.class, myjdo.id);  on the same persistence manager
that I used to update the JDO gets me back an instance with the
updated values.

But when I close the persistence manager, an instance with old values
is brought back.
Am I doing something wrong here?
(i've also tried using a Query instead of getobjectbyid.
I've tried using persistencemanager.flush()
I've tried with and without transaction.begin/commit
I've tried with and without pm.makePersistent.

Has anyone else seen this behavior?

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class MyJDO implements Serializable{

private static final long serialVersionUID = 1L;

@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
public Long id;

@Persistent
public double myDouble;

@Persistent
public String myString;


}



public class MyDataServiceImpl  extends RemoteServiceServlet
implements MyDataService{

private static final PersistenceManagerFactory pmfInstance =
JDOHelper.getPersistenceManagerFactory(transactions-
optional);


public Boolean update(MyJDO myjdo) {

Boolean done = false;

PersistenceManager pm = pmfInstance.getPersistenceManager();

try {
if (myjdo.id != 0L) {
double dblVal = 5.0;
String strVal = this value does not save for 
subsequent calls;

pm.currentTransaction().begin();


MyJDO persistentJDO = 
pm.getObjectById(MyJDO.class, myjdo.id);
persistentJDO.myDouble = dblVal;
persistentJDO.myString = strVal;
pm.makePersistent(persistentJDO);

pm.currentTransaction().commit();

MyJDO tjdo = pm.getObjectById(MyJDO.class, 
myjdo.id);
//tjdo.myDouble  is 5.0 like we'd expecet
//tjdo.myString is this value does not save 
for subsequent
calls  like we'd expect

} else {

pm.makePersistent(myjdo);
}
done = true;
} catch (Exception ex) {
 pm.currentTransaction().rollback();

} finally {
pm.close();
}

--~--~-~--~~~---~--~~
You received this message 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: One-to-many relationships and saving

2009-09-08 Thread Dobromir

Hi Max,

I updated my code to use getters  setters and set both children and
parent relationships. The tests still fail as before:

public class RelationshipTest extends LocalServiceTestCase {

  @Test  // PASSES
  public void saveParentWithChildAdded() throws Throwable {
Child child = new Child();
Parent parent = new Parent();
parent.addChild(child);
savePojo(parent);
assertNotNull(child.key);
assertNotNull(parent.key);
  }

  @Test  // FAILS
  public void saveParentThenAddChild() throws Throwable {
Child child = new Child();
Parent parent = new Parent();
savePojo(parent);
assertNotNull(parent.key);
parent.addChild(child);
child.setParent(parent);
savePojo(parent);
assertNotNull(parent.key);
assertNotNull(child.key);  // THIS FAILS
  }

  @Test  // FAILS
  public void saveChildWithParentSet() throws Exception {
Child child = new Child();
Parent parent = new Parent();
savePojo(parent);
child.setParent(parent);
parent.addChild(child);
savePojo(child);  // Shouldn't this work??
assertNotNull(parent.key);
assertNotNull(child.key);// THIS FAILS
  }

  @Test  // FAILS, obviously
  public void saveParentWithParentSet() throws Exception {
Child child = new Child();
Parent parent = new Parent();
savePojo(parent);
child.setParent(parent);
parent.addChild(child);
savePojo(parent);
assertNotNull(parent.key);
assertNotNull(child.key);// THIS FAILS
  }

  private void savePojo(Object pojo) throws Exception {
PersistenceManager pm = PMF.get().getPersistenceManager();
pm.setDetachAllOnCommit(true);
pm.setCopyOnAttach(false);
try {
  pm.makePersistent(pojo);
  pm.close();
} catch (Exception e) {
  pm.close();
  throw e;
}
  }

  @PersistenceCapable(identityType = IdentityType.APPLICATION,
detachable=true)
  public static class Parent {

@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
Key key;
@Persistent(mappedBy = parent)
private ListChild children;

public Parent() {
  children = Lists.newArrayList();
}

public ListChild getChildren() {
  return children;
}
public void addChild(Child child) {
  children.add(child);
}
  }

  @PersistenceCapable(identityType = IdentityType.APPLICATION,
detachable=true)
  public static class Child {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
Key key;

@Persistent
private Parent parent;

public Parent getParent() {
  return parent;
}

public void setParent(Parent parent) {
  this.parent = parent;
}
  }
}

Any ideas?

Dobromir

On Aug 14, 8:11 pm, Max Ross maxr+appeng...@google.com wrote:
 You may find this page 
 helpful:http://www.datanucleus.org/products/accessplatform_1_1/jdo/orm/one_to...

 The key point is that you need to set both sides of a bidirectional
 relationship.  Also, if you're accessing members directly (as in the below
 example) you need to annotate the class performing this access with
 @PersistenceAware.  Otherwise JDO can't see that you're modifying the fields
 and doesn't know it needs to perform any updates.  However, it's much easier
 to just always access members via setters and getters.

 Hope this helps,
 Max



 On Fri, Aug 14, 2009 at 4:31 PM, Dobromir dmont...@gmail.com wrote:

  Here's another test that fails and which gets to the heart of my
  problem: how do I add a Child to a Parent that's already been saved?

  �...@test  // FAILS - help!
   public void saveParentThenAddChild() throws Throwable {
      Child child = new Child();
     Parent parent = new Parent();
      savePojo(parent);
     assertNotNull(parent.key);
      parent.children = Lists.newArrayList(child);
     savePojo(parent);
      assertNotNull(parent.key);
     assertNotNull(child.key);  // THIS FAILS
   }
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: problem in updating to 1.2.5 in eclipse

2009-09-08 Thread Jason Parekh
Hey Vik,
Dug around a bit deeper with Rajeev and found an Eclipse bug that sounds
what you've run into (at
https://bugs.eclipse.org/bugs/show_bug.cgi?id=236437 .)

The solution they propose is to remove the update site, and re-add it.
 Please let us know if that fixes your problem.

Thanks,
jason

On Tue, Sep 8, 2009 at 11:45 AM, Jason Parekh jasonpar...@gmail.com wrote:

 Hi Vik,
 This is very strange.  I'm looking at the metadata files for the update
 site, and only line 9 and 10 have a repository element (which both contain a
 valid url attribute).

 Since you're the only person I've seen with this issue, I
 suggest uninstalling the Google Plugin for Eclipse, deleting the update
 site, re-adding the update site, and re-installing the plugin.  Please let
 us know how things go! :)

 jason


 On Fri, Sep 4, 2009 at 11:22 AM, Vik vik@gmail.com wrote:

 Hie
 using for J2EE  Eclipse SDK
 Version: 3.4.2
 Build id: M20090211-1700

 And below is what i see in log file
 !ENTRY org.eclipse.equinox.p2.metadata.repository 2 0 2009-09-04
 20:45:42.018
 !MESSAGE Error parsing metadata repository
 !SUBENTRY 1 org.eclipse.equinox.p2.core 2 0 2009-09-04 20:45:42.018
 !MESSAGE Error at line 9, column 99: Missing required attribute in
 repository: url
 !SUBENTRY 1 org.eclipse.equinox.p2.core 2 0 2009-09-04 20:45:42.018
 !MESSAGE Error at line 9, column 99: Illegal value for attribute url of
 element repository: null
 !SUBENTRY 1 org.eclipse.equinox.p2.core 2 0 2009-09-04 20:45:42.018
 !MESSAGE Error at line 10, column 99: Missing required attribute in
 repository: url
 !SUBENTRY 1 org.eclipse.equinox.p2.core 2 0 2009-09-04 20:45:42.018
 !MESSAGE Error at line 10, column 99: Illegal value for attribute url of
 element repository: null
 !SUBENTRY 1 org.eclipse.equinox.p2.core 2 0 2009-09-04 20:45:42.018
 !MESSAGE Error at line 11, column 97: Missing required attribute in
 repository: url
 !SUBENTRY 1 org.eclipse.equinox.p2.core 2 0 2009-09-04 20:45:42.018
 !MESSAGE Error at line 11, column 97: Illegal value for attribute url of
 element repository: null
 !SUBENTRY 1 org.eclipse.equinox.p2.core 2 0 2009-09-04 20:45:42.018
 !MESSAGE Error at line 12, column 97: Missing required attribute in
 repository: url
 !SUBENTRY 1 org.eclipse.equinox.p2.core 2 0 2009-09-04 20:45:42.018
 !MESSAGE Error at line 12, column 97: Illegal value for attribute url of
 element repository: null

 !ENTRY org.eclipse.equinox.p2.engine 4 4 2009-09-04 20:48:28.202
 !MESSAGE An error occurred while collecting items to be installed
 !SUBENTRY 1 org.eclipse.equinox.p2.artifact.repository 4 0 2009-09-04
 20:48:28.202
 !MESSAGE No repository found containing:
 com.google.appengine.eclipse.sdkbundle/osgi.bundle/1.2.5.v200909021031
 !SUBENTRY 1 org.eclipse.equinox.p2.artifact.repository 4 0 2009-09-04
 20:48:28.202
 !MESSAGE No repository found containing:
 com.google.appengine.eclipse.sdkbundle.e34.feature/org.eclipse.update.feature/1.2.5.v200909021031



 Thankx and Regards

 Vik
 Founder
 www.sakshum.com
 www.sakshum.blogspot.com


 2009/9/4 Miguel Méndez mmen...@google.com

 What version of eclipse are you using?  What flavor of eclipse are you
 using (Eclipse for Java Developers, Eclipse for J2EE, etc)?  Are there any
 exceptions in the PATH_TO_YOUR_WORKSPACE/.metadata/.log file?


 On Fri, Sep 4, 2009 at 9:18 AM, Vik vik@gmail.com wrote:

 i still see this issue.. in a way for last 10 hours..
 i have not changed the updated site and i have got previous updates
 properly in past.
 Thankx and Regards

 Vik
 Founder
 www.sakshum.com
 www.sakshum.blogspot.com


 2009/9/4 Miguel Méndez mmen...@google.com

  Was this a temporary problem?  Are you sure that you are using the
 right update site for your version of eclipse?

 On Fri, Sep 4, 2009 at 3:13 AM, Vik vik@gmail.com wrote:

 hie
 getting error

 An error occurred while collecting items to be installed
   No repository found containing:
 com.google.appengine.eclipse.sdkbundle/osgi.bundle/1.2.5.v200909021031
   No repository found containing:
 com.google.appengine.eclipse.sdkbundle.e34.feature/org.eclipse.update.feature/1.2.5.v200909021031


 While trying to upgrade to 1.2.5 in eclipse.

 Thankx and Regards

 Vik
 Founder
 www.sakshum.com
 www.sakshum.blogspot.com





 --
 Miguel








 --
 Miguel




 



--~--~-~--~~~---~--~~
You received this message 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: Eclipse 3.3 plugin missing from update site

2009-09-08 Thread James H

Please disregard this issue...I've decided to install Eclipse Galileo
instead of trying to figure out what is wrong with this older version
and the GAE update.

On Sep 7, 9:44 am, Anne van der Bom annes.datam...@gmail.com wrote:
 James,

 My situation is a bit different from yours. I did not upgrade. I
 installed the GWT SDK and Eclipse Plugin a week ago. Then ran into
 some
 problems and tried to uninstall the Google GWT features (all 3) to see
 if that would change the situation. When I tried to re-install them
 today, I noticed the missing plugin.
--~--~-~--~~~---~--~~
You received this message 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: new stack traces after upgrading to SDK 1.2.5

2009-09-08 Thread anjolight

I've got the same stack trace. I reveted back to 1.2.2 due and this
exception disappeared.

On Sep 4, 3:14 pm, Vince Bonfanti vbonfa...@gmail.com wrote:
 That's fine. :)

 I just wanted to make sure someone was aware of this, since it
 appeared to be something new introduced with the latest SDK.

 On Fri, Sep 4, 2009 at 4:14 PM, Toby Reyeltsto...@google.com wrote:
  It's a message that you can safely ignore. There is a reason it's logged at
  INFO. :)
--~--~-~--~~~---~--~~
You received this message 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: new stack traces after upgrading to SDK 1.2.5

2009-09-08 Thread Don Schwarz
I would recommend setting:

com.google.appengine.repackaged.com.google.common.base.FinalizableReferenceQueue.level=WARNING

in your logging.properties file to disable this log message.  It's harmless,
but annoying.

On Tue, Sep 8, 2009 at 12:49 PM, anjolight anjoli...@gmail.com wrote:


 I got the same error after upgrading to 1.2.5.
 I reverted to 1.2.2 and the error disappeared.

 On Sep 4, 3:14 pm, Vince Bonfanti vbonfa...@gmail.com wrote:
  That's fine. :)
 
  I just wanted to make sure someone was aware of this, since it
  appeared to be something new introduced with the latest SDK.
 
  On Fri, Sep 4, 2009 at 4:14 PM, Toby Reyeltsto...@google.com wrote:
   It's a message that you can safely ignore. There is a reason it's
 logged at
   INFO. :)
 


--~--~-~--~~~---~--~~
You received this message 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] Chat Time transcript for September 2, 2009

2009-09-08 Thread Jason (Google)

Last Wednesday, the App Engine team hosted the latest session of its
bimonthly IRC office hours. A transcript of the session and a summary
of the topics covered is provided below. The next session will take
place on Wednesday, September 16th from 9:00-10:00 a.m. PDT in the
#appengine channel on irc.freenode.net.

--SUMMARY---
- Q: Where can I find information on per-minute and daily quotas,
maximum number of simultaneous requests, etc.? A: The Quotas doc at
http://code.google.com/appengine/docs/quotas.html lists most per-
minute and daily quotas. Task queue quotas and limits are listed in
http://code.google.com/appengine/docs/python/taskqueue/overview.html#Quotas_and_Limits.
You can also check the Quota Details page in the Admin Console to see
quota information for a particular application.  [7:01, 7:03]

- JSF 2.0, ICEFaces 1.8.1 compatibility with App Engine -- several
developers have written posts on using JSF 2.0 with App Engine (see
http://groups.google.com/group/google-appengine-java/web/will-it-play-in-app-engine),
but it appears that ICEFaces is not currently compatible.  [7:04-7:07,
7:11, 7:14-7:15, 7:42, 7:56]

- Tip: one way to optimize your application, especially when you're
working with large entities (i.e. entities with large BLOB properties)
is to create separate entities, placing the BLOB data in its own
entity and referencing this from the original entity. This way,
retrieving the entity doesn't necessarily pull down the large BLOBs,
although they're available should you need them later -- think of a
listing of file metadata (i.e. name, size, hash) where the actual file
is only loaded when the user clicks on a particular filename. [7:19,
7:21]

- http://code.google.com/p/googleappengine/issues/detail?id=1444
strikes again -- (Java) deployment fails because of a vague more than
100 URLMap entries in application configuration error. We'll work on
trying to reproduce this internally, but if you're seeing this, please
create a new thread in the group with the contents of your web.xml and
appengine-web.xml file and the number of JSPs and static files your
application includes. [7:22, 7:26, 7:28, 7:36-7:38, 7:41]

- Q: Is there support for HTTPS on custom domains? A: We're waiting on
broader support for SNI before we implement this. [7:26, 7:28, 7:30]

- If your application experiences a denial of service attack, your
application may stop serving if requests come in at 500 qps or above,
the request limit for applications with billing enabled. Currently,
you can filter requests by IP address if an attacker is primarily
using one or several machines. The team is planning a better API for
dealing with potential attacks, but unfortunately it wasn't
prioritized highly enough to make it on the latest roadmap. [7:35,
7:40, 7:49]


--FULL TRANSCRIPT---
[7:00pm] Jason_Google: Welcome Everyone! I'll be here for the next
hour or so to answer any App Engine questions, so don't hold back.
[7:00pm] joakime:
[7:01pm] kaminoo: First time for me here, do we just fire off our
questions?
[7:01pm] Jason_Google: Yep, fire away.
[7:01pm] kaminoo: Wanted to ask about Task Queues
[7:01pm] joakime: Java - where can I find information about
Simultaneous Request limits and quota details?  i've been hitting it
recently. even tho i have a $20 budget set and less than 1%
utilization on all other quota constrained stuff.
[7:03pm] maxoizo: Hi Jason! Can google team update offline docs with
actual documentation? (last update May 8, 2009).
[7:03pm] kaminoo: Python: Task Queues. Me and some other guys have
posted a lot of bugs we have found in the queue system. My bugs in
particular have been more than a month there, not even acknowledge. Do
we bother keep testing it? Are we doing a good job at it? Will we have
an answer?
[7:03pm] Jason_Google: joakime: It looks like
http://code.google.com/appengine/docs/python/taskqueue/overview.html#Quotas_and_Limits
is the only thing that's available for now.
[7:03pm] Jason_Google: maxoizo: Thanks for the suggestion. I'll try to
do this for you soon, hopefully before the end of the week. Adding it
to my to-dos right now.
[7:04pm] maxoizo: 2Jason_Google: tnx!
[7:04pm] guest07: i used the dev server for java
[7:04pm] Jason_Google: kaminoo: Yes, please keep filing your bugs.
We're not doing the best job acknowledging them on the public tracker,
but we are tracking them internally.
[7:04pm] guest07: and it seems that appengine doesn't support jsf 1.2
[7:05pm] gae-peon: ?
[7:05pm] Jason_Google: guest07: Have you seen
http://groups.google.com/group/google-appengine-java/web/will-it-play-in-app-engine?
[7:05pm] kaminoo: Jason_Google: Great to know. The feature is GREAT.
But unusable with the current problems. Plus, we had a lot of
suggestions to make it even better. Hopefully we'll see some updates
soon enough. tnx!
[7:06pm] Jason_Google: guest07: Which links to

[appengine-java] Re: problem in updating to 1.2.5 in eclipse

2009-09-08 Thread Vik
yeah that worked for me as well..
Thankx and Regards

Vik
Founder
www.sakshum.com
www.sakshum.blogspot.com


On Tue, Sep 8, 2009 at 10:10 PM, Jason Parekh jasonpar...@gmail.com wrote:

 Hey Vik,
 Dug around a bit deeper with Rajeev and found an Eclipse bug that sounds
 what you've run into (at
 https://bugs.eclipse.org/bugs/show_bug.cgi?id=236437 .)

 The solution they propose is to remove the update site, and re-add it.
  Please let us know if that fixes your problem.

 Thanks,
 jason


 On Tue, Sep 8, 2009 at 11:45 AM, Jason Parekh jasonpar...@gmail.comwrote:

 Hi Vik,
 This is very strange.  I'm looking at the metadata files for the update
 site, and only line 9 and 10 have a repository element (which both contain a
 valid url attribute).

 Since you're the only person I've seen with this issue, I
 suggest uninstalling the Google Plugin for Eclipse, deleting the update
 site, re-adding the update site, and re-installing the plugin.  Please let
 us know how things go! :)

 jason


 On Fri, Sep 4, 2009 at 11:22 AM, Vik vik@gmail.com wrote:

 Hie
 using for J2EE  Eclipse SDK
 Version: 3.4.2
 Build id: M20090211-1700

 And below is what i see in log file
 !ENTRY org.eclipse.equinox.p2.metadata.repository 2 0 2009-09-04
 20:45:42.018
 !MESSAGE Error parsing metadata repository
 !SUBENTRY 1 org.eclipse.equinox.p2.core 2 0 2009-09-04 20:45:42.018
 !MESSAGE Error at line 9, column 99: Missing required attribute in
 repository: url
 !SUBENTRY 1 org.eclipse.equinox.p2.core 2 0 2009-09-04 20:45:42.018
 !MESSAGE Error at line 9, column 99: Illegal value for attribute url of
 element repository: null
 !SUBENTRY 1 org.eclipse.equinox.p2.core 2 0 2009-09-04 20:45:42.018
 !MESSAGE Error at line 10, column 99: Missing required attribute in
 repository: url
 !SUBENTRY 1 org.eclipse.equinox.p2.core 2 0 2009-09-04 20:45:42.018
 !MESSAGE Error at line 10, column 99: Illegal value for attribute url
 of element repository: null
 !SUBENTRY 1 org.eclipse.equinox.p2.core 2 0 2009-09-04 20:45:42.018
 !MESSAGE Error at line 11, column 97: Missing required attribute in
 repository: url
 !SUBENTRY 1 org.eclipse.equinox.p2.core 2 0 2009-09-04 20:45:42.018
 !MESSAGE Error at line 11, column 97: Illegal value for attribute url
 of element repository: null
 !SUBENTRY 1 org.eclipse.equinox.p2.core 2 0 2009-09-04 20:45:42.018
 !MESSAGE Error at line 12, column 97: Missing required attribute in
 repository: url
 !SUBENTRY 1 org.eclipse.equinox.p2.core 2 0 2009-09-04 20:45:42.018
 !MESSAGE Error at line 12, column 97: Illegal value for attribute url
 of element repository: null

 !ENTRY org.eclipse.equinox.p2.engine 4 4 2009-09-04 20:48:28.202
 !MESSAGE An error occurred while collecting items to be installed
 !SUBENTRY 1 org.eclipse.equinox.p2.artifact.repository 4 0 2009-09-04
 20:48:28.202
 !MESSAGE No repository found containing:
 com.google.appengine.eclipse.sdkbundle/osgi.bundle/1.2.5.v200909021031
 !SUBENTRY 1 org.eclipse.equinox.p2.artifact.repository 4 0 2009-09-04
 20:48:28.202
 !MESSAGE No repository found containing:
 com.google.appengine.eclipse.sdkbundle.e34.feature/org.eclipse.update.feature/1.2.5.v200909021031



 Thankx and Regards

 Vik
 Founder
 www.sakshum.com
 www.sakshum.blogspot.com


 2009/9/4 Miguel Méndez mmen...@google.com

 What version of eclipse are you using?  What flavor of eclipse are you
 using (Eclipse for Java Developers, Eclipse for J2EE, etc)?  Are there any
 exceptions in the PATH_TO_YOUR_WORKSPACE/.metadata/.log file?


 On Fri, Sep 4, 2009 at 9:18 AM, Vik vik@gmail.com wrote:

 i still see this issue.. in a way for last 10 hours..
 i have not changed the updated site and i have got previous updates
 properly in past.
 Thankx and Regards

 Vik
 Founder
 www.sakshum.com
 www.sakshum.blogspot.com


 2009/9/4 Miguel Méndez mmen...@google.com

  Was this a temporary problem?  Are you sure that you are using the
 right update site for your version of eclipse?

 On Fri, Sep 4, 2009 at 3:13 AM, Vik vik@gmail.com wrote:

 hie
 getting error

 An error occurred while collecting items to be installed
   No repository found containing:
 com.google.appengine.eclipse.sdkbundle/osgi.bundle/1.2.5.v200909021031
   No repository found containing:
 com.google.appengine.eclipse.sdkbundle.e34.feature/org.eclipse.update.feature/1.2.5.v200909021031


 While trying to upgrade to 1.2.5 in eclipse.

 Thankx and Regards

 Vik
 Founder
 www.sakshum.com
 www.sakshum.blogspot.com





 --
 Miguel








 --
 Miguel








 


--~--~-~--~~~---~--~~
You received this message 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 BUG !?

2009-09-08 Thread Jason (Google)
It's hard to say without seeing your query. I realize you're using a
wrapper, but the JDO query itself should only be a few lines of code -- can
you post it?

- Jason

On Fri, Sep 4, 2009 at 4:01 AM, Cornel corneliu.lupu...@gmail.com wrote:


 Hello!

 I have some objects in the database that have a String property called
 version.
 Some of them have version = '0.2', the others have '0.0'

 I have an application written in java.
 When i query for an object with version 0.2 with the low level api it
 works (it finds 62 obejcts)

DatastoreService ds =
 DatastoreServiceFactory.getDatastoreService
 ();
Query q1 = new Query(DbRawContact);
q1.addFilter(version, FilterOperator.EQUAL,
 0.2);
PreparedQuery pq = ds.prepare(q1);
log.info(remainging:  + pq.countEntities());

 When i query with JDO the query doesn't fetch anything!

 I won't post the JDO query here, because i actually use a wrapper
 around it (too many lines to post here); but i'm 99.99% sure that code
 is correct because it works for a version = '0.0' query with no
 problems! (and for all other queries that i'm doing with it)

 I even tried to fetch one of those version 0.2 objects using a
 different property; was succesful, so then i tried a consecutive query
 with version = fetchedObject.getVersion(). No results! What gives? :(
 


--~--~-~--~~~---~--~~
You received this message 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: JDOs not updating.

2009-09-08 Thread datanucleus

 Am I doing something wrong here?

Updating fields of an object directly has always been a dodgy practice
IMHO, and in this case you bypass JDO's mechanism for knowing if
fields are updated or not. Use setters, or mark the updating class as
PersistenceAware
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: How to make a query using low level API using the 'key' property?

2009-09-08 Thread Jason (Google)
A key is a complex object -- you can't query on it using a simple string
literal. Also, you shouldn't be changing an entity's key after it's
persisted -- once a key is set, that key is associated with the entity for
its lifetime.

If you want to query by key, you should use the __key__ syntax and use a Key
object to filter against. I believe you can do this in JDO just as you can
with the low-level API; please let me know if I'm incorrect about this.

- Jason

On Fri, Sep 4, 2009 at 5:08 AM, Corneliu Paul Lupulet 
corneliu.lupu...@gmail.com wrote:

 I noticed that i can make a query like this:

 DatastoreService ds = DatastoreServiceFactory.getDatastoreService();
 Query query = new Query(DbContact);
 query.addFilter(__key__, FilterOperator.GREATER_THAN,
 KeyFactory.stringToKey(a_key_string));

 And it works. It fetches the correct results.

 Then i also noticed i can do this (locally on my computer; i haven't tested
 this on app-engine yet):

 entity.put(__key__, some value);
 ds.put(entity);
 Using the datastore viewer i can see the object with this property
 (__key__) and the corresponding value i've set.

 Then if try a query like this:
 q1.addFilter(__key__, FilterOperator.EQUAL, some value);

 it doesnt' fetch any results!

 So can someone explain the mechanism of what is happening over here? :)

 One last thing i've noticed:
 If i try the following line in DataViewer -- Query (using GQL):
 SELECT * FROM DbCategory where __key__  'a'

 I get:

 server error(500)
 Server Error

 A server error has occurred.

 And also, are there any other reserved properties like __key__ i should
 be aware of, or which are useful for special kinds of queries.?

 On Fri, Sep 4, 2009 at 2:17 PM, Cornel corneliu.lupu...@gmail.com wrote:
 
  Hello,
 
  How can i make a Query using the lowlevel API, similar to this:
  select * from Entity where key  certain_key ?
 
  In JDO i would do something like this:
  select * from Entity where encodedKey  a_key_string
 
  where encodedKey is my objects' primary key:
 
 @PrimaryKey
 @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
 @Extension(vendorName=datanucleus, key=gae.encoded-pk,
  value=true)
 private String encodedKey;


 --
 Corneliu Paul Lupulet




 


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



[appengine-java] Re: Java memcache increment with initial value

2009-09-08 Thread Jason (Google)
Hi Vince. I'm pretty certain that the Python method is for convenience and
not necessarily any more efficient than the three calls you would have to
make with the Java API. Feel free to do your own benchmarking.

- Jason

On Fri, Sep 4, 2009 at 12:27 PM, Vince Bonfanti vbonfa...@gmail.com wrote:


 I notice that the Python memcache API supports an increment with
 initial value operation:


 http://code.google.com/appengine/docs/python/memcache/clientclass.html#Client_incr

 Are there any plans to support this on Java? In the Python
 implementation, is this simply done as three memcache calls, something
 like this:

Long counter = memcache.increment( key, 1 );
if ( counter == null ) {
memcache.put( key, (long)0, null, SetPolicy.ADD_ONLY_IF_NOT_PRESENT
 );
counter = memcache.increment( key, 1 );
}

 If that's all Python is doing, then I don't see any value of adding it
 to Java; but, if the Python implementation is somehow more efficient
 than the three memcache calls in the Java example above, then I'd like
 to see it added to Java.

 Thanks.

 Vince

 


--~--~-~--~~~---~--~~
You received this message 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: support for task queues in development environment?

2009-09-08 Thread Max Ross
Interesting.  We were planning on getting rid of manual task execution so
that dev would completely match prod, but if your experience is shared by
others it sounds like we should consider leaving the door open for manual
task execution as well.

Thanks,
Max

On Mon, Sep 7, 2009 at 8:52 AM, Vince Bonfanti vbonfa...@gmail.com wrote:


 Perfect! At least for initial debugging, that's actually better than
 having the tasks execute automatically--it makes it easier to see
 what's going on with multiple tasks being queued.

 Thanks.

 On Sun, Sep 6, 2009 at 7:05 PM, Max 
 Rossmaxr+appeng...@google.commaxr%2bappeng...@google.com
 wrote:
  Hi Vince,
 
  In order to get the task queue into the 1.2.5 release we had to take a
  shortcut with the local development environment.  Tasks execute
  automatically in production but not locally.  However, in the local
  environment you can kick off your tasks manually by visiting the task
 queue
  admin console page, accessible via a link off of
  http://localhost:8080/_ah/admin
 
  We thought we had this properly documented but it appears we do not.
 I've
  filed a bug and we'll get this taken care of quickly.
 
  Sorry for the trouble.
 
  Thanks,
  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] Re: Seeing different (incorrect?) JDO behavior after upgrading to 1.2.5

2009-09-08 Thread Jason (Google)
Hi David. I believe this is expected behavior -- unindexed properties,
including Text, Blob, and reference properties as well as descendants
(PrivilegedUser in this case) are not retrieved by default. There is an
easier way to add a field to the default fetch group:

@Persistent(defaultFetchGroup = true)
private PrivilegedUser privilegedUser;

Can you let me know if this works for you? If not, can you share your
PrivilegedUser class definition?

- Jason

On Fri, Sep 4, 2009 at 9:56 PM, David turntwo...@gmail.com wrote:


 I’ve been working with a fairly simple data model that has an
 Organization object which contains some String members as well as a
 member variable of type PrivilegedUser.  And PrivilegedUser extends a
 User, and contains only a Key and some String members.

 @PersistenceCapable(identityType = IdentityType.APPLICATION,
 detachable=true)
 public class Organization implements Serializable {

@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Long id;


@Persistent
private String organizationId;

@Persistent
private String organizationName;


@Persistent
 private PrivilegedUser privilegedUser;

 ….

 I have code running successfully under 1.2.2 which creates an
 Organization, then creates a Privileged User object, and assigns it to
 the Organization, and then makes the Organization persistent.
 Later I query by organizationId to retrieve the Organization object,
 and update the PrivilegedUser on the Organization object.
 This works fine under 1.2.2.

 Under 1.2.5 I began getting the following error:
 You have just attempted to access field privilegedUser yet this
 field was not detached when you detached the object. Either dont
 access this field, or detach it when detaching the object.

 However, after stepping through the debugger I believe the root cause
 is that the privilegedUser field is null on the Organization object
 returned from the query (the String members are still correct).  This
 value is null even before I attempt to detach the Organization object
 from the PersistenceManager.

 After seeing this behavior I modified the query code I had been using
 to include a custom fetch plan for the query.
 This did not change the behavior under 1.2.5.

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


FetchGroup fetchGroup = pm.getFetchGroup(Organization.class,
 OrganizationGroup);
fetchGroup.addMember(privilegedUser);

// Add this group to the fetch plan (using its name)
FetchPlan fetchPlan = pm.getFetchPlan();
fetchPlan.addGroup(OrganizationGroup);

Query query = pm.newQuery(Organization.class);
query.setFilter(organizationId == rhsValue);
query.declareParameters(String rhsValue);



 I don't think the following is relevant, but I’ve also noticed that
 under 1.2.5 the following exception occurs, which has been reported by
 others:

 INFO: Failed to start reference finalizer thread. Reference cleanup
 will only occur when new references are
 created.java.lang.reflect.InvocationTargetException

 Does this sound like a bug introduced under 1.2.5, or is this expected
 behavior that was not enforced under 1.2.2?  In either case, does
 anyone have a suggestion on how to work around this issue?

 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-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: Simplest web framework + ORM for GAE/J?

2009-09-08 Thread Thomas Wiradikusuma

you mean more to the web framework thing? try Grails or Gaelyk.

On Sep 8, 12:02 am, Chris xop...@gmail.com wrote:
 What's the simplest web framework + ORM combination that works well on
 GAE/J?
--~--~-~--~~~---~--~~
You received this message 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 Relationships (Primary key for object of type XXX is null)

2009-09-08 Thread Jason (Google)
Can you post your full stack trace? Does this error get generated with the
makePersistent call or some other call?

Your sample looks relatively straightforward aside from your employee
instance's masterData field -- since you're setting up an owned relationship
with the data field, why do you need a separate unowned relationship to the
MasterData kind? If you remove the masterData field (if you don't need it),
does the error go away?

- Jason

On Sat, Sep 5, 2009 at 5:24 AM, Mr. Deckard new...@gmail.com wrote:


 Hello everyone,
 I have a class Employee (Parent) is MasterdData (Child).
 The code of classes is at the end of the message.
 When I try to write to the datastore:

 Employee employee = new Employee ();
 setMethod for employee use

 MasterData masterData = new MasterData ();
 method for use in September masterData istance

 employee.setData (masterData);

 PMF.get (). GetPersistenceManager (). MakePersistent (employe);

 I get the error:
 java.lang.IllegalStateException: Primary key for object of type
 MasterData is null

 Who helps me?
 Thanks

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

@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Long ID;

@Persistent
private Key masterData;

@Persistent
private String name;

private String lastName;

@Persistent(mappedBy = employee)
private MasterData data;

public Employee(String nome, String cognome, MasterData data) {
this.name = nome;
this.lastName = cognome;
this.data = data;
}
public Long getID() {
return ID;
}
public void setID(Long ID) {
this.ID = ID;
}
public Key getMasterData() {
return masterData;
}
public void setMasterData(Key masterData) {
this.masterData = masterData;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public MasterData getData() {
return data;
}
public void setData(MasterData data) {
this.data = data;
}
 }


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

@Persistent(valueStrategy= IdGeneratorStrategy.IDENTITY)
@PrimaryKey
private Key ID;

@Persistent
private Date dateOfBirth;

@Persistent
private String homeTown;

@Persistent
private String provinceTown;

@Persistent
private String cf;

@Persistent
private Employee employee;

public MasterData(Date dateOfBirth, String homeTown, String
 provinceTown, String cf) {
this.dateOfBirth = dateOfBirth;
this.homeTown = homeTown;
this.provinceTown = provinceTown;
this.cf = cf;
}

public Key getID() {
return ID;
}
public void setID(Key ID) {
this.ID = ID;
}
public Date getDateOfBirth() {
return dateOfBirth;
}
public void setDateOfBirth(Date dateOfBirth) {
this.dateOfBirth = dateOfBirth;
}
public String getHomeTown() {
return homeTown;
}
public void setHomeTown(String homeTown) {
this.homeTown = homeTown;
}
public String getProvinceTown() {
return provinceTown;
}
public void setProvinceTown(String provinceTown) {
this.provinceTown = provinceTown;
}
public String getCf() {
return cf;
}
public void setCf(String cf) {
this.cf = cf;
}
public Employee getEmployee() {
return employee;
}
public void setEmployee(Employee employee) {
this.employee = employee;
}

 }

 public final class PMF {
private static final PersistenceManagerFactory pmfInstance =
JDOHelper.getPersistenceManagerFactory(transactions-
 optional);

private PMF() {}

public static PersistenceManagerFactory get() {
return pmfInstance;
}
 }



 


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



[appengine-java] Re: java developers and hot deployment

2009-09-08 Thread James H

Yep, you nailed it...in under 4 minutes!  Thanks, it was driving me
nuts!

On Sep 8, 3:28 pm, Rajeev Dayal rda...@google.com wrote:
 What version of the JDK are you using? There is a known issue with JDK
 1.6.0_14 that causes breakpoints to be skipped. If you're using this JDK,
 either downgrade to JDK 1.6.0_13, or upgrade to JDK 1.6.0_16.



 On Tue, Sep 8, 2009 at 4:24 PM, James H james.hollier...@gmail.com wrote:

  What is going on with Debugging anyway?  I had been running fine with
  1.2.2 GAE plugin an Eclipse 3.3, and was able to debug nicely except
  for signature changes, additions.  Then the 1.2.5 upgarde blew my
  environment up so I decided to load Eclipse 3.5 Galileo and the latest
  GAE plugin.  But, debugging didn't work out-of-the-box.  I had to add -
  Xdebug to the builtin launch provided by the GAE plugin.  Though now,
  the debugging is sporatic.  It will stop at a breakpoint only once,
  etc...  This is NOT tolerable...I must be missing something, surely
  its intended to work as well under Eclipse 3.5 as it did under Eclipse
  3.3?

  J

  On Sep 7, 8:59 am, Nicolas Melendez nmelen...@getsense.com.ar wrote:
   hi all!
   If you are tired of running the sever again every time you make a
   change in your code, please vote this issue to have server hot
   deployment which is an   important  and time-saving feature. that
   would make java developers really happy :)

  http://code.google.com/p/googleappengine/issues/detail?id=1787- 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: java developers and hot deployment

2009-09-08 Thread Rajeev Dayal
Glad everything is working for you. As an FYI, in case this bites you in
other situations, this is a general issue with the JDK. It is not a specific
bug in App Engine, GWT, the Plugin, or Eclipse.
See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6862295 for more
information.

On Tue, Sep 8, 2009 at 4:49 PM, James H james.hollier...@gmail.com wrote:


 Yep, you nailed it...in under 4 minutes!  Thanks, it was driving me
 nuts!

 On Sep 8, 3:28 pm, Rajeev Dayal rda...@google.com wrote:
  What version of the JDK are you using? There is a known issue with JDK
  1.6.0_14 that causes breakpoints to be skipped. If you're using this JDK,
  either downgrade to JDK 1.6.0_13, or upgrade to JDK 1.6.0_16.
 
 
 
  On Tue, Sep 8, 2009 at 4:24 PM, James H james.hollier...@gmail.com
 wrote:
 
   What is going on with Debugging anyway?  I had been running fine with
   1.2.2 GAE plugin an Eclipse 3.3, and was able to debug nicely except
   for signature changes, additions.  Then the 1.2.5 upgarde blew my
   environment up so I decided to load Eclipse 3.5 Galileo and the latest
   GAE plugin.  But, debugging didn't work out-of-the-box.  I had to add -
   Xdebug to the builtin launch provided by the GAE plugin.  Though now,
   the debugging is sporatic.  It will stop at a breakpoint only once,
   etc...  This is NOT tolerable...I must be missing something, surely
   its intended to work as well under Eclipse 3.5 as it did under Eclipse
   3.3?
 
   J
 
   On Sep 7, 8:59 am, Nicolas Melendez nmelen...@getsense.com.ar wrote:
hi all!
If you are tired of running the sever again every time you make a
change in your code, please vote this issue to have server hot
deployment which is an   important  and time-saving feature. that
would make java developers really happy :)
 
   http://code.google.com/p/googleappengine/issues/detail?id=1787- 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: Bulk writes to datastore

2009-09-08 Thread Jason (Google)
Yes. If you need to be able to rollback in case one or more entities don't
get written, you'll need to use transactions. If you use transactions, your
entities must belong to the same entity group or else an exception will be
thrown. You'll get better performance if you do this outside of a
transaction since all entities can be written in parallel but you'll lose
the ability to roll back in case of an individual failure.

- Jason

On Sat, Sep 5, 2009 at 7:18 AM, Vince Bonfanti vbonfa...@gmail.com wrote:


 Your two quick notes seem to be contradictory. In order to use
 transactions, don't all of the entities have to be in the same entity
 group?

 Vince

 On Fri, Sep 4, 2009 at 8:24 PM, Jason (Google)apija...@google.com wrote:
  Batch puts are supported, yes, and as of yesterday's release, calling
  makePersistentAll (JDO) and the equivalent JPA call will take advantage
 of
  this support (previously, you had to use the low-level API).
 
  Two quick notes:
 
  1) All of the entities that you're persisting should be in separate
 entity
  groups since two entities in the same entity group can't be written to
  consecutively, and you will see datastore timeout exceptions if many
  simultaneous write requests come in for the same entity or entity group.
  2) Batch puts do not operate in a transaction. This means that some
 writes
  may succeed but others may not, so if you need the ability to rollback,
  you'll need transactions.
 
  - Jason
 
  Let me know if you have any more questions on this.
 
  - 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-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: is not persistable

2009-09-08 Thread Jason (Google)
Make sure to close your PersistenceManager instance in getCategories().

Are you seeing the original error or a different stack trace?

- Jason

On Sun, Sep 6, 2009 at 7:06 AM, Bob L. bob.net2...@gmail.com wrote:


 Oh mine! It occurred again. JDO looks quite fragile.
 Is there any wrong with following code?

 @PersistenceCapable(identityType = IdentityType.APPLICATION)
 public class Category {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Long id;
@Persistent
private String name;

public Category() {
}

public Category(String name) {
this.name = name;
}

public Long getId() {
return id;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}
 }

 serverlet:
 ...
 @SuppressWarnings(unchecked)
public ListCategory getCategories() {
String query = select from  + Category.class.getName();
PersistenceManager pm = PMF.get().getPersistenceManager();
try {
return (ListCategory)
 pm.newQuery(query).execute();
} catch (Exception ex) {
}

return null;
}

private void initializeCategories() {
ListCategory categories = this.getCategories();
if (categories == null || categories.isEmpty()) {
categories = new ArrayListCategory();
Category category = new Category(Boys);
categories.add(category);
category = new Category(Girls);
categories.add(category);
PersistenceManager pm =
 PMF.get().getPersistenceManager();
try {
pm.makePersistentAll(categories);
} finally {
pm.close();
}
}
}
 ...
 


--~--~-~--~~~---~--~~
You received this message 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: JDOs not updating.

2009-09-08 Thread Ashley Messer
Good call getters/setters worked.
I realize it's 'bad form' to not use getters/setter
But when the docs say, This class defines getters and setters for the
properties. These are used only by the application, and are not needed for
JDO. 
http://code.google.com/appengine/docs/java/gettingstarted/usingdatastore.html
and i'm banging out a quick test app to get familiar with GAE and I see that
statement in the docs, it's reasonable to think they are at least
temporarily unnecessary.  Now, I know better!

FWIW the PersistenceAware change  put my datanucleas enhancer into an
infinite loop in eclipse.

Thanks for your help.

On Tue, Sep 8, 2009 at 2:31 PM, datanucleus andy_jeffer...@yahoo.comwrote:


  Am I doing something wrong here?

 Updating fields of an object directly has always been a dodgy practice
 IMHO, and in this case you bypass JDO's mechanism for knowing if
 fields are updated or not. Use setters, or mark the updating class as
 PersistenceAware
 


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



[appengine-java] Re: java developers and hot deployment

2009-09-08 Thread James H

What is going on with Debugging anyway?  I had been running fine with
1.2.2 GAE plugin an Eclipse 3.3, and was able to debug nicely except
for signature changes, additions.  Then the 1.2.5 upgarde blew my
environment up so I decided to load Eclipse 3.5 Galileo and the latest
GAE plugin.  But, debugging didn't work out-of-the-box.  I had to add -
Xdebug to the builtin launch provided by the GAE plugin.  Though now,
the debugging is sporatic.  It will stop at a breakpoint only once,
etc...  This is NOT tolerable...I must be missing something, surely
its intended to work as well under Eclipse 3.5 as it did under Eclipse
3.3?

J

On Sep 7, 8:59 am, Nicolas Melendez nmelen...@getsense.com.ar wrote:
 hi all!
 If you are tired of running the sever again every time you make a
 change in your code, please vote this issue to have server hot
 deployment which is an   important  and time-saving feature. that
 would make java developers really happy :)

 http://code.google.com/p/googleappengine/issues/detail?id=1787
--~--~-~--~~~---~--~~
You received this message 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: QueueFactory.getQueue( String )

2009-09-08 Thread Vince Bonfanti

Done (#2089).

BTW, I've opened two issues on the Task Queue API that I consider
fairly serious (at least for what I'm trying to accomplish):

  #2088. A datastore Key that has a parent does not survive a
round-trip through keyToString and stringToKey and still be usable as
a memcache key. The bug report contains more details and a simple
example that doesn't require task queues (so technically, this isn't a
task queue issue).

  #2090. TaskOptions doesn't support multiple parameters with the same
name. Again, the bug report has more details about why this is
important.

I'd be interested in getting some feedback on these.

Vince

On Tue, Sep 8, 2009 at 4:11 PM, Jason (Google)apija...@google.com wrote:
 Hi Vince. I think this sounds reasonable. Please open a new issue.

 - Jason

 On Sat, Sep 5, 2009 at 11:48 AM, Vince Bonfanti vbonfa...@gmail.com wrote:

 I found the answer to this: the Queue.add() method throws
 IllegalArgumentException if the specified queue isn't configured (BTW,
 the message in the IllegalArgumentException is The specified queue is
 unknown : but doesn't actually include the queue name in the message
 string). This isn't as nice as what I'd like, but I can see that the
 queue.xml file isn't processed until Queue.add() is invoked.

 I guess my workaround will be to try to add a dummy task to the queue
 when I create it:

    private static Queue queue;

    static {
        queue = QueueFactory.getQueue( myQueue );
        try {
            queue.add();
        } catch ( IllegalArgumentException e ) {
            queue = QueueFactory.getDefaultQueue();
        }
    }

 I'm trying to simplify configuration for users of GaeVFS
 (http://code.google.com/p/gaevfs/). Rather than requiring them to
 configure task queues for GaeVFS, I'd like to have it use the default
 queue by default. However, if they want to change the behavior for
 specific queues, then they can configure them explicitly.

 Should I open an issue for a simpler way to detect if a queue is
 configured? or is this something that's unlikely to change?

 Vince

 On Fri, Sep 4, 2009 at 6:19 PM, Vince Bonfantivbonfa...@gmail.com wrote:
  My first question on task queues...
 
  I'd like to design my application to use a named (configured) queue if
  it exists, but to drop back to using the default queue if the named
  queue isn't configured. I'd like to do something like this:
 
     Queue q = QueueFactory.getQueue( myQueue );
     if ( q == null ) {
         q = QueueFactory.getDefaultQueue();
     }
 
  But, the documentation for QueueFactory.getQueue( String ) implies
  that this isn't how it works:
 
     Attempting to use a non-existing queue name may result in errors
  at the point of use of the Queue object and not when calling
  getQueue(String).
 
  Is there a way to simply and reliably determine whether a given queue
  name has been configured?
 
  Vince
 




 


--~--~-~--~~~---~--~~
You received this message 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: 500 Internal Server Error when uploading to GAE

2009-09-08 Thread Jason (Google)
How often are you seeing this? Is there any discernible pattern when this
occurs, e.g. after adding a new static file or updating a large class/JSP,
changing a version, certain time of day, etc.?

Also, what is your application's ID?

- Jason

On Sun, Sep 6, 2009 at 12:19 PM, barak barak.ya...@gmail.com wrote:


 Hi,

 I'm using Eclipse plugin and sdk-1.2.2 to upload my app to GAE, its
 size is 109MB. From time to time I'm facing upload problems with the
 following error: java.io.IOException: Error posting to URL:
 http://appengine.google.com/api/appversion/addblob?path=__.500
 Internal Server Error

 The stack trace is:

 Unable to upload:
 java.io.IOException: Error posting to URL:
 http://appengine.google.com/api/appversion/addblob?path=__static_...
 500 Internal Server Error

 Server Error (500)
 A server error has occurred.

at com.google.appengine.tools.admin.ServerConnection.send
 (ServerConnection.java:143)
at com.google.appengine.tools.admin.ServerConnection.post
 (ServerConnection.java:95)
at com.google.appengine.tools.admin.AppVersionUpload.send
 (AppVersionUpload.java:420)
at com.google.appengine.tools.admin.AppVersionUpload.uploadFile
 (AppVersionUpload.java:323)
at com.google.appengine.tools.admin.AppVersionUpload.doUpload
 (AppVersionUpload.java:105)
at com.google.appengine.tools.admin.AppAdminImpl.update
 (AppAdminImpl.java:53)
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)

 Is there something I should configured somewhere?
 


--~--~-~--~~~---~--~~
You received this message 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: Query a collection of entities with their IDs

2009-09-08 Thread Jason (Google)
http://groups.google.com/group/google-appengine-java/browse_thread/thread/e881ba0220ed8e9a/5a46b73f435f342a

Please try not to double-post in the future.

Thanks,
- Jason

2009/9/6 Zhi Le Zou zouzh...@gmail.com

 Hi,
 I have a class Foo defined as below:

   public class Foo{

   @PrimaryKey
   @Persistent(valueStrategy=
 IdGeneratorStrategy.IDENTITY)
   private String fooID;

...

   }

 Now, I have a list of IDs of the Foo entities, is it possible to retrieve
 the corresponding collection of Foo entities in a single query? I found the
 in the documentation, it says logic or and IN are not supported in the
 java version app engine sdk, although it is supported in the python version.

 Thanks in advance :-)


 --
 Best Regards
 Robin (邹志乐)

 


--~--~-~--~~~---~--~~
You received this message 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: Entity ID and keyName identification scope

2009-09-08 Thread Max Ross
I'm guessing your tests were run locally because the counter in the local
datastore does indeed have datastore scope.  The scope of the counter in the
prod datastore, however, is parent key + kind.  This is described here:
http://code.google.com/appengine/docs/java/datastore/creatinggettinganddeletingdata.html#Keys

If it's important to you that the scope of the generated ids match between
dev and and prod please file an issue.

Thanks,
Max

On Tue, Sep 8, 2009 at 6:04 AM, iker98 ike...@gmail.com wrote:


 One detail I haven't read about is the different scope of the
 identification function of ID and keyName.
 According to my tests the ID generation counter has datastore scope,
 not kind scope like we are used to with RDBs. Otherwise the keyName
 identifies an entity in a kind.

 Am I right with my conclusions? Is there some way to set one ID
 generator for each kind?

 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: QueueFactory.getQueue( String )

2009-09-08 Thread Jason (Google)
Hi Vince. I think this sounds reasonable. Please open a new issue.

- Jason

On Sat, Sep 5, 2009 at 11:48 AM, Vince Bonfanti vbonfa...@gmail.com wrote:


 I found the answer to this: the Queue.add() method throws
 IllegalArgumentException if the specified queue isn't configured (BTW,
 the message in the IllegalArgumentException is The specified queue is
 unknown : but doesn't actually include the queue name in the message
 string). This isn't as nice as what I'd like, but I can see that the
 queue.xml file isn't processed until Queue.add() is invoked.

 I guess my workaround will be to try to add a dummy task to the queue
 when I create it:

private static Queue queue;

static {
queue = QueueFactory.getQueue( myQueue );
try {
queue.add();
} catch ( IllegalArgumentException e ) {
queue = QueueFactory.getDefaultQueue();
}
}

 I'm trying to simplify configuration for users of GaeVFS
 (http://code.google.com/p/gaevfs/). Rather than requiring them to
 configure task queues for GaeVFS, I'd like to have it use the default
 queue by default. However, if they want to change the behavior for
 specific queues, then they can configure them explicitly.

 Should I open an issue for a simpler way to detect if a queue is
 configured? or is this something that's unlikely to change?

 Vince

 On Fri, Sep 4, 2009 at 6:19 PM, Vince Bonfantivbonfa...@gmail.com wrote:
  My first question on task queues...
 
  I'd like to design my application to use a named (configured) queue if
  it exists, but to drop back to using the default queue if the named
  queue isn't configured. I'd like to do something like this:
 
 Queue q = QueueFactory.getQueue( myQueue );
 if ( q == null ) {
 q = QueueFactory.getDefaultQueue();
 }
 
  But, the documentation for QueueFactory.getQueue( String ) implies
  that this isn't how it works:
 
 Attempting to use a non-existing queue name may result in errors
  at the point of use of the Queue object and not when calling
  getQueue(String).
 
  Is there a way to simply and reliably determine whether a given queue
  name has been configured?
 
  Vince
 

 


--~--~-~--~~~---~--~~
You received this message 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: confuse on Whitelist

2009-09-08 Thread Jason (Google)
Your applications will run if they import java.lang.Thread but an exception
will be thrown if your applications attempt to spawn a new thread.

- Jason

On Sun, Sep 6, 2009 at 9:07 AM, asianCoolz second.co...@gmail.com wrote:


 I saw white list
 http://code.google.com/appengine/docs/java/jrewhitelist.html
 , java.lang.Thread is in it. Aren't Thread not 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-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] are quotas per Application or total?

2009-09-08 Thread BigMax

It is not clear from documentation, the quotas imposed on my account,
are they per-application or total per-account?
So if I have 6.5 CPU hours per day, is it for all my applications
(up to 10) or for each? Storage, 1GB per application or total?

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: Warning message about junit plugin from datanucleus in my logs when running Junit tests

2009-09-08 Thread Erem

I just found out that it all gets spammed as a response to
JDOHelper.getPersistenceManagerFactory(). It only happens when running
the Local Service implementation as specified on the AppEngine wiki

On Sep 8, 3:34 pm, Erem ehb...@gmail.com wrote:
 Hi Rajeev,

 Thanks for the response! It's a normal JUnit launch config.

 There are only 2 classpath entries in my launch config:
 ---
 v Bootstrap Entries
    JRE System Library [jre1.6.0_15 - 32-bit[
 v User Entries
     MyProject (default classpath)
 
 I still can't figure it out how to shut these logs up =/

 On Aug 31, 11:52 am, Rajeev Dayal rda...@google.com wrote:

  Hi,

  Is this a normal JUnit Launch Configuration, or is there a special plugin
  that you're using?

  Can you navigate to the launch configuration's classpath tab and list out
  the entries?

  Thanks,
  Rajeev

  On Wed, Aug 26, 2009 at 4:58 PM, Amendmen7 ehb...@gmail.com wrote:

   I'm having the same issues. I have tried turning off all known loggers
   in the setUp methods of my LocalDatastoreTestCase superclass, but it
   has no effect re: this logspam!

   Has anyone found an answer?

   On Aug 5, 8:41 am, Stephan stephanv...@gmail.com wrote:
I'm having the same problem here. Using a fresh eclipse install and a
simple test-application, I get the same messages. They only appear
when I use JDO in my unit tests.
Except for the error log messages, everything seems to work fine. But
starting each unit-test with more then 30 warnings and errors doesn't
seem like a clean way to test an application.

Did you find a solution yet? I'd think there would be a much larger
group with the same problem, or isn't anyone unit-testing here? :)

On 27 jun, 15:57, Peter Recore peterrec...@gmail.com wrote:

 I have a warning message showing up in my logs when I run my unit
 tests in Eclipse, using the junit plugin.
 I have the google plugin installed.
 The messages seem to be coming from the DataNucleus logger.

 Here is one line.  There are about 30 more all referencing  different
 extension points.
 Jun 27, 2009 8:42:40 AM
 org.datanucleus.plugin.NonManagedPluginRegistry registerExtensions
 WARNING: Extension Point org.eclipse.ui.views not registered, but
 plugin org.eclipse.jdt.junit defined in file:/C:/Documents%20and
 %20Settings/peter/Desktop/eclipse/configuration/org.eclipse.osgi/
 bundles/307/1/.cp/META-INF/MANIFEST.MF refers to it.

 Then there are some that look like this:

 Jun 27, 2009 8:42:40 AM
 org.datanucleus.plugin.NonManagedPluginRegistry resolveConstraints
 SEVERE: Bundle org.eclipse.jdt.junit4.runtime requires org.junit4
 but it cannot be resolved.

 I'm hoping someone can give me a hint as to whether this is an eclipse
 issue, a junit issue, a datanucleus issue, or something else.
 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: Warning message about junit plugin from datanucleus in my logs when running Junit tests

2009-09-08 Thread Erem

The root problem unsurprisingly turns out to be logging configuration.

Stop this from happening by setting the following DataNucleus loggers
PRIOR to your  JDOHelper.getPersistenceManagerFactory() calls:

//This one caused all the WARNING and SEVERE logs about eclipse UI
elements
Logger.getLogger(DataNucleus.Plugin).setLevel(Level.OFF);

//This one logged the last couple INFOs about Persistence
configuration
Logger.getLogger(DataNucleus.Persistence).setLevel(Level.WARNING);

As it doesn't seem even the WARNINGs or SEVEREs affect test outcomes,
this seems like a perfectly fine way to do it.

On Sep 8, 3:40 pm, Erem ehb...@gmail.com wrote:
 I just found out that it all gets spammed as a response to
 JDOHelper.getPersistenceManagerFactory(). It only happens when running
 the Local Service implementation as specified on the AppEngine wiki

 On Sep 8, 3:34 pm, Erem ehb...@gmail.com wrote:

  Hi Rajeev,

  Thanks for the response! It's a normal JUnit launch config.

  There are only 2 classpath entries in my launch config:
  ---
  v Bootstrap Entries
     JRE System Library [jre1.6.0_15 - 32-bit[
  v User Entries
      MyProject (default classpath)
  
  I still can't figure it out how to shut these logs up =/

  On Aug 31, 11:52 am, Rajeev Dayal rda...@google.com wrote:

   Hi,

   Is this a normal JUnit Launch Configuration, or is there a special plugin
   that you're using?

   Can you navigate to the launch configuration's classpath tab and list out
   the entries?

   Thanks,
   Rajeev

   On Wed, Aug 26, 2009 at 4:58 PM, Amendmen7 ehb...@gmail.com wrote:

I'm having the same issues. I have tried turning off all known loggers
in the setUp methods of my LocalDatastoreTestCase superclass, but it
has no effect re: this logspam!

Has anyone found an answer?

On Aug 5, 8:41 am, Stephan stephanv...@gmail.com wrote:
 I'm having the same problem here. Using a fresh eclipse install and a
 simple test-application, I get the same messages. They only appear
 when I use JDO in my unit tests.
 Except for the error log messages, everything seems to work fine. But
 starting each unit-test with more then 30 warnings and errors doesn't
 seem like a clean way to test an application.

 Did you find a solution yet? I'd think there would be a much larger
 group with the same problem, or isn't anyone unit-testing here? :)

 On 27 jun, 15:57, Peter Recore peterrec...@gmail.com wrote:

  I have a warning message showing up in my logs when I run my unit
  tests in Eclipse, using the junit plugin.
  I have the google plugin installed.
  The messages seem to be coming from the DataNucleus logger.

  Here is one line.  There are about 30 more all referencing  
  different
  extension points.
  Jun 27, 2009 8:42:40 AM
  org.datanucleus.plugin.NonManagedPluginRegistry registerExtensions
  WARNING: Extension Point org.eclipse.ui.views not registered, but
  plugin org.eclipse.jdt.junit defined in file:/C:/Documents%20and
  %20Settings/peter/Desktop/eclipse/configuration/org.eclipse.osgi/
  bundles/307/1/.cp/META-INF/MANIFEST.MF refers to it.

  Then there are some that look like this:

  Jun 27, 2009 8:42:40 AM
  org.datanucleus.plugin.NonManagedPluginRegistry resolveConstraints
  SEVERE: Bundle org.eclipse.jdt.junit4.runtime requires 
  org.junit4
  but it cannot be resolved.

  I'm hoping someone can give me a hint as to whether this is an 
  eclipse
  issue, a junit issue, a datanucleus issue, or something else.
  Thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: Problem with encoding on production environment

2009-09-08 Thread Jason (Google)
I don't have a good test case on-hand to reproduce this with, unfortunately.
Are you seeing any exceptions in your logs? I ask because I usually pass the
string UTF-8 into InputStreamReader whereas you're passing in utf8 --
it's possible (probable?) that both are supported, but the documentation
does say an UnsupportedEncodingException will be thrown so best to be sure.

I usually use Spring which has a special filter already set up for
automatically setting the character encoding properly.  According to the
documentation for this filter, it just calls the ServletRequest method's
setCharacterEncoding method. I notice below that you're calling the same
method for your ServletResponse but not on the requests -- can you set up
your own filter to do this and see if that's the issue?

- Jason

On Fri, Sep 4, 2009 at 6:07 AM, sandlex aspes...@gmail.com wrote:


 Hello.


 I'm trying to do following:
 1. I have a GWT-application with a form uploading text files in utf8
 character encoding
 2. Uploaded file content I save in the entity Blob field in datastore
 3. I have a JavaFX client application getting this file content and
 displaying it

 Everything works just fine on dev environment but on production I have
 problems with encoding - I get question marks on my javafx appet form.

 More details.

 1. On Form submit we go to

 public class Upload extends HttpServlet

 which creates a jdo transfer object (dictionaryTO) with byte[] field
 where we need to store a content of the file:
 dictionaryTO.setFile(inputStreamToBytes(item.openStream()));

 where (notice, I'm setting utf8 there):

   private byte[] inputStreamToBytes(InputStream stream)
   throws IOException, IllegalArgumentException,
 IllegalStateException
 {

   BufferedReader inputStream = null;
   inputStream = new BufferedReader(new InputStreamReader
 (stream,
 utf8));

   String str;
   ByteArrayOutputStream out = new ByteArrayOutputStream
 ();
   StringBuffer buffer = new StringBuffer();
   while ((str = inputStream.readLine()) != null) {
   
   buffer.append(str);
   buffer.append(\n);
   }
   out.write(buffer.toString().getBytes());
   out.close();
   return out.toByteArray();
   }

 2. After that I need to transfer this object to next servlet
 (dictionaryService) which will save this object as an entity in
 datastore. Doing it this way:
   PrintWriter out = null;
   response.setCharacterEncoding(utf8);
   response.setContentType(text/plain);
   out = response.getWriter();
   ...
   request.getSession().setAttribute(dictionary,
 dictionaryTO);
   response.sendRedirect(dictionaryService);

 3. dictionaryService is:
 public class DictionaryServiceImpl extends RemoteServiceServlet
 implements DictionaryService

 which gets a transfer object from session, converts it in jdo entity
 object - dictionary. A field with file content is being converted from
 byte[] into Blob in this way - new Blob(dictionaryTO).getFile()). And
 then the object is saved in a standard way: pm.makePersistent
 (dictionary).

 4. After that we need to process a request from client javafx
 application. All I need is two methods:

 import java.net.HttpURLConnection;
 import java.net.URL;

   /**
* Common method that performs http request to the servlet in
 order to
* retrieve required data
*
* @param urlString servlet name to send request
* @param xml xml-body of request
* @return xml-response from servlet
* @throws java.lang.Exception
*/
   static private String performHttpPostRequest(String urlString,
 String xml) throws Exception {
   URL url;
   HttpURLConnection connection;
   String response = false;
   url = new URL(urlString);
   connection = (HttpURLConnection) url.openConnection();
   connection.setRequestMethod(POST);
   connection.setUseCaches(false);
   connection.setDoOutput(true);
   connection.setDoInput(true);
   connection.setAllowUserInteraction(true);
   connection.setRequestProperty(Content-Type, application/x-
 www-form-urlencoded;charset=utf8);
   //connection.setRequestProperty(Content-Type, text/
 xml;charset=utf8);
   connection.setRequestProperty(Accept-Charset, utf8);
   connection.getOutputStream().write(xml.getBytes());

   InputStream inpStr;
   inpStr = connection.getInputStream();
   //System.out.println(+++  + connection.getRequestProperty
 (Content-Type));

   response = convertStreamToString(inpStr);

   inpStr.close();

   return response;
   }

   /**
* Converts input stream received from servlet into string.
*
* @param is input stream
* @return 

[appengine-java] Re: Access Appengine Datastore Remotely using AEJTools

2009-09-08 Thread Erdinc Yilmazel
Thanks Jason, I sent an email to the group admin.

On Tue, Sep 8, 2009 at 9:16 PM, Jason (Google) apija...@google.com wrote:

 Thanks for sharing, Erdinc. If you're interested in having your project
 listed on our open source App Engine projects wiki page, please follow the
 process at the bottom of the wiki page linked below.


 http://groups.google.com/group/google-appengine/web/google-app-engine-open-source-projects

 - Jason


 On Sat, Sep 5, 2009 at 9:42 AM, Erdinc Yilmazel 
 erdincyilma...@gmail.comwrote:

 I developed a set of open source tools to access the appengine datastore
 remotely. The project is hosted on http://aejtools.googlecode.com.

 AEJTools provide a server module which can be installed on appengine as a
 seperate java web application and can be used to access your original
 application data remotely. The server module has an Rest style Xml interface
 to access the data. It also provides a client command line tool that works
 as the mysql command line client and you can access your data remotely using
 it. The client module implements low level interfaces such as
 DatastoreService and PreparedQuery etc. and calls made to these
 implementations actually performs operation on the remote server. The client
 module makes use of a Groovy interactive shell which you can use to make
 some calls.

 Even though this project is still in early stages (There isn't any
 documentation right now, just a video tutorial), it is already very useful.
 You can use it as a tool to run queries on your data remotely, use it as a
 data import/export tool etc. Any feedback is appreciated. I uploaded a
 tutorial on YouTube about aejtools, you can check it to understand what it
 actually does..

 http://www.youtube.com/watch?v=sfd4i7FzozM

 http://www.youtube.com/watch?v=3_aIAjeQ4Ho

 http://www.youtube.com/watch?v=B-QvidgpTGo

 Erdinc




 


--~--~-~--~~~---~--~~
You received this message 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: support for task queues in development environment?

2009-09-08 Thread Vince Bonfanti

Being able to examine the task queue, and release tasks manually--and
in different order than they were queued--is proving quite valuable.
It would be nice to keep this as an option when you add automatic
execution.

Vince

On Tue, Sep 8, 2009 at 2:42 PM, Max Rossmaxr+appeng...@google.com wrote:
 Interesting.  We were planning on getting rid of manual task execution so
 that dev would completely match prod, but if your experience is shared by
 others it sounds like we should consider leaving the door open for manual
 task execution as well.

 Thanks,
 Max

 On Mon, Sep 7, 2009 at 8:52 AM, Vince Bonfanti vbonfa...@gmail.com wrote:

 Perfect! At least for initial debugging, that's actually better than
 having the tasks execute automatically--it makes it easier to see
 what's going on with multiple tasks being queued.

 Thanks.

 On Sun, Sep 6, 2009 at 7:05 PM, Max Rossmaxr+appeng...@google.com wrote:
  Hi Vince,
 
  In order to get the task queue into the 1.2.5 release we had to take a
  shortcut with the local development environment.  Tasks execute
  automatically in production but not locally.  However, in the local
  environment you can kick off your tasks manually by visiting the task
  queue
  admin console page, accessible via a link off of
  http://localhost:8080/_ah/admin
 
  We thought we had this properly documented but it appears we do not.
  I've
  filed a bug and we'll get this taken care of quickly.
 
  Sorry for the trouble.
 
  Thanks,
  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] Re: Can I provide a web service using Google App Engine for java?

2009-09-08 Thread Jason (Google)
The only SOAP web services solution compatible with App Engine (that I'm
aware of) is located here:

http://code.google.com/p/sfdc-wsc/

Check the Downloads tab for a pre-built JAR that should work out-of-the-box
with App Engine.

- Jason

On Mon, Sep 7, 2009 at 3:52 AM, shradha shradh...@gmail.com wrote:


 Can I provide a web service using Google App Engine for java?

 I mean I want  a SOAP Web Service Server with  a WSDL and everything,
 to which people can connect using their Web Service.

 If so can anyone please provide me with the implementation details


 


--~--~-~--~~~---~--~~
You received this message 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 Sequences in AppEngine

2009-09-08 Thread Jason (Google)
You may also want to look into sharded counters, which is the approach we've
traditionally recommended for implementing hit counters or other
monotonically increasing data:

http://code.google.com/appengine/articles/sharding_counters.html

The article is in Python, but there is a Java demo available:

http://code.google.com/p/googleappengine/source/browse/#svn/trunk/java/demos/shardedcounter

- Jason

On Mon, Sep 7, 2009 at 11:03 AM, Erem ehb...@gmail.com wrote:


 Hey guys,

 I wanted to use a JDO persistence-backed Sequence to provide
 monotonically increasing visitor #'s in my webapp. A static variable
 doesn't cut it because I want the number to survive redeployments,
 upgrades, etc.

 I didn't see any info on Sequence in the wiki Using JDO section so I
 did this. It works but it seemed kinda hacky. Is this the best way to
 configure a JDO-backed Sequence in AppEngine?

 (FWIW I'm using the eclipse plug-in.)

 (1) Make the following file: MyProject/META-INF/package.jdo
* This directory should already contain a jdoconfig.xml.
* Both files will be autoplaced into MyProject/war/WEB-INF/classes/
 META-INF on deploy.

 (2) Paste the following XML into package.jdo:

 ?xml version=1.0 encoding=UTF-8 ?
 jdo xmlns=http://java.sun.com/xml/ns/jdo/jdo;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/jdo/jdo
 http://java.sun.com/xml/ns/jdo/jdo_2_2.xsd;
!-- name the package whatever you want --
package name=MyProject
sequence name=VisitorSequence
   datastore-
 sequence=VISITOR_SEQUENCE
   strategy=contiguous
 /
/package
 /jdo

 (3) When you need the next value in your application, call:

 PersistenceManager pm = //...allocate pm

 //the sequence name is package name.sequence name
 //from the corresponding tags in package.jdo
 Sequence seq = pm.getSequence(MyProject.VisitorSequence);

 //If strategy from package.jdo was contiguous, this has to happen
 //in a transaction.
 long nextValue = seq.nextValue();
 


--~--~-~--~~~---~--~~
You received this message 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: GWT RPC Problem with JDP

2009-09-08 Thread Jason (Google)
You can't pass a query result directly to GWT because the object that
contains the results does not implement Serializable. For a workaround, see
the last post in this thread:

http://groups.google.com/group/google-appengine-java/browse_thread/thread/bce6630a3f01f23a

- Jason

On Mon, Sep 7, 2009 at 3:17 AM, webnazar webna...@gmail.com wrote:


 Mudassar Nazar: Software Engineer

 I found this is not the problem, it is an issue. i persisted data
 class through gwt rpc successfully
 but failed while loading the following error is found while loading
 data class through gwt rpc. it is a bu, need to fix

 Sep 7, 2009 3:32:55 PM
 com.google.appengine.tools.development.ApiProxyLocalImpl log
 SEVERE: [1252317775578000] javax.servlet.ServletContext log: Exception
 while dispatching incoming RPC call
 com.google.gwt.user.client.rpc.SerializationException: Type
 'org.datanucleus.store.appengine.query.StreamingQueryResult' was not
 included in the set of types which can be serialized by this
 SerializationPolicy or its Class object could not be loaded. For
 security purposes, this type will not be serialized.
at

 com.google.gwt.user.server.rpc.impl.StandardSerializationPolicy.validateSerialize
 (StandardSerializationPolicy.java:83)
at

 com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize
 (ServerSerializationStreamWriter.java:591)
at

 com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject
 (AbstractSerializationStreamWriter.java:129)
at
 com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter
 $ValueWriter$8.write(ServerSerializationStreamWriter.java:146)
at

 com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeValue
 (ServerSerializationStreamWriter.java:530)
at com.google.gwt.user.server.rpc.RPC.encodeResponse(RPC.java:573)
at com.google.gwt.user.server.rpc.RPC.encodeResponseForSuccess
 (RPC.java:441)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse
 (RPC.java:529)
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.utils.servlet.TransactionCleanupFilter.doFilter
 (TransactionCleanupFilter.java:43)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
 (ServletHandler.java:1084)
at com.google.appengine.tools.development.StaticFileFilter.doFilter
 (StaticFileFilter.java:121)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
 (ServletHandler.java:1084)
at org.mortbay.jetty.servlet.ServletHandler.handle
 (ServletHandler.java:360)
at org.mortbay.jetty.security.SecurityHandler.handle
 (SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle
 (SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle
 (ContextHandler.java:712)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
 405)
at
 com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle
 (DevAppEngineWebAppContext.java:54)
at org.mortbay.jetty.handler.HandlerWrapper.handle
 (HandlerWrapper.java:139)
at com.google.appengine.tools.development.JettyContainerService
 $ApiProxyHandler.handle(JettyContainerService.java:313)
at org.mortbay.jetty.handler.HandlerWrapper.handle
 (HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:313)
at
 org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
 506)
at org.mortbay.jetty.HttpConnection$RequestHandler.content
 (HttpConnection.java:844)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
at org.mortbay.io.nio.SelectChannelEndPoint.run
 (SelectChannelEndPoint.java:396)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run
 (BoundedThreadPool.java:442)
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-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: Sending mail with the mail api

2009-09-08 Thread king

I have the same problem. I sent out 3 email and have been waiting for
hours, still no email arrived at my inbox, there is no error message
either. Does anyone have any update on this issue?


On Aug 20, 12:00 pm, DrMorten morten.dalgaard.niel...@gmail.com
wrote:
 Nothing in the log about failed messages. I've made a Grails Service
 sending my emails. Basiclly I just cut and pasted the info 
 fromhttp://code.google.com/appengine/docs/java/mail/usingjavamail.html,
 and modified it to fit my needs. Just as a quick version to get it
 working. I pasted the service below.

 class MailService {

         boolean transactional = true

         def sendMail(subject, msgBody, from, fromText, too, tooText) {

                 Properties props = new Properties();
                 Session session = Session.getDefaultInstance(props, null);

                 try {
                         def msg = new MimeMessage(session);
                         msg.setFrom(new InternetAddress(from, fromText));
                         msg.addRecipient(Message.RecipientType.TO,
                                                         new 
 InternetAddress(too, tooText));
                         msg.setSubject(subject);
                         msg.setText(msgBody);
                         Transport.send(msg);

                 } catch (AddressException e) {
                         log.error(address error sendingmail, e)
                 } catch (MessagingException e) {
                         log.error(messaging exception sendingmail, e)
                 }

         }

 }

 On Aug 20, 8:48 pm, Jason (Google) apija...@google.com wrote:



  Did you check your application's logs to see if there were any errors
  sending the messages? What code were you using to send the emails?
  - Jason

  On Wed, Aug 19, 2009 at 7:47 AM, DrMorten morten.dalgaard.niel...@gmail.com

   wrote:

   I sent about 7 emails last night to my own email address. They havnt
   arrived, Ive checked the code and the addresses were right. The Quotas
   say that I've sent the e-mails.

   Anyone have an idea of how long it should take to send to a gmail
   address?
--~--~-~--~~~---~--~~
You received this message 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] Task Queue Limits

2009-09-08 Thread hansamann

I know the Task Queue is just experimental for now and things will
change, but could we get an estimate by what degree the limits of the
API will be affected?

The current daily task insertion limit is 10 000 - not much if you do
for example think about a twitter-related app that polls for new
tweets every minute. Just the polling over 24hrs would then result in
1440 tasks... imagine a service that offers this as a paid model
you'd hit the 10 000 with the 7th customer...

So here are some basic questions:

- with previous experimental features, how did the limits develop?
Were they strongly increased? Decreased?
- I assume this will also be a feature you can pay for to get extended
limits. Roughly, would 1$ be 10 000 insertions, 100 000?

I am not sure why there needs to be a limit in this case. Don't get me
wrong, but the actual processing of the tasks is of course also paid
by the user, right?

I think at least knowing roughly what the plan is here would help me
to figure out if app-engine is the right place to start thinking about
a new app or not.

Any ideas welcome?

Cheers
Sven
--~--~-~--~~~---~--~~
You received this message 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: Deleting indexes

2009-09-08 Thread Matthew Farmell

search the group as I wrote some instructions on how to delete indexes  
in a java app using the python sdk

Sent from my iPhone

On Sep 9, 2009, at 10:22 AM, klong86 klon...@gmail.com wrote:


 Is there a way to delete indexes?  I have old index on my deployed
 server that are no longer used.

 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] Initializing Datastore

2009-09-08 Thread gopalkalasa

hi,

I want to write an application to load the static data to the
datastore and make use the same datastore for real application. Is
there any tools for that?

For example if i use JDBC connection we can connect to the database
using database name, drivers ,
and make use of the database for another application. .

Is there any equivalent for that??


Thanks in Advance
   gopal kalasa
--~--~-~--~~~---~--~~
You received this message 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
-~--~~~~--~~--~--~---