Issue1708377

classification
Title: PyServlet not working w/ Jetty 6.1.2
Type: Severity: normal
Components: None Versions:
Milestone:
process
Status: closed Resolution: works for me
Dependencies: Superseder:
Assigned To: Nosy List: amak, cgroves, panzerlurch
Priority: normal Keywords:

Created on 2007-04-26.21:26:15 by panzerlurch, last changed 2008-01-14.21:39:27 by cgroves.

Messages
msg1568 (view) Author: panzerlurch (panzerlurch) Date: 2007-04-26.21:26:15
I tired to setup w/ PyServlet.
* Created webapp
* Copied jython.jar
* Modified web.xml:
<servlet>  
    <servlet-name>PyServlet</servlet-name>  
    <servlet-class>org.python.util.PyServlet</servlet-class>
    <init-param>
        <param-name>python.home</param-name>
        <param-value>C:\Entwicklung\jython-2.2b1</param-value>
        <param-name>python.options.showJavaExceptions</param-name>
        <param-value>true</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>  
  </servlet>

  <servlet-mapping>
    <servlet-name>PyServlet</servlet-name>
    <url-pattern>*.py</url-pattern>
  </servlet-mapping>

* End up w/ stacktrace:

HTTP ERROR: 500

Could not create Jython servletTraceback (innermost last):
  (no code object) at line 0
Traceback (innermost last):

  (no code object) at line 0

ImportError: no module named main


org.python.core.PyException: Traceback (innermost last):

  (no code object) at line 0

ImportError: no module named main



RequestURI=/ytong/hello.py
Caused by:

javax.servlet.ServletException: Could not create Jython servletTraceback (innermost last):
  (no code object) at line 0
Traceback (innermost last):

  (no code object) at line 0

ImportError: no module named main


org.python.core.PyException: Traceback (innermost last):

  (no code object) at line 0

ImportError: no module named main



	at org.python.util.PyServlet.loadServlet(Unknown Source)
	at org.python.util.PyServlet.getServlet(Unknown Source)
	at org.python.util.PyServlet.service(Unknown Source)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:467)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:367)
	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)
	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
	at org.mortbay.jetty.Server.handle(Server.java:285)
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:502)
	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:821)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:510)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:208)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:378)
	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:368)
	at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)




msg1569 (view) Author: Charlie Groves (cgroves) Date: 2007-04-29.09:04:07
Would you mind attaching hello.py as well?  I tried recreating this in Jetty 6.1.2rc5, but had no luck.  If you could tar up your whole webapp sans jython.jar that would be best.

Also, how are you starting up jetty?  I just used Jetty's simple startup, java -jar start.jar etc/jetty.xml, in its base directory.  
msg1570 (view) Author: Charlie Groves (cgroves) Date: 2007-05-18.17:22:50
I just got a mail from someone who was seeing the same problem.  They had an old Jython-2.2a1 jar lying around on their classpath which was confusing things.  Could that be the case here?
msg1571 (view) Author: Alan Kennedy (amak) Date: 2008-01-14.21:19:54
Since the submitter hasn't replied to this request for further info for 8 months, should this bug just be closed?
msg1572 (view) Author: Charlie Groves (cgroves) Date: 2008-01-14.21:39:27
Sure!
History
Date User Action Args
2007-04-26 21:26:15panzerlurchcreate