Hi all,
I'm using Apache 1.3.4 on a Linux 2.0.36 with JServ 1.0b3. Generally, I
can install servlets and I can execute them. The problems arise when I
try to access a servlet (the LoginServlet) which sets a SecurityManager
(the ServletSecurityManager I defined myself and which at this point
never throws a SecurityException but writes a message to stderr). Later
on, the ServletSecurityManager should be used to check if someone is
allowed to access a particular different servlet.
When I restart Apache (I have to do this because the SecurityManager can
only be set once per servlet zone) and then try to call the servlet via
a browser, I get no answer. The logfile says the SecurityManager gets
installed (the constructor gives a message), but it also gives the
following exception:
java.lang.ClassNotFoundException: fp/intranet/ServletSecurityManager
        at java.lang.ClassLoader.findSystemClass(ClassLoader.java)
        at
org.apache.java.lang.AdaptiveClassLoader.loadSystemClass(AdaptiveClassLoader.java:451)
        at
org.apache.java.lang.AdaptiveClassLoader.loadClass(AdaptiveClassLoader.java:389)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java)
        at java.lang.ClassLoader.resolveClass(ClassLoader.java)
        at
org.apache.java.lang.AdaptiveClassLoader.loadClass(AdaptiveClassLoader.java:430)
        at java.lang.ClassLoader.loadClass(ClassLoader.java)
        at
org.apache.jserv.JServServletManager.load_init(JServServletManager.java:421)
        at
org.apache.jserv.JServServletManager.loadServlet(JServServletManager.java:383)
        at
org.apache.jserv.JServConnection.run(JServConnection.java:301)
        at java.lang.Thread.run(Thread.java) 

This is the first thing that confused me: why can't the JVM find the
class fp.intranet.ServletSecurityManager, despite the fact that the
directory fp/intranet exists in the servlet directory and contains that
class? Why is the classname shown with /'s rather than dots (nowhere in
my code I used slashes by accident)?

But it even gets weirder (at least to me): if I call the servlet a
second time, about a thousand lines of error messages get written into
the error log. They look like this (these are the last lines of the
message):
java.lang.StackOverflowError
        at java.util.Hashtable.get(Hashtable.java) 
        ....
>        at
>        at 
>org.apache.java.lang.AdaptiveClassLoader.securityAllowsClass(AdaptiveClassLoader.java:486)
>        at 
>org.apache.java.lang.AdaptiveClassLoader.loadClass(AdaptiveClassLoader.java:383)
>        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java)
        at
        at
org.apache.java.lang.AdaptiveClassLoader.securityAllowsClass(AdaptiveClassLoader.java:486)
        at
org.apache.java.lang.AdaptiveClassLoader.loadClass(AdaptiveClassLoader.java:383)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java)
        at java.net.Socket.getPort(Socket.java:260)
        at java.net.ServerSocket.implAccept(ServerSocket.java:202)
        at java.net.ServerSocket.accept(ServerSocket.java:181)
        at
org.apache.java.net.AuthenticatedServerSocket.accept(AuthenticatedServerSocket.java:142)
        at org.apache.jserv.JServ.main(JServ.java:128)
httpd: [Fri Feb 26 15:49:56 1999] [error] [client 192.168.66.84]
Premature end of script headers: /servlets/LoginServlet
httpd: [Fri Feb 26 15:49:56 1999] [error] [client 192.168.66.84]
Premature end of script headers: /servlets/LoginServlet 

, where the lines I marked with '>' are repeated about 100-200(!) times
(the LoginServlet is the one that sets the SecurityManager). If I call
it a third time, the message from above appears again, including the
message from my class that it installed a new SecurityManager (which
shouldn't be possible?!?).
>From now on the two different messages from above appear
interchangingly.

So, what is it I'm doing wrong? Or is there a bug about SecurityManagers
in JServ? My LoginServlet isn't doing much more than setting the
SecurityManager.

I'm almost desperate, so many thanks in advance,
Frank Ploss


----------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://www.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to