3 Replies Latest reply on May 2, 2003 3:34 AM by jonmartin

    error while deploying example of CMP2.0 help need

    deepaksumani

      hi all ,

      I using a simple sample for CMP2.0 and when i try to deploy it on jboss-3.2.0_tomcat-4.1.24 It gave me the following error.

      14:22:54,723 ERROR [MainDeployer] could not create deployment: file:/C:/jboss-3.
      2.0_tomcat-4.1.24/server/all/tmp/deploy/server/all/deploy/Countries.ear/59.Count
      ries.ear-contents/countries.jar
      org.jboss.deployment.DeploymentException: Error in ejb-jar.xml for Entity Bean S
      ms/CountriesBean: The ejb-name for a CMP2.x Entity must be a valid Java Identifi
      er
      at org.jboss.metadata.ApplicationMetaData.importEjbJarXml(ApplicationMet
      aData.java:247)


      my ejb-jar.xml is as follow

      <?xml version="1.0" encoding="UTF-8"?>

      <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>

      <ejb-jar>
      <display-name>countries.jar</display-name>
      <enterprise-beans>


      <display-name>CountriesBean</display-name>
      <ejb-name>Sms/CountriesBean</ejb-name>
      <local-home>com.dsq.sms.dataLayer.countries.CountriesHome</local-home>
      com.dsq.sms.dataLayer.countries.Countries
      <ejb-class>com.dsq.sms.dataLayer.countries.CountriesBean</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>com.dsq.sms.dataLayer.countries.CountriesPK</prim-key-class>
      False

      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>Countries</abstract-schema-name>
      <cmp-field><field-name>countriesID</field-name></cmp-field>
      <cmp-field><field-name>countryName</field-name></cmp-field>
      <cmp-field><field-name>taxStatus</field-name></cmp-field>
      <primkey-field>countriesID</primkey-field>


      </enterprise-beans>
      <assembly-descriptor>
      <method-permission>


      <ejb-name>Sms/CountriesBean</ejb-name>
      <method-intf>Local</method-intf>
      <method-name>*</method-name>


      <ejb-name>Sms/CountriesBean</ejb-name>
      <method-intf>LocalHome</method-intf>
      <method-name>*</method-name>
      <method-params />

      </method-permission>
      <container-transaction>

      <ejb-name>Sms/CountriesBean</ejb-name>
      <method-intf>Local</method-intf>
      <method-name>*</method-name>

      <trans-attribute>Required</trans-attribute>
      </container-transaction>
      <container-transaction>

      <ejb-name>Sms/CountriesBean</ejb-name>
      <method-intf>LocalHome</method-intf>
      <method-name>*</method-name>

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


      any help in this regard will be highly helpful.

      Thanxs

      Dee

        • 1. Re: error while deploying example of CMP2.0 help need
          kvikram

          Hi
          The error says it all.
          "/" is not allowed in a valid java identifier.
          Change <ejb-name>Sms/CountriesBean</ejb-name>
          to <ejb-name>Sms_CountriesBean</ejb-name> everywhere & u'r bean should be deployed smoothly.

          Good Luck
          Vikram

          • 2. Re: error while deploying example of CMP2.0 help need
            deepaksumani

            Thanxs Vikram ,

            The thing i am just upgrading myself to Jboss3.2.0 version. I am trying to deploy a CMP2.0 example on this version it would be very helpful for me if any one can send me a example for doing this or any URL where i can find all the stuff regarding this .

            Thanks
            D

            • 3. Re: error while deploying example of CMP2.0 help need
              jonmartin

              Within the Sun j2sdkee 1.3.1 there is a file called cmpcustomer.ear. It's a very simple app, jsp-pages accessing cmp-ejbs directly using local interface. Last time I tried it deployed directly on a fresh JBoss 3 installation. Ofcourse Jboss disregards all the sunXYZ.xml configuration files, and Sun hasn't put any Jboss specific stuff in there, so it relies entirely on default configuration values.

              I don't remember if there is any source for ejb's in there, but at least you can dissect the archives and standard xml configuration files.