6 Replies Latest reply on Feb 28, 2004 11:17 AM by jae77

    Problems with latest security checkin

      After getting the latest from CVS HEAD after the security related checkins, I am having a lot of problems.

      org.jboss.nukes.test.common.PropertyEditorTest can't find the class org.jboss.nukes.common.propertyeditor.Converter.

      The news module has compilation problems in AddStory and other classes.

      By cutting out org.jboss.nukes.test.common.PropertyEditorTest and the news module, I can compile.

      When I try to deploy, the core modules do not start due to permission problems.

      If I roll back the changes to nukes.sar/META-INF/jboss-service.xml to the previous version, nukes deploys, but when I try to hit nukes, I get:

      2004-02-27 13:40:44,702 ERROR [org.jboss.nukes.component.Component.html] Cannot retrieve public file with id=
      2004-02-27 13:40:44,702 ERROR [STDERR] RuntimeErrorException: Error in MBean operation 'process(org.jboss.nukes.html.Page)'
      Cause: java.lang.AbstractMethodError: org.jboss.nukes.theme.ThemeTemplate.render(Lorg/jboss/nukes/html/Page;)V
      2004-02-27 13:40:44,702 ERROR [STDERR] at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:307)
      2004-02-27 13:40:44,718 ERROR [STDERR] at org.jboss.mx.interceptor.ObjectReferenceInterceptor.invoke(ObjectReferenceInterceptor.java:59)
      2004-02-27 13:40:44,718 ERROR [STDERR] at org.jboss.mx.interceptor.MBeanAttributeInterceptor.invoke(MBeanAttributeInterceptor.java:43)
      2004-02-27 13:40:44,718 ERROR [STDERR] at org.jboss.mx.interceptor.PersistenceInterceptor2.invoke(PersistenceInterceptor2.java:93)
      2004-02-27 13:40:44,718 ERROR [STDERR] at org.jboss.nukes.mx.LifeCycleInterceptor.invoke(LifeCycleInterceptor.java:93)
      2004-02-27 13:40:44,718 ERROR [STDERR] at org.jboss.mx.server.MBeanInvoker.invoke(MBeanInvoker.java:76)
      2004-02-27 13:40:44,718 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
      2004-02-27 13:40:44,718 ERROR [STDERR] at org.jboss.nukes.core.Main$LastNext.handle(Main.java:438)
      2004-02-27 13:40:44,718 ERROR [STDERR] at org.jboss.nukes.core.modules.profile.ProfileModule$1.handle(ProfileModule.java:153)
      2004-02-27 13:40:44,718 ERROR [STDERR] at org.jboss.nukes.core.Main$HandlerNext.handle(Main.java:423)
      2004-02-27 13:40:44,718 ERROR [STDERR] at org.jboss.nukes.core.modules.core.CoreModule$3.handle(CoreModule.java:404)
      2004-02-27 13:40:44,718 ERROR [STDERR] at org.jboss.nukes.core.Main$HandlerNext.handle(Main.java:423)
      2004-02-27 13:40:44,718 ERROR [STDERR] at org.jboss.nukes.core.modules.block.BlockModule$3.handle(BlockModule.java:665)
      2004-02-27 13:40:44,718 ERROR [STDERR] at org.jboss.nukes.core.Main$HandlerNext.handle(Main.java:423)
      2004-02-27 13:40:44,718 ERROR [STDERR] at org.jboss.nukes.core.modules.theme.ThemeModule$2.handle(ThemeModule.java:217)
      2004-02-27 13:40:44,718 ERROR [STDERR] at org.jboss.nukes.core.Main$HandlerNext.handle(Main.java:423)
      2004-02-27 13:40:44,718 ERROR [STDERR] at org.jboss.nukes.core.modules.user.UserModule$2.handle(UserModule.java:978)
      2004-02-27 13:40:44,718 ERROR [STDERR] at org.jboss.nukes.core.Main$HandlerNext.handle(Main.java:423)
      2004-02-27 13:40:44,718 ERROR [STDERR] at org.jboss.nukes.core.Main.process(Main.java:93)
      2004-02-27 13:40:44,718 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2004-02-27 13:40:44,718 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      2004-02-27 13:40:44,718 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      2004-02-27 13:40:44,718 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:324)
      2004-02-27 13:40:44,718 ERROR [STDERR] at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      2004-02-27 13:40:44,718 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
      2004-02-27 13:40:44,718 ERROR [STDERR] at org.jboss.nukes.servlet.NukeServlet.handleRoot(NukeServlet.java:250)
      2004-02-27 13:40:44,718 ERROR [STDERR] at org.jboss.nukes.servlet.NukeServlet.doGet(NukeServlet.java:187)

      ....



      Any ideas?


      Sherman

        • 1. Re: Problems with latest security checkin
          jae77

          julien didn't update the news module b/c i'm currently neck deep in it's refactoring - i am going to take a look at getting it up to speed this weekend.

          not sure about the other errors though b/c i haven't updated w/ the latest changes.

          • 2. Re: Problems with latest security checkin

            I fixed it

            • 3. Re: Problems with latest security checkin

              Still no good.

              After cleaning out the Security rows in nuke_services_attributes, and starting JBoss with just nukes.ear deployed, I am getting several of each of these stack traces in the start up:

              2004-02-27 20:07:11,750 INFO [org.jboss.deployment.EARDeployer] Init J2EE application: file:/C:/jboss-3.2.3/server/default/deploy/nukes.ear/
              2004-02-27 20:07:15,625 WARN [org.jboss.nukes.component.Component.user] Skip malformed permission
              org.jboss.nukes.security.MalformedPermissionException: there must be at least one instance in the permission definition
               at org.jboss.nukes.security.Permission.initialize(Permission.java:125)
               at org.jboss.nukes.security.Permission.<init>(Permission.java:67)
               at org.jboss.nukes.module.ModuleSupport.setSecurity(ModuleSupport.java:126)
              
              ...
              
              2004-02-27 20:07:22,140 WARN [org.jboss.nukes.component.Component.theme] Skip malformed permission
              org.jboss.nukes.security.MalformedPermissionException: there must be at least one instance in the permission definition
               at org.jboss.nukes.security.Permission.initialize(Permission.java:125)
               at org.jboss.nukes.security.Permission.<init>(Permission.java:67)
               at org.jboss.nukes.module.ModuleSupport.setSecurity(ModuleSupport.java:126)
              
              
              ...
              
              2004-02-27 20:07:24,000 WARN [org.jboss.nukes.component.Component.block] Skip malformed permission
              org.jboss.nukes.security.MalformedPermissionException: there must be at least one instance in the permission definition
               at org.jboss.nukes.security.Permission.initialize(Permission.java:125)
               at org.jboss.nukes.security.Permission.<init>(Permission.java:67)
               at org.jboss.nukes.module.ModuleSupport.setSecurity(ModuleSupport.java:126)
              
              ...
              
              2004-02-27 20:07:24,703 WARN [org.jboss.nukes.component.Component.profile] Skip malformed permission
              org.jboss.nukes.security.MalformedPermissionException: there must be at least one instance in the permission definition
               at org.jboss.nukes.security.Permission.initialize(Permission.java:125)
               at org.jboss.nukes.security.Permission.<init>(Permission.java:67)
               at org.jboss.nukes.module.ModuleSupport.setSecurity(ModuleSupport.java:126)
              
              ...
              
              2004-02-27 20:07:25,406 WARN [org.jboss.nukes.component.Component.index] Skip malformed permission
              org.jboss.nukes.security.MalformedPermissionException: there must be at least one instance in the permission definition
               at org.jboss.nukes.security.Permission.initialize(Permission.java:125)
               at org.jboss.nukes.security.Permission.<init>(Permission.java:67)
               at org.jboss.nukes.module.ModuleSupport.setSecurity(ModuleSupport.java:126)
              


              and


              
              2004-02-27 20:07:25,781 ERROR [org.jboss.nukes.component.NukesBuilder] Cannot build the nukes model mbean metadata
              RuntimeOperationsException: null
              Cause: java.lang.IllegalArgumentException: MBean does not contain attribute Security
               at javax.management.modelmbean.ModelMBeanInfoSupport.getAttribute(ModelMBeanInfoSupport.java:407)
               at org.jboss.nukes.component.NukesBuilder.build(NukesBuilder.java:197)
               at org.jboss.nukes.component.NukesBuilder.build(NukesBuilder.java:73)
               at org.jboss.nukes.component.NukesMBean.<init>(NukesMBean.java:47)
               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:274)
               at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:847)
               at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:291)
               at org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.java:318)
              
              Caused by: org.jboss.deployment.DeploymentException: - nested throwable: (javax.management.NotCompliantMBeanException)
               at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:139)
               at org.jboss.system.ServiceController.install(ServiceController.java:225)
               at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:324)
               at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
               at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
               at $Proxy4.install(Unknown Source)
               at org.jboss.deployment.SARDeployer.create(SARDeployer.java:183)
               ... 49 more
              Caused by: javax.management.NotCompliantMBeanException
               at org.jboss.nukes.component.NukesBuilder.build(NukesBuilder.java:83)
               at org.jboss.nukes.component.NukesMBean.<init>(NukesMBean.java:47)
               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:274)
               at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:847)
               at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:291)
               at org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.java:318)
              
              
              
              



              • 4. Re: Problems with latest security checkin

                did you do a fresh checkout ? because setSecurity is not anymore on the class ModuleSupport but on ComponentSupport (and your trace says it is in ModuleSupport).

                also you should flush your security settings that are persisted in the database.

                • 5. Re: Problems with latest security checkin



                  I found the problem. I had an old nukes-installer.war in my deployment, and JBoss was picking up old classes from that war, instead of the new nules.ear. Deleting the installer.war fixed things.

                  I don't understand why classes in the installer.war were being used by the nukes.ear. Seems like some issue with JBoss class loading and MBeans.

                  Sherman

                  • 6. Re: Problems with latest security checkin
                    jae77

                    wars are loaded before ears, so if they contain duplicate classes, the classloader is going to ignore those found in the ear b/c it is loaded after the war.