4 Replies Latest reply on Nov 29, 2011 10:58 PM by JACK LI

    jboss-web-2.1.9.GA security mode not running,help me ....

    JACK LI Newbie

      i download jboss-web-2.1.9.GA, and jboss-web-2.1.4  ,they don't run right...,but apache-tomcat is ok ...why....why .help me ....

       

      jboss-web-2.1.9.GA fllow....

       

      #./catalina.sh debug -security

      Using CATALINA_BASE:   /root/Desktop/jboss-web-2.1.9.GA

      Using CATALINA_HOME:   /root/Desktop/jboss-web-2.1.9.GA

      Using CATALINA_TMPDIR: /root/Desktop/jboss-web-2.1.9.GA/temp

      Using JAVA_HOME:       /root/Desktop/jdk1.6.0_13/

      Using Security Manager

      Initializing jdb ...

      > run

      run org.apache.catalina.startup.Bootstrap start

      Set uncaught java.lang.Throwable

      Set deferred uncaught java.lang.Throwable

      >

      VM Started: Handler error

      java.security.AccessControlException: access denied (java.io.FilePermission logs read)

              at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)

              at java.security.AccessController.checkPermission(AccessController.java:546)

              at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)

              at java.lang.SecurityManager.checkRead(SecurityManager.java:871)

              at java.io.File.exists(File.java:731)

              at java.io.File.mkdirs(File.java:1181)

              at org.apache.juli.FileHandler.open(FileHandler.java:257)

              at org.apache.juli.FileHandler.<init>(FileHandler.java:59)

              at org.apache.juli.FileHandler.<init>(FileHandler.java:50)

              at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

              at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

              at java.lang.reflect.Constructor.newInstance(Constructor.java:513)

              at java.lang.Class.newInstance0(Class.java:355)

              at java.lang.Class.newInstance(Class.java:308)

              at org.apache.juli.ClassLoaderLogManager.readConfiguration(ClassLoaderLogManager.java:418)

              at org.apache.juli.ClassLoaderLogManager.readConfiguration(ClassLoaderLogManager.java:363)

              at org.apache.juli.ClassLoaderLogManager.readConfiguration(ClassLoaderLogManager.java:241)

              at java.util.logging.LogManager$2.run(LogManager.java:258)

              at java.security.AccessController.doPrivileged(Native Method)

              at java.util.logging.LogManager.readPrimordialConfiguration(LogManager.java:256)

              at java.util.logging.LogManager.getLogManager(LogManager.java:239)

              at java.util.logging.Logger.<init>(Logger.java:220)

              at java.util.logging.LogManager$RootLogger.<init>(LogManager.java:989)

              at java.util.logging.LogManager$RootLogger.<init>(LogManager.java:986)

              at java.util.logging.LogManager$1.run(LogManager.java:179)

              at java.security.AccessController.doPrivileged(Native Method)

              at java.util.logging.LogManager.<clinit>(LogManager.java:156)

              at java.util.logging.Logger.getLogger(Logger.java:273)

              at org.jboss.logging.jdk.JDK14LoggerPlugin.init(JDK14LoggerPlugin.java:45)

              at org.jboss.logging.Logger.getDelegatePlugin(Logger.java:393)

              at org.jboss.logging.Logger.<init>(Logger.java:119)

              at org.jboss.logging.Logger.getLogger(Logger.java:357)

              at org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java:54)

      java.lang.ClassNotFoundException: org.apache.coyote.http11.Http11Processor$1

              at java.net.URLClassLoader$1.run(URLClassLoader.java:200)

              at java.security.AccessController.doPrivileged(Native Method)

              at java.net.URLClassLoader.findClass(URLClassLoader.java:188)

              at java.lang.ClassLoader.loadClass(ClassLoader.java:307)

              at java.lang.ClassLoader.loadClass(ClassLoader.java:252)

              at org.apache.catalina.security.SecurityClassLoad.loadHttp11Package(SecurityClassLoad.java:127)

              at org.apache.catalina.security.SecurityClassLoad.securityClassLoad(SecurityClassLoad.java:46)

              at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:210)

              at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:390)

       

      The application exited

        • 1. Re: jboss-web-2.1.9.GA security mode not running,help me ....
          Jean-Frederic Clere Master

          It seems a bug, try the following patch:
          +++

          Index: java/org/apache/catalina/security/SecurityClassLoad.java

          ===================================================================

          --- java/org/apache/catalina/security/SecurityClassLoad.java    (revision 1876)

          +++ java/org/apache/catalina/security/SecurityClassLoad.java    (working copy)

          @@ -124,7 +124,6 @@

               private final static void loadHttp11Package(ClassLoader loader)

                   throws Exception {

                   String basePackage = "org.apache.coyote.http11.";

          -        loader.loadClass(basePackage + "Http11Processor$1");

                   loader.loadClass(basePackage + "InternalOutputBuffer$1");

                   loader.loadClass(basePackage + "InternalOutputBuffer$2");

               }

          Index: conf/catalina.policy

          ===================================================================

          --- conf/catalina.policy    (revision 1876)

          +++ conf/catalina.policy    (working copy)

          @@ -62,6 +62,8 @@

           

          // These permissions apply to the logging API

          grant codeBase "file:${catalina.home}/bin/tomcat-juli.jar" {

          +        permission java.lang.RuntimePermission "setContextClassLoader";

          +        permission java.util.PropertyPermission "user.dir", "read";

                   permission java.util.PropertyPermission "java.util.logging.config.class", "read";

                   permission java.util.PropertyPermission "java.util.logging.config.file", "read";

                   permission java.io.FilePermission "${java.home}${file.separator}lib${file.separator}logging.properties", "read";

          +++

          • 2. Re: jboss-web-2.1.9.GA security mode not running,help me ....
            JACK LI Newbie

            not running ok....

             

            why delete

              loader.loadClass(basePackage + "Http11Processor$1");

             

            i delete loader.loadClass(basePackage + "Http11Processor$1");

            then

            #javac SecurityClassLoad.java

            make a SecurityClassLoad.class

            replace SecurityClassLoad.class to catalina.jar (path is" java/org/apache/catalina/security/SecurityClassLoad.class")

             

            then ,

             

            [root@localhost jboss-web-2.1.9.GA]# ./bin/catalina.sh debug -security

            Using CATALINA_BASE:   /root/Desktop/jboss-web-2.1.9.GA

            Using CATALINA_HOME:   /root/Desktop/jboss-web-2.1.9.GA

            Using CATALINA_TMPDIR: /root/Desktop/jboss-web-2.1.9.GA/temp

            Using JAVA_HOME:       /root/Desktop/jdk1.6.0_13/

            Using Security Manager

            Initializing jdb ...

            > run

            run org.apache.catalina.startup.Bootstrap start

            Set uncaught java.lang.Throwable

            Set deferred uncaught java.lang.Throwable

            >

            VM Started: java.lang.ClassNotFoundException: org.apache.coyote.http11.Http11Processor$1

                    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)

                    at java.security.AccessController.doPrivileged(Native Method)

                    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)

                    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)

                    at java.lang.ClassLoader.loadClass(ClassLoader.java:252)

                    at org.apache.catalina.security.SecurityClassLoad.loadHttp11Package(SecurityClassLoad.java:127)

                    at org.apache.catalina.security.SecurityClassLoad.securityClassLoad(SecurityClassLoad.java:46)

                    at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:210)

                    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:390)

             

            The application exited

             

             

            why  ?

            • 3. Re: jboss-web-2.1.9.GA security mode not running,help me ....
              JACK LI Newbie

              tomcat-toyote.jar not include Http11Processor$1,so it not found class. is right????

              • 4. Re: jboss-web-2.1.9.GA security mode not running,help me ....
                JACK LI Newbie

                i download tomcat-http11.jar then extract Http11Processor$1 ,then put it to tomcat-toyote.jar

                 

                then run catalina.sh debug -security is sucess...

                 

                good luck....