5 Replies Latest reply on Apr 25, 2006 1:32 PM by dimitris

    Service XMBean: Unable to find operation

    henkomannen

      I'm migrating from 403SP1 to 404CR2 and it seems like one of my Service XMBeans is broken, although it deploys and displays nicely in the JMX Console.

      It seems to work to look it up but when I try to access methods on it I get an IllegalArgumentException:

      15:34:27,860 ERROR [Login] java.lang.IllegalArgumentException: Unable to find operation getAgeAccessLimit()
      15:34:27,860 ERROR [STDERR] javax.ejb.EJBTransactionRolledbackException: java.lang.IllegalArgumentException: Unable to find operation getAgeAccessLimit()
      15:34:27,862 ERROR [STDERR] at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:89)
      15:34:27,862 ERROR [STDERR] at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
      15:34:27,862 ERROR [STDERR] at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:196)
      15:34:27,862 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      15:34:27,862 ERROR [STDERR] at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
      15:34:27,862 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      15:34:27,863 ERROR [STDERR] at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:54)
      15:34:27,863 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      15:34:27,863 ERROR [STDERR] at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
      15:34:27,863 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      15:34:27,863 ERROR [STDERR] at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
      15:34:27,864 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      15:34:27,864 ERROR [STDERR] at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
      15:34:27,864 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      15:34:27,864 ERROR [STDERR] at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:181)
      15:34:27,864 ERROR [STDERR] at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:79)
      ...
      15:34:27,896 ERROR [STDERR] Caused by: java.lang.IllegalArgumentException: Unable to find operation getAgeAccessLimit()
      15:34:27,896 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:227)
      15:34:27,896 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      15:34:27,896 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
      15:34:27,896 ERROR [STDERR] at $Proxy119.getAgeAccessLimit(Unknown Source)
      ...
      


      The XMBean is making use of the AttributePersistenceService declared in /conf/jboss-service.xml and the values are loaded upon startup of the server and shows up correctly in the JMX Console for the service.

      The service in question extends the ServiceMBeanSupport class and implements an Interface that in turn extends the ServiceMBean interface.

      import org.jboss.system.ServiceMBeanSupport;
      
      public class AxessityService extends ServiceMBeanSupport implements AxessityServiceMBean
      {
      ...
      
      import org.jboss.system.ServiceMBean;
      
      public interface AxessityServiceMBean extends ServiceMBean
      {
      ...
      


      The service does not make use of any annotations but solely on xml declaration where methods and return values are declared.

      <server>
      
       <mbean name="axessity:service=axessityService"
       code="se.infogate.axessity.service.AxessityService" xmbean-dd="">
      
       <!-- Declare a dependency on the "axessity:service=saeService" and
       bind this name to the saeService attribute -->
       <depends>axessity:service=saeService</depends>
      
      ...
      
       <xmbean>
       <description>
       This Management Bean is provided for configuration of the
       business logic of Axessity. The values set here are retreived
       by the web tier at startup and at a regular basis depending on
       the cache value of the web tier.
       </description>
       <descriptors>
       <persistence persistPolicy="OnUpdate" />
       <persistence-manager
       value="org.jboss.mx.persistence.DelegatingPersistenceManager" />
       </descriptors>
       <class>se.infogate.axessity.service.AxessityService</class>
      
       <attribute access="read-write"
       getMethod="isLimitRegisteredUserPerPlug"
       setMethod="setLimitRegisteredUserPerPlug">
       <description>
       This parameter tells if the citynet shall limit the number
       of users per connection / plug. If true, the parameter
       registeredUsersAmountLimit is checked for a specific limit.
       </description>
       <name>LimitRegisteredUserPerPlug</name>
       <type>boolean</type>
       true
       </attribute>
      ...
       <!-- ServiceMBean operations -->
       <operation>
       <description>Standard MBean lifecycle method</description>
       <name>create</name>
       </operation>
      
       <operation>
       <description>The start lifecycle operation</description>
       <name>start</name>
       </operation>
      
       <operation>
       <description>The stop lifecycle operation</description>
       <name>stop</name>
       </operation>
      
       <operation>
       <description>The destroy lifecycle operation</description>
       <name>destroy</name>
       </operation>
      
       </xmbean>
      
       </mbean>
      
      </server>
      


      Have I missed something out in the migration process of services?