I followed up with Alan on modjy and he informed me that he has an
issue filed in jython 2.5beta that is causing this error.
http://bugs.jython.org/issue1171

Thanks Alan =]

For now I'll just wait it out until a later release of jython 2.5 =].

Thank you too Frank, if you see this, for all your hard work on
Jython!

Andrew

On Nov 11, 5:01 pm, Andrew <[EMAIL PROTECTED]> wrote:
> Closer still :)
>
> Looked up windows signal.h and found only following signal types are
> defined in windows:
>
> #define SIGINT          2       /* interrupt */
> #define SIGILL          4       /* illegal instruction - invalid
> function image */
> #define SIGFPE          8       /* floating point exception */
> #define SIGSEGV         11      /* segment violation */
> #define SIGTERM         15      /* Software termination signal from
> kill */
> #define SIGBREAK        21      /* Ctrl-Break sequence */
> #define SIGABRT         22      /* abnormal termination triggered by
> abort call */
>
> So I modified my signal.py accordingly and commented out unused signal
> definitions. Now I'm stuck at an error I don't quite understand and
> will probably need someone familiar with Java to assist.
>
> Traceback (most recent call last):
>   File "c:\temp\webapp\WEB-INF\lib\modjy.jar\modjy.py", line 72, in
> service
>   File "c:\temp\webapp\WEB-INF\lib\modjy.jar\modjy.py", line 89, in
> dispatch_to_application
>   File "c:\temp\webapp\WEB-INF\lib\modjy.jar\modjy_wsgi.py", line 141,
> in set_wsgi_environment
>   File "c:\temp\webapp\WEB-INF\lib\modjy.jar\modjy_wsgi.py", line 115,
> in set_wsgi_streams
> TypeError: coercing to Unicode: need string, 'javainstance' type found
>
> This threw me off as I didn't expect to run across any errors in modjy
> since other people seem to be using it with glassfish / django. Does
> anyone know what this means and if it is possibly a configuration err
> on my part? Or is this more possibly a compatibility issue between the
> newer modjy and glassfish v3 prelude?
>
> Thanks,
> Andrew
>
> On Nov 11, 4:37 pm, Andrew <[EMAIL PROTECTED]> wrote:
>
> > *correction in my layout, application.py is in the root of the webapp
> > folder.
> > c:\temp\webapp
> >                 |__WEB-INF
> >                 |         |__web.xml
> >                 |         |___lib
> >                 |                |__modjy.jar
> >                 |                |__jython-complete.jar
> >                 |                |__Lib
> >                 |__web2py
> >                 |        |__(web2py src structure with gluon etc)
> >                 |__application.py
>
> > still receiving unknown signal and can't find much on the web
> > regarding this IllegalArgException. Any help or direction is greatly
> > appreciated :)
>
> > Andrew
>
> > On Nov 11, 3:29 pm, Andrew <[EMAIL PROTECTED]> wrote:
>
> > > Getting closer. I added the following init-param to my web.xml
>
> > >     <init-param>
> > >       <param-name>python.path</param-name>
> > >       <param-value>c:\temp\webapp\WEB-INF\lib\Lib;c:\temp\webapp
> > > \web2py</param-value>
> > >     </init-param>
>
> > > and based off of one of deha's post found that Jython has no signal
> > > module so I stole the one 
> > > from:http://twistedmatrix.com/trac/attachment/ticket/3413/signal.py
>
> > > I have my original layout as defined in the post above (ie. no web2py
> > > in WEB-INF/*  just in webapp)
>
> > > Unfortunately now I get:
>
> > > java.lang.IllegalArgumentException: Unknown signal: QUIT
>
> > > so I'm going to muck around with the signal.py file since I'm on a
> > > windows platform I figure I'll have to modify the signals
> > > accordingly.
>
> > > -Andrew
>
> > > On Nov 11, 2:34 pm, Andrew <[EMAIL PROTECTED]> wrote:
>
> > > > I'm able to deploy fine but when I try to hit the application I
> > > > receive:
>
> > > > Traceback (most recent call last):
> > > >   File "c:\temp\webapp\WEB-INF\lib\modjy.jar\modjy.py", line 76, in
> > > > service
> > > >   File "c:\temp\webapp\WEB-INF\lib\modjy.jar\modjy_exceptions.py",
> > > > line 91, in handle
> > > > modjy_exceptions.NoCallable: Error loading jython callable 'handler':
> > > > No module named gluon
>
> > > > Initially my layout looked like the following:
>
> > > > c:\temp\webapp
> > > >                 |__WEB-INF
> > > >                 |         |__web.xml
> > > >                 |         |___lib
> > > >                 |                |__modjy.jar
> > > >                 |                |__jython-complete.jar
> > > >                 |                |__Lib
> > > >                 |__web2py
> > > >                          |__(web2py src structure with gluon etc)
> > > >                          |__application.py
>
> > > > application.py looks like:
>
> > > > import os
> > > > from gluon.main import wsgibase
>
> > > > def handler(environ, start_response):
> > > >     return wsgibase(environ, start_response)
>
> > > > I've tried copying the web2py folder to WEB-INF/lib as well as copying
> > > > the contents of the web2py folder to WEB-INF/lib.
>
> > > > I wasn't sure where to set python path but I'm thinking maybe as a
> > > > param / init value in the web.xml for the modjy servlet as defined 
> > > > in:http://modjy.xhaus.com/params.html
> > > > I'll give that a shot.
>
> > > > If you see anything out of place here let me know :)
>
> > > > Thanks,
> > > > Andrew
>
> > > > On Nov 11, 11:50 am, mdipierro <[EMAIL PROTECTED]> wrote:
>
> > > > > Absolutely. I am very exited by seeing web2py on jython. That would be
> > > > > a very big step.
>
> > > > > # in Django from your link
>
> > > > >     import os
> > > > >     from django.core.handlers import wsgi
> > > > >     os.putenv("DJANGO_SETTINGS_MODULE", "mysite.settings")
> > > > >     def handler(environ, start_response):
> > > > >     h = wsgi.WSGIHandler()
> > > > >     return h(environ, start_response)
>
> > > > > # in web2py there are no setting
>
> > > > >     from gluon.main import wsgibase
> > > > >     return wsgibase(environ, start_response)
>
> > > > > # make sure the web2py folder is in your python path
>
> > > > > let me us know how things progress!
>
> > > > > Massimo
>
> > > > > On Nov 11, 11:37 am, Andrew <[EMAIL PROTECTED]> wrote:
>
> > > > > > I'm trying to get Web2Py working in glassfish via the new Jython 2.5
> > > > > > beta (www.jython.org) and was following the same approach that Frank
> > > > > > outlines 
> > > > > > here:http://fwierzbicki.blogspot.com/2008/04/jython-and-django-progress-pa...
>
> > > > > > I'm stuck at the point where you setup the application.py and was
> > > > > > wondering if A) this approach could even work with web2py the way it
> > > > > > does with django  and B) if anyone could assist me with how the
> > > > > > application.py would look?
>
> > > > > > Any help is greatly appreciated :)
>
> > > > > > TIA,
> > > > > > Andrew
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to