Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@www.apache.org Received: (qmail 83729 invoked from network); 6 Dec 2004 14:00:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 6 Dec 2004 14:00:53 -0000 Received: (qmail 77855 invoked by uid 500); 6 Dec 2004 13:59:50 -0000 Delivered-To: apmail-jakarta-tomcat-dev-archive@jakarta.apache.org Received: (qmail 77761 invoked by uid 500); 6 Dec 2004 13:59:48 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 77580 invoked by uid 99); 6 Dec 2004 13:59:44 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from Unknown (HELO mail) (12.96.248.146) by apache.org (qpsmtpd/0.28) with ESMTP; Mon, 06 Dec 2004 05:59:42 -0800 Received: from InterNet.dev.donnell.com (defrouter [12.96.248.158]) by mail.donnell.com (iPlanet Messaging Server 5.2 (built Feb 21 2002)) with SMTP id <0I8B00J1B07KSV@mail.donnell.com> for tomcat-dev@jakarta.apache.org; Mon, 06 Dec 2004 08:59:45 -0500 (EST) Date: Mon, 06 Dec 2004 08:57:41 -0500 From: Mark Claassen Subject: RE: CGI servlet is not found after it gets initialized... In-reply-to: <008101c4d88a$a8f39a40$19c909c0@k9> To: 'Tomcat Developers List' Message-id: <00b301c4db9b$8dc02450$19c909c0@k9> MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4927.1200 X-Mailer: Microsoft Outlook, Build 10.0.6626 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Importance: Normal X-Priority: 3 (Normal) X-MSMail-priority: Normal X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Does anyone know the answer to why this is? Or, perhaps, the prevailing opinion is that I am crazy. It took me a long time to figure out a theory that fit the facts of this problem, and I didn't really believe what I came up with. I don't really know how the internals of Tomcat work and how the CGI servlet attaches to other webapps, but I really can't understand why it works for the CGI servlet (in org.apache) and not for my copy (int dsi.app). Mark > -----Original Message----- > From: Mark Claassen [mailto:mac@donnell.com] > Sent: Thursday, December 02, 2004 11:19 AM > To: tomcat-dev@jakarta.apache.org > Subject: CGI servlet is not found after it gets initialized... > > > What I did: > o I copied the code from 4.1.31 CGIServlet > o Fixed some bugs in that code (that have been duly submitted to > Bugzilla) > I added no class dependancies to do this. > I change the package to dsi.app.tomcat > o Copiled the file and put it in a jar file (right > where the servlets-cgi.jar is) > o Restart Tomcat > o Noticed that my servlet was getting initialized by > the customized > "cgi: init" line below > o Got tons of ClassNotFoundExceptions in the > localhost_log for every webapp > o The almost exact same code in the servlets-cgi.jar > file works fine > Instead of the ClassNotFoundExceptions I get: > StandardWrapper[/JViewerDocs:cgi]: Loading > container servlet cgi > o If I copy my servlet to the shared/lib directory it > works fine. > (I did not bother to remove it from the > server/lib directory since I have some custom valves in > the same jar file, so in this test the jar file > is in both > places.) > > Is there a package naming check done by Tomcat that is more > restrictive than the VM check here? > > Thanks, > Mark > > localhost_log with ClassNotFoundExceptions below > ------------------------------------------------ > > 2004-12-02 10:46:19 StandardManager[/manager]: Seeding random > number generator class java.security.SecureRandom 2004-12-02 > 10:46:19 StandardManager[/manager]: Seeding of random number > generator has been completed 2004-12-02 10:46:19 > StandardWrapper[/manager:default]: Loading container servlet > default 2004-12-02 10:46:19 default: DefaultServlet.init: > input buffer size=2048, output buffer size=2048 2004-12-02 > 10:46:19 default: DefaultServlet.init: welcome > file=index.html 2004-12-02 10:46:19 default: > DefaultServlet.init: welcome file=index.htm 2004-12-02 > 10:46:19 default: DefaultServlet.init: welcome > file=index.jsp 2004-12-02 10:46:19 cgi: init (mac): loglevel > set to 0 2004-12-02 10:46:19 HostConfig[localhost]: Deploying > configuration descriptor JNLPUpgradeServlet.xml 2004-12-02 > 10:46:21 HostConfig[localhost]: Deploying web application > archive OcieServlet.war > > .... > > 2004-12-02 10:46:23 ContextConfig[/OcieServlet]: Added > certificates -> request attribute Valve 2004-12-02 10:46:23 > StandardManager[/OcieServlet]: Seeding random number > generator class java.security.SecureRandom 2004-12-02 > 10:46:23 StandardManager[/OcieServlet]: Seeding of random > number generator has been completed 2004-12-02 10:46:23 > StandardWrapper[/OcieServlet:default]: Loading container > servlet default 2004-12-02 10:46:23 default: > DefaultServlet.init: input buffer size=2048, output buffer > size=2048 2004-12-02 10:46:23 default: DefaultServlet.init: > welcome file=index.html 2004-12-02 10:46:23 default: > DefaultServlet.init: welcome file=index.htm 2004-12-02 > 10:46:23 default: DefaultServlet.init: welcome > file=index.jsp 2004-12-02 10:46:23 > StandardWrapper[/OcieServlet:cgi]: Marking servlet cgi as > unavailable 2004-12-02 10:46:23 > StandardContext[/OcieServlet]: Servlet /OcieServlet threw > load() exception > javax.servlet.ServletException: Wrapper cannot find servlet > class dsi.app.tomcat.DCGIServlet or a class it depends on > at > org.apache.catalina.core.StandardWrapper.loadServlet(StandardW > rapper.java:89 > 1) > at > org.apache.catalina.core.StandardWrapper.load(StandardWrapper. > java:823) > at > org.apache.catalina.core.StandardContext.loadOnStartup(Standar > dContext.java: > 3422) > at > org.apache.catalina.core.StandardContext.start(StandardContext > .java:3623) > at > org.apache.catalina.core.ContainerBase.addChildInternal(Contai > nerBase.java:8 > 21) > at > org.apache.catalina.core.ContainerBase.addChild(ContainerBase. > java:807) > at > org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595) > at > org.apache.catalina.core.StandardHostDeployer.install(Standard > HostDeployer.j > ava:307) > ... > ----- Root Cause ----- > java.lang.ClassNotFoundException: dsi.app.tomcat.DCGIServlet > at > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappC > lassLoader.jav > a:1443) > at > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappC > lassLoader.jav > a:1289) > at > org.apache.catalina.core.StandardWrapper.loadServlet(StandardW > rapper.java:88 > 5) > > Confidentiality Notice: OCIESERVICE > --------------------------------------------------------------------- > The contents of this e-mail message and any attachments are intended > solely for the addressee(s) named in this message. This communication > is intended to be and to remain confidential. If you are not the > intended recipient of this message, or if this message has been > addressed to you in error, please immediately alert the sender by > reply e-mail and then delete this message and its attachments. Do not > deliver, distribute, copy, disclose the contents or take any action > in reliance upon the information contained in the communication or > any attachments. > --------------------- > Mark Claassen > Donnell Systems, Inc. > 300 S. St. Louis Blvd. Ste. 203 > South Bend, IN 46617 > E-mail: mailto:mark.claassen@donnell.com > Voice: (574)232-3784 > Fax: (574)232-4014 > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org > For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org