[appengine-java] Re: java.lang.RuntimeException: Version not ready.

2010-04-20 Thread hector
+1 - I'm having issues deploying as well... I'm guessing some service
is down.

On Apr 20, 3:01 pm, Robert Cooper  wrote:
> I am trying to update "shortyz-xword" and am getting timeouts. I can't
> extract any useful info from the admin log. Is there something going
> on today?
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine for Java" group.
> To post to this group, send email to google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/google-appengine-java?hl=en.

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



[appengine-java] Re: java.lang.RuntimeException: Version not ready.

2010-04-20 Thread hector
yeah, its backup in Java for me

On Apr 20, 3:38 pm, bjy  wrote:
> Looks like it is back up
>
> On Apr 20, 3:24 pm, bjy  wrote:
>
>
>
> > Having same issue in python.. still
>
> > On Apr 20, 3:01 pm, Robert Cooper  wrote:
>
> > > I am trying to update "shortyz-xword" and am getting timeouts. I can't
> > > extract any useful info from the admin log. Is there something going
> > > on today?
>
> > > --
> > > You received this message because you are subscribed to the Google Groups 
> > > "Google App Engine for Java" group.
> > > To post to this group, send email to 
> > > google-appengine-j...@googlegroups.com.
> > > To unsubscribe from this group, send email to 
> > > google-appengine-java+unsubscr...@googlegroups.com.
> > > For more options, visit this group 
> > > athttp://groups.google.com/group/google-appengine-java?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Google App Engine for Java" group.
> > To post to this group, send email to google-appengine-j...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > google-appengine-java+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/google-appengine-java?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine for Java" group.
> To post to this group, send email to google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/google-appengine-java?hl=en.

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



[appengine-java] NullPointerException on URLFetchService

2010-04-23 Thread hector
I'm sometimes getting a NullPointerException when using the
URLFetchService to a web service running on another appspot.  In these
cases the request does not show up in the other appspot's logs.

If I make this request from the command-line, it works fine and I can
see the request in the logs.

I'm also using the URLFetchService to access other web services NOT
running on appspot, and those are working fine.

This exception was happening yesterday, then magically went away.  Now
its showing up again.


---

java.lang.NullPointerException
at com.google.appengine.api.urlfetch.URLFetchServicePb$URLFetchRequest
$Header$Builder.setValue(URLFetchServicePb.java:756)
at
com.google.appengine.api.urlfetch.URLFetchServiceImpl.convertToPb(URLFetchServiceImpl.java:
147)
at
com.google.appengine.api.urlfetch.URLFetchServiceImpl.fetch(URLFetchServiceImpl.java:
30)
at
org.systemsbiology.addama.coresvcs.gae.filters.CheckAccessFilter.doFilter(CheckAccessFilter.java:
68)

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



[appengine-java] Re: NullPointerException on URLFetchService

2010-04-26 Thread hector
I figured out the problem.  Setting a null value in a request header
will cause this exception.  Not sure if this should be the expected
behavior, since its hard to tell where the null pointer is coming
from.

On Apr 23, 5:29 pm, hector  wrote:
> I'm sometimes getting a NullPointerException when using the
> URLFetchService to a web service running on another appspot.  In these
> cases the request does not show up in the other appspot's logs.
>
> If I make this request from the command-line, it works fine and I can
> see the request in the logs.
>
> I'm also using the URLFetchService to access other web services NOT
> running on appspot, and those are working fine.
>
> This exception was happening yesterday, then magically went away.  Now
> its showing up again.
>
> ---
>
> java.lang.NullPointerException
>         at com.google.appengine.api.urlfetch.URLFetchServicePb$URLFetchRequest
> $Header$Builder.setValue(URLFetchServicePb.java:756)
>         at
> com.google.appengine.api.urlfetch.URLFetchServiceImpl.convertToPb(URLFetchServiceImpl.java:
> 147)
>         at
> com.google.appengine.api.urlfetch.URLFetchServiceImpl.fetch(URLFetchServiceImpl.java:
> 30)
>         at
> org.systemsbiology.addama.coresvcs.gae.filters.CheckAccessFilter.doFilter(CheckAccessFilter.java:
> 68)
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine for Java" group.
> To post to this group, send email to google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/google-appengine-java?hl=en.

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



[appengine-java] Re: NullPointerException on URLFetchService

2010-04-29 Thread hector
http://code.google.com/p/googleappengine/issues/detail?id=3169

here you go!

On Apr 26, 11:42 am, "Ikai L (Google)"  wrote:
> Can you file a bug in our issues tracker? We should try to throw a more
> useful exception or throw the same error locally in the development server:
>
> http://code.google.com/p/googleappengine/issues/list
>
>
>
> On Mon, Apr 26, 2010 at 11:00 AM, hector  wrote:
> > I figured out the problem.  Setting a null value in a request header
> > will cause this exception.  Not sure if this should be the expected
> > behavior, since its hard to tell where the null pointer is coming
> > from.
>
> > On Apr 23, 5:29 pm, hector  wrote:
> > > I'm sometimes getting a NullPointerException when using the
> > > URLFetchService to a web service running on another appspot.  In these
> > > cases the request does not show up in the other appspot's logs.
>
> > > If I make this request from the command-line, it works fine and I can
> > > see the request in the logs.
>
> > > I'm also using the URLFetchService to access other web services NOT
> > > running on appspot, and those are working fine.
>
> > > This exception was happening yesterday, then magically went away.  Now
> > > its showing up again.
>
> > > ---
>
> > > java.lang.NullPointerException
> > >         at
> > com.google.appengine.api.urlfetch.URLFetchServicePb$URLFetchRequest
> > > $Header$Builder.setValue(URLFetchServicePb.java:756)
> > >         at
>
> > com.google.appengine.api.urlfetch.URLFetchServiceImpl.convertToPb(URLFetchServiceImpl.java:
> > > 147)
> > >         at
>
> > com.google.appengine.api.urlfetch.URLFetchServiceImpl.fetch(URLFetchServiceImpl.java:
> > > 30)
> > >         at
>
> > org.systemsbiology.addama.coresvcs.gae.filters.CheckAccessFilter.doFilter(CheckAccessFilter.java:
> > > 68)
>
> > > --
> > > You received this message because you are subscribed to the Google Groups
> > "Google App Engine for Java" group.
> > > To post to this group, send email to
> > google-appengine-j...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > google-appengine-java+unsubscr...@googlegroups.com
> > .
> > > For more options, visit this group athttp://
> > groups.google.com/group/google-appengine-java?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google App Engine for Java" group.
> > To post to this group, send email to
> > google-appengine-j...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-appengine-java+unsubscr...@googlegroups.com
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-appengine-java?hl=en.
>
> --
> Ikai Lan
> Developer Relations, Google App Engine
> Twitter:http://twitter.com/ikai
> Delicious:http://delicious.com/ikailan
>
> 
> Google App Engine links:
> Blog:http://googleappengine.blogspot.com
> Twitter:http://twitter.com/app_engine
> Reddit:http://www.reddit.com/r/appengine
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine for Java" group.
> To post to this group, send email to google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/google-appengine-java?hl=en.

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



[appengine-java] The API call datastore_v3.Put() is temporarily unavailable.

2010-05-05 Thread hector
Getting this error on Java App Engine.

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



[appengine-java] java.lang.NoClassDefFoundError: org/apache/log4j/xml/DOMConfigurator

2010-06-24 Thread hector
Deployed a minor change to my app and got this error.  No dependencies
changed in my pom.

C 06-24 09:19AM 49.700
Uncaught exception from servlet
java.lang.NoClassDefFoundError: org/apache/log4j/xml/DOMConfigurator
at
org.springframework.util.Log4jConfigurer.initLogging(Log4jConfigurer.java:
70)
at
org.springframework.web.util.Log4jWebConfigurer.initLogging(Log4jWebConfigurer.java:
152)
at
org.springframework.web.util.Log4jConfigListener.contextInitialized(Log4jConfigListener.java:
47)
at
org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:
548)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:
1250)
at
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:
517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:
467)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
com.google.apphosting.runtime.jetty.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.java:
191)
at
com.google.apphosting.runtime.jetty.AppVersionHandlerMap.getHandler(AppVersionHandlerMap.java:
168)
at
com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:
123)
at
com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:
250)
at com.google.apphosting.base.RuntimePb$EvaluationRuntime
$6.handleBlockingRequest(RuntimePb.java:5838)
at com.google.apphosting.base.RuntimePb$EvaluationRuntime
$6.handleBlockingRequest(RuntimePb.java:5836)
at
com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java:
24)
at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:
398)
at com.google.net.rpc.impl.Server$2.run(Server.java:852)
at
com.google.tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java:
56)
at
com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan(LocalTraceSpanBuilder.java:
576)
at com.google.net.rpc.impl.Server.startRpc(Server.java:807)
at com.google.net.rpc.impl.Server.processRequest(Server.java:369)
at
com.google.net.rpc.impl.ServerConnection.messageReceived(ServerConnection.java:
442)
at
com.google.net.rpc.impl.RpcConnection.parseMessages(RpcConnection.java:
319)
at
com.google.net.rpc.impl.RpcConnection.dataReceived(RpcConnection.java:
290)
at com.google.net.async.Connection.handleReadEvent(Connection.java:
474)
at
com.google.net.async.EventDispatcher.processNetworkEvents(EventDispatcher.java:
831)
at
com.google.net.async.EventDispatcher.internalLoop(EventDispatcher.java:
207)
at com.google.net.async.EventDispatcher.loop(EventDispatcher.java:
103)
at
com.google.net.rpc.RpcService.runUntilServerShutdown(RpcService.java:
251)
at com.google.apphosting.runtime.JavaRuntime
$RpcRunnable.run(JavaRuntime.java:413)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException:
org.apache.log4j.xml.DOMConfigurator
at
com.google.appengine.runtime.Request.process-2f45e0fa3a38edf7(Request.java)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
... 32 more

#
I 06-24 09:19AM 49.705

This request caused a new process to be started for your application,
and thus caused your application code to be loaded for the first time.
This request may thus take longer and use more CPU than a typical
request for your application.

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



[appengine-java] IOException instead of 404

2010-09-20 Thread hector
I'm using the URLFetchService to access some web services from my
domain.  Today I was testing the connection to one of my services, but
I didn't realize that my app server was down.

The expected behavior was that I would get a 404 in the HTTPResponse,
but instead I'm seeing a java.io.IOException.

Here's the top of the stacktrace.  Hope this helps...

Uncaught exception from servlet
java.io.IOException: Could not fetch URL: 
https://.../google-dsapi-svc/addama/datasources/...
at
com.google.appengine.api.urlfetch.URLFetchServiceImpl.convertApplicationException(URLFetchServiceImpl.java:
106)
at
com.google.appengine.api.urlfetch.URLFetchServiceImpl.fetch(URLFetchServiceImpl.java:
39)
at
org.systemsbiology.addama.coresvcs.gae.services.Proxy.doProxy(Proxy.java:
183)

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



[appengine-java] Re: App Engine Channel API release date on production?

2010-09-20 Thread hector
Hooray!  I'm eagerly waiting for Channel API to be enabled.  I've been
wanting to use it for two use cases (so far):
- publishing events from services to users (job is finished, errors in
analysis)
- sending messages between applications (currently using polling to
see if other application has submitted data)

On Sep 13, 11:53 am, "Ikai Lan (Google)" 
wrote:
> It's not ready yet. Our roadmap is here:
>
> http://code.google.com/appengine/docs/roadmap.html
>
> In general, we do not release ETAs for features until they are imminent. For
> instance, if you see something in a prerelease SDK, that's a sign it's
> likely going to happen (barring catastrophic issues).
>
> On Sun, Sep 12, 2010 at 6:30 PM, Daniel Guermeur wrote:
>
> > Hello there,
>
> > I thought Channel API would be enabled with v1.3.6. We are now at
> > v1.3.7, and I get an error when trying it:
>
> > Uncaught exception from servlet
> > com.google.apphosting.api.ApiProxy$FeatureNotEnabledException: The
> > channel service is not enabled.
>
> > Could anyone share some info regarding its release?
>
> > Daniel
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google App Engine for Java" group.
> > To post to this group, send email to
> > google-appengine-j...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-appengine-java+unsubscr...@googlegroups.com
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-appengine-java?hl=en.

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



[appengine-java] Re: Spring MVC on GAE: Slow Load Time

2010-10-08 Thread hector
I had the same experience with my Spring MVC webapp.  I found that the
problem was affected directly by the type of controllers I was
using.

Controllers that use annotations
(org.springframework.stereotype.Controller) take longer to startup.
On the other hand, controllers that extend from
org.springframework.web.servlet.mvc.AbstractController startup fast.

Also, avoid any startup routines that take a long time
(InitializingBean or init-method configurations).  Startup on GAE can
happen whenever an instance of your appspot is cycled up, which means
more often than you think.  I have some logic that need to happen only
once before my application could be used by clients.  So I created an
"admin-only" controller with that logic.  After I deploy to my
appspot, I would call my admin controller and trigger my startup
routine.

And if you need to upload large amounts of data, use the
com.google.apphosting.utils.remoteapi.RemoteApiServlet.  Don't try to
implement your own controller, its too much hassle.

On Oct 6, 12:44 pm, Vladimir  wrote:
> Hello All!
>
> I recently deployed a Spring MVC application to google app engine, and
> the intial load time is about 7sec. Once the application is loaded,
> the app is quite responsive. But, if the app is idle for more than 1
> minute (there isn't ANY traffic to it) the app needs to be again
> reloaded by GAE, which, takes about 7sec as well. For a PRD-level
> application this is unacceptable. (The app is empty -- I'm not even
> using JPA, Sitemesh, Spring Security, etc yet. It just loads a jsp
> page with some text.)
>
> The only "best practice" to fix the 'load time' I've seen so far is to
> set up a cron job that hits the url every minute, therefore keeping
> the app 'loaded'. Obviously this is a terrible solution.
>
> So here are the questions:
> Are there any "best practices" for Spring on GAE in terms of
> "responsiveness"?
> Since google and spring are working on developing better integration
> between the two of them, has there been any news/progress on this
> problem? I can't find anything concrete, that's why I'm asking it here
>
> Thanks!
> Vladimir

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



[appengine-java] DeadlineExceededException from URLFetchService

2010-10-25 Thread hector
Would it be possible to throw DeadlineExceededException from the
URLFetchService instead of IOException?

java.io.IOException: Timeout while fetching: https://...
at
com.google.appengine.api.urlfetch.URLFetchServiceImpl.convertApplicationException(URLFetchServiceImpl.java:
108)
at
com.google.appengine.api.urlfetch.URLFetchServiceImpl.fetch(URLFetchServiceImpl.java:
39)

Maybe I'm expecting the wrong behavior from the API.

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



[appengine-java] Re: DeadlineExceededException from URLFetchService

2010-10-25 Thread hector
That's correct, I'm using AppEngine to run a service registry that
proxies to other services.  I would like to differentiate between
services that are unavailable and services that are not responding
fast enough.

I've also noticed that if the service I'm calling from GAE is down, I
get an IOException, instead of a 404 in the response... which is what
I would get if I were calling the service from the browser.

On Oct 25, 1:22 pm, Don Schwarz  wrote:
> DeadlineExceededException isn't appropriate, as that exception
> indicates that your overall request deadline has passed and you need
> to finish what you are doing and return from the request.
>
> java.io.IOException seems correct for this.  Are you just trying to
> distinguish timeouts from other types of connection errors (e.g. the
> remote server is slow vs. the remote server is down completely) ?  I
> don't know how reliably we can tell the difference.
>
> -- Don
>
> On Mon, Oct 25, 2010 at 3:05 PM, hector  wrote:
> > Would it be possible to throw DeadlineExceededException from the
> > URLFetchService instead of IOException?
>
> > java.io.IOException: Timeout while fetching: https://...
> >        at
> > com.google.appengine.api.urlfetch.URLFetchServiceImpl.convertApplicationException(URLFetchServiceImpl.java:
> > 108)
> >        at
> > com.google.appengine.api.urlfetch.URLFetchServiceImpl.fetch(URLFetchServiceImpl.java:
> > 39)
>
> > Maybe I'm expecting the wrong behavior from the API.
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Google App Engine for Java" group.
> > To post to this group, send email to google-appengine-j...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > google-appengine-java+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/google-appengine-java?hl=en.

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



[appengine-java] URLFetch weirdness

2010-12-02 Thread hector
Have you guys noticed any weirdness with URLFetch today?

One of my appspots is getting intermittent IOException through the
URLFetchService.  Most of the time it fails, once in a while it goes
through.  I've verified the target web service and it is up (and has
been up).

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



[appengine-java] Re: URLFetch weirdness

2010-12-04 Thread hector
No, it was failing fast... I was not even seeing the call in my web
service.
In any case, it started working correctly again.  No change on my
part.

I wonder where that appspot was deployed... I have other appspots that
were not experiencing the issue.

On Dec 2, 10:22 pm, Philippe Beaudoin 
wrote:
> You're not hitting the 10s (or default 5s) timeout of URLFetch by any
> chance? (Could happen if the service is slower than usual.)
>
> On Dec 2, 2:46 pm, hector  wrote:
>
> > Have you guys noticed any weirdness with URLFetch today?
>
> > One of my appspots is getting intermittent IOException through the
> > URLFetchService.  Most of the time it fails, once in a while it goes
> > through.  I've verified the target web service and it is up (and has
> > been up).

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



[appengine-java] JDO Unit testing with JUnit. Object with id "" is managed by a different ObjectManager

2011-04-11 Thread Hector
Hi everyone,

I'm trying to test a method that uses JDO and I can't figure out where
the problem is. I get this exception when I execute a test method.

org.datanucleus.exceptions.NucleusUserException: Object with id "" is
managed by a different ObjectManager
at
org.datanucleus.ObjectManagerImpl.findStateManager(ObjectManagerImpl.java:
756)

@Test
public void nuevaEntidadMismoNombreTest(){

Entidad entidad = new Entidad(nombre, cif, tipo, localizacion);
Entidad entidad2 = new Entidad(nombre, cif, tipo, localizacion);

Entidad nuevaEntidad = entidadDao.crearEntidad(entidad);
Entidad nuevaEntidad2 = entidadDao.crearEntidad(entidad2);

}

The method that I use to create the Entity is.

public Entidad crearEntidad(Entidad entidad) {
PersistenceManager pm = PMF.get().getPersistenceManager();
try{
Entidad nuevaEntidad = pm.makePersistent(entidad);
return  pm.detachCopy(nuevaEntidad);
}finally{
pm.close();
}
}

For getting the PM I used the class recommended by Google

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

private PMF() {}

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

I've also added the setting up of the datastore folowing the Google's
documentation instructions.

private final LocalServiceTestHelper dataHelper = new
LocalServiceTestHelper(new LocalDatastoreServiceTestConfig());

Can anyone tell my why I'm getting this exception?

Thanks in advance.

Regards.

-- 
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 add parameters to HTTP Post

2011-04-26 Thread hector@ISB
something like this...

import com.google.appengine.api.urlfetch.*;
import static com.google.appengine.api.urlfetch.HTTPMethod.POST;
import static 
com.google.appengine.api.urlfetch.FetchOptions.Builder.withDeadline;
import static 
com.google.appengine.api.urlfetch.URLFetchServiceFactory.getURLFetchService;

public class PostClass {

public void postMethod() throws Exception {
HTTPRequest req = new HTTPRequest("http://www.example.com/comment";, 
POST, withDeadline(10.0));
req.setHeader(new HTTPHeader("x-header-one", "some header"));

String params = "x=y&y=z&z=abc";

req.setPayload(params.getBytes());

HTTPResponse resp = getURLFetchService().fetch(proxyRequest);
if (resp != null) {
int responseCode = resp.getResponseCode();
  
List headers = resp.getHeaders();

byte[] content = resp.getContent();
}
}
}

-- 
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 add parameters to HTTP Post

2011-04-26 Thread hector@ISB
import com.google.appengine.api.urlfetch.*;
import static com.google.appengine.api.urlfetch.HTTPMethod.POST;
import static 
com.google.appengine.api.urlfetch.FetchOptions.Builder.withDeadline;
import static 
com.google.appengine.api.urlfetch.URLFetchServiceFactory.getURLFetchService;

public class PostClass {

public void postMethod() throws Exception {
HTTPRequest req = new HTTPRequest("http://www.example.com/comment";, 
POST, withDeadline(10.0));
req.setHeader(new HTTPHeader("x-header-one", "some header"));

String params = "x=y&y=z&z=abc";

req.setPayload(params.getBytes());

HTTPResponse resp = getURLFetchService().fetch(req);
if (resp != null) {
int responseCode = resp.getResponseCode();
  
List headers = resp.getHeaders();

byte[] content = resp.getContent();
}
}
}

-- 
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] Lots of 500 errors

2011-06-06 Thread hector@ISB
   My appspot (addama-systemsbiology.appspot.com) is getting lots of 500 
errors today.  I haven't deployed any changes in a while.

2011-06-06 13:05:36.158 */addama/registry/mappings/tools/vera-sam-pipeline*500 
11985ms 0cpu_ms 0kb Jakarta Commons-HttpClient/3.1,gzip(gfe)
209.124.189.39 - - [06/Jun/2011:13:05:36 -0700] "POST 
/addama/registry/mappings/tools/vera-sam-pipeline HTTP/1.1" 500 0 - "Jakarta 
Commons-HttpClient/3.1,gzip(gfe)" "" ms=11986 cpu_ms=0 api_cpu_ms=0 
cpm_usd=0.54
*W *2011-06-06 13:05:36.158
Request was aborted after waiting too long to attempt to service your 
request. This may happen sporadically when the App Engine serving cluster is 
under unexpectedly high or uneven load. If you see this message frequently, 
please contact the App Engine team.

   

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine-java/-/OEl3Wndqd1FmQUVK.
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: Lots of 500 errors

2011-06-07 Thread hector@ISB
I am using the URLFetchService low level api (which works great, esp 
Futures).  I checked my dependencies for commons-httpclient but I didn't 
find any... I do have commons-fileupload, commons-lang, commons-logging from 
apache... as well as aopalliance, log4j and a bunch of springframework jars. 
 I'm also packaging org.json libraries, but I plan to move to the repackaged 
version offered by GAE.

Anyways, my appspot seems to be working this morning... so I thank the cloud 
masters at GAE :)

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine-java/-/ZW1TaFF2VDEtRGdK.
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't get log4j working

2011-10-19 Thread hector@ISB
I originally used log4j on my webapp running on GAE, but I migrated to 
java.util.logging.  Perhaps you can use my configuration as an example.

Here are the contents of my WEB-INF directory on my open source project on 
google 
code.
 
 Take a look at the *web.xml* for log4j configuration using Spring 
Framework.  The logging.properties file actually controls the 
java.util.logging API, but I still have log4j.xml in there.

Also, here's an example using java.util.logging API:  
RegistryController.java

Hope this helps!

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine-java/-/V0ZeonAIxogJ.
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't get log4j working

2011-10-19 Thread hector@ISB
Almost forgot, I don't have my appengine-web.xml checked-in, but here's the 
relevant snippet:


http://appengine.google.com/ns/1.0";>
...
...

**
...

true



-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine-java/-/uIVK2ed9v-IJ.
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: Simple Java WebServices Call in GAE

2011-12-28 Thread Hector Rovira
Are you trying to expose a Web Service from your Appspot?

For this you will need to extend HttpServlet, and configure it in your 
web.xml with a mapping for your web service.
http://code.google.com/appengine/docs/java/runtime.html#Requests_and_Servlets

For an example of a REST web service with JSON output, go here: 
 http://goo.gl/0zU0e  

It uses Spring MVC to manage URL mappings.  In this example, the controller 
receives an AJAX request from a web page to 
https://example.appspot.com/users/whoami and returns JSON containing 
information about the logged in user... I use this controller to load user 
information on the web page, and provide a sign out button.

Here's a javascript component that makes the REST call and processes the 
JSON:  http://goo.gl/Z18ev

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine-java/-/6GazSiYJ-8wJ.
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] Refresh your UI without redeploying to appspot

2011-01-18 Thread hector@ISB
I developed this generally useful HttpServlet that fetches your
application's static content (html, javascript, images, css) from any
external web server.  It also maintains a copy of the content in
memcache and provides an admin-only interface to refresh the copy.

I am using it to rapidly deploy changes to my user interface by
serving my content directly from SVN, and external javascript
libraries (ext-js, prototype-js, protovis) from an internal web
server.   This significantly reduces the number of deployments in an
Agile development environment.

This servlet is easily wired into your web.xml and requires little
configuration to start working.

code:  http://goo.gl/jHnee
configuration: http://goo.gl/K6dQb
blog:  http://addama.wordpress.com/2011/01/09/ui-rapid-deployment-in-appspot/

Hope you find this useful!

Hector Rovira
Institute for Systems Biology
Seattle WA

Addama is open source software offered under the Apache v2 license

-- 
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: AWS competition

2011-02-02 Thread hector@ISB
Actually, I was looking at that recently.  I plan to deploy some war
files out there to see how the process compares, but my experience
thus far with AWS has been that you need to do a lot of the heavy
lifting to get apps running and available to the public... That's one
of the things I really like about GAE, you can turn on and go so
quickly.

On Jan 26, 9:49 pm, Andrei  wrote:
> Has anybody looked at AWS Elastic 
> Beanstalk?http://aws.amazon.com/elasticbeanstalk/
> What do you think

-- 
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: Servlet Filter on non-Servlet resource

2011-02-02 Thread hector@ISB
I'm also heavily using Servlet filters... are you asking because you
can't get it to work?  or because there's no examples?

what i've had a bit of trouble with is the  tag
on web.xml... there seems to be some unexpected behavior but I haven't
debugged it thoroughly.

On Jan 28, 1:45 am, andrew  wrote:
> We are using servlet filters without any problem on app-engine for
> logging and authentication of servlet.
>
> The servlet filter spec states they can be applied to "any resource",
> i.e. including html pages etc.
>
> I have tried this on app engine without success, and when looking at
> the app engine docs 
> (herehttp://code.google.com/intl/en/appengine/docs/java/config/webxml.html...)
> it just mentions and shows examples of servlets.
>
> Is this just an omission of the text, and no example for that?
>
> In appengine, can I apply servlet filters to a url (single or with a
> pattern).

-- 
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: Getting Null pointer expection

2011-03-11 Thread hector rovira
try this instead:

if (!userService.isUserLoggedIn()) {
response.sendRedirect(userService.createLoginURL(url));
return null;
}

User user = userService.getCurrentUser();

JSONObject json = new JSONObject();
json.put("email", user.getEmail());

-- 
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: UserService error

2011-03-11 Thread hector rovira
do you check if the user is logged in anywhere in your stack?  for example:

if (!userService.isUserLoggedIn()) {
response.sendRedirect(userService.createLoginURL(url));
return null;
}

there's a way to enforce this in your web.xml but you may want some of your 
content to be available for users that are not logged in.

-- 
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: Design question for SOA / Facebook like Platform on GAE

2011-03-11 Thread hector rovira
You don't necessarily need to host the other apps on appspot, if what they 
are providing is web UIs... you can serve them from your appspot as a proxy. 
 The pages you serve will benefit from your authentication and will be able 
to access your REST APIs.

I've developed this open source project with a similar approach for research 
apps:  http://cloud.addama.org.  It ties a variety of apps running outside 
of GAE through a service registry running on GAE.  The registry provides the 
security concerns and standardizes the REST APIs.

-- 
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: Dudas sobre Aplicaciones con JPA

2011-03-11 Thread hector rovira
Necesitas dar mas informacion.  Provee ejemplos de tu configuracion 
(persistence.xml y web.xml) y de las clases.  Cual es la relacion entre 
Colleciones y Editoriales?

Cual es la naturaleza del problema?  En que parte piensas que falla?  En 
"persist" o en "retrieve"?

Has utilizado JPA anteriormente, sin GAE?  Te funciona en el "dev server"?

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

2011-03-18 Thread hector@ISB
Este blog parece tener buenos ejemplos: 
 http://gae-java-persistence.blogspot.com/

Estos son otras referencias, lo mas seguro las has visto antes...

   - http://code.google.com/appengine/docs/java/datastore/jpa/overview.html
   - http://code.google.com/p/datanucleus-appengine/
   - 
   
http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/package-summary.html

Perdona que no te pueda informar mas, yo no uso JPA... yo uso el 
DatastoreService directamente.

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