2 Replies Latest reply on Jul 24, 2003 7:10 AM by r_andriy

    Custom BMP finder in CMP bean

    r_andriy Newbie

      Hi
      I can't create custom BMP finder query defined in my 2.0 CMP bean. For example:

      abstract public class MyBean implements EntityBean {
      ...

      public Collection ejbFindByPrimaryKeys(Collection keys) {
      return keys;
      }
      ...
      }

      ejb-jar.xml

      <query-method>
      <method-name>findByPrimaryKeys</method-name>
      <method-params>
      <method-param>java.util.Collection</method-param>
      </method-params>
      </query-method>
      <ejb-ql/>


      I get error message
      2003-07-24 14:42:39,773 ERROR [org.jboss.deployment.MainDeployer] could not create deployment: file:/D:/Program Files/jboss-3.2.1/server/default/deploy/my.jar
      org.jboss.deployment.DeploymentException: Verification of Enterprise Beans failed, see above for error messages.
      at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:487)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:784)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:639)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
      at sun.reflect.GeneratedMethodAccessor12.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:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy7.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:458)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:200)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:211)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:190)

      What's wrong?