Return-Path: Delivered-To: apmail-jakarta-struts-dev-archive@jakarta.apache.org Received: (qmail 80439 invoked by uid 500); 5 Sep 2001 15:49:40 -0000 Mailing-List: contact struts-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk Reply-To: struts-dev@jakarta.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list struts-dev@jakarta.apache.org Received: (qmail 80416 invoked from network); 5 Sep 2001 15:49:40 -0000 Received: from unknown (HELO hqmail1.silverstream.com) (216.142.115.7) by daedalus.apache.org with SMTP; 5 Sep 2001 15:49:40 -0000 Received: by hqmail1.silverstream.com with Internet Mail Service (5.5.2653.19) id ; Wed, 5 Sep 2001 11:47:57 -0400 Received: from mstapp (route-64-131-159-142.telocity.com [64.131.159.142]) by slim.silverstream.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id S2130WZW; Wed, 5 Sep 2001 11:51:23 -0400 From: "Michael Stapp" To: "Struts-Dev \(E-mail\)" Subject: ServiceManager bug? Date: Wed, 5 Sep 2001 11:48:27 -0400 Message-ID: <002601c13622$3503e440$6501a8c0@silverstream.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N I think I've run across a ServiceManager bug, but want to make sure that it's not operator error before I submit a bug report. The code in question is in ServiceManager.performCall() and ServiceManager.performBooleanCall(). I've set up a test application to use ServicesServlet instead of ActionServlet, and the behavior I'm seeing is that my service's methods aren't being called by ServiceManager. The bug is that ServiceManager is using the wrong parameter list in its calls to service.getClass().getMethod(). It's looking for a single Object parameter, but ServicesServlet is asking ServiceManager to call the method with a parameter set that matches the servlet method's parameters. (Example: ServicesServlet.processPreprocess() passes "new Object [] { request, response }" to ServiceManager.performBooleanCall().) The result is that ServiceManager will find a service method only if it has a single Object parameter, but then the call to method.invoke() fails with a java.lang.IllegalArgumentException because the actual parameters don't match that single-Object signature. If I change my service method so that it has the correct formal parameters, then ServiceManager will not find the method (it's only looking for methods with a single Object parameter). I have a patch to ServiceManager that makes this work, but the patch has its own issues. I think it could use some discussion to get the right solution. Does this sound legitimate? Thanks. --Mike