[appengine-java] Re: warmup requests going crazy (9850 requests in 15 hours)

2011-05-06 Thread pac
Since yesterday, I am also seeing lots fo warm requests and some of
them are failing


2011-05-05 11:28:34.515 /_ah/warmup 500 248296ms 1540cpu_ms 0kb

0.1.0.3 - - [05/May/2011:11:28:34 -0700] GET /_ah/warmup HTTP/1.1
500 0 - - 1.350128199943308417.landofproperties.appspot.com
ms=248297 cpu_ms=1540 api_cpu_ms=0 cpm_usd=0.042797 loading_request=1
exit_code=104

W 2011-05-05 11:25:43.406

EXCEPTION
com.google.apphosting.api.DeadlineExceededException: This request
(f508b2b459c9812c) started at 2011/05/05 18:25:13.781 UTC and was
still executing at 2011/05/05 18:25:43.224 UTC.
at com.google.appengine.runtime.Request.process-
f508b2b459c9812c(Request.java)
at java.io.FileInputStream.readBytes(Native Method)

On May 6, 9:26 am, Aswath Satrasala aswath.satras...@gmail.com
wrote:
 I had this issue earlier.  I re-deployed the application and it is 
 gone.http://groups.google.com/group/google-appengine-java/browse_thread/th...

 Now, again, since 3-4 hrs, I don't have any /_ah/warmup requests. My
 application is normal :).

 -Aswathwww.AccountingGuru.in

 On Fri, May 6, 2011 at 7:17 AM, Aswath Satrasala aswath.satras...@gmail.com







  wrote:
  I have the same issue since yesterday.
  *Current Load [image: 
  help]http://code.google.com/appengine/kb/general.html#currentload
  *      URI  Req/Min current  Requests last 19 hrs  Avg CPU (API) last hr % 
  CPU last
  19 hrs
  /_ah/warmuphttps://appengine.google.com/logs?version_id=9.350156772333002480app...
   7.0  379  7630 (0)  84%

  -Aswath

  On Thu, May 5, 2011 at 5:50 AM, Matt Farnell mfarn...@gmail.com wrote:

  That url doesn't work, I'm assuming you mean
 http://code.google.com/p/googleappengine/issues/detail?id=4984

  On Wed, May 4, 2011 at 5:08 PM, Ikai Lan (Google) ika...@google.comwrote:

  Can anyone else experiencing this add details here?

 http://code.google.com/p/googleappengine/issues/list?cursor=4984

  Ikai Lan
  Developer Programs Engineer, Google App Engine
  Blog:http://googleappengine.blogspot.com
  Twitter:http://twitter.com/app_engine
  Reddit:http://www.reddit.com/r/appengine

  On Wed, May 4, 2011 at 3:33 PM, Matt Farnell mfarn...@gmail.com wrote:

  Hi there,

  My app is going crazy with warmup requests, here's the dashboard

   URI  Req/Mincurrent Requestslast 16 hrs Avg CPU (API)last hr % CPUlast
  16 hrs
  /_ah/warmuphttps://appengine.google.com/logs?version_id=1.350168112217871336app...
   26.0 9.85K 1876 (0) 98%
  This has only started happening today?

  --
  thanks,
  *Matt Farnell*
  *follow on twitter http://twitter.com/lepah*

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

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

  --
  thanks,
  *Matt Farnell*
  *follow on twitter http://twitter.com/lepah*

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

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-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: warmup requests going crazy (9850 requests in 15 hours)

2011-05-06 Thread pac
I also saw lots of warm request yesterday and few of them failed with
error:

EXCEPTION
com.google.apphosting.api.DeadlineExceededException: This request
(f508b2b459c9812c) started at


Today seems to be ok.


On May 6, 9:26 am, Aswath Satrasala aswath.satras...@gmail.com
wrote:
 I had this issue earlier.  I re-deployed the application and it is 
 gone.http://groups.google.com/group/google-appengine-java/browse_thread/th...

 Now, again, since 3-4 hrs, I don't have any /_ah/warmup requests. My
 application is normal :).

 -Aswathwww.AccountingGuru.in

 On Fri, May 6, 2011 at 7:17 AM, Aswath Satrasala aswath.satras...@gmail.com







  wrote:
  I have the same issue since yesterday.
  *Current Load [image: 
  help]http://code.google.com/appengine/kb/general.html#currentload
  *      URI  Req/Min current  Requests last 19 hrs  Avg CPU (API) last hr % 
  CPU last
  19 hrs
  /_ah/warmuphttps://appengine.google.com/logs?version_id=9.350156772333002480app...
   7.0  379  7630 (0)  84%

  -Aswath

  On Thu, May 5, 2011 at 5:50 AM, Matt Farnell mfarn...@gmail.com wrote:

  That url doesn't work, I'm assuming you mean
 http://code.google.com/p/googleappengine/issues/detail?id=4984

  On Wed, May 4, 2011 at 5:08 PM, Ikai Lan (Google) ika...@google.comwrote:

  Can anyone else experiencing this add details here?

 http://code.google.com/p/googleappengine/issues/list?cursor=4984

  Ikai Lan
  Developer Programs Engineer, Google App Engine
  Blog:http://googleappengine.blogspot.com
  Twitter:http://twitter.com/app_engine
  Reddit:http://www.reddit.com/r/appengine

  On Wed, May 4, 2011 at 3:33 PM, Matt Farnell mfarn...@gmail.com wrote:

  Hi there,

  My app is going crazy with warmup requests, here's the dashboard

   URI  Req/Mincurrent Requestslast 16 hrs Avg CPU (API)last hr % CPUlast
  16 hrs
  /_ah/warmuphttps://appengine.google.com/logs?version_id=1.350168112217871336app...
   26.0 9.85K 1876 (0) 98%
  This has only started happening today?

  --
  thanks,
  *Matt Farnell*
  *follow on twitter http://twitter.com/lepah*

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

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

  --
  thanks,
  *Matt Farnell*
  *follow on twitter http://twitter.com/lepah*

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

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-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: Blobstore vs. Datastore for HTML files

2011-05-06 Thread Yegor
Brandon,

Have you considered storing HTML in compressed form as Datastore
blobs? Being plain text HTML should have very high compression ratio.

* java.util.zip.GZIPOutputStream is usually no worse than x5, but it
is slower
* com.ning.compress.lzf.LZFOutputStream should yield x3 compression,
but it is faster than GZIP

Cheers,

Yegor

On May 5, 8:14 pm, Brandon Donnelson branflake2...@gmail.com wrote:
 Entity limit is 1MB total. But you could have multiple blobs within one if
 they where less than 1MB.

 Brandon

-- 
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: Blobstore vs. Datastore for HTML files

2011-05-06 Thread Brandon Donnelson
I haven't yet. Are you storing compressed to save on cost? I am mainly 
working with images at the moment and sending them to the blobstore so I 
haven't had the need to consider that yet. Thats interesting point if you 
are trying to save on cost of storage that way. 

How much time does it take to compress java.util.zip.GZIPOutputStream?

Brandon

-- 
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: Using BulkUpload into Local Java Dev Server on Mac

2011-05-06 Thread Renan
I've got the same error:

error: [Errno 54] Connection reset by peer
[INFO] Authentication Failed

*Please google, help us. I have to insert by hand the same data from
appengine datastore. Please and thanks. But please, help.

On Mar 10, 2:28 am, Brian Conneen conn...@gmail.com wrote:
 I've seen a bunch of threads on this issue, but there doesn't seem to
 be a definitive example of getting this to work.

 Essentially I want to migrate my existing Python app to Java, and I
 know I can deploy both versions into production. But I want to do lots
 of testing locally before ever deploying a Java version.  And in order
 to test, I need to upload my data into my local Java dev server
 datastore.

 I can use bulkuploader to export the datastore from the production
 PYTHON app and load it into a local PYTHON dev server datastore no
 problem. I've done it hundreds of time.

 If I try to use the same export to load into my local JAVA dev server
 datastore, I always get an AuthenticationException [See stack below].
 Yes I've configured remote_api. Yes I can 
 accesshttp://localhost:/remote_api
 from a browser. It first takes me to the authentication page.  But
 bulkupload just won't work against my local JAVA dev datastore.

 I've now read every thread on this subject, and it seems like there
 might be a commonality.  Perhaps everyone running into this
 AuthenticationException is running on a Mac? I really don't know
 what's causing it, and I can't believe more people don't want to do
 the same thing.

 Stack Trace:

 [DEBUG   ] Bulkloader using app_id: bofprod
 [INFO    ] Connecting to localhost:8080/remote_api
 [ERROR   ] Exception during authentication
 Traceback (most recent call last):
   File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
 GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
 google/appengine/tools/bulkloader.py, line 3175, in Run
     self.request_manager.Authenticate()
   File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
 GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
 google/appengine/tools/bulkloader.py, line 1187, in Authenticate
     remote_api_stub.MaybeInvokeAuthentication()
   File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
 GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
 google/appengine/ext/remote_api/remote_api_stub.py, line 540, in
 MaybeInvokeAuthentication
     datastore_stub._server.Send(datastore_stub._path, payload=None)
   File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
 GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
 google/appengine/tools/appengine_rpc.py, line 346, in Send
     f = self.opener.open(req)
   File /System/Library/Frameworks/Python.framework/Versions/2.6/lib/
 python2.6/urllib2.py, line 389, in open
     response = meth(req, response)
   File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
 GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
 google/appengine/ext/remote_api/throttle.py, line 473, in
 http_response
     self.AddResponse(BANDWIDTH_DOWN, res)
   File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
 GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
 google/appengine/ext/remote_api/throttle.py, line 414, in AddResponse
     content = res.read()
   File /System/Library/Frameworks/Python.framework/Versions/2.6/lib/
 python2.6/socket.py, line 327, in read
     data = self._sock.recv(rbufsize)
   File /System/Library/Frameworks/Python.framework/Versions/2.6/lib/
 python2.6/httplib.py, line 537, in read
     s = self.fp.read(amt)
   File /System/Library/Frameworks/Python.framework/Versions/2.6/lib/
 python2.6/socket.py, line 351, in read
     data = self._sock.recv(left)
 error: [Errno 54] Connection reset by peer
 [INFO    ] Authentication Failed

-- 
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] API Channel

2011-05-06 Thread CoDe
First of all hi every1, I have the following bug with api channel.
I've builded an chat room, everything is ok so far but sometimes the
socket.onmessage function is not refreshing from ChannelService
channelService = ChannelServiceFactory.getChannelService();
channelService.sendMessage(new ChannelMessage(channel, string));
What could be doing wrong?,some advice??

Best!!
Jorge

-- 
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] xml parsing on GAE servers acts weird

2011-05-06 Thread Richie
Hey guys,

I created an app where a user can upload an xml, I display the nodes
in a GWT table then the user selects the nodes he/she wants to
download. Sounds easy, works perfectly in hosted mode.

I use only the base xml parsing, no 3rd party jars in the project
(aside from commons-fileupload-1.2.1.jar, commons-io-1.3.2.jar,
gxt-2.2.3-gwt22.jar).


Here's the code I use for parsing the XML:

import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;

...

public static Document getXml(InputStream stream) throws
ParserConfigurationException, SAXException, IOException {

DocumentBuilder parser =
DocumentBuilderFactory.newInstance().newDocumentBuilder();
// Parse xml data
Document xml = parser.parse(stream);

return xml;

}

It's working perfectly in hosted mode, but when I upload it to the
appengine servers I get the following exception:

javax.servlet.ServletException: java.lang.RuntimeException:
java.lang.ClassNotFoundException:
com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl
at
com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:
240)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
542)
at org.mortbay.jetty.HttpConnection
$RequestHandler.headerComplete(HttpConnection.java:923)
at
com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:
76)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at
com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:
135)
at
com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:
260)
at com.google.apphosting.base.RuntimePb$EvaluationRuntime
$2.handleRequest(RuntimePb.java:9669)
at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:
439)
at com.google.net.rpc.impl.Server$RpcTask.runInContext(Server.java:
573)
at com.google.tracing.TraceContext$TraceContextRunnable
$1.run(TraceContext.java:448)
at com.google.tracing.TraceContext.runInContext(TraceContext.java:
688)
at com.google.tracing.TraceContext
$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:
326)
at com.google.tracing.TraceContext
$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:
318)
at com.google.tracing.TraceContext
$TraceContextRunnable.run(TraceContext.java:446)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:
1110)
at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:636)
Caused by: java.lang.RuntimeException:
java.lang.ClassNotFoundException:
com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl
at
com.google.apphosting.runtime.jetty.SessionManager.deserialize(SessionManager.java:
421)
at
com.google.apphosting.runtime.jetty.SessionManager.createSessionFromEntity(SessionManager.java:
382)
at
com.google.apphosting.runtime.jetty.SessionManager.loadSession(SessionManager.java:
320)
at
com.google.apphosting.runtime.jetty.SessionManager.getSession(SessionManager.java:
288)
at
org.mortbay.jetty.servlet.AbstractSessionManager.getHttpSession(AbstractSessionManager.java:
237)
at
org.mortbay.jetty.servlet.SessionHandler.setRequestedId(SessionHandler.java:
246)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
136)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
418)
at
com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:
238)
... 19 more
Caused by: java.lang.ClassNotFoundException:
com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl
at
com.google.apphosting.runtime.security.UserClassLoader.loadClass(UserClassLoader.java:
445)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.google.apphosting.runtime.jetty.SessionManager
$DelegatingObjectInputStream.resolveClass(SessionManager.java:476)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:
1592)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:
1513)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:
1749)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1346)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:368)
at 

[appengine-java] java.lang.NoClassDefFoundError: com.sun.org.apache.xerces.internal.dom.DocumentImpl

2011-05-06 Thread racoq
Hello!


I'm  getting a major headache about an soap web service client/ server
example. What is more intriguing is that  using part of the following
official howto available:

https://code.google.com/intl/pt-PT/appengine/articles/soap.html

My specs are:

Ubuntu 10.04 LTS
Eclipse Helios
Google App Engine plugin up to date.

When in the code i try to do this in my code (i'm receiving an soap
request from a local client)

SOAPMessage soapRequest = messageFactory.createMessage(headers, is);

I get

5/Mai/2011 3:35:54 com.google.apphosting.utils.jetty.JettyLogger info
INFO: Logging to JettyLogger(null) via
com.google.apphosting.utils.jetty.JettyLogger
5/Mai/2011 3:35:54
com.google.apphosting.utils.config.AppEngineWebXmlReader
readAppEngineWebXml
INFO: Successfully processed /home/rui/Documentos/Eclipse/workspace/
WSCloud/war/WEB-INF/appengine-web.xml
5/Mai/2011 3:35:54
com.google.apphosting.utils.config.AbstractConfigXmlReader
readConfigXml
INFO: Successfully processed /home/rui/Documentos/Eclipse/workspace/
WSCloud/war/WEB-INF/web.xml
5/Mai/2011 4:35:55
com.google.appengine.tools.development.DevAppServerImpl start
INFO: The server is running at http://localhost:/
 headers =javax.xml.soap.MimeHeaders@15c40eb imputstream
=org.mortbay.jetty.HttpParser$Input@1aa0e3b
5/Mai/2011 4:36:06 com.sun.xml.messaging.saaj.soap.MessageImpl init
SEVERE: SAAJ0535: Unable to internalize message
com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to internalize
message
at com.sun.xml.messaging.saaj.soap.MessageImpl.init(MessageImpl.java:
506)
at
com.sun.xml.messaging.saaj.soap.MessageImpl.init(MessageImpl.java:
309)
at
com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl.init(Message1_1Impl.java:
99)
at
com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl.createMessage(SOAPMessageFactory1_1Impl.java:
93)
at pt.uc.dei.WSCloud.WSServlet.doPost(WSServlet.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
511)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1166)
at
com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:
58)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:
43)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:
122)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
388)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:
216)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
182)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
418)
at
com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:
70)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
152)
at com.google.appengine.tools.development.JettyContainerService
$ApiProxyHandler.handle(JettyContainerService.java:351)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
542)
at org.mortbay.jetty.HttpConnection
$RequestHandler.content(HttpConnection.java:938)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:
409)
at org.mortbay.thread.QueuedThreadPool
$PoolThread.run(QueuedThreadPool.java:582)
Caused by: java.lang.NoClassDefFoundError:
com.sun.org.apache.xerces.internal.dom.DocumentImpl is a restricted
class. Please see the Google  App Engine developer's guide for more
details.
at
com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java:
51)
at
com.sun.xml.messaging.saaj.soap.SOAPDocumentImpl.init(SOAPDocumentImpl.java:
83)
at
com.sun.xml.messaging.saaj.soap.SOAPPartImpl.init(SOAPPartImpl.java:
119)
at
com.sun.xml.messaging.saaj.soap.ver1_1.SOAPPart1_1Impl.init(SOAPPart1_1Impl.java:
89)
at

[appengine-java] Re: Deferred Task with non default queue

2011-05-06 Thread Gianni Mariani

Hi Marcel,

Yes, it should work in a production server, not on the development
server.

Are you trying this on the production environment?  If so, let me know
what your app id is.

g

On Apr 27, 7:28 pm, Marcel Overdijk marceloverd...@gmail.com wrote:
 Hi Gianni,

 If I understand correctly I can use the default handler for any
 deferred task and thus specifying the url is irrelevant.

 How would I send a 'deferred' Task to a specific queue? Like this?
 QueueFactory.getQueue(email-queue).add(TaskOptions.Builder.withPayload(newEmailTask(email)));

 This seems to work indeed as
 DeferredTaskContext.getCurrentRequest().getHeader(X-AppEngine-
 QueueName)printsoutthe 'email-queue'. So that's great.

 Now I've added queue.xml to WEB-INF folder with:

 queue-entries
     queue
         namedefault/name
         rate1/s/rate
         retry-parameters
             min-backoff-seconds1/min-backoff-seconds
             task-retry-limit5/task-retry-limit
         /retry-parameters
     /queue
     queue
         nameemail-queue/name
         rate1/s/rate
         retry-parameters
             min-backoff-seconds5/min-backoff-seconds
             task-retry-limit3/task-retry-limit
         /retry-parameters
     /queue
     queue
         nameother-queue/name
         rate1/s/rate
     /queue
 /queue-entries

 I've done some testing and inside the task I just throw an Exception
 to test the retry parameters.

 What I see is that the retry parameters are not picked up (at least in
 Development server).

 I keeps trying (more than the 3 time retry limit) and the backoff
 seconds are also not used.
 I see the first 3 or 4 retries within 2 seconds or so, and interval
 starts increasing, nut 5 between each retry.

 Could it be that the queue.xml is not picked up or I did something
 wrong?

 Thanks for your help and patience,
 Marcel

 On Apr 27, 12:09 am, Gianni Mariani gian...@google.com wrote:







  On Wed, Apr 27, 2011 at 4:19 AM, Marcel Overdijk
  marceloverd...@gmail.comwrote:

   But is it possible to change queue settings for Deferred task?

  A DeferredTask is just like any other task. There is no restriction on
  DeferredTasks with respect to queue settings or which queues you put them
  in.

  The fact that a special handler exists for deferred task is inconsequential.
   It's just a simplification, in that you don't need to do that for yourself.
   i.e. if you do not specify a URL, it will workoutof the box.  The task is
  automatically set to the correct handler when you set the DeferredTask
  payload.

   Like a deferred Email task I would like to throttle differently then
   anotther queue (using Deferred Task(

   So baically the questions are:
   - With Deferred task, can you have multiple queues?

  Like any task.  You can add a deferred task to any queue.

   - Is it possible to change throttling configuration per Deferred task
   queue?

  DeferredTasks may be placed in any queue.

  Just a note.  You seem to be conflating handlers/servlet mappings with
  queues.  There is nothing stopping you from having a single handler accept
  requests from any queue.

  In the case of the TaskOptions.payload(DeferredTask) method, it will
  automatically set the handler url for you if it is not otherwise specified.
   URL is somewhat irrelevant for deferred task since the run() method you
  define is essentially the entry point for the task.

   On Apr 26, 4:59 pm, Gianni Mariani gmari...@google.com wrote:
The preconfigured URL mapping for the DeferredTaskServlet may be used
for any queue.  There is no need to specify your own URL mapping that
I can see.

On Apr 22, 8:05 pm, Marcel Overdijk marceloverd...@gmail.com wrote:

 I did some quick testing and I foundout:

 QueueFactory.getQueue(email-
 queue).add(TaskOptions.Builder.withPayload(new
 EmailTask(email)).url(/email-queue));

 that with above I can enqueue adeferredtaskin the another queue
 (not default).
 I had to to use the url(/email-queue) setting otherwise it was
 pushed to the default __deferred__ handler.

 I just configured the
 com.google.apphosting.utils.servlet.DeferredTaskServlet and mapped it
 to /email-queue

 When I try System.out.println(queue name:  +
 DeferredTaskContext.getCurrentRequest().getHeader(X-AppEngine-
 QueueName));
 I see the correct e-mail-queue being printed thus so far everything
 seems to work.

 I also configured task-retry-limit5/task-retry-limit for this
 queue but this does not seem to work.

 So the setup is working but the DeferredTask / DeferredTaskServlet do
 not seem to look into the settings configured in queue.xml

 Can somebody confirm this?

Do you have more information on how you determined that this is not
working?

 On Apr 22, 11:13 am, Marcel Overdijk marceloverd...@gmail.com wrote:

  Maybe use additional mappings to
  com.google.apphosting.utils.servlet.DeferredTaskServlet
  The 

[appengine-java] Re: Google update available for Eclipse?

2011-05-06 Thread David Chandler
http://code.google.com/webtoolkit/doc/latest/ReleaseNotes.html

GPE is led by the GWT team. You'll also find most discussion about GPE
releases on the GWT group:
http://groups.google.com/group/google-web-toolkit

/dmc

On May 6, 12:18 am, Sam Stigler sam.stig...@gmail.com wrote:
 Hi all,

 I got a message today that there are some Google updates available for the 
 Eclipse plugin and installing the updates now, but I can't find release notes 
 for them. Can someone please point me in the right direction?

 Thanks,
 Sam

-- 
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] Inter-instance communication

2011-05-06 Thread Ion Ionascu
Hello,


Could you please tell me what option are available for inter-instance
communication? Actually, I'm curious if there other options than memchace
and datastore/blob.


Thank you,
Ion Ionascu
www.ionionascu.eu

-- 
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: Remote_api in Java works in Development Server?

2011-05-06 Thread Renan
I'm pretty surprised too! Its a must have feature to solve problems!

i've got the same error (no matter what i try):

- Authentication Failed  at Terminal
- Cookie name Path is a reserved token - in Server



On Mar 11, 9:17 pm, Brian Conneen conn...@gmail.com wrote:
 I'm also having the same problem.  I'm pretty surprised we don't see
 more people complaining about this. And I'm genuinely shocked that
 there is so little official communication from Google. There are about
 a dozen threads complaining about this issue and very few official
 responses.

 I'd very much like to migrate my Python GAE app to Java GAE, but if I
 can't test using real data locally, then I can't do real development.

 Brian

 On Feb 17, 10:23 am, Carlos Aguilar c.aguim...@gmail.com wrote:







  I've been following all tutorials, but I always get the same error
  when trying to upload data to the Development Server:

  - Authentication Failed  at Terminal
  - Cookie name Path is a reserved token - in Server

  I'm having some troubles in my production app because the data so I
  would like to debug with the same data. Is this impossible with
  appengine?

  Carlos

-- 
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.



Re: [appengine-java] xml parsing on GAE servers acts weird

2011-05-06 Thread Stephen Johnson
 You don't show what stream you're passing in so I can't comment on if that
might be an issue but you should try setting namespaceAware to true like
this to see if it will cause the DeferredDocumentImpl to not be used. I use
code like this and works fine for me.

DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setNamespaceAware(true);
DocumentBuilder docBuilder = dbf.newDocumentBuilder();
Document document = docBuilder.parse(inputStream);

Stephen


On Thu, May 5, 2011 at 9:16 AM, Richie richiejr...@gmail.com wrote:

 Hey guys,

 I created an app where a user can upload an xml, I display the nodes
 in a GWT table then the user selects the nodes he/she wants to
 download. Sounds easy, works perfectly in hosted mode.

 I use only the base xml parsing, no 3rd party jars in the project
 (aside from commons-fileupload-1.2.1.jar, commons-io-1.3.2.jar,
 gxt-2.2.3-gwt22.jar).


 Here's the code I use for parsing the XML:

 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.NodeList;

 ...

public static Document getXml(InputStream stream) throws
 ParserConfigurationException, SAXException, IOException {

DocumentBuilder parser =
 DocumentBuilderFactory.newInstance().newDocumentBuilder();
// Parse xml data
Document xml = parser.parse(stream);

return xml;

}

 It's working perfectly in hosted mode, but when I upload it to the
 appengine servers I get the following exception:

 javax.servlet.ServletException: java.lang.RuntimeException:
 java.lang.ClassNotFoundException:
 com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl
at

 com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:
 240)
at
 org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
 152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at
 org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
 542)
at org.mortbay.jetty.HttpConnection
 $RequestHandler.headerComplete(HttpConnection.java:923)
at

 com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:
 76)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at

 com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:
 135)
at
 com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:
 260)
at com.google.apphosting.base.RuntimePb$EvaluationRuntime
 $2.handleRequest(RuntimePb.java:9669)
at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:
 439)
at com.google.net.rpc.impl.Server$RpcTask.runInContext(Server.java:
 573)
at com.google.tracing.TraceContext$TraceContextRunnable
 $1.run(TraceContext.java:448)
at com.google.tracing.TraceContext.runInContext(TraceContext.java:
 688)
at com.google.tracing.TraceContext

 $AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:
 326)
at com.google.tracing.TraceContext
 $AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:
 318)
at com.google.tracing.TraceContext
 $TraceContextRunnable.run(TraceContext.java:446)
at
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:
 1110)
at java.util.concurrent.ThreadPoolExecutor
 $Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:636)
 Caused by: java.lang.RuntimeException:
 java.lang.ClassNotFoundException:
 com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl
at

 com.google.apphosting.runtime.jetty.SessionManager.deserialize(SessionManager.java:
 421)
at

 com.google.apphosting.runtime.jetty.SessionManager.createSessionFromEntity(SessionManager.java:
 382)
at

 com.google.apphosting.runtime.jetty.SessionManager.loadSession(SessionManager.java:
 320)
at

 com.google.apphosting.runtime.jetty.SessionManager.getSession(SessionManager.java:
 288)
at

 org.mortbay.jetty.servlet.AbstractSessionManager.getHttpSession(AbstractSessionManager.java:
 237)
at

 org.mortbay.jetty.servlet.SessionHandler.setRequestedId(SessionHandler.java:
 246)
at
 org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
 136)
at
 org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
 765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
 418)
at

 com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:
 238)
... 19 more
 Caused by: java.lang.ClassNotFoundException:
 com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl
at

 com.google.apphosting.runtime.security.UserClassLoader.loadClass(UserClassLoader.java:
 445)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at java.lang.Class.forName0(Native Method)
 

[appengine-java] JPA fetching class.anotherClass.attribute

2011-05-06 Thread kidowell
Hello, I am currently working for a university project about digital 
humanities, basically its an app where you can read books and make and share 
annotations to it. Im facing a problem that got me stuck for 4 days long 
now, and I do not know what to do.

Here is the tech spec:  Annotatio: has many AnnotationType.  Lets say that I 
have to AnnotationTypes  i.e ''sadness and tradegy. Then the app 
administrator realises that both AnnotationType are the same so he wants to 
merge sadness and tradegy to be AnnotationType tradegy only.

So in order to make this my approach is to first grab all the annotations 
whose annotationType.getName() == comedy and then  set the new 
AnnotationType in the whole list. here's the code.

@Entity
@Table(name = annotation)
public class Annotation implements Serializable, IsSerializable {

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Key id;
private String bookId;

@Basic
@ManyToOne(cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)
private AnnotationType annotationType;

}

@Entity
@Table(name = annotation_type)
public class AnnotationType implements Serializable, IsSerializable {

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Key id;
private String name;
@Basic
@OneToMany(cascade = CascadeType.ALL,mappedBy = annotationType)
private ArrayListAnnotation annotations;
}


And heres the method  fusionAnnotationType

 public int fusionAnnotationTypes(AnnotationType annotationType1, 
AnnotationType annotationType2) throws GeneralException, 
AnnotationTypeNotFoundException, NullParameterException {
int total = 0;
ListAnnotation annotations2 = new ArrayListAnnotation();
ListAnnotationType annotationTypes2;
entityManager = EMF.get().createEntityManager();
if (annotationType1 == null || annotationType2 == null) {
throw new NullParameterException(Parameter cant be null in 
method deleteDnServices);
}
try {

String sql2 = SELECT a FROM Annotation a WHERE 
a.annotationType + annotationType2;
annotations2 = entityManager.createQuery(sql2).getResultList();
AnnotationType auxAnnotationType = new AnnotationType();
for (int i = 0; i  annotations2.size(); i++) {
annotations2.get(i).setAnnotationType(annotationType1);
saveAnnotation(annotations2.get(i));
}
 
} catch (Exception e) {
entityTransaction.rollback();
throw new GeneralException(Exception in method 
fusionAnnotationTypes:  + e.getMessage());
} finally {
if (entityManager.isOpen()) {
entityManager.close();
}
}
return total;
}


when executing it jumps this message error:  Portion of expression could not 
be parsed: @164a05d

I have also tried to fetch SELECT a FROM Annotation a WHERE 
a.annotationType.name + annotationType2.getName(); and annother exception 
occured: Can only reference properties of a sub-object if the sub-object is 
embedded.

Can you please help me out on this, I really do not know what to do. another 
thing that I also tried was fetching the AnnotationType and then getting its 
annotationList and do the same project, but it complains again throwing 
another exception about entity groups.

I really need some help.

cheers.

Kido.

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

2011-05-06 Thread Brandon Donnelson
I've been playing with randomizing query results. So far its working well 
for me. I still have more configurations to try. Has anybody else tried 
randomizing?

What I do in brief:
1. query results with desired filter
2. buffer the results into another entity with an incremented index
3. loop the buffer, randomly get a number then query using the index as a 
filter

Maybe I should be asking my self, what is random. Should I be using some 
atomic decay?

Brandon Donnelson
http://gwt-examples.googlecode.com

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



Re: [appengine-java] xml parsing on GAE servers acts weird

2011-05-06 Thread Brandon Donnelson
I see a java.lang.ClassNotFoundException. Got the libs in war?

-- 
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.lang.NoClassDefFoundError: com.sun.org.apache.xerces.internal.dom.DocumentImpl

2011-05-06 Thread Brandon Donnelson
If you pulled the source code in, try renaming(refractor) the source make 
sure its referencing the correct class. 

Brandon Donnelson
http://gwt-examples.googlecode.com

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



[appengine-java] Re: Uploading a file to the blobstore in Base64 gives wrong filesize in blobinfo. Any work arounds?

2011-05-06 Thread Brandon Donnelson
Wahoo. I'm getting really good results chunking base64 over RPC calls into a 
entity. After the chunks are all sent, I recombine the chunks and decode 
into bytes for save the file to blobstore.

I am having so much more control with chunking, I'm starting to dig it. :)

Brandon Donnelson
http://gwt-examples.googlecode.com

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



[appengine-java] Re: bug with cron job?

2011-05-06 Thread Vik
anyone on this plz?

Thankx and Regards

Vik
Founder
http://www.sakshum.org
http://blog.sakshum.org


On Thu, May 5, 2011 at 7:44 AM, Vik vik@gmail.com wrote:

 Hi

 A cron job in our system is set to email every first day of month. all of a
 sudden i am noticing that it is mailing everyday. Not sure why.

 Here is the cron file entry

  cron
 url/sendPocAvailablityReview/url
 descriptionSend availability review to POCs every month/description
 schedule1st day of month 23:59/schedule
 timezoneAsia/Calcutta/timezone
   /cron


 Thankx and Regards

 Vik
 Founder
 http://www.sakshum.org
 http://blog.sakshum.org


-- 
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.



Re: [appengine-java] Re: Objectify: IllegalAccessError

2011-05-06 Thread Jeff Schnitzer
Specific GAE SDK version requirements are documented in the Objectify
release notes for each version.

Code moves fast in appengine-land!

Jeff

On Tue, May 3, 2011 at 3:19 PM, GeneralSlaine lennart.ben...@gmail.com wrote:
 Jeff,
 I'm using 1.3.8 I think reading from this Jar file: appengine-api-1.0-
 sdk-1.3.8.jar.
 However, this version dates from october 2010, not that old!
 So I have to upgrade?

 BR


 On 3 mei, 04:04, Jeff Schnitzer j...@infohazard.org wrote:
 Are you running with a very old GAE SDK... something before 1.4.0,
 perhaps?  Make sure you are using the latest.

 Jeff







 On Mon, May 2, 2011 at 3:16 PM, GeneralSlaine lennart.ben...@gmail.com 
 wrote:
  Hi all,

  I'm a first time user of objectify and  I'm implementing the
  intorduction (with slightly modified classes). When calling
  ObjectifyService.begin() I already run into trouble: an
  IllegalAccessError is thrown:

         //Some objectify Test code
         ObjectifyService.register(Website.class);

         Objectify ofy = ObjectifyService.begin();

  Exception:

  java.lang.IllegalAccessError: tried to access method
  com.google.appengine.api.datastore.DatastoreServiceFactory.getAsyncDatastor
   eService(Lcom/
  google/appengine/api/datastore/DatastoreServiceConfig;)Lcom/google/
  appengine/api/datastore/AsyncDatastoreService; from class
  com.googlecode.objectify.ObjectifyFactory
         at
  com.googlecode.objectify.ObjectifyFactory.getRawAsyncDatastoreService(Objec
   tifyFactory.java:
  159)
         at
  com.googlecode.objectify.ObjectifyFactory.getAsyncDatastoreService(Objectif
   yFactory.java:
  138)
         at
  com.googlecode.objectify.ObjectifyFactory.begin(ObjectifyFactory.java:
  185)
         at
  com.googlecode.objectify.ObjectifyFactory.begin(ObjectifyFactory.java:
  176)
         at
  com.googlecode.objectify.ObjectifyService.begin(ObjectifyService.java:
  29)
         at com.fourture.catalog.server.UserServlet.doGet(UserServlet.java:
  23)\
  

  Any idea ?

  BTW: I'm implementing Objectify in the context of the following
  discussion on avoiding Data Transfer Objects:
 http://groups.google.com/group/google-appengine-java/browse_thread/th...

  BR

  --
  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 
  athttp://groups.google.com/group/google-appengine-java?hl=en.

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



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-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: xml parsing on GAE servers acts weird

2011-05-06 Thread Didier Durand
Hi,

You have a ClassNotFoundException on a Xerces class according to your
dump: so you are not using the basic xml classes to parse your xml but
also xerces.

You should add the xerces jar in you lib directory

regards

didier

On May 5, 6:16 pm, Richie richiejr...@gmail.com wrote:
 Hey guys,

 I created an app where a user can upload an xml, I display the nodes
 in a GWT table then the user selects the nodes he/she wants to
 download. Sounds easy, works perfectly in hosted mode.

 I use only the base xml parsing, no 3rd party jars in the project
 (aside from commons-fileupload-1.2.1.jar, commons-io-1.3.2.jar,
 gxt-2.2.3-gwt22.jar).

 Here's the code I use for parsing the XML:

 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.NodeList;

 ...

         public static Document getXml(InputStream stream) throws
 ParserConfigurationException, SAXException, IOException {

         DocumentBuilder parser =
 DocumentBuilderFactory.newInstance().newDocumentBuilder();
         // Parse xml data
         Document xml = parser.parse(stream);

         return xml;

     }

 It's working perfectly in hosted mode, but when I upload it to the
 appengine servers I get the following exception:

 javax.servlet.ServletException: java.lang.RuntimeException:
 java.lang.ClassNotFoundException:
 com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl
         at
 com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:
 240)
         at
 org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
 152)
         at org.mortbay.jetty.Server.handle(Server.java:326)
         at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
 542)
         at org.mortbay.jetty.HttpConnection
 $RequestHandler.headerComplete(HttpConnection.java:923)
         at
 com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:
 76)
         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
         at
 com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:
 135)
         at
 com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:
 260)
         at com.google.apphosting.base.RuntimePb$EvaluationRuntime
 $2.handleRequest(RuntimePb.java:9669)
         at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:
 439)
         at com.google.net.rpc.impl.Server$RpcTask.runInContext(Server.java:
 573)
         at com.google.tracing.TraceContext$TraceContextRunnable
 $1.run(TraceContext.java:448)
         at com.google.tracing.TraceContext.runInContext(TraceContext.java:
 688)
         at com.google.tracing.TraceContext
 $AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:
 326)
         at com.google.tracing.TraceContext
 $AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:
 318)
         at com.google.tracing.TraceContext
 $TraceContextRunnable.run(TraceContext.java:446)
         at
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:
 1110)
         at java.util.concurrent.ThreadPoolExecutor
 $Worker.run(ThreadPoolExecutor.java:603)
         at java.lang.Thread.run(Thread.java:636)
 Caused by: java.lang.RuntimeException:
 java.lang.ClassNotFoundException:
 com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl
         at
 com.google.apphosting.runtime.jetty.SessionManager.deserialize(SessionManager.java:
 421)
         at
 com.google.apphosting.runtime.jetty.SessionManager.createSessionFromEntity(SessionManager.java:
 382)
         at
 com.google.apphosting.runtime.jetty.SessionManager.loadSession(SessionManager.java:
 320)
         at
 com.google.apphosting.runtime.jetty.SessionManager.getSession(SessionManager.java:
 288)
         at
 org.mortbay.jetty.servlet.AbstractSessionManager.getHttpSession(AbstractSessionManager.java:
 237)
         at
 org.mortbay.jetty.servlet.SessionHandler.setRequestedId(SessionHandler.java:
 246)
         at
 org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
 136)
         at
 org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
 765)
         at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
 418)
         at
 com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:
 238)
         ... 19 more
 Caused by: java.lang.ClassNotFoundException:
 com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl
         at
 com.google.apphosting.runtime.security.UserClassLoader.loadClass(UserClassLoader.java:
 445)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:264)
         at com.google.apphosting.runtime.jetty.SessionManager
 $DelegatingObjectInputStream.resolveClass(SessionManager.java:476)
         at 

[appengine-java] Re: Blobstore vs. Datastore for HTML files

2011-05-06 Thread bradr
Ikai, this is what a 1.5MB HTML page looks like:
http://svnbook.red-bean.com/en/1.5/svn-book.html  :)

I can't think of many other examples, outside of single page user
guides for open source projects. So your point is very fair,
especially given the average HTML files size is ~25 KB.

1MB XML files, however, are not out of the question. Have you ever
seen the XML that MS Office products output? It is very verbose, and
in my experience ~250 KB for an average sized document. If you embed
images you can easily exceed 1MB. What if I wanted to store MS Project
XML files for my Chrome App: 
https://chrome.google.com/webstore/detail/kdecagaipaomhgmddggocgibjclimaol?hl=en-US
?

Luckily, for this particular project i'm not working with MS XML
files, so I can simplify my solution.

I've taken the approach where I store editable files in the
datastore (xml, xsl, html, css, etc) and non-editable files in the
blobstore (images, pdfs, etc). I like the ability to update records,
as opposed to constantly creating new blobs and deleting the older
versions.

Thanks everyone for your feedback, really appreciate it

On May 6, 10:48 am, Ikai Lan (Google) ika...@google.com wrote:
 What does a 1 megabyte HTML file look like? That seems like a REALLY BIG
 HTML file.

 Ikai Lan
 Developer Programs Engineer, Google App Engine
 Blog:http://googleappengine.blogspot.com
 Twitter:http://twitter.com/app_engine
 Reddit:http://www.reddit.com/r/appengine

 On Fri, May 6, 2011 at 7:57 AM, Brandon Donnelson
 branflake2...@gmail.comwrote:







  I haven't yet. Are you storing compressed to save on cost? I am mainly
  working with images at the moment and sending them to the blobstore so I
  haven't had the need to consider that yet. Thats interesting point if you
  are trying to save on cost of storage that way.

  How much time does it take to compress java.util.zip.GZIPOutputStream?

  Brandon

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

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