Hi,
   Contets from my ejb-jar.xml are

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

<!-- Generated XML! -->

<ejb-jar>
  <description><![CDATA[Account CMP Test]]></description>
  <display-name>Account CMP</display-name>
  <enterprise-beans>
    <entity>
      <ejb-name>accountcmpmanaged</ejb-name>
      <home>personal.ejb.learning.cmpbean.AccountCMPHome</home>
      <remote>personal.ejb.learning.cmpbean.AccountCMP</remote>
      <ejb-class>personal.ejb.learning.cmpbean.AccountCMPBean</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>personal.ejb.learning.cmpbean.AccountCMPPK</prim-key-class>
      <reentrant>False</reentrant>
      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>AccountBean</abstract-schema-name>
      <cmp-field>
        <description><![CDATA[Account Balance]]></description>
        <field-name>balance</field-name>
      </cmp-field>
      <cmp-field>
        <description><![CDATA[Name of the account Holder]]></description>
        <field-name>ownerName</field-name>
      </cmp-field>
      <cmp-field>
        <description><![CDATA[Account Number]]></description>
        <field-name>accNumber</field-name>
      </cmp-field>
      <primkey-field>accNumber</primkey-field>
    </entity>
  </enterprise-beans>

  <assembly-descriptor>
    <container-transaction>
      <method>
        <ejb-name>accountcmpmanaged</ejb-name>
        <method-name>*</method-name>
      </method>
      <trans-attribute>Required</trans-attribute>
    </container-transaction>
  </assembly-descriptor>

</ejb-jar>

and the contents from my weblogic-cmp-rdbms-jar.xml are

<!DOCTYPE weblogic-rdbms-jar PUBLIC  '-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB RDBMS Persistence//EN' 'http://www.bea.com/servers/wls700/dtd/weblogic-rdbms20-persistence-700.dtd'>
 
 

<!-- Generated XML! -->
 

<weblogic-rdbms-jar>
  <weblogic-rdbms-bean>
    <ejb-name>accountcmpmanaged</ejb-name>
    <data-source-name>txvis</data-source-name>
    <table-map>
      <table-name>account</table-name>
      <field-map>
        <cmp-field>accNumber</cmp-field>
        <dbms-column>accnumber</dbms-column>
      </field-map>
      <field-map>
        <cmp-field>ownerName</cmp-field>
        <dbms-column>ownername</dbms-column>
      </field-map>
      <field-map>
        <cmp-field>balance</cmp-field>
        <dbms-column>balance</dbms-column>
      </field-map>
    </table-map>
  </weblogic-rdbms-bean>
  <create-default-dbms-tables>True</create-default-dbms-tables>
</weblogic-rdbms-jar>

thanks
Manoj
 

"Hicks, James" wrote:

 

It would help to see your deployment descriptors.  That is probably where your error is.

James

-----Original Message-----
From: Manoj Kumar [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 23, 2002 10:17 AM
To: [EMAIL PROTECTED]
Subject: Problem with Return type of Abstarct get/set methods in CMP Entity Beans

Hi,
I have created a 'Account' Entity bean having a Primary Key class 'AccountPK' which has a AccountNumber field. My bean class has abstarct set/get methods for AccountNumber also. Signatures of these methods is as under

public abstract int getAccNumber();
public abstract void setAccNumber(int accnumber);

When i tried deploying the Bean in weblgic 7.0, i got the exception saying that the return type of the abstarct methods getAccountNumber should be of primary key AccountPK and not the int. However, all the examples which i could find in tutorials and Books says that the return type should be the data type of the field which in this case is int.

Thanks in advance!

Manoj Kumar.

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff EJB-INTEREST".  For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".

The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you receive this in error, please contact the sender and delete the material from all computers.

Reply via email to