Problem with SVN version of Wub...

20 views
Skip to first unread message

Georgios Petasis

unread,
Oct 8, 2011, 8:24:45 AM10/8/11
to Wub Discussion
Hi all,

I have started a Wub server on my pc, checking out the latest SVN head of Wub,
and I am getting an error:

Server Error: extra switch pattern with no body

extra switch pattern with no body

Error Code 'TCL OPERATION SWITCH BADARM'

extra switch pattern with no body
    while executing
"switch -glob -- "[dict get $r -host],[dict get $r -path]/" { {
	    Http Redir $r [dict get $r -path]/
	}
	    default {
		NotFound $r
	    }
	}"
    (procedure "trailing" line 2)
    invoked from within
"trailing $r"
    (procedure "::Dispatcher::do" line 32)
    invoked from within
"::Dispatcher do REQUEST [::Dispatcher pre $r]"
INNER invokeStk1 switch -glob -- petasis.dyndns.org,// { { Http Redir $r [dict get $r -path]/ } default { NotFound $r } }
CALL trailing {-host petasis.dyndns.org -port 8080 -httpd {::Httpd new} -id ::oo::Obj21 -server {192.168.1.10 192.168.1.10 8080} -sock sock548 -cid ::oo::Obj24 -ipaddr 79.129.169.176 -rport 37924 -received_seconds 1318076466 -server_id {Wub 6.0} -send ::Httpd::coros::coro2 -transaction 1 -time {connected 1318076466484646 headerstart 1659 headerdone 2291 entitystart 3104} -header {GET / HTTP/1.1} -method GET host petasis.dyndns.org:8080 -clientheaders {host user-agent accept accept-language accept-encoding accept-charset connection} user-agent {Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1} accept {text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8} accept-language {el-gr,el;q=0.8,en-us;q=0.5,en;q=0.3} accept-encoding {gzip, deflate} accept-charset {ISO-8859-7,utf-8;q=0.7,*;q=0.7} connection keep-alive -version 1.1 -uri / -normalized 1 -path / -ua {} -ua_class browser -url http://petasis.dyndns.org:8080/ -scheme http -forwards {} -encoding binary -received 1318076466487900 -cookies {}}
CALL ::Dispatcher::do REQUEST {-host petasis.dyndns.org -port 8080 -httpd {::Httpd new} -id ::oo::Obj21 -server {192.168.1.10 192.168.1.10 8080} -sock sock548 -cid ::oo::Obj24 -ipaddr 79.129.169.176 -rport 37924 -received_seconds 1318076466 -server_id {Wub 6.0} -send ::Httpd::coros::coro2 -transaction 1 -time {connected 1318076466484646 headerstart 1659 headerdone 2291 entitystart 3104} -header {GET / HTTP/1.1} -method GET host petasis.dyndns.org:8080 -clientheaders {host user-agent accept accept-language accept-encoding accept-charset connection} user-agent {Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1} accept {text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8} accept-language {el-gr,el;q=0.8,en-us;q=0.5,en;q=0.3} accept-encoding {gzip, deflate} accept-charset {ISO-8859-7,utf-8;q=0.7,*;q=0.7} connection keep-alive -version 1.1 -uri / -normalized 1 -path / -ua {} -ua_class browser -url http://petasis.dyndns.org:8080/ -scheme http -forwards {} -encoding binary -received 1318076466487900 -cookies {}}
CALL my process {-host petasis.dyndns.org -port 8080 -httpd {::Httpd new} -id ::oo::Obj21 -server {192.168.1.10 192.168.1.10 8080} -sock sock548 -cid ::oo::Obj24 -ipaddr 79.129.169.176 -rport 37924 -received_seconds 1318076466 -server_id {Wub 6.0} -send ::Httpd::coros::coro2 -transaction 1 -time {connected 1318076466484646 headerstart 1659 headerdone 2291 entitystart 3104} -header {GET / HTTP/1.1} -method GET host petasis.dyndns.org:8080 -clientheaders {host user-agent accept accept-language accept-encoding accept-charset connection} user-agent {Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1} accept {text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8} accept-language {el-gr,el;q=0.8,en-us;q=0.5,en;q=0.3} accept-encoding {gzip, deflate} accept-charset {ISO-8859-7,utf-8;q=0.7,*;q=0.7} connection keep-alive -version 1.1 -uri / -normalized 1 -path / -ua {} -ua_class browser -url http://petasis.dyndns.org:8080/ -scheme http -forwards {} -encoding binary}
-code
1
-level
0
-errorline
53

Is this a problem in my configuration?

Regards,

George

Colin McCormack

unread,
Oct 8, 2011, 8:46:49 AM10/8/11
to wub-dis...@googlegroups.com, Georgios Petasis
Yes, configuration problem - the error below occurs in the decode/dispatch code generated from site.config.  It appears there may be a problem with the syntax of that, or its content - it's tcl-format, so a brace-aware editor ought to find the problem, otherwise email it to me and I'll have a look in the morning.

Colin.

Georgios Petasis

unread,
Oct 8, 2011, 8:52:16 AM10/8/11
to Colin McCormack, wub-dis...@googlegroups.com
Dear Colin,

I am using the file Wub/example.config renamed to site.config, with a startup script:

package require Site
## Initialise Site...
Site init home $DocumentRoot ini $SiteConfiguration
## Start Site Server(s)...
Site start

Variable DocumentRoot: D:/Users/petasis/Projects/Intellitech/EllogonServer/wub/docroot
Variable SiteConfiguration: D:/Users/petasis/Projects/Intellitech/EllogonServer/configuration/site.config

Regards,

George

Georgios Petasis

unread,
Oct 8, 2011, 9:17:20 AM10/8/11
to Colin McCormack, wub-dis...@googlegroups.com
Dear Colin,

I have found it :-)
It seems that there is more an "ini" option in Wub, so "ini site.ini" has no effect.
Using the following, works:

Site init home $DocumentRoot config $SiteConfiguration

(Maybe Application.tcl needs an update?)

Regards,

George

Colin McCormack

unread,
Oct 8, 2011, 6:27:19 PM10/8/11
to Georgios Petasis, wub-dis...@googlegroups.com
Thanks for finding that.  Fixed in Application.tcl

Application.tcl actually doesn't do anything now that Site.tcl doesn't when invoked as the command ... I'd almost forgotten about Application.tcl as I generally use Site.tcl.

Colin.

Aric

unread,
Nov 3, 2011, 12:00:51 PM11/3/11
to Wub Discussion
Hi everyone,

Apologies if I'm not following proper protocol by posting this
question here. I checked out Wub from SVN and downloaded Jos
Decoster's tutorial, and am getting the same error George describes
above. The only way I can seem to make the tutorial examples work is
to use a much earlier version of Wub. What do I need to do to make
the examples run with the most recent version of Wub?

Thanks,
Aric
> -ua_class browser -urlhttp://petasis.dyndns.org:8080/-scheme http
> -forwards {} -encoding binary -received 1318076466487900 -cookies {}}
> CALL    ::Dispatcher::do REQUEST {-host petasis.dyndns.org -port 8080
> -httpd {::Httpd new} -id ::oo::Obj21 -server {192.168.1.10 192.168.1.10
> 8080} -sock sock548 -cid ::oo::Obj24 -ipaddr 79.129.169.176 -rport 37924
> -received_seconds 1318076466 -server_id {Wub 6.0} -send
> ::Httpd::coros::coro2 -transaction 1 -time {connected 1318076466484646
> headerstart 1659 headerdone 2291 entitystart 3104} -header {GET /
> HTTP/1.1} -method GET host petasis.dyndns.org:8080 -clientheaders {host
> user-agent accept accept-language accept-encoding accept-charset
> connection} user-agent {Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1)
> Gecko/20100101 Firefox/7.0.1} accept
> {text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8}
> accept-language {el-gr,el;q=0.8,en-us;q=0.5,en;q=0.3} accept-encoding
> {gzip, deflate} accept-charset {ISO-8859-7,utf-8;q=0.7,*;q=0.7}
> connection keep-alive -version 1.1 -uri / -normalized 1 -path / -ua {}
> -ua_class browser -urlhttp://petasis.dyndns.org:8080/-scheme http
> -forwards {} -encoding binary -received 1318076466487900 -cookies {}}
> CALL    my process {-host petasis.dyndns.org -port 8080 -httpd {::Httpd
> new} -id ::oo::Obj21 -server {192.168.1.10 192.168.1.10 8080} -sock
> sock548 -cid ::oo::Obj24 -ipaddr 79.129.169.176 -rport 37924
> -received_seconds 1318076466 -server_id {Wub 6.0} -send
> ::Httpd::coros::coro2 -transaction 1 -time {connected 1318076466484646
> headerstart 1659 headerdone 2291 entitystart 3104} -header {GET /
> HTTP/1.1} -method GET host petasis.dyndns.org:8080 -clientheaders {host
> user-agent accept accept-language accept-encoding accept-charset
> connection} user-agent {Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1)
> Gecko/20100101 Firefox/7.0.1} accept
> {text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8}
> accept-language {el-gr,el;q=0.8,en-us;q=0.5,en;q=0.3} accept-encoding
> {gzip, deflate} accept-charset {ISO-8859-7,utf-8;q=0.7,*;q=0.7}
> connection keep-alive -version 1.1 -uri / -normalized 1 -path / -ua {}
> -ua_class browser -urlhttp://petasis.dyndns.org:8080/-scheme http

Georgios Petasis

unread,
Nov 3, 2011, 4:12:29 PM11/3/11
to wub-dis...@googlegroups.com, Aric
Στις 3/11/2011 18:00, ο/η Aric έγραψε:
> Hi everyone,
>
> Apologies if I'm not following proper protocol by posting this
> question here. I checked out Wub from SVN and downloaded Jos
> Decoster's tutorial, and am getting the same error George describes
> above. The only way I can seem to make the tutorial examples work is
> to use a much earlier version of Wub. What do I need to do to make
> the examples run with the most recent version of Wub?
>
> Thanks,
> Aric
>
To my understanding, the configuration names have changed names in the
recent versions of wub.
So, when initialising the site "Site init" change "ini" to "config". I.e.:

package require Site
Site init config site.config (and not ini site.config)
Site start

George

Aric

unread,
Nov 8, 2011, 1:28:11 AM11/8/11
to Wub Discussion
I'm afraid I still haven't figured out how to make the examples run by
themselves, but I have managed to use the "Quick Start" code, along
with snippets from the tutorial, which I guess is good enough for
now. Thanks for your reply; the information was still helpful.

Aric
Reply all
Reply to author
Forward
0 new messages