3 Replies Latest reply on Jul 15, 2010 11:04 AM by alesj

    MC not finding required method defined in beans.xml file

      Hey guys,

       

      I'm writing up the datagrid profile for the AS currently and I've encountered an issue with creating a certain type of bean. I basically want to create an instance of the HotRodServer and call start() on it. This start() call requires a Properties instance and also a DefaultCacheManager instance. So in this case I create the HotRodServer bean separately before creating the DCM. Once the DCM is created, I call start() on HRS. The xml is below: -

       

       

      <bean name="HotRodServer" />
       
       
      <bean name="DefaultCacheManager">
       
      <constructor>
      <parameter class="java.lang.String">infinispan-configuration.xml</parameter>
      </constructor>
       
       
      <install bean="HotRodServer" method="start">
       
      <!-- Properties object required as a parameter -->
       
       
      <parameter class="java.util.Properties">
       
      <map>
       
      <entry>
      <key>infinispan.server.host</key>
      <value>127.0.0.1</value>
      </entry>
       
      <entry>
      <key>infinispan.server.port</key>
      <value>11311</value>
      </entry>
       
      </map>
       
       
       
      </parameter>
       
      <parameter class="org.infinispan.manager.EmbeddedCacheManager"><this/></parameter>
       
      </install>
       
      </bean>
       
      
      

       

       

      The issue I get when I'm doing a ./run.sh on the AS is as follows: -

       

      DEPLOYMENTS IN ERROR:

        Deployment "DefaultCacheManager" is in error due to the following reason(s): org.jboss.joinpoint.spi.JoinpointException: Method not found start[java.util.Properties, org.infinispan.manager.EmbeddedCacheManager] for class org.infinispan.server.hotrod.HotRodServer

      Which is odd because if instead of calling start() and I call the method stop() [which doesn't require and parameters] I don't get this error at all. Also when I don't specify the class type for each of the parameters makes no difference.
      Any assistance would be much appreciated.
      Thanks,
      Navin.