Hi Alan! thanks for replying, I'm serving a sample repoze.bfg application, you can find more about it here http://docs.repoze.org/bfg/current/narr/project.html and here http://ediaz.me/2010/01/repoze-bfg-on-jython-2-5/

It works when using paster's pure python WSGI server but it would be much more convenient to run it inside a servlet container.

In bfg you can configure a directory to serve all of your "static" resources, such as css, images, js, etc like this:

from views import *

import sys
print sys.executable

def app(global_config, **settings):
    """ This function returns a repoze.bfg.router.Router object.  It
    is usually called by the PasteDeploy framework during ``paster
    serve``"""
    print global_config, settings
    config = Configurator(root_factory=get_root, settings=settings)
    config.begin()

    config.add_view(context=MyModel, view=my_view)
    config.add_view(context=MyModel, view=static_view, name='static')

    config.end()
    return config.make_wsgi_app()

The static view is define like this:

from repoze.bfg.view import static

static_view = static('templates/static')

But when I try to access some "static" file, I get the error described.

For now I configured the default servlet to serve static content and it is working that way, but I'd like to know it works with the special bfg's static view.

Thanks for you help in advance.

On Wed, Jan 6, 2010 at 4:53 AM, Alan Kennedy <jython-dev@xhaus.com> wrote:
[Eduardo]
> So far it works, but there's one problem with static resources, I get the
> following error:
>
> Traceback (most recent call last):
>   File "/home/iamedu/BFG/sys/Lib/modjy/modjy.py", line 80, in service
>     self.exc_handler.handle(req, resp, wsgi_environ, mx, (typ, value, tb) )
>   File "/home/iamedu/BFG/sys/Lib/modjy/modjy.py", line 76, in service
>     self.dispatch_to_application(req, resp, wsgi_environ)
>   File "/home/iamedu/BFG/sys/Lib/modjy/modjy.py", line 103, in
> dispatch_to_application
>     self.raise_exc(ApplicationException, str(x))
>   File "/home/iamedu/BFG/sys/Lib/modjy/modjy.py", line 121, in raise_exc
>     raise exc_class(message)
> modjy.modjy_exceptions.ApplicationException: StreamIO.seek() not supported
>
> I'm using Glassfish and java 1.6,

Hi Eduardo,

I don't know what you mean by "static resources". Modjy doesn't serve
static resources, it only invokes WSGI applications.

Can you describe the problem in some more detail, i.e.

 - What WSGI application is modjy running?
 - What are the circumstances when the exception happens, e.g. what
URL is being requested?

Alan.