5 Replies Latest reply on Mar 9, 2004 8:07 PM by jae

    Error in news module

    danvu Newbie

      When I tried to edit a story in the news module (News->[Story name] -> Edit), it threw the following exception:
      org.jboss.mx.util.RuntimeProxyException: java.lang.NoSuchMethodException: Unable to locate MBean operation for: findUserById(java.lang.Integer)
      at org.jboss.mx.util.DefaultExceptionHandler.handleReflectionException(DefaultExceptionHandler.java:68)
      at org.jboss.mx.util.JMXInvocationHandler.invoke(JMXInvocationHandler.java:197)
      at $Proxy219.findUserById(Unknown Source)
      at org.jboss.nukes.component.ComponentSupport$ApiImpl.findUserById(ComponentSupport.java:590)
      at org.jboss.nukes.addons.modules.news.AddStory.display AddStory.java:349)
      at org.jboss.nukes.addons.modules.news.NewsModule.addstoryedit(NewsModule.java:287)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.jboss.nukes.module.ModuleSupport.operation(ModuleSupport.java:115)
      at org.jboss.nukes.module.ModuleSupport.process(ModuleSupport.java:90)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.interceptor.ObjectReferenceInterceptor.invoke(ObjectReferenceInterceptor.java:59)
      at org.jboss.mx.interceptor.MBeanAttributeInterceptor.invoke(MBeanAttributeInterceptor.java:43)
      at org.jboss.mx.interceptor.PersistenceInterceptor2.invoke(PersistenceInterceptor2.java:93)
      at org.jboss.nukes.mx.LifeCycleInterceptor.invoke(LifeCycleInterceptor.java:93)
      at org.jboss.mx.server.MBeanInvoker.invoke(MBeanInvoker.java:76)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
      at org.jboss.nukes.core.Main$LastNext.process(Main.java:535)
      at org.jboss.nukes.core.modules.html.HtmlModule$1.process(HtmlModule.java:180)
      at org.jboss.nukes.core.Main$HandlerNext.process(Main.java:496)
      at org.jboss.nukes.core.modules.core.CoreModule$3.process(CoreModule.java:398)
      at org.jboss.nukes.core.Main$HandlerNext.process(Main.java:496)
      at org.jboss.nukes.core.modules.block.BlockModule$3.process(BlockModule.java:798)
      at org.jboss.nukes.core.Main$HandlerNext.process(Main.java:496)
      at org.jboss.nukes.core.modules.theme.ThemeModule$2.process(ThemeModule.java:233)
      at org.jboss.nukes.core.Main$HandlerNext.process(Main.java:496)
      at org.jboss.nukes.core.modules.user.UserModule$2.process(UserModule.java:1360)
      at org.jboss.nukes.core.Main$HandlerNext.process(Main.java:496)
      at org.jboss.nukes.core.Main.process(Main.java:116)
      ...

      I cannot figure out the problem. Can some one please take a look and fix it?
      By the way, except the admin, no one else can see the news link on the main menu like it used to be. I tried to change the menu block permission for user to 'module:(youraccount|journal|faq|bb|news):main' and 'module:(journal|faq|bb|news):main' for anonymous, but it didn't help. Can some one also show me how? Thank you!

        • 1. Re: Error in news module
          jae Master

          the news module is not very stable right now, and there are definately pieces of functionality that do not work properly.

          i am working on this, but i only have time to do it at night (i do have a day job), so pls be patient with this.

          • 2. Re: Error in news module
            danvu Newbie

            I figured out the error. The problem comes from the core module, not the news module. The APIs for function findByUserID in the core don't match each other. It's findByUserID(Integer) in Api.java and findByUserID(int) in UserModule.java. I don't know if the findByUserID(int) in UserModule is used by any other module so I just left it there and added a function findByUserID(Integer) in UserModule. Everything then worked fine in news.
            To set permission for the Main Menu block so users other than admin can see news module links, add new permisson for the group you want with pattern 'module:news:[news operation] (ex: newsindexpage)'. You can use (op1 | op2 | ..) to allow more than one operation.

            • 3. Re: Error in news module
              Viet Master

              that requires a fix, thanks for the info

              • 4. Re: Error in news module
                Viet Master

                I changed the method in the Api interface as well as in the journal module but Jae I let you do it in the news module.

                • 5. Re: Error in news module
                  jae Master

                  danvu : thx for tracking that down. the fix has been checked in. pls post back if you find any more of these.