Error uploading file set on JCR 0.6.6.1

Help
2009-03-17
2012-12-15
  • John Dickson
    John Dickson
    2009-03-17

    Hi folks

    If you did a new install of JCR 0.6.6.1 since about early March, there is a strong likelihood that it will not work correctly - in particular, you will get a server error when you try to upload a tarball or zipfile for a new file set. 

    Cause:
    -----------
    Since JCR 0.6.6.1 was released, there have been version updates to a number of the third party libraries it uses, and one of these has changed the way in which form validation works.  This change breaks some forms in JCR.

    Fix:
    ----
    I'm working on version 0.6.7 at the moment, which will support all the library updates.  I expect the first release candidate to be available around 25th March.

    Workaround:
    --------------------
    To work around this, you need to install the appropriate versions of the libraries.  You do this by telling easy_install the library version you want.

    Note that I haven't tested this, so the instructions may be a little rough.  Also, note that I'm assuming you're using 'sudo' - if not, just log in as root and omit 'sudo' from these lines.

      sudo easy_install FormEncode==0.7.1
      sudo easy_install Paste==1.6
      sudo easy_install PasteScript==1.3.6
      sudo easy_install WebHelpers==0.3.2

    Please post here if you have any problems (or can improve the instructions).

    Cheers  ........................... JD

     
    • Andrew Banach
      Andrew Banach
      2009-03-18

      Tried the above workaround with this result:

      usr/lib/python2.5/site-packages/Pylons-0.9.6.2-py2.5.egg/pylons/middleware.py:1
      1: DeprecationWarning: The webhelpers.rails package is deprecated.
      - Please begin migrating to the new helpers in webhelpers.html,
        webhelpers.text, webhelpers.number, etc.
      - Import url_for() directly from routes, and redirect_to() from
        pylons.controllers.util (if using Pylons) or from routes.
      - All Javascript support has been deprecated.  You can write link_to_remote()
        yourself or use one of the third-party Javascript libraries.
        from webhelpers.rails.asset_tag import javascript_path
      Traceback (most recent call last):
        File "/usr/bin/paster", line 8, in <module>
          load_entry_point('PasteScript==1.3.6', 'console_scripts', 'paster')()
        File "/usr/lib/python2.5/site-packages/PasteScript-1.3.6-py2.5.egg/paste/scrip
      t/command.py", line 78, in run
          invoke(command, command_name, options, args[1:])
        File "/usr/lib/python2.5/site-packages/PasteScript-1.3.6-py2.5.egg/paste/scrip
      t/command.py", line 117, in invoke
          exit_code = runner.run(args)
        File "/usr/lib/python2.5/site-packages/PasteScript-1.3.6-py2.5.egg/paste/scrip
      t/command.py", line 212, in run
          result = self.command()
        File "/usr/lib/python2.5/site-packages/PasteScript-1.3.6-py2.5.egg/paste/scrip
      t/serve.py", line 227, in command
          relative_to=base, global_conf=vars)
        File "/usr/lib/python2.5/site-packages/PasteScript-1.3.6-py2.5.egg/paste/scrip
      t/serve.py", line 250, in loadapp
          **kw)
        File "/usr/lib/python2.5/site-packages/PasteDeploy-1.3.1-py2.5.egg/paste/deplo                                    y/loadwsgi.py", line 193, in loadapp
          return loadobj(APP, uri, name=name, **kw)
        File "/usr/lib/python2.5/site-packages/PasteDeploy-1.3.1-py2.5.egg/paste/deplo                                    y/loadwsgi.py", line 214, in loadobj
          return context.create()
        File "/usr/lib/python2.5/site-packages/PasteDeploy-1.3.1-py2.5.egg/paste/deplo                                    y/loadwsgi.py", line 606, in create
          return self.object_type.invoke(self)
        File "/usr/lib/python2.5/site-packages/PasteDeploy-1.3.1-py2.5.egg/paste/deplo                                    y/loadwsgi.py", line 99, in invoke
          return fix_call(context.object, context.global_conf, **context.local_conf)
        File "/usr/lib/python2.5/site-packages/PasteDeploy-1.3.1-py2.5.egg/paste/deplo                                    y/util/fixtypeerror.py", line 57, in fix_call
          val = callable(*args, **kw)
        File "/home/abanach/Download/jcr-0.6.6.1/jcr/config/middleware.py", line 68, i                                    n make_app
          tarvcs.init(app_conf)
        File "/home/abanach/Download/jcr-0.6.6.1/jcr/model/vcs/tarvcs/__init__.py", li                                    ne 41, in init
          raise Exception('Cannot locate base directory [%s] from configuration item [                                    %s]' % (BASE_DIR, BASE_DIR_KEY))
      NameError: global name 'BASE_DIR_KEY' is not defined

      looking forward to next rev.

      thanks for the quick response!

       
      • John Dickson
        John Dickson
        2009-03-18

        Hi Andrew

        This test is trying to run against an un-installed JCR.  Please try the re-install from the binary package, as discussed on the other thread, and then repeat this and let me know if it still fails.

        Cheers .................................... JD

         
    • Andrew Banach
      Andrew Banach
      2009-03-20

      OK, installed from jcr-0.6.6.1.tar.gz obtained from sourceforge.

      Installation completed w/o errors.

      served out jcr via:

      paster serve /home/abanach/Download/jcr-0.6.6.1/jcr.ini

      received this error during login:

      [abanach@gorilla jcr-0.6.6.1]$ paster serve /home/abanach/Download/jcr-0.6.6.1/jcr.ini
      /usr/lib/python2.5/site-packages/Pylons-0.9.6.2-py2.5.egg/pylons/middleware.py:11: DeprecationWarning: The webhelpers.rails package is deprecated.
      - Please begin migrating to the new helpers in webhelpers.html,
        webhelpers.text, webhelpers.number, etc.
      - Import url_for() directly from routes, and redirect_to() from
        pylons.controllers.util (if using Pylons) or from routes.
      - All Javascript support has been deprecated.  You can write link_to_remote()
        yourself or use one of the third-party Javascript libraries.
        from webhelpers.rails.asset_tag import javascript_path
      09:25:42,925 INFO  diff [-1208580416] Starting diff generation thread
      Starting server in PID 7711.
      serving on 0.0.0.0:5000 view at http://127.0.0.1:5000
      /usr/lib/python2.5/site-packages/jcr-0.6.6.1.egg/jcr/lib/base.py:54: DeprecationWarning: webhelpers.rails.url_for is deprecated; import url_for from routes instead
        url = h.url_for(LOGIN_URL)
      /usr/lib/python2.5/site-packages/jcr-0.6.6.1.egg/jcr/lib/base.py:57: DeprecationWarning: webhelpers.rails.url_for is deprecated; import url_for from routes instead
        url = h.url_for(LOGIN_URL, **paramDict)
      09:25:52,694 INFO  base [-1243350128] Session expired - forwarding to login page: /login?originalUrl=/
      Error - <type 'exceptions.NameError'>: global name 'Request' is not defined
      URL: http://127.0.0.1:5000/login/login
      File '/usr/lib/python2.5/site-packages/paste/exceptions/errormiddleware.py', line 143 in __call__
        app_iter = self.application(environ, start_response)
      File '/usr/lib/python2.5/site-packages/Pylons-0.9.6.2-py2.5.egg/pylons/wsgiapp.py', line 314 in __call__
        return self.app(environ, start_response)
      File '/usr/lib/python2.5/site-packages/beaker/middleware.py', line 75 in __call__
        return self.app(environ, start_response)
      File '/usr/lib/python2.5/site-packages/beaker/middleware.py', line 148 in __call__
        return self.wrap_app(environ, session_start_response)
      File '/usr/lib/python2.5/site-packages/Routes-1.10.3-py2.5.egg/routes/middleware.py', line 71 in __call__
        req = Request(environ)
      NameError: global name 'Request' is not defined

      CGI Variables
      -------------
        CONTENT_LENGTH: '63'
        CONTENT_TYPE: 'application/x-www-form-urlencoded'
        HTTP_ACCEPT: 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
        HTTP_ACCEPT_CHARSET: 'ISO-8859-1,utf-8;q=0.7,*;q=0.7'
        HTTP_ACCEPT_ENCODING: 'gzip,deflate'
        HTTP_ACCEPT_LANGUAGE: 'en-us,en;q=0.5'
        HTTP_CONNECTION: 'keep-alive'
        HTTP_HOST: '127.0.0.1:5000'
        HTTP_KEEP_ALIVE: '300'
        HTTP_REFERER: 'http://127.0.0.1:5000/login?originalUrl=/'
        HTTP_USER_AGENT: 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.7) Gecko/2009021906 Firefox/3.0.7'
        PATH_INFO: '/login/login'
        REMOTE_ADDR: '127.0.0.1'
        REQUEST_METHOD: 'POST'
        SERVER_NAME: '0.0.0.0'
        SERVER_PORT: '5000'
        SERVER_PROTOCOL: 'HTTP/1.1'

      WSGI Variables
      --------------
        application: <pylons.wsgiapp.PylonsApp object at 0x8e4a16c>
        authkit.authenticate: True
        authkit.config: {}
        authkit.intercept: ['401']
        beaker.cache: <beaker.cache.CacheManager object at 0x8e86eac>
        beaker.get_session: <bound method SessionMiddleware._get_session of <beaker.middleware.SessionMiddleware object at 0x8e7ff8c>>
        beaker.session: {}
        paste.auth_tkt.logout_user: <function logout_user at 0x8fa0064>
        paste.auth_tkt.set_user: <function set_user at 0x8fa002c>
        paste.cookies: (<SimpleCookie: >, '')
        paste.expected_exceptions: [<class 'paste.httpexceptions.HTTPException'>]
        paste.httpexceptions: <paste.httpexceptions.HTTPExceptionHandler object at 0x8e86f2c>
        paste.httpserver.thread_pool: <paste.httpserver.ThreadPool object at 0x859d88c>
        paste.recursive.forward: <paste.recursive.Forwarder from />
        paste.recursive.include: <paste.recursive.Includer from />
        paste.recursive.include_app_iter: <paste.recursive.IncluderAppIter from />
        paste.recursive.script_name: ''
        paste.registry: <paste.registry.Registry object at 0x8f9a1ec>
        paste.throw_errors: True
        pylons.environ_config: {'cache': 'beaker.cache', 'session': 'beaker.session'}
        wsgi process: 'Multithreaded'
      ------------------------------------------------------------

                  <p>Additionally an error occurred while sending the &lt;paste.exceptions.reporter.EmailReporter object at 0x8f9ab8c&gt; report:

                  <pre>Traceback (most recent call last):
        File "/usr/lib/python2.5/site-packages/paste/exceptions/errormiddleware.py", line 403, in send_report
          rep.report(exc_data)
        File "/usr/lib/python2.5/site-packages/paste/exceptions/reporter.py", line 49, in report
          server = smtplib.SMTP(self.smtp_server)
        File "/usr/lib/python2.5/smtplib.py", line 244, in __init__
          (code, msg) = self.connect(host, port)
        File "/usr/lib/python2.5/smtplib.py", line 310, in connect
          raise socket.error, msg
      error: (111, 'Connection refused')
      </pre>
                  </p>----------------------------------------
      Exception happened during processing of request from ('127.0.0.1', 35013)
      Traceback (most recent call last):
        File "/usr/lib/python2.5/site-packages/paste/httpserver.py", line 1053, in process_request_in_thread
          self.finish_request(request, client_address)
        File "/usr/lib/python2.5/SocketServer.py", line 254, in finish_request
          self.RequestHandlerClass(request, client_address, self)
        File "/usr/lib/python2.5/SocketServer.py", line 522, in __init__
          self.handle()
        File "/usr/lib/python2.5/site-packages/paste/httpserver.py", line 432, in handle
          BaseHTTPRequestHandler.handle(self)
        File "/usr/lib/python2.5/BaseHTTPServer.py", line 316, in handle
          self.handle_one_request()
        File "/usr/lib/python2.5/site-packages/paste/httpserver.py", line 427, in handle_one_request
          self.wsgi_execute()
        File "/usr/lib/python2.5/site-packages/paste/httpserver.py", line 287, in wsgi_execute
          self.wsgi_start_response)
        File "/usr/lib/python2.5/site-packages/paste/cascade.py", line 121, in __call__
          return self.apps[-1](environ, start_response)
        File "/usr/lib/python2.5/site-packages/paste/registry.py", line 334, in __call__
          app_iter = self.application(environ, start_response)
        File "/usr/lib/python2.5/site-packages/paste/recursive.py", line 84, in __call__
          return middleware(environ, start_response)
        File "/usr/lib/python2.5/site-packages/paste/recursive.py", line 47, in __call__
          return self.app(environ, start_response)
        File "/usr/lib/python2.5/site-packages/paste/errordocument.py", line 84, in __call__
          return self.app(environ, keep_status_start_response)
        File "/usr/lib/python2.5/site-packages/paste/recursive.py", line 80, in __call__
          return self.application(environ, start_response)
        File "/usr/lib/python2.5/site-packages/paste/errordocument.py", line 185, in __call__
          app_iter = self.application(environ, change_response)
        File "/usr/lib/python2.5/site-packages/AuthKit-0.4.0-py2.5.egg/authkit/authenticate/__init__.py", line 290, in __call__
          return self.app(environ, start_response)
        File "/usr/lib/python2.5/site-packages/AuthKit-0.4.0-py2.5.egg/authkit/authenticate/cookie.py", line 352, in __call__
          return self.app(environ, cookie_setting_start_response)
        File "/usr/lib/python2.5/site-packages/AuthKit-0.4.0-py2.5.egg/authkit/authenticate/forward.py", line 26, in __call__
          app_iter = self.application(environ, start_response)
        File "/usr/lib/python2.5/site-packages/paste/recursive.py", line 80, in __call__
          return self.application(environ, start_response)
        File "/usr/lib/python2.5/site-packages/AuthKit-0.4.0-py2.5.egg/authkit/authenticate/multi.py", line 62, in __call__
          app_iter = app(environ, start_response)
        File "/usr/lib/python2.5/site-packages/AuthKit-0.4.0-py2.5.egg/authkit/authenticate/multi.py", line 32, in app
          return self.default(environ, find)
        File "/usr/lib/python2.5/site-packages/paste/httpexceptions.py", line 632, in __call__
          return self.application(environ, start_response)
        File "/usr/lib/python2.5/site-packages/paste/exceptions/errormiddleware.py", line 138, in __call__
          return self.application(environ, start_response)
        File "/usr/lib/python2.5/site-packages/Pylons-0.9.6.2-py2.5.egg/pylons/wsgiapp.py", line 314, in __call__
          return self.app(environ, start_response)
        File "/usr/lib/python2.5/site-packages/beaker/middleware.py", line 75, in __call__
          return self.app(environ, start_response)
        File "/usr/lib/python2.5/site-packages/beaker/middleware.py", line 148, in __call__
          return self.wrap_app(environ, session_start_response)
        File "/usr/lib/python2.5/site-packages/Routes-1.10.3-py2.5.egg/routes/middleware.py", line 71, in __call__
          req = Request(environ)
      NameError: global name 'Request' is not defined
      ----------------------------------------

      so yes it still fails.

      Andy

       
    • John Dickson
      John Dickson
      2009-03-24

      I've just uploaded 0.6.7rc1, which updates the third party libraries and therefore fixes this issue.

      Cheers .............................. JD