2 Replies Latest reply on Sep 9, 2003 7:44 AM by Ravikanth

    Problem deploying my CMP Bean

    Ravikanth Newbie

      Hi,
      I am trying to migrate my application from
      jboss 2.4.X to Jboss 4.0.I have prblem deploying my EJBs.I added the below tag to the ejb-jar.xml.
      <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN" "http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd">

      While the deployer tries to deploy my application,I get the following errors.Please not that the same .jar file is properly working on the JBoss 2.4.x.


      15:27:43,309 ERROR [EntityContainer] Starting failed: org.jboss.deployment.DeploymentException: Home interface does not have a findByPrimaryKey method
      15:27:43,309 WARN [ServiceController] Problem starting service jboss.j2ee:jndiName=com.syncline.ows.server.ejb.coordsysentity.CoordsysEntityHome,service=EJB
      org.jboss.deployment.DeploymentException: Home interface does not have a findByPrimaryKey method
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCQueryManager.start(JDBCQueryManager.java:89)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.startStoreManager(JDBCStoreManager.java:579)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:474)
      at org.jboss.ejb.entity.CMPInterceptor.start(CMPInterceptor.java:57)
      at org.jboss.ejb.entity.SimplePersistenceManager.start(SimplePersistenceManager.java:79)
      at org.jboss.ejb.EntityContainer.typeSpecificStart(EntityContainer.java:324)
      at org.jboss.ejb.Container.startService(Container.java:1004)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:233)
      at org.jboss.ejb.Container.invoke(Container.java:1328)
      at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:692)
      at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:72)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:544)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:1036)
      at $Proxy44.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:401)
      at org.jboss.system.ServiceController.start(ServiceController.java:426)
      at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:72)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:45)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:70)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:155)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:544)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:172)
      at $Proxy43.start(Unknown Source)
      at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:503)
      at org.jboss.deployment.DeploymentInfo.start(DeploymentInfo.java:255)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:72)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:45)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:70)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:155)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:544)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:1036)

      Can somebody help?
      Thanks,
      Ravi

        • 1. Re: Problem deploying my CMP Bean
          Weston Price Newbie

          Well, let's start with the simplest reason:
          Do your Entity Beans offer a findByPrimary key method in the respective Home intefaces?

          Weston

          • 2. Re: Problem deploying my CMP Bean
            Ravikanth Newbie

            Yes they do.Like I mentioned,the application works properly on Jboss 2.X with Tomcat.The same application I am trying to deploy on Jboss 4.0 with the changes I needed to do in the deployment descriptors.
            The following is the method in my home interface.
            /**
            * Method findByPrimaryKey uses the input primary key to get the remote interface(CoordsysEntity)
            * of CoordsysEntityBean
            *
            *
            * @param pk CoordsysEntityPK object
            *
            * @return remote interface of the CoordsysEntityBean.
            *
            * @throws FinderException
            * @throws RemoteException
            *
            */
            public CoordsysEntity findByPrimaryKey(CoordsysEntityPK pk)
            throws RemoteException, FinderException;