Re: problems running v. 70-190a with ACL 6.2
"Ben Olasov" <[email protected]> Mon, 14 Jun 2004 18:41:48 -0700
| Newsgroups | gmane.lisp.cl-http |
|---|---|
| Message-ID | <[email protected]> |
On Sat, 12 Jun 2004 13:20:58 +0200 Karsten Poeck <[email protected]> wrote: >Hello Ben, > >I see two definitions of %allocate-resource in cl-http >one in clim-sys;resources.lisp like >(defmethod %allocate-resource ((resource resource) args &aux newly-created-p) > (with-slots (free-list) resource > (flet ((create-object () > (let* ((constructor (resource-constructor resource)) > (object (apply constructor resource args))) > (with-atomic-execution > (vector-push-extend object (resource-pool >resource))) > (setq newly-created-p t) > object))) > (declare (inline create-object)) > ;; find an object > (let ((object (or (with-atomic-execution (pop free-list)) >(create-object))) > (initializer (resource-initializer resource))) > (when initializer > (if (clim-sys-p resource) > (apply initializer object args) > (apply initializer resource object args))) > (values object newly-created-p))))) > >and a second in >mcl;server;resources.lisp >(defmethod %allocate-resource ((resource resource) args &aux newly-created-p) > (with-slots (free-list) resource > (flet ((create-object () > (let* ((constructor (resource-constructor resource)) > (object (apply constructor resource args))) > (with-atomic-execution > (vector-push-extend object (resource-pool >resource))) > (setq newly-created-p t) > object))) > (declare (inline create-object)) > ;; find an object > (let ((object (or (with-atomic-execution (pop free-list)) >(create-object))) > (initializer (resource-initializer resource))) > (when initializer > (apply initializer resource object args)) > (values object newly-created-p))))) > >They only differ in the the form >(if (clim-sys-p resource) > (apply initializer object args) > (apply initializer resource object args)) > >In my environment the former definition is active since clim-sys is loaded >before cl-http-sys > >I would bet a glass of spanish cava that for some reason in your environment >the clim-sys version of allocate resource is active. I'll take that bet! I recursively deleted all the .fasl files below cl-http-70-190a, commented out the %allocate-resource definitions in clim-sys;resources.lisp and replaced them with those from mcl;server;resources.lisp and then recompiled and loaded cl-http by loading acl/jkf/start.lisp. Then I tried opening the cl-http test page http://localhost:8000/cl-http/ and the same error appeared in the Lisp buffer Error: HTTP::PATCH-INITIALIZE-RESOURCED-SERVER got 4 args, wanted 5 args. [condition type: PROGRAM-ERROR] Restart actions (select using :continue): 0: Abort entirely from this process. [Current process: HTTP Server [8000] (localhost)] [1] CL-USER(1): :zo Evaluation stack: (ERROR PROGRAM-ERROR :FORMAT-CONTROL "~ ~s got ~d arg~:[~;ument word~]~p, wanted ~d arg~:p~:[~; (plus double-float place holders)~]." :FORMAT-ARGUMENTS (HTTP1::PATCH-INITIALIZE-RESOURCED-SERVER 4 NIL 4 5 NIL)) ->(HTTP1::PATCH-INITIALIZE-RESOURCED-SERVER #<HTTP1::SERVER localhost>localhost @ #x61a1d02> #<MULTIVALENT hiper socket connected from localhost/8000 to localhost/33361 @ #x619062a> "localhost" 2130706433 NIL) (CLIM-SYS:ALLOCATE-RESOURCE HTTP1::HTTP-SERVER . #S(CLIM-INTERNALS::OBJECT-STORAGE :OBJECT #<HTTP1::SERVER localhost>localhost @ #x61a1d02> :USE-CONS (#<CLIM-INTERNALS::RESOURCE-DESCRIPTOR HTTP1::HTTP-SERVER> . 0) :PARAMETERS (#<MULTIVALENT hiper socket connected from localhost/8000 to localhost/33361 @ #x619062a> "localhost" 2130706433))) (HTTP1::%PROVIDE-SERVICE-INTERNAL #<MULTIVALENT hiper socket connected from localhost/8000 to localhost/33361 @ #x619062a> "localhost" 2130706433 18000) (HTTP1::%PROVIDE-SERVICE #<MULTIVALENT hiper socket connected from localhost/8000 to localhost/33361 @ #x619062a> "localhost" 2130706433 18000) ((:INTERNAL HTTP1::LAUNCH-PROCESS 0)) [Current process: HTTP Server [8000] (localhost)] [1] CL-USER(2): so something still causes a 'wrong number of arguments' error... >Either you use the mcl definition or change path-initialize-resourced-server >to >(defun patch-initialize-resourced-server (server set-stream set-host >set-address) > (initialize-resourced-server 'http-server server set-stream set-host >set-address)) > >Hope that helps > >Karsten >