RE: CGI servlet is not found after it gets initialized...

2004-12-06 Thread Mark Claassen
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:[EMAIL PROTECTED] 
 Sent: Thursday, December 02, 2004 11:19 AM
 To: [EMAIL PROTECTED]
 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

CGI servlet is not found after it gets initialized...

2004-12-02 Thread Mark Claassen
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(StandardWrapper.java:89
1)
at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:823)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
3422)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3623)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.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(StandardHostDeployer.j
ava:307)
...
- Root Cause -
java.lang.ClassNotFoundException: dsi.app.tomcat.DCGIServlet
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1443)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1289)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.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