[kforge-dev] Weird DB error on session lookup

John Bywater john.bywater at appropriatesoftware.net
Wed Jan 7 20:37:42 UTC 2009


Rufus Pollock wrote:
> Dear John,
>
> I've been noticing that when I visiting trac sites on
> knowledgeforge.net I frequently get a login popup from my browser. If
> I just click OK (without entering any info) everything works fine
> (and, as this may be relevant, I should note thatI am correctly logged
> in ...). Looking at the error logs however I find something like the
> example below.
>
> The last line 'syntax error at or near WHERE ...' looks like some
> issue in the db layer related to looking up sessions. I've already
> spent a bit of time trying to track this down without success. Any
> ideas at your end?
>   

Sometimes SQLObject can fail to construct a valid SQL query, but I don't 
see why the find() method would fail in this way when retrieving a 
Session by key. Especially intermittently.

Can you find the full SQL query in the log? I suspect it ends with 
"WHERE", that there isn't any condition, and so it doesn't execute.

Is it intermittent? Is this happening only following your recent upgrade?

J.

> Regards,
>
> Rufus
>
> [Wed Jan 07 17:35:39 2009] [error] [client 81.101.140.207]
> PythonAccessHandler kforge.handlers.projecthost::accesshandler:
> Traceback (most recent call last):, referer:
> http://project.knowledgeforge.net/domainmodel/trac/ticket/25
> [Wed Jan 07 17:35:39 2009] [error] [client 81.101.140.207]
> PythonAccessHandler kforge.handlers.projecthost::accesshandler:   File
> "/usr/lib/python2.4/site-packages/mod_python/apache.py", line 299, in
> HandlerDispatch\n    result = object(req), referer:
> http://project.knowledgeforge.net/domainmodel/trac/ticket/25
> [Wed Jan 07 17:35:39 2009] [error] [client 81.101.140.207]
> PythonAccessHandler kforge.handlers.projecthost::accesshandler:   File
> "/home/kforge/svn-kforge/trunk/src/kforge/handlers/projecthost.py",
> line 128, in accesshandler\n    return handler.authorise(), referer:
> http://project.knowledgeforge.net/domainmodel/trac/ticket/25
> [Wed Jan 07 17:35:39 2009] [error] [client 81.101.140.207]
> PythonAccessHandler kforge.handlers.projecthost::accesshandler:   File
> "/home/kforge/svn-kforge/trunk/src/kforge/handlers/projecthost.py",
> line 89, in authorise\n    self.initAuthuserNameFromCookie(), referer:
> http://project.knowledgeforge.net/domainmodel/trac/ticket/25
> [Wed Jan 07 17:35:39 2009] [error] [client 81.101.140.207]
> PythonAccessHandler kforge.handlers.projecthost::accesshandler:   File
> "/home/kforge/svn-kforge/trunk/src/kforge/handlers/modpython.py", line
> 127, in initAuthuserNameFromCookie\n
> view.setSessionFromCookieString(authCookieValue), referer:
> http://project.knowledgeforge.net/domainmodel/trac/ticket/25
> [Wed Jan 07 17:35:39 2009] [error] [client 81.101.140.207]
> PythonAccessHandler kforge.handlers.projecthost::accesshandler:   File
> "/home/kforge/svn-dm/trunk/src/dm/view/base.py", line 97, in
> setSessionFromCookieString\n    self.session =
> self.findSession(sessionKey), referer:
> http://project.knowledgeforge.net/domainmodel/trac/ticket/25
> [Wed Jan 07 17:35:39 2009] [error] [client 81.101.140.207]
> PythonAccessHandler kforge.handlers.projecthost::accesshandler:   File
> "/home/kforge/svn-dm/trunk/src/dm/view/base.py", line 130, in
> findSession\n    return self.registry.sessions[sessionKey], referer:
> http://project.knowledgeforge.net/domainmodel/trac/ticket/25
> [Wed Jan 07 17:35:39 2009] [error] [client 81.101.140.207]
> PythonAccessHandler kforge.handlers.projecthost::accesshandler:   File
> "/home/kforge/svn-dm/trunk/src/dm/dom/base.py", line 56, in
> __getitem__\n    item = self.find(key), referer:
> http://project.knowledgeforge.net/domainmodel/trac/ticket/25
> [Wed Jan 07 17:35:39 2009] [error] [client 81.101.140.207]
> PythonAccessHandler kforge.handlers.projecthost::accesshandler:   File
> "/home/kforge/svn-dm/trunk/src/dm/dom/base.py", line 91, in find\n
> return self.retrieveItem(key), referer:
> http://project.knowledgeforge.net/domainmodel/trac/ticket/25
> [Wed Jan 07 17:35:39 2009] [error] [client 81.101.140.207]
> PythonAccessHandler kforge.handlers.projecthost::accesshandler:   File
> "/home/kforge/svn-dm/trunk/src/dm/dom/base.py", line 177, in
> retrieveItem\n    raise KforgeRegistryKeyError, msg, referer:
> http://project.knowledgeforge.net/domainmodel/trac/ticket/25
> [Wed Jan 07 17:35:39 2009] [error] [client 81.101.140.207]
> PythonAccessHandler kforge.handlers.projecthost::accesshandler:
> KforgeRegistryKeyError: No Session called
> 'aea7a8ec79e168e947daefae77686366' found: syntax error at or near
> "WHERE" at character 21\n, referer:
> http://project.knowledgeforge.net/domainmodel/trac/ticket/25
>
>
>
>   






More information about the kforge-dev mailing list