tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Claassen <...@donnell.com>
Subject RE: CGI servlet is not found after it gets initialized...
Date Mon, 06 Dec 2004 13:57:41 GMT
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


Mime
View raw message