Worked like a charm! Thanks for the time and effort you put into helping me out on this.

On Wed, Aug 5, 2009 at 5:07 AM, Josh Juneau <juneau001@gmail.com> wrote:
Okay, I got it working in PyDev (Eclipse).  On the first run, I had the same issue as you, but then I altered my CLASSPATH a bit to include the web directory.  Perform the following steps and let me know if it works out for you...

1)  Go to Project Properties->Java Build Path

2)  Click on Add Folder and select war folder

3)  Exclude the WEB-INF directory of the war folder or else it will not accept the war directory as a valid build path

4)  Run app!

I also deployed to the cloud and it seems to work fine.

Let me know how if this does the trick!



Josh Juneau
juneau001@gmail.com
http://jj-blogger.blogspot.com
Twitter ID:  javajuneau


On Tue, Aug 4, 2009 at 12:06 PM, Cliff Hill <xlorep@darkhelm.org> wrote:
Ok, well, if you are wondering, a fresh release of the code I sent in that attachment is currently running at:

http://www-test.darkhelm.org/NewJythonServlet

The logs show the following:

    1. 08-04 09:59AM 06.576 /NewJythonServlet 500 6687ms 12020cpu_ms 36api_cpu_ms 0kb Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.1) Gecko/20090715 Firefox/3.5.1,gzip(gfe),gzip(gfe)
      See details
      207.166.99.104 - - [04/Aug/2009:09:59:13 -0700] "GET /NewJythonServlet HTTP/1.1" 500 0 - "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.1) Gecko/20090715 Firefox/3.5.1,gzip(gfe),gzip(gfe)" "www-test.darkhelm.org"
    2. W 08-04 09:59AM 09.912
      [thedarkhelm/1.335383232504979261].<stderr>: *sys-package-mgr*: The java security manager isn't allowing access to the package cache dir, 'cachedir/packages'

    3. E 08-04 09:59AM 13.160
      org.plyjy.factory.JythonObjectFactory createObject: null
      org.plyjy.exceptions.ModuleNotFoundException: The module 'NewJythonServlet' is not found.
      at org.plyjy.factory.JythonObjectFactory.createObject(JythonObjectFactory.java:50)
      at org.jython.JythonServletFacade.doGet(JythonServletFacade.java:65)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
      at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
      at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:35)
      at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
      at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
      at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
      at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
      at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
      at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
      at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
      at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:237)
      at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
      at org.mortbay.jetty.Server.handle(Server.java:313)
      at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
      at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830)
      at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76)
      at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
      at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:139)
      at com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:235)
      at com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:4823)
      at com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:4821)
      at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java:24)
      at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:359)
      at com.google.net.rpc.impl.Server$2.run(Server.java:820)
      at com.google.tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java:56)
      at com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan(LocalTraceSpanBuilder.java:516)
      at com.google.net.rpc.impl.Server.startRpc(Server.java:775)
      at com.google.net.rpc.impl.Server.processRequest(Server.java:348)
      at com.google.net.rpc.impl.ServerConnection.messageReceived(ServerConnection.java:436)
      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:428)
      at com.google.net.async.EventDispatcher.processNetworkEvents(EventDispatcher.java:762)
      at com.google.net.async.EventDispatcher.internalLoop(EventDispatcher.java:207)
      at com.google.net.async.EventDispatcher.loop(EventDispatcher.java:101)
      at com.google.net.rpc.RpcService.runUntilServerShutdown(RpcService.java:251)
      at com.google.apphosting.runtime.JavaRuntime$RpcRunnable.run(JavaRuntime.java:374)
      at java.lang.Thread.run(Unknown Source)
    4. W 08-04 09:59AM 13.199
      /NewJythonServlet
      java.lang.NullPointerException
      at org.plyjy.factory.JythonObjectFactory.createObject(JythonObjectFactory.java:58)
      at org.jython.JythonServletFacade.doGet(JythonServletFacade.java:65)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
      at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
      at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:35)
      at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
      at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
      at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
      at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
      at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
      at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
      at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
      at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:237)
      at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
      at org.mortbay.jetty.Server.handle(Server.java:313)
      at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
      at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830)
      at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76)
      at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
      at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:139)
      at com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:235)
      at com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:4823)
      at com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:4821)
      at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java:24)
      at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:359)
      at com.google.net.rpc.impl.Server$2.run(Server.java:820)
      at com.google.tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java:56)
      at com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan(LocalTraceSpanBuilder.java:516)
      at com.google.net.rpc.impl.Server.startRpc(Server.java:775)
      at com.google.net.rpc.impl.Server.processRequest(Server.java:348)
      at com.google.net.rpc.impl.ServerConnection.messageReceived(ServerConnection.java:436)
      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:428)
      at com.google.net.async.EventDispatcher.processNetworkEvents(EventDispatcher.java:762)
      at com.google.net.async.EventDispatcher.internalLoop(EventDispatcher.java:207)
      at com.google.net.async.EventDispatcher.loop(EventDispatcher.java:101)
      at com.google.net.rpc.RpcService.runUntilServerShutdown(RpcService.java:251)
      at com.google.apphosting.runtime.JavaRuntime$RpcRunnable.run(JavaRuntime.java:374)
      at java.lang.Thread.run(Unknown Source)
    5. C 08-04 09:59AM 13.249
      Uncaught exception from servlet
      java.lang.NullPointerException
      at org.plyjy.factory.JythonObjectFactory.createObject(JythonObjectFactory.java:58)
      at org.jython.JythonServletFacade.doGet(JythonServletFacade.java:65)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
      at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
      at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:35)
      at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
      at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
      at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
      at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
      at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
      at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
      at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
      at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:237)
      at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
      at org.mortbay.jetty.Server.handle(Server.java:313)
      at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
      at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830)
      at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76)
      at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
      at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:139)
      at com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:235)
      at com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:4823)
      at com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:4821)
      at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java:24)
      at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:359)
      at com.google.net.rpc.impl.Server$2.run(Server.java:820)
      at com.google.tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java:56)
      at com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan(LocalTraceSpanBuilder.java:516)
      at com.google.net.rpc.impl.Server.startRpc(Server.java:775)
      at com.google.net.rpc.impl.Server.processRequest(Server.java:348)
      at com.google.net.rpc.impl.ServerConnection.messageReceived(ServerConnection.java:436)
      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:428)
      at com.google.net.async.EventDispatcher.processNetworkEvents(EventDispatcher.java:762)
      at com.google.net.async.EventDispatcher.internalLoop(EventDispatcher.java:207)
      at com.google.net.async.EventDispatcher.loop(EventDispatcher.java:101)
      at com.google.net.rpc.RpcService.runUntilServerShutdown(RpcService.java:251)
      at com.google.apphosting.runtime.JavaRuntime$RpcRunnable.run(JavaRuntime.java:374)
      at java.lang.Thread.run(Unknown Source)
It appears that the module isn't found. However, if you run the link as:

http://www-test.darkhelm.org/NewJythonServlet.py

It will work, and then the other link also will work after running it once with the .py extension.

The problem I have is while this works for me, it would be annoying to have to run each jython servlet individually with a .py extension, in order to have them all built and ready to be used as I expect them to be.


On Tue, Aug 4, 2009 at 9:32 AM, Josh Juneau <juneau001@gmail.com> wrote:
Thanks.  Don't worry about setting Netbeans up unless you really want to.  I need to make sure that this will work in Eclipse anyways since I am using this example in the book.  This will also give me a chance to give some feedback on working with GAE in Eclipse. ;)

I'll be in touch later today.


Josh Juneau
juneau001@gmail.com
http://jj-blogger.blogspot.com
Twitter ID:  javajuneau


On Tue, Aug 4, 2009 at 11:28 AM, Cliff Hill <xlorep@darkhelm.org> wrote:
When at work, I'm on Windows XP. When I'm at home, I'm on Kubuntu GNU/Linux. I've been trying to get a GIT plugin working for Eclipse for me to be able to easily run a distributed source repo directly in Eclipse.

Another note: The Windows XP system is set up as a portable app off my USB hard drive. If I could get netbeans set up using the same kind of a system, I'd give it a shot, but it is being annoying in how it doesn't want to work right...


On Tue, Aug 4, 2009 at 9:20 AM, Josh Juneau <juneau001@gmail.com> wrote:
Everything does look fine to me.  I am going to try and set up the project in Eclipse and get it running.  Another question, are you using Windows or OS X?  I am on OS X myself.  Now that obviously won't make a difference when deploying to the cloud, but perhaps it would with our dev environments.

Thanks


Josh Juneau
juneau001@gmail.com
http://jj-blogger.blogspot.com
Twitter ID:  javajuneau


On Tue, Aug 4, 2009 at 10:46 AM, Cliff Hill <xlorep@darkhelm.org> wrote:
Ok, I just tried to do exactly what you outlined, to the letter, in Eclipse, and still get the error 500's when I run the local testing server or deploy it to the cloud. Grr... this is annoying. I've attached a copy of the code from Eclipse, if you are curious.


On Tue, Aug 4, 2009 at 2:42 AM, Josh Juneau <juneau001@gmail.com> wrote:
When using the nbappengine plugin for Netbeans, the project does not follow the template as suggested by Google.  There is no war folder, but rather just a normal web application so my setup may be a little different.  I've been placing my Jython servlets into the same place as my JSPs would go.  However, just for fun I have tried to move my code around into different regions of the application and it works as long as the .py files are somewhere on the classpath.

Josh Juneau
juneau001@gmail.com
http://jj-blogger.blogspot.com
Twitter ID:  javajuneau

--
"I'm not responcabel fer my computer's spleling errnors" - Xlorep DarkHelm
Website: http://darkhelm.org





--
"I'm not responcabel fer my computer's spleling errnors" - Xlorep DarkHelm
Website: http://darkhelm.org
Sent from Santa Maria, California, United States




--
"I'm not responcabel fer my computer's spleling errnors" - Xlorep DarkHelm
Website: http://darkhelm.org





--
"I'm not responcabel fer my computer's spleling errnors" - Xlorep DarkHelm
Website: http://darkhelm.org