0 Replies Latest reply on May 17, 2005 5:22 AM by Rajeswari Aluri

    Problem deploying a CMP bean

    Rajeswari Aluri Newbie

      Hi

      I am new to JBoss and EJBs. I am trying to deploy a CMP bean on JBoss 4.0.2. I am getting the following error:

      01:56:37,028 DEBUG [EJBDeployer] create, mlp_register_bean.jar
      01:56:37,153 DEBUG [EJBDeployer] Verifying file:/D:/jboss-4.0.2/server/xpme/tmp/
      deploy/tmp6738ME-MLP.ear-contents/mlp_register_bean.jar
      01:56:37,200 WARN [verifier] EJB spec violation:
      Bean : MemberBean
      Section: 22.2
      Warning: The Bean Provider must specify the fully-qualified name of the Java cla
      ss that implements the enterprise bean's business methods in the <ejb-class> ele
      ment.
      Info : Class not found on 'com.xpherix.mobile.me.ejb.mlp.member.MemberBean': N
      o ClassLoaders found for: com.xpherix.mobile.me.ejb.mlp.member.MemberBean

      01:56:37,200 ERROR [MainDeployer] could not create deployment: file:/D:/jboss-4.
      0.2/server/xpme/tmp/deploy/tmp6738ME-MLP.ear-contents/mlp_register_bean.jar
      01:56:37,216 DEBUG [NestedThrowable] org.jboss.util.NestedThrowable.parentTraceE
      nabled=true
      01:56:37,216 DEBUG [NestedThrowable] org.jboss.util.NestedThrowable.nestedTraceE
      nabled=false
      01:56:37,216 DEBUG [NestedThrowable] org.jboss.util.NestedThrowable.detectDuplic
      ateNesting=true
      org.jboss.deployment.DeploymentException: Verification of Enterprise Beans faile
      d, see above for error messages.
      at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:553)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:918)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:910)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:774)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
      at sun.reflect.GeneratedMethodAccessor49.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.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
      er.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
      or.java:121)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
      BeanOperationInterceptor.java:127)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:249)



      Here is my code:

      ejb-jar.xml

      <ejb-jar>
      <enterprise-beans>

      <ejb-name>MemberBean</ejb-name>
      com.xpherix.mobile.me.ejb.mlp.member.MemberHome
      com.xpherix.mobile.me.ejb.mlp.member.MemberRemote
      <ejb-class>com.xpherix.mobile.me.ejb.mlp.member.MemberBean</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>com.xpherix.mobile.me.ejb.mlp.member.MemberPK</prim-key-class>
      False
      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>MemberBean</abstract-schema-name>
      <cmp-field>
      <field-name>memberId</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>name</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>phoneNumber</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>email</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>state</field-name>
      </cmp-field>
      <resource-ref>
      <res-ref-name>jdbc/mlpPool</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
      </resource-ref>

      </enterprise-beans>
      <assembly-descriptor>
      <container-transaction>

      <ejb-name>MemberBean</ejb-name>
      <method-name>*</method-name>

      <trans-attribute>Required</trans-attribute>
      </container-transaction>
      </assembly-descriptor>
      </ejb-jar>

      jboss.xml:


      <enterprise-beans>

      <ejb-name>MemberBean</ejb-name>
      <jndi-name>MemberBean</jndi-name>

      </enterprise-beans>



      jbosscmp-jdbc.xml

      <jbosscmp-jdbc>

      java:/mlpPool
      <datasource-mapping>javax.sql.DataSource</datasource-mapping>

      <enterprise-beans>

      <ejb-name>MemberBean</ejb-name>
      <table-name>MEMBER_TABLE</table-name>
      <cmp-field>
      <field-name>memberId</field-name>
      <column-name>memberid</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>name</field-name>
      <column-name>name</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>phoneNumber</field-name>
      <column-name>phoneNumber</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>email</field-name>
      <column-name>email</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>state</field-name>
      <column-name>state</column-name>
      </cmp-field>


      <query-method>

      <method-name>findByName</method-name>
      <method-params>
      <method-param>java.lang.String</method-param>
      </method-params>
      </query-method>
      <jboss-ql> <![CDATA[ SELECT OBJECT(o) FROM MEMBER_TABLE o WHERE o.NAME=?1 ]]> </jboss-ql>


      <jbosscmp-jdbc>


      bean class package is : package com.xpherix.mobile.me.ejb.mlp.member;


      Please help me if any one has faced this kind of problem

      Thanks in advance.
      Raj