Bugs item #696633, was opened at 2003-03-03 07:34
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=696633&group_id=22866

Category: JBossServer
Group: v3.0 Rabbit Hole
>Status: Pending
>Resolution: Fixed
Priority: 5
Submitted By: Phil Dawes (pdawes)
>Assigned to: Scott M Stark (starksm)
Summary: Stack overflow using security manager (with fix!)

Initial Comment:
Hi JBoss Team,

When using jboss 3.0.6 with a security manager
(i.e. -Djava.security.manager), I found that the server
went into a
recursive loop on startup:

15:03:56,334 INFO  [Server] JBoss Release: JBoss-3.0.6
CVSTag=JBoss_3_0_6
java.lang.StackOverflowError
        at java.lang.String.regionMatches(String.java:990)
        at java.lang.String.equalsIgnoreCase(String.java:698)
        at
sun.net.www.protocol.jar.Handler.parseURL(Handler.java:59)
        at java.net.URL.<init>(URL.java:608)
        at java.net.URL.<init>(URL.java:476)
        at
sun.misc.URLClassPath$JarLoader.checkResource(URLClassPath.java:599)
        at
sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:671)
        at
sun.misc.URLClassPath$JarLoader.findResource(URLClassPath.java:658)
        at sun.misc.URLClassPath.findResource(URLClassPath.java:137)
        at java.net.URLClassLoader$2.run(URLClassLoader.java:351)
        at java.security.AccessController.doPrivileged(Native
Method)
        at
java.net.URLClassLoader.findResource(URLClassLoader.java:348)
        at java.lang.ClassLoader.getResource(ClassLoader.java:780)
        at
org.jboss.net.protocol.URLStreamHandlerFactory.createURLStreamHandler(URLStreamHandlerFactory.java:134)
        at java.net.URL.getURLStreamHandler(URL.java:1057)
        at java.net.URL.<init>(URL.java:584)
        at java.net.URL.<init>(URL.java:476)
        at java.net.URL.<init>(URL.java:425)
        at
java.net.JarURLConnection.parseSpecs(JarURLConnection.java:157)
        at
java.net.JarURLConnection.<init>(JarURLConnection.java:140)
        at
sun.net.www.protocol.jar.JarURLConnection.<init>(JarURLConnection.java:61)
        at
sun.net.www.protocol.jar.Handler.openConnection(Handler.java:24)
        at java.net.URL.openConnection(URL.java:943)
        at sun.misc.URLClassPath.check(URLClassPath.java:392)
        at
sun.misc.URLClassPath$JarLoader.checkResource(URLClassPath.java:601)
        at
sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:671)
        at
sun.misc.URLClassPath$JarLoader.findResource(URLClassPath.java:658)
        at sun.misc.URLClassPath.findResource(URLClassPath.java:137)
        at java.net.URLClassLoader$2.run(URLClassLoader.java:351)
        at java.security.AccessController.doPrivileged(Native
Method)
        at
java.net.URLClassLoader.findResource(URLClassLoader.java:348)
        at java.lang.ClassLoader.getResource(ClassLoader.java:780)
        at
org.jboss.net.protocol.URLStreamHandlerFactory.createURLStreamHandler(URLStreamHandlerFactory.java:134)


I've fixed this in my local build via the following
patch to the URLStreamHandlerFactory class (N.B. this
conditionally disables the patch for handling an IBM VM
TCL problem, if there's a security manager set)

--- 
/usr/local/src/jboss-3.0.6-src/common/src/main/org/jboss/net/protocol/URLStreamHandlerFactory.java
  Sun Jan 26 01:15:52 2003
+++ common/src/main/org/jboss/net/protocol/URLStreamHandlerFactory.java Mon Mar  3 
12:57:50 2003
@@ -130,6 +130,8 @@
                around a bad interaction between the
IBM VMs and custom
                URLStreamHandlerFactory that use the
TCL. See bug#669043
                */
+               if (System.getSecurityManager() != null) 
+                  throw new ClassNotFoundException();
                String resname = classname.replace('.',
'/') + ".class";
                URL typeURL =
ctxLoader.getResource(resname);
                if( typeURL != null )



Best Regards,

Phil



----------------------------------------------------------------------

>Comment By: Scott M Stark (starksm)
Date: 2003-03-03 09:32

Message:
Logged In: YES 
user_id=175228

I have applied this workaournd for now until I can further
look into why the existence of a security manager triggers
the recursive behavior.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=696633&group_id=22866


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to