3 Replies Latest reply on Apr 29, 2003 7:21 PM by Adrian Richter

    Deploying EJB with Single Parameter Finder Method Fails

    Adrian Richter Newbie

      Hi All,

      I have been trying to deploy an CMP 2.0 Entity Bean on JBoss 3.2. The bean is nothing special, in fact it is only 2 fields, ID and Description. It has 3 finder methods (findByPrimaryKey, findAll, findByDescription)

      The findAll method takes no parameters and the findByDescription takes a String parameter. When deploying the jar file, I have found that the EJB verifier cannot find the EJBQL that is written in the ejb-jar.xml file for the findByDescription but finds it for the findAll.

      I have attached the jar file also. If you deploy it, it should give you an error. If it does not please tell me what I have done wrong with my installation of JBoss.

      Here is the error message:
      17:07:06,991 INFO [MainDeployer] Starting deployment of package: file:/F:/java/
      jboss-3.2.0_tomcat-4.1.24/server/default/deploy/ejbtest.jar
      17:07:07,121 INFO [EJBDeployer] looking for nested deployments in : file:/F:/ja
      va/jboss-3.2.0_tomcat-4.1.24/server/default/deploy/ejbtest.jar
      17:07:07,512 WARN [verifier] EJB spec violation:
      Bean : Test
      Method : public abstract Collection findByDescription(String) throws RemoteExcep
      tion, FinderException
      Section: 10.5.6
      Warning: Every finder method except findByPrimaryKey(key) must be associated wit
      h a query element in the deployment descriptor.

      17:07:07,512 ERROR [MainDeployer] could not create deployment: file:/F:/java/jbo
      ss-3.2.0_tomcat-4.1.24/server/default/deploy/ejbtest.jar
      org.jboss.deployment.DeploymentException: Verification of Enterprise Beans faile
      d, see above for error messages.
      at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:501)
      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.GeneratedMethodAccessor34.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.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(URLDeploymen
      tScanner.java:280)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
      canner.java:407)
      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)
      17:07:07,512 ERROR [URLDeploymentScanner] Failed to deploy: org.jboss.deployment
      .scanner.URLDeploymentScanner$DeployedURL@2b877f3f{ url=file:/F:/java/jboss-3.2.
      0_tomcat-4.1.24/server/default/deploy/ejbtest.jar, deployedLastModified=10515999
      14269 }
      org.jboss.deployment.DeploymentException: Verification of Enterprise Beans faile
      d, see above for error messages.
      at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:501)
      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.GeneratedMethodAccessor34.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.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(URLDeploymen
      tScanner.java:280)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
      canner.java:407)
      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)


      Thanks in advance,

      Adrian Richter