Cmr field and ejbgen

How do i define a cmr-field through ejbgen annotations in weblogic?
I have defined the relation as
* @ejbgen:relation
* multiplicity = one
* name = EntityCanHaveMultipleJournals
     * role-name = EntityHasJournals
* target-ejb = FTEntityEJB
* @ejbgen:ejb-local-ref
* home = ft.infosys.journal.FTJournalHome
* local = ft.infosys.journal.FTJournalLocal
* jndi-name = FTJournal
* name = Journal
* type = Entity
And the accessor/mutator as:
* @ejbgen:cmr-field
* @ejbgen:local-method transaction-attribute = NotSupported
abstract public Collection getJournals();
* @ejbgen:local-method transaction-attribute = Required
abstract public void setJournals(Collection val);
Though this does not give any error on executing ejbgen,and the local and home interfaces are fine;the CMR field is not appearing in the relations tag in ejb-jar.xml.
So i have to add the following manually in ejb-relations:
<cmr-field>
<cmr-field-name>journals</cmr-field-name>
<cmr-field-type>java.util.Collection</cmr-field-type>
</cmr-field>
Why so?

cmr field which is "category" in ur mapping , u can't use as cmp field in abstract schema mapping. just remove category from cmp field . and every thing is fine

Similar Messages

  • A cmr-field and a cmp-field on the bean are using the same name. The names

    Hi:
    I am using weblogic 8.1 and MyEclipse 5.1.1. I am deploying my ear application through MyEclipse 5.1.1 as an ear file.
    When I ran the following EJB QL:
    SELECT OBJECT(p) FROM Product p.category = ?1
    I get the following error:
    n relation Category-Product, a cmr-field and a cmp-field on the bean are using the same name. The names of cmr and cmp fields must be unique.
    It is basically complaining that I have a field
    <cmr-field>
                             <cmr-field-name>category</cmr-field-name>
                        </cmr-field>
    in my ejb-jar.xml and also the same category in the
    <cmp-field><field-name>category</field-name></cmp-field>
    field. The problem is that if I changed the value of the cmr-field, I have to add a get and set in my productLocal.java and when you do that you have to do the same in the ejb-jar.xml.
    Here is my ejb-jar.xml:
    <?xml version="1.0"?>
    <!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>
    <enterprise-beans>
    <entity>
    <ejb-name>CategoryEJB</ejb-name>
    <local-home>com.CategoryHomeLocal</local-home>
    <local>com.CategoryLocal</local>
    <ejb-class>com.CategoryBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Integer</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>Category</abstract-schema-name>
         <cmp-field><field-name>categoryId</field-name></cmp-field>
    <cmp-field><field-name>categoryName</field-name></cmp-field>
    <cmp-field><field-name>picture</field-name></cmp-field>
    <cmp-field><field-name>pictureWidth</field-name></cmp-field>
    <cmp-field><field-name>pictureHeight</field-name></cmp-field>
    <cmp-field><field-name>labelOn</field-name></cmp-field>
         <cmp-field><field-name>labelOff</field-name></cmp-field>
         <cmp-field><field-name>button</field-name></cmp-field>
    <primkey-field>categoryId</primkey-field>
    <security-identity><use-caller-identity/></security-identity>
              <query>
                   <query-method>
                        <method-name>findCategory</method-name>
                        <method-params></method-params>
                   </query-method>
                   <ejb-ql>
                        SELECT OBJECT(c) FROM Category c
                   </ejb-ql>
              </query>
         </entity>
         <entity>
    <ejb-name>ProductEJB</ejb-name>
    <local-home>com.ProductHomeLocal</local-home>
    <local>com.ProductLocal</local>
    <ejb-class>com.ProductBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Integer</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>Product</abstract-schema-name>
         <cmp-field><field-name>productId</field-name></cmp-field>
    <cmp-field><field-name>brandName</field-name></cmp-field>
    <cmp-field><field-name>productDescription</field-name></cmp-field>
    <cmp-field><field-name>purchasePrice</field-name></cmp-field>
    <cmp-field><field-name>category</field-name></cmp-field>
    <primkey-field>productId</primkey-field>
    <security-identity><use-caller-identity/></security-identity>
              <query>
                   <query-method>
                        <method-name>findProduct</method-name>
                        <method-params>
                        <method-param>com.CategoryLocal</method-param>
                        </method-params>
                   </query-method>
                   <ejb-ql>
                        SELECT OBJECT(p) FROM Product p.category = ?1
                   </ejb-ql>
              </query>
         </entity>
    </enterprise-beans>
    <relationships>
                   <ejb-relation>
                   <ejb-relation-name>Category-Product</ejb-relation-name>
                   <ejb-relationship-role>
                        <ejb-relationship-role-name>
                             Category-has-many-Product-numbers
                        </ejb-relationship-role-name>
                        <multiplicity>one</multiplicity>
                        <relationship-role-source>
                             <ejb-name>CategoryEJB</ejb-name>
                        </relationship-role-source>
                        <cmr-field>
                             <cmr-field-name>productNumbers</cmr-field-name>
                             <cmr-field-type>java.util.Collection</cmr-field-type>
                        </cmr-field>
                   </ejb-relationship-role>
                   <ejb-relationship-role>
                        <ejb-relationship-role-name>
                             Product-belongs-to-Category
                        </ejb-relationship-role-name>
                        <multiplicity>many</multiplicity>
                        <cascade-delete/>
                        <relationship-role-source>
                             <ejb-name>ProductEJB</ejb-name>
                        </relationship-role-source>
                        <cmr-field>
                             <cmr-field-name>category</cmr-field-name>
                        </cmr-field>
                   </ejb-relationship-role>
              </ejb-relation>
    </relationships>
    <assembly-descriptor>
    <security-role>
    <role-name>Employees</role-name>
    </security-role>
    <method-permission>
    <role-name>Employees</role-name>
    <method>
    <ejb-name>CategoryEJB</ejb-name>
    <method-name>*</method-name>
    </method>
    </method-permission>
    <container-transaction>
    <method>
    <ejb-name>CategoryEJB</ejb-name>
    <method-name>*</method-name>
    </method>
    <method>
    <ejb-name>ProductEJB</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>     
    Here is my weblogic-cmp-rdbms-jar.xml:
    <!DOCTYPE weblogic-rdbms-jar PUBLIC
    '-//BEA Systems, Inc.//DTD WebLogic 8.1.0 EJB RDBMS Persistence//EN'
    'http://www.bea.com/servers/wls810/dtd/weblogic-rdbms20-persistence-810.dtd'>
    <weblogic-rdbms-jar>
    <weblogic-rdbms-bean>
         <ejb-name>CategoryEJB</ejb-name>
    <data-source-name>ShoeStore</data-source-name>
         <table-map>
              <table-name>category</table-name>
              <field-map>
              <cmp-field>categoryId</cmp-field>
              <dbms-column>categoryID</dbms-column>
              </field-map>
              <field-map>
              <cmp-field>categoryName</cmp-field>
              <dbms-column>categoryName</dbms-column>
              </field-map>
              <field-map>
              <cmp-field>picture</cmp-field>
              <dbms-column>Picture</dbms-column>
              </field-map>
              <field-map>
              <cmp-field>pictureWidth</cmp-field>
              <dbms-column>PictureWidth</dbms-column>
              </field-map>
              <field-map>
              <cmp-field>pictureHeight</cmp-field>
              <dbms-column>PictureHeight</dbms-column>
              </field-map>
              <field-map>
              <cmp-field>labelOn</cmp-field>
              <dbms-column>LabelOn</dbms-column>
              </field-map>
              <field-map>
              <cmp-field>labelOff</cmp-field>
              <dbms-column>LabelOff</dbms-column>
              </field-map>
              <field-map>
              <cmp-field>button</cmp-field>
              <dbms-column>Button</dbms-column>
              </field-map>
    </table-map>
    <automatic-key-generation>
    <generator-type>SQL_SERVER</generator-type>
    </automatic-key-generation>
    </weblogic-rdbms-bean>
    <weblogic-rdbms-bean>
         <ejb-name>ProductEJB</ejb-name>
    <data-source-name>ShoeStore</data-source-name>
         <table-map>
              <table-name>PRODUCT</table-name>
              <field-map>
              <cmp-field>productId</cmp-field>
              <dbms-column>productId</dbms-column>
              </field-map>
              <field-map>
              <cmp-field>brandName</cmp-field>
              <dbms-column>brandName</dbms-column>
              </field-map>
              <field-map>
              <cmp-field>productDescription</cmp-field>
              <dbms-column>productDescription</dbms-column>
              </field-map>
              <field-map>
              <cmp-field>purchasePrice</cmp-field>
              <dbms-column>purchasePrice</dbms-column>
              </field-map>
              <field-map>
              <cmp-field>category</cmp-field>
              <dbms-column>categoryId</dbms-column>
              </field-map>
    </table-map>
         <!-- Automatically generate the value of ID in the database on inserts using sequence table -->
    <automatic-key-generation>
    <generator-type>SQL_SERVER</generator-type>
    </automatic-key-generation>
    </weblogic-rdbms-bean>
    <weblogic-rdbms-relation>
         <relation-name>Category-Product</relation-name>
    <weblogic-relationship-role>
    <relationship-role-name>Product-belongs-to-Category</relationship-role-name>
              <relationship-role-map>
    <column-map>
    <foreign-key-column>categoryId</foreign-key-column>
    <key-column>categoryID</key-column>
    </column-map>
              </relationship-role-map>
    </weblogic-relationship-role>
    </weblogic-rdbms-relation>
    </weblogic-rdbms-jar>
    Here is my productLocal.java:
    package com;
    import javax.ejb.CreateException;
    import javax.naming.NamingException;
    import java.util.Date;
    import java.util.Vector;
    import java.util.Collection;
    public interface ProductLocal extends javax.ejb.EJBLocalObject
         public Integer getProductId();
         public void setProductId(Integer productId);
         public String getBrandName();
         public void setBrandName(String brandName);
         public String getProductDescription();
         public void setProductDescription(String productDescription);
         public Double getPurchasePrice();
         public void setPurchasePrice(Double purchasePrice);
    public CategoryLocal getCategory();
         public void setCategory(CategoryLocal category);
    Here is my ProductBean.java:
    package com;
    import javax.naming.InitialContext;
    import javax.ejb.EntityContext;
    import javax.ejb.CreateException;
    import javax.naming.NamingException;
    import java.util.Date;
    import java.util.Collection;
    import java.util.Iterator;
    import java.util.Vector;
    import java.lang.Integer;
    public abstract class ProductBean implements javax.ejb.EntityBean
         public Integer ejbCreate(Integer id)
              this.setProductId(id);
              return null;
         public void ejbPostCreate(Integer id)
         //public abstract Integer getCategoryId();
    //     public abstract void setCategoryId(Integer categoryId);
         public abstract CategoryLocal getCategory();
         public abstract void setCategory(CategoryLocal category);
         public abstract Integer getProductId();
         public abstract void setProductId(Integer productId);
         public abstract String getBrandName();
         public abstract void setBrandName(String brandName);
         public abstract String getProductDescription();
         public abstract void setProductDescription(String productDescription);
         public abstract Double getPurchasePrice();
         public abstract void setPurchasePrice(Double purchasePrice);
         public void setEntityContext(EntityContext ec)
              System.out.println("ProductBean setEntityContext");
         public void unsetEntityContext()
              System.out.println("ProductBean unsetEntityContext");
         public void ejbLoad()
              System.out.println("ProductBean ejbLoad");
         public void ejbStore()
              System.out.println("ProductBean ejbStore");
         public void ejbActivate()
              System.out.println("ProductBean ejbActivate");
         public void ejbPassivate()
              System.out.println("ProductBean ejbPassivate");
         public void ejbRemove()
              System.out.println("ProductBean ejbRemove");
    What do I needed to do to fix this problem.
    Any hint or help would be greatly appreciated!!!
    Yours,
    Frustrated

    cmr field which is "category" in ur mapping , u can't use as cmp field in abstract schema mapping. just remove category from cmp field . and every thing is fine

  • EJB-QL with self referencing cmr-field in path identifier fails

    I have a simple application . Only one bean and one relationship. The relationship is a (0..1)-(0..1) for the same bean (self referencing).
    I have a finder method defined with ejb-ql that tries to access the field of one of the cmr fields of the relationship.
    class1Bean is the abstract schema for my bean, and subclass1 is the cmr-field name.
    SELECT OBJECT(obj) FROM class1Bean obj WHERE obj.subclass1.id LIKE ?1
    Here is the error message when trying to deploy:
    Bean: Class1
    Method: java.util.Collection findBySubclass1(java.lang.String)
    EJBQL: SELECT OBJECT(obj) FROM class1Bean obj WHERE obj.subclass1.id LIKE ?1
    Error: JDO75100: Fatal internal error: JDO75341: Missing field meta data for field 'subclass1' of 'Class1'
    This same code deploys fine on JBoss 4.0, and should be legal ejb-ql. Is this a known issue with Sun JSAS?

    Sounds like a problem with the bean metadata. Please check the entity mapping defined in sun-cmp-mappings.xml. Also make sure field sublass1 is defined as CMR everywhere.
    -- markus.

  • All cmp-fields that double as cmr-fields must have an object type??

    Greetings,
    I'm deploying an application in weblogic 8.1sp2 that worked fine in
    jboss 3.2. The error is:
    Exception:weblogic.management.ApplicationException: prepare failed for
    ServiceEJB.jar Module: ServiceEJB.jar Error: Exception preparing module:
    EJBModule(ServiceEJB.jar,status=NEW) Unable to deploy EJB:
    ServiceEJB.jar from ServiceEJB.jar: [EJB:011017]Error while reading
    'META-INF/weblogic-cmp-rdbms-jar.xml'. The error was: In relationship
    'primitive_TO_primitive_param', role
    'primitive_param_BELONGS_TO_primitive', a cmp-field used to implement
    this relationship has a primitive type. All cmp-fields that double as
    cmr-fields must have an object type. . at
    weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java:255) at
    Does it means that I should cmp field from "int" type to "Integer"
    object??? If true, I really don't know why the requirement since in
    jboss worked just fine. But do you confirm it?
    regards,
    Pedro Salazar

    I believe there is a requirement that any field used as a primary or
    foreign key must be an object and implement hashCode/equals.
    I'd post in weblogic.developer.interest.ejb.cmp if you want more
    information.
    -- Rob
    Pedro Salazar wrote:
    Greetings,
    I'm deploying an application in weblogic 8.1sp2 that worked fine in
    jboss 3.2. The error is:
    Exception:weblogic.management.ApplicationException: prepare failed for
    ServiceEJB.jar Module: ServiceEJB.jar Error: Exception preparing module:
    EJBModule(ServiceEJB.jar,status=NEW) Unable to deploy EJB:
    ServiceEJB.jar from ServiceEJB.jar: [EJB:011017]Error while reading
    'META-INF/weblogic-cmp-rdbms-jar.xml'. The error was: In relationship
    'primitive_TO_primitive_param', role
    'primitive_param_BELONGS_TO_primitive', a cmp-field used to implement
    this relationship has a primitive type. All cmp-fields that double as
    cmr-fields must have an object type. . at
    weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java:255) at
    Does it means that I should cmp field from "int" type to "Integer"
    object??? If true, I really don't know why the requirement since in
    jboss worked just fine. But do you confirm it?
    regards,
    Pedro Salazar

  • Beginner needs help with CMR field problem

    Hello,
    I have two ejbs, one called EstablishmentEJB and another called VisitorCommentsEJB. The relationship is of one EstablishmentEJB instance to many VisitorCommentsEJB instances.
    Here are the definitions for the tables:
    CREATE TABLE establishments (
      DB_ESTABLISHMENT_ID int(11) NOT NULL default '0',
      DB_POSTCODE varchar(100) NOT NULL default '',
      DB_ESTABLISHMENT_NAME varchar(255) NOT NULL default '',
      PRIMARY KEY  (DB_ESTABLISHMENT_ID)
    ) TYPE=InnoDB;
    CREATE TABLE visitors_comments (
      DB_VISITOR_COMMENT_ID int(11) NOT NULL auto_increment,
      DB_ESTABLISHMENT_ID int(11) NOT NULL default '0',
      DB_COMMENT varchar(255) NOT NULL default '',
      PRIMARY KEY  (DB_VISITOR_COMMENT_ID)
    ) TYPE=InnoDB;Here are the xml DDs:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!--
    <!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>
    -->
    <ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
               http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"
               version="2.1">
         <description>test guide</description>
         <display-name>test guide</display-name>
         <enterprise-beans>
              <!--===========Establishment================ -->
              <entity>
                   <ejb-name>EstablishmentEJB</ejb-name>
                   <home>com.softwareag.test_guide.establishmentEJB.PGEstablishmentHome</home>
                   <remote>com.softwareag.test_guide.establishmentEJB.PGEstablishment</remote>
                   <local-home>com.softwareag.test_guide.establishmentEJB.PGEstablishmentLocalHome</local-home>
                   <local>com.softwareag.test_guide.establishmentEJB.PGEstablishmentLocal</local>
                   <ejb-class>com.softwareag.test_guide.establishmentEJB.PGEstablishmentBean</ejb-class>
                   <persistence-type>Container</persistence-type>
                   <prim-key-class>java.lang.Integer</prim-key-class>
                   <reentrant>false</reentrant>
                   <cmp-version>2.x</cmp-version>
                   <abstract-schema-name>Establishment</abstract-schema-name>
                   <cmp-field>
                        <field-name>id</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>name</field-name>
                   </cmp-field>
                   <primkey-field>id</primkey-field>
              </entity>
              <!--===========Grade================ -->
              <entity>
                   <ejb-name>GradeEJB</ejb-name>
                   <home>com.softwareag.test_guide.gradeEJB.PGGradeHome</home>
                   <remote>com.softwareag.test_guide.gradeEJB.PGGrade</remote>
                   <local-home>com.softwareag.test_guide.gradeEJB.PGGradeLocalHome</local-home>
                   <local>com.softwareag.test_guide.gradeEJB.PGGradeLocal</local>
                   <ejb-class>com.softwareag.test_guide.gradeEJB.PGGradeBean</ejb-class>
                   <persistence-type>Container</persistence-type>
                   <prim-key-class>java.lang.Integer</prim-key-class>
                   <reentrant>false</reentrant>
                   <cmp-version>2.x</cmp-version>
                   <abstract-schema-name>Grade</abstract-schema-name>
                   <cmp-field>
                        <field-name>id</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>grade</field-name>
                   </cmp-field>
                   <primkey-field>id</primkey-field>
              </entity>
              <!--===========VisitorsComment================ -->
              <entity>
                   <ejb-name>VisitorCommentEJB</ejb-name>
                   <home>com.softwareag.test_guide.visitorCommentEJB.PGVisitorCommentHome</home>
                   <remote>com.softwareag.test_guide.visitorCommentEJB.PGVisitorComment</remote>
                   <local-home>com.softwareag.test_guide.visitorCommentEJB.PGVisitorCommentLocalHome</local-home>
                   <local>com.softwareag.test_guide.visitorCommentEJB.PGVisitorCommentLocal</local>
                   <ejb-class>com.softwareag.test_guide.visitorCommentEJB.PGVisitorCommentBean</ejb-class>
                   <persistence-type>Container</persistence-type>
                   <prim-key-class>java.lang.Integer</prim-key-class>
                   <reentrant>false</reentrant>
                   <cmp-version>2.x</cmp-version>
                   <abstract-schema-name>VisitorsComment</abstract-schema-name>
                   <cmp-field>
                        <field-name>id</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>comment</field-name>
                   </cmp-field>
                   <primkey-field>id</primkey-field>
              </entity>
              <!--===========Country================ -->
              <entity>
                   <ejb-name>CountryEJB</ejb-name>
                   <home>com.softwareag.test_guide.countryEJB.PGCountryHome</home>
                   <remote>com.softwareag.test_guide.countryEJB.PGCountry</remote>
                   <local-home>com.softwareag.test_guide.countryEJB.PGCountryLocalHome</local-home>
                   <local>com.softwareag.test_guide.countryEJB.PGCountryLocal</local>
                   <ejb-class>com.softwareag.test_guide.countryEJB.PGCountryBean</ejb-class>
                   <persistence-type>Container</persistence-type>
                   <prim-key-class>java.lang.Integer</prim-key-class>
                   <reentrant>false</reentrant>
                   <cmp-version>2.x</cmp-version>
                   <abstract-schema-name>Country</abstract-schema-name>
                   <cmp-field>
                        <field-name>id</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>countryName</field-name>
                   </cmp-field>
                   <primkey-field>id</primkey-field>
              </entity>
              <!--===========Category================ -->
              <entity>
                   <ejb-name>CategoryEJB</ejb-name>
                   <home>com.softwareag.test_guide.categoryEJB.PGCategoryHome</home>
                   <remote>com.softwareag.test_guide.categoryEJB.PGCategory</remote>
                   <local-home>com.softwareag.test_guide.categoryEJB.PGCategoryLocalHome</local-home>
                   <local>com.softwareag.test_guide.categoryEJB.PGCategoryLocal</local>
                   <ejb-class>com.softwareag.test_guide.categoryEJB.PGCategoryBean</ejb-class>
                   <persistence-type>Container</persistence-type>
                   <prim-key-class>java.lang.Integer</prim-key-class>
                   <reentrant>false</reentrant>
                   <cmp-version>2.x</cmp-version>
                   <abstract-schema-name>Category</abstract-schema-name>
                   <cmp-field>
                        <field-name>id</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>category</field-name>
                   </cmp-field>
                   <primkey-field>id</primkey-field>
              </entity>
              <!--===========SearchEngineValueListHandler================ -->
              <session>
                   <ejb-name>PGSearchEngineValueListHandlerEJB</ejb-name>
                   <home>com.softwareag.test_guide.searchEngineEJB.PGSearchEngineValueListHandlerHome</home>
                   <remote>com.softwareag.test_guide.searchEngineEJB.PGSearchEngineValueListHandler</remote>
                   <local-home>com.softwareag.test_guide.searchEngineEJB.PGSearchEngineValueListHandlerLocalHome</local-home>
                   <local>com.softwareag.test_guide.searchEngineEJB.PGSearchEngineValueListHandlerLocal</local>
                   <ejb-class>com.softwareag.test_guide.searchEngineEJB.PGSearchEngineValueListHandlerBean</ejb-class>
                   <session-type>Stateful</session-type>
                   <transaction-type>Container</transaction-type>
                    <resource-ref>
                   <res-ref-name>jdbc/test_guia</res-ref-name>
                   <res-type>javax.sql.DataSource</res-type>
                   <res-auth>Application</res-auth>
                   </resource-ref>
              </session>
              <!--===========SessionFacade================ -->
              <session>
                   <ejb-name>PGSessionFacadeEJB</ejb-name>
                   <home>com.softwareag.test_guide.sessionFacadeEJB.PGSessionFacadeHome</home>
                   <remote>com.softwareag.test_guide.sessionFacadeEJB.PGSessionFacade</remote>
                   <local-home>com.softwareag.test_guide.sessionFacadeEJB.PGSessionFacadeLocalHome</local-home>
                   <local>com.softwareag.test_guide.sessionFacadeEJB.PGSessionFacadeLocal</local>
                   <ejb-class>com.softwareag.test_guide.sessionFacadeEJB.PGSessionFacadeBean</ejb-class>
                   <session-type>Stateless</session-type>
                   <transaction-type>Container</transaction-type>
                   <resource-ref>
                   <res-ref-name>jdbc/test_guia</res-ref-name>
                   <res-type>javax.sql.DataSource</res-type>
                   <res-auth>Application</res-auth>
                   </resource-ref>
              </session>
         </enterprise-beans>
         <relationships>
              <!--===========Establishments-VisitorComments================-->
              <ejb-relation>
                   <ejb-relation-name>Establishment-VisitorComment</ejb-relation-name>
                   <ejb-relationship-role>
                        <ejb-relationship-role-name>Establishment-has-many-comments</ejb-relationship-role-name>
                        <multiplicity>One</multiplicity>
                        <relationship-role-source>
                             <ejb-name>EstablishmentEJB</ejb-name>
                        </relationship-role-source>
                        <cmr-field>
                             <cmr-field-name>visitorComments</cmr-field-name>
                             <cmr-field-type>java.util.Collection</cmr-field-type>
                        </cmr-field>
                   </ejb-relationship-role>
                   <ejb-relationship-role>
                        <ejb-relationship-role-name>Comment-belongs-to-Establishment</ejb-relationship-role-name>
                        <multiplicity>Many</multiplicity>
                        <relationship-role-source>
                             <ejb-name>VisitorCommentEJB</ejb-name>
                        </relationship-role-source>
                   </ejb-relationship-role>
              </ejb-relation>
              <!--===========Establishments-Grades================-->
              <ejb-relation>
                   <ejb-relation-name>Establishment-Grade</ejb-relation-name>
                   <ejb-relationship-role>
                        <ejb-relationship-role-name>Establishment-has-many-grades</ejb-relationship-role-name>
                        <multiplicity>One</multiplicity>
                        <relationship-role-source>
                             <ejb-name>EstablishmentEJB</ejb-name>
                        </relationship-role-source>
                        <cmr-field>
                             <cmr-field-name>grades</cmr-field-name>
                             <cmr-field-type>java.util.Collection</cmr-field-type>
                        </cmr-field>
                   </ejb-relationship-role>
                   <ejb-relationship-role>
                        <ejb-relationship-role-name>Grade-belongs-to-Establishment</ejb-relationship-role-name>
                        <multiplicity>Many</multiplicity>
                        <relationship-role-source>
                             <ejb-name>GradeEJB</ejb-name>
                        </relationship-role-source>
                   </ejb-relationship-role>
              </ejb-relation>
              <!--===========Establishments-Countries================-->
              <ejb-relation>
                   <ejb-relation-name>Country-Establishment</ejb-relation-name>
                   <ejb-relationship-role>
                        <ejb-relationship-role-name>Country-has-many-establishments</ejb-relationship-role-name>
                        <!--========== One or Many here?? ==========-->
                        <multiplicity>Many</multiplicity>
                        <relationship-role-source>
                             <ejb-name>CountryEJB</ejb-name>
                        </relationship-role-source>
                   </ejb-relationship-role>
                   <ejb-relationship-role>
                        <ejb-relationship-role-name>Establishment-has-many-countries</ejb-relationship-role-name>
                        <multiplicity>Many</multiplicity>
                        <relationship-role-source>
                             <ejb-name>EstablishmentEJB</ejb-name>
                        </relationship-role-source>
                        <cmr-field>
                             <cmr-field-name>countries</cmr-field-name>
                             <cmr-field-type>java.util.Collection</cmr-field-type>
                        </cmr-field>
                   </ejb-relationship-role>
              </ejb-relation>
              <!--===========Establishments-Categories ================-->
              <ejb-relation>
                   <ejb-relation-name>Establishment-Category</ejb-relation-name>
                   <ejb-relationship-role>
                        <ejb-relationship-role-name>Establishment-has-many-categories</ejb-relationship-role-name>
                        <multiplicity>Many</multiplicity>
                        <relationship-role-source>
                             <ejb-name>EstablishmentEJB</ejb-name>
                        </relationship-role-source>
                        <cmr-field>
                             <cmr-field-name>categories</cmr-field-name>
                             <cmr-field-type>java.util.Collection</cmr-field-type>
                        </cmr-field>
                   </ejb-relationship-role>
                   <ejb-relationship-role>
                        <ejb-relationship-role-name>Category-has-many-establishments</ejb-relationship-role-name>
                        <multiplicity>Many</multiplicity>
                        <relationship-role-source>
                             <ejb-name>CategoryEJB</ejb-name>
                        </relationship-role-source>
                   </ejb-relationship-role>
              </ejb-relation>
         </relationships>
    </ejb-jar>
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <jonas-ejb-jar xmlns="http://www.objectweb.org/jonas/ns"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="http://www.objectweb.org/jonas/ns
                http://www.objectweb.org/jonas/ns/jonas-ejb-jar_4_0.xsd" >
    <!--
    <!DOCTYPE jonas-ejb-jar PUBLIC "-//ObjectWeb//DTD JOnAS 3.2//EN" "http://www.objectweb.org/jonas/dtds/jonas-ejb-jar_3_2.dtd">
    <jonas-ejb-jar>
    -->
    <!-- ===============SearchEngineValueListHandler=======================-->
      <jonas-session>
        <ejb-name>PGSearchEngineValueListHandlerEJB</ejb-name>
        <jndi-name>PGSearchEngineValueListHandlerEJBHome</jndi-name>
        <jonas-resource>
          <res-ref-name>jdbc/test_guia</res-ref-name>
          <jndi-name>test_guia</jndi-name>
        </jonas-resource>
      </jonas-session>
      <!-- ===============SessionFacade=======================-->
      <jonas-session>
        <ejb-name>PGSessionFacadeEJB</ejb-name>
        <jndi-name>PGSessionFacadeEJBHome</jndi-name>
         <jonas-resource>
          <res-ref-name>jdbc/test_guia</res-ref-name>
          <jndi-name>test_guia</jndi-name>
        </jonas-resource>
      </jonas-session>
    <!-- ===============Establishment=======================-->
      <jonas-entity>
        <ejb-name>EstablishmentEJB</ejb-name>
        <jndi-name>PGEstablishmentHome</jndi-name>
             <cleanup>none</cleanup>
         <jdbc-mapping>
          <jndi-name>test_guia</jndi-name>
          <jdbc-table-name>ESTABLISHMENTS</jdbc-table-name>
          <cmp-field-jdbc-mapping>
         <field-name>id</field-name>
         <jdbc-field-name>DB_ESTABLISHMENT_ID</jdbc-field-name>
          </cmp-field-jdbc-mapping>
          <cmp-field-jdbc-mapping>
         <field-name>name</field-name>
    <jdbc-field-name>DB_ESTABLISHMENT_NAME</jdbc-field-name>
          </cmp-field-jdbc-mapping>
        </jdbc-mapping>
    </jonas-entity>
      <!-- ===============Grade=======================-->
        <jonas-entity>
        <ejb-name>GradeEJB</ejb-name>
        <jndi-name>PGgradeHome</jndi-name>
         <cleanup>none</cleanup>
         <jdbc-mapping>
          <jndi-name>test_guia</jndi-name>
          <jdbc-table-name>GRADES</jdbc-table-name>
          <cmp-field-jdbc-mapping>
         <field-name>id</field-name>
         <jdbc-field-name>DB_GRADE_ID</jdbc-field-name>
          </cmp-field-jdbc-mapping>
          <cmp-field-jdbc-mapping>
         <field-name>grade</field-name>
         <jdbc-field-name>DB_GRADE</jdbc-field-name>
          </cmp-field-jdbc-mapping>
        <!--
         <cmp-field-jdbc-mapping>
         <field-name>establishment_id</field-name>
         <jdbc-field-name>DB_ESTABLISHMENT_ID</jdbc-field-name>
        </cmp-field-jdbc-mapping>
         -->
        </jdbc-mapping>
      </jonas-entity>
      <!-- ===============Visitor�s comments=======================-->
        <jonas-entity>
        <ejb-name>VisitorCommentEJB</ejb-name>
        <jndi-name>PGVisitorCommentHome</jndi-name>
         <cleanup>none</cleanup>
         <jdbc-mapping>
          <jndi-name>test_guia</jndi-name>
          <jdbc-table-name>VISITORS_COMMENTS</jdbc-table-name>
          <cmp-field-jdbc-mapping>
         <field-name>id</field-name>
         <jdbc-field-name>DB_VISITOR_COMMENT_ID</jdbc-field-name>
          </cmp-field-jdbc-mapping>
          <cmp-field-jdbc-mapping>
         <field-name>comment</field-name>
         <jdbc-field-name>DB_COMMENT</jdbc-field-name>
          </cmp-field-jdbc-mapping>
            <!--
           <cmp-field-jdbc-mapping>
         <field-name>establishment_id</field-name>
         <jdbc-field-name>DB_ESTABLISHMENT_ID</jdbc-field-name>
          </cmp-field-jdbc-mapping>
         -->
        </jdbc-mapping>
      </jonas-entity>
        <!-- ===============Countries=======================-->
        <jonas-entity>
        <ejb-name>CountryEJB</ejb-name>
        <jndi-name>PGcountryHome</jndi-name>
              <cleanup>none</cleanup>
        <jdbc-mapping>
          <jndi-name>test_guia</jndi-name>
          <jdbc-table-name>COUNTRIES</jdbc-table-name>
          <cmp-field-jdbc-mapping>
         <field-name>id</field-name>
         <jdbc-field-name>DB_COUNTRY_ID</jdbc-field-name>
          </cmp-field-jdbc-mapping>
          <cmp-field-jdbc-mapping>
         <field-name>countryName</field-name>
         <jdbc-field-name>DB_COUNTRY_NAME_FR</jdbc-field-name>
          </cmp-field-jdbc-mapping>
        </jdbc-mapping>
      </jonas-entity>
      <!-- ===============Categories=======================-->
        <jonas-entity>
        <ejb-name>CategoryEJB</ejb-name>
        <jndi-name>PGcategoryHome</jndi-name>
        <cleanup>none</cleanup>
         <jdbc-mapping>
          <jndi-name>test_guia</jndi-name>
          <jdbc-table-name>CATEGORIES</jdbc-table-name>
          <cmp-field-jdbc-mapping>
         <field-name>id</field-name>
         <jdbc-field-name>DB_CATEGORY_ID</jdbc-field-name>
          </cmp-field-jdbc-mapping>
          <cmp-field-jdbc-mapping>
         <field-name>category</field-name>
         <jdbc-field-name>DB_CATEGORY_NAME_FR</jdbc-field-name>
          </cmp-field-jdbc-mapping>
        </jdbc-mapping>
      </jonas-entity>
      <!--===========Establishments-VisitorComments================-->
      <jonas-ejb-relation>
          <ejb-relation-name>Establishment-VisitorComment</ejb-relation-name>
          <jonas-ejb-relationship-role>
            <ejb-relationship-role-name>Comment-belongs-to-Establishment</ejb-relationship-role-name>
            <foreign-key-jdbc-mapping>
              <foreign-key-jdbc-name>DB_ESTABLISHMENT_ID</foreign-key-jdbc-name>
            </foreign-key-jdbc-mapping>
          </jonas-ejb-relationship-role>
        </jonas-ejb-relation>
         <!--===========Establishments-Grades================-->
           <jonas-ejb-relation>
          <ejb-relation-name>Establishment-Grade</ejb-relation-name>
          <jonas-ejb-relationship-role>
            <ejb-relationship-role-name>Grade-belongs-to-Establishment</ejb-relationship-role-name>
            <foreign-key-jdbc-mapping>
              <foreign-key-jdbc-name>DB_ESTABLISHMENT_ID</foreign-key-jdbc-name>
            </foreign-key-jdbc-mapping>
          </jonas-ejb-relationship-role>
        </jonas-ejb-relation>
         <!--===========Establishments-Countries================-->
          <jonas-ejb-relation>
          <ejb-relation-name>Country-Establishment</ejb-relation-name>
          <jdbc-table-name>COUNTRIES_ESTABLISHMENTS</jdbc-table-name>
          <jonas-ejb-relationship-role>
            <ejb-relationship-role-name>Country-has-many-establishments</ejb-relationship-role-name>
            <foreign-key-jdbc-mapping>
              <foreign-key-jdbc-name>DB_ESTABLISHMENT_ID</foreign-key-jdbc-name>
            </foreign-key-jdbc-mapping>
          </jonas-ejb-relationship-role>
          <jonas-ejb-relationship-role>
            <ejb-relationship-role-name>Establishment-has-many-countries</ejb-relationship-role-name>
            <foreign-key-jdbc-mapping>
              <foreign-key-jdbc-name>DB_COUNTRY_ID</foreign-key-jdbc-name>
            </foreign-key-jdbc-mapping>
          </jonas-ejb-relationship-role>
        </jonas-ejb-relation>
         <!--===========Establishments-Categories ================-->
          <jonas-ejb-relation>
          <ejb-relation-name>Establishment-Category</ejb-relation-name>
          <jdbc-table-name>ESTABLISHMENTS_CATEGORIES</jdbc-table-name>
          <jonas-ejb-relationship-role>
            <ejb-relationship-role-name>Establishment-has-many-categories</ejb-relationship-role-name>
            <foreign-key-jdbc-mapping>
              <foreign-key-jdbc-name>DB_CATEGORY_ID</foreign-key-jdbc-name>
            </foreign-key-jdbc-mapping>
          </jonas-ejb-relationship-role>
          <jonas-ejb-relationship-role>
            <ejb-relationship-role-name>Category-has-many-establishments</ejb-relationship-role-name>
            <foreign-key-jdbc-mapping>
              <foreign-key-jdbc-name>DB_ESTABLISHMENT_ID</foreign-key-jdbc-name>
            </foreign-key-jdbc-mapping>
          </jonas-ejb-relationship-role>
        </jonas-ejb-relation>
    </jonas-ejb-jar>Here are the two classes for the beans
    package com.softwareag.test_guide.establishmentEJB;
    import java.util.Collection;
    import java.util.Iterator;
    import javax.ejb.CreateException;
    import javax.ejb.EntityBean;
    import javax.ejb.EntityContext;
    import javax.ejb.RemoveException;
    import com.softwareag.test_guide.ejb.util.PGServiceLocator;
    import com.softwareag.test_guide.ejb.util.PGServiceLocatorException;
    import com.softwareag.test_guide.gradeEJB.PGGradeLocal;
    import com.softwareag.test_guide.visitorCommentEJB.PGVisitorCommentLocal;
    import com.softwareag.test_guide.visitorCommentEJB.PGVisitorCommentLocalHome;
    * @author Julien Martin
    public abstract class PGEstablishmentBean implements EntityBean {
         public Integer ejbCreate(
              Integer id,
              String name,
              Collection visitorComments,
              Collection grades,
              Collection countries,
              Collection categories)
              throws CreateException {
              setId(id);
              setName(name);
              setVisitorComments(visitorComments);
              setGrades(grades);
              return null;
         public void ejbPostCreate(
              Integer id,
              String name,
              Collection visitorComments,
              Collection grades,
              Collection countries,
              Collection categories) {
              setCountries(countries);
              setCategories(categories);
         //Business methods
         public int getAverageGrade() {
              Collection grades = this.getGrades();
              if (grades.size() == 0) {
                   return 0;
              } else {
                   Iterator iterator = grades.iterator();
                   int total = 0;
                   while (iterator.hasNext()) {
                        PGGradeLocal pGGradeLocal = (PGGradeLocal) iterator.next();
                        Integer amount = pGGradeLocal.getGrade();
                        total = total + amount.intValue();
                   float average = total / grades.size();
                   int roundedAverage = Math.round(average);
                   return roundedAverage;
         public void addComment(Integer id, String comment) {
              try {
                   PGVisitorCommentLocalHome pGcommentHome =
                        (PGVisitorCommentLocalHome) PGServiceLocator.getInstance().getLocalHome("PGVisitorCommentHome_L");
                   PGVisitorCommentLocal pGcomment = pGcommentHome.create(id, comment);
                   Collection pGcomments = this.getVisitorComments();
                   pGcomments.add(pGcomment);
              } catch (PGServiceLocatorException e) {
                   e.printStackTrace();
              } catch (CreateException e) {
                   e.printStackTrace();
         //Persistence fields
         public abstract Integer getId();
         public abstract void setId(Integer id);
         public abstract String getName();
         public abstract void setName(String name);
         //Relation fields
         public abstract Collection getVisitorComments();
         public abstract void setVisitorComments(Collection visitorComments);
         public abstract Collection getGrades();
         public abstract void setGrades(Collection grades);
         public abstract Collection getCountries();
         public abstract void setCountries(Collection countries);
         public abstract Collection getCategories();
         public abstract void setCategories(Collection categories);
         //Callback methods
         public void setEntityContext(EntityContext ec) {
         public void unsetEntityContext() {
         public void ejbLoad() {
         public void ejbStore() {
         public void ejbActivate() {
         public void ejbPassivate() {
         public void ejbRemove() throws RemoveException {
    package com.softwareag.test_guide.visitorCommentEJB;
    import javax.ejb.CreateException;
    import javax.ejb.EntityBean;
    import javax.ejb.EntityContext;
    import javax.ejb.RemoveException;
    * @author Julien Martin
    public abstract class PGVisitorCommentBean implements EntityBean {
         public Integer ejbCreate(Integer id, String comment)throws CreateException {
              setId(id);
              setComment(comment);
              return null;
         public void ejbPostCreate(Integer id, String comment) {}
         //Persistence fields
         public abstract Integer getId();
         public abstract void setId(Integer id);
         public abstract String getComment();
         public abstract void setComment(String comment);
    //     public abstract Integer getEstablishment_id();
    //     public abstract void setEstablishment_id(Integer establishment_id);
         //Callback methods
         public void setEntityContext(EntityContext ec) {}
         public void unsetEntityContext() {}
         public void ejbLoad() {}
         public void ejbStore() {}
         public void ejbActivate() {}
         public void ejbPassivate() {}
         public void ejbRemove() throws RemoveException  {}
    }I get the following error from MYSQL:
    22:57:10,203 : JOnASVisitorCommentEJBBean.ejbPostCreate : Failed to create bean:
    java.sql.SQLException: General error,  message from server: "Column 'DB_ESTABLISHMENT_ID' cannot be null"
            at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1626)
            at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:886)
            at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:945)
            at com.mysql.jdbc.Connection.execSQL(Connection.java:1844)
            at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1602)
            at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1488)
            at jorm.rdb.mysql.VisitorsCommentBinding.insertVISITORS_COMMENTSTable(VisitorsCommentBinding.java:558)
            at jorm.rdb.mysql.VisitorsCommentBinding.write(VisitorsCommentBinding.java:147)
            at com.softwareag.test_guide.visitorCommentEJB.JOnASVisitorCommentEJBBean.ejbPostCreate(JOnASVisitorCommentEJBBean.java:283)
            at com.softwareag.test_guide.visitorCommentEJB.JOnASVisitorCommentEJBLocalHome.create(JOnASVisitorCommentEJBLocalHome.java:76)
            at com.softwareag.test_guide.establishmentEJB.PGEstablishmentBean.addComment(PGEstablishmentBean.java:71)
            at com.softwareag.test_guide.establishmentEJB.JOnASEstablishmentEJBLocal.addComment(JOnASEstablishmentEJBLocal.java:170)
            at com.softwareag.test_guide.sessionFacadeEJB.PGSessionFacadeBean.addComment(PGSessionFacadeBean.java:80)
            at com.softwareag.test_guide.sessionFacadeEJB.JOnASPGSessionFacadeEJBLocal.addComment(JOnASPGSessionFacadeEJBLocal.java:168)
            at com.softwareag.test_guide.web.temp.PGBusinessDelegate.addComment(PGBusinessDelegate.java:93)
            at com.softwareag.test_guide.web.temp.PGCommentsManagedBean.addCommentAction(PGCommentsManagedBean.java:13)
            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 com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
            at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
            at javax.faces.component.UICommand.broadcast(UICommand.java:312)
            at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
            at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
            at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
            at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
            at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
            at sun.reflect.GeneratedMethodAccessor208.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:241)
            at java.security.AccessController.doPrivileged(Native Method)
            at javax.security.auth.Subject.doAsPrivileged(Subject.java:499)
            at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:263)
            at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:157)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
            at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50)
            at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:140)
            at java.security.AccessController.doPrivileged(Native Method)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:136)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
            at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:702)
            at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571)
            at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:644)
            at java.lang.Thread.run(Thread.java:536)
    22:57:10,203 : JFactory.postInvoke : system exception in business method:
    javax.ejb.EJBException: Failed to create bean: General error,  message from server: "Column 'DB_ESTABLISHMENT_ID' cannot be null"
            at com.softwareag.test_guide.visitorCommentEJB.JOnASVisitorCommentEJBBean.ejbPostCreate(JOnASVisitorCommentEJBBean.java:288)
            at com.softwareag.test_guide.visitorCommentEJB.JOnASVisitorCommentEJBLocalHome.create(JOnASVisitorCommentEJBLocalHome.java:76)
            at com.softwareag.test_guide.establishmentEJB.PGEstablishmentBean.addComment(PGEstablishmentBean.java:71)
            at com.softwareag.test_guide.establishmentEJB.JOnASEstablishmentEJBLocal.addComment(JOnASEstablishmentEJBLocal.java:170)
            at com.softwareag.test_guide.sessionFacadeEJB.PGSessionFacadeBean.addComment(PGSessionFacadeBean.java:80)
            at com.softwareag.test_guide.sessionFacadeEJB.JOnASPGSessionFacadeEJBLocal.addComment(JOnASPGSessionFacadeEJBLocal.java:168)
            at com.softwareag.test_guide.web.temp.PGBusinessDelegate.addComment(PGBusinessDelegate.java:93)
            at com.softwareag.test_guide.web.temp.PGCommentsManagedBean.addCommentAction(PGComments                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              

    Thanks all for replying,
    The error occurs when I run the client and not at deploy time. Here is the client code:
         public void addComment(Integer primaryKey, String comment) {
              System.out.println("primaryKey------>" + primaryKey);
              try {
                   PGEstablishmentLocalHome establishmentHome = (PGEstablishmentLocalHome) PGServiceLocator.getInstance().getLocalHome("PGEstablishmentHome_L");
                   PGEstablishmentLocal establishmentLocal = establishmentHome.findByPrimaryKey(primaryKey);
                   establishmentLocal.addComment(primaryKey,comment);
              } catch (PGServiceLocatorException e) {
                   e.printStackTrace();
              } catch (FinderException e) {
                   e.printStackTrace();
    u haven't defined the PK entry in the Establishment EJB Bean in DDYes look in the standard DD.
    What's more I need both DD as I would with most ejb containers.
    The field DB_ESTABLISHMENT_ID is required and I cannot set it to NULL.
    Any other help greatly appreciated.
    Julien Martin.

  • Finder method to retrieve CMR field?

    Hello all!
    I have two entity EJBs - one named "Property" and another named "Merchandise".
    Property has a one-to-many relationship to Merchandise, and Merchandise is a CMR
    field (named "merchandise") in Property. Now I would like to write a finder method
    for Property to retrieve the CMR field (Merchandise references). The finder method
    is called "findDVD()". The ejb-ql is below:
    SELECT DISTINCT OBJECT(merch) FROM Property AS p, IN(p.merchandise) AS merch
    WHERE merch.starsMasterTitleId = ?1
    AND merch.productTypeCode = 'VIDEO'
    AND merch.format = 'DVD'
    AND merch.active = 'Y'
    AND merch.approved = 'Y'
    AND merch.purchaseable = 'Y'
    However, I can't seem to get this method to work. Weblogic's EJBC keeps complaining
    that the returned collection MUST be of the method owner type - in other words,
    I can't return Merchandise references, only Property references.
    What am I doing wrong? Is this a limitation in CMR that I didn't know about? Please
    help!
    I am using WLS 6.1 with SP 1.
    Thanks so much!
    -B

    If you are using ejb2.0 you can do this using a home method and select
    method instead of a finder. Finders are limited to returning objects of the
    type of ejb they belong to while select methods are not. Select methods
    cannot be invoked directly by the clients so you need a home method to wrap
    them.
    -- Anand
    "Brian Wang" <[email protected]> wrote in message
    news:3ca3678d$[email protected]..
    >
    >
    Hello all!
    I have two entity EJBs - one named "Property" and another named"Merchandise".
    Property has a one-to-many relationship to Merchandise, and Merchandise isa CMR
    field (named "merchandise") in Property. Now I would like to write afinder method
    for Property to retrieve the CMR field (Merchandise references). Thefinder method
    is called "findDVD()". The ejb-ql is below:
    SELECT DISTINCT OBJECT(merch) FROM Property AS p, IN(p.merchandise) ASmerch
    WHERE merch.starsMasterTitleId = ?1
    AND merch.productTypeCode = 'VIDEO'
    AND merch.format = 'DVD'
    AND merch.active = 'Y'
    AND merch.approved = 'Y'
    AND merch.purchaseable = 'Y'
    However, I can't seem to get this method to work. Weblogic's EJBC keepscomplaining
    that the returned collection MUST be of the method owner type - in otherwords,
    I can't return Merchandise references, only Property references.
    What am I doing wrong? Is this a limitation in CMR that I didn't knowabout? Please
    help!
    I am using WLS 6.1 with SP 1.
    Thanks so much!
    -B

  • Javax.ejb.EJBException: Attempt to access a collection valued cmr-field

    I have 2 local CMP project and defect
    i have a method getDefectList in ProjectBean. This method returns a collection of defect object.The relationship of Defect and Project is defined in ejb-jar where project can contain many defects.
    when i try to access this method in a session bean it gives me the error
    "javax.ejb.EJBException: Attempt to access a collection valued cmr-field outside the scope of a transaction."
    Please let me know the solution.

    After further research, it looks like CMR fields can only use three options for the trans-attribute: Mandatory, Required, or RequiresNew
    <container-transaction>
    <description>Transaction attributes</description>
    <method>
    <ejb-name>strong.customer</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Mandatory</trans-attribute>
    </container-transaction>
    thus I believe that you will have to begin a transaction before executing your method.

  • IllegalStateException for cmr-fields due to diff txns

    Hi,
    I am using cmp entity beans on WebLogic Server 7. Assume bean 'A' to bean 'B' is
    1:M
    I get the following exception while trying to create bean B -
    <Exception in MyClass.createB(): javax.ejb.EJBException: EJB Exception:: java.lang.IllegalStateException:
    Attempted to access the collection valued cmr-field, 'b', for bean, 'A', in a transaction
    that is different than the transaction in which the collection was materialized.
    All access to the collection must be performed during the transaction in which the
    collection was initially retrieved.
    I upgraded from 6.1 sp2 to 7 and got this exception. I never got it in wls 6.1 sp2.
    Since my beans are cmp, the container handles all transactions and I have specified
    <trans-attribute>Required</trans-attribute> in ejb-jar.xml.
    How can I ensure that the container uses the same txn for accessing all cmr fields?
    I will appreciate if anyone can point me in the right direction.
    Thanks!

    I figured out the problem. The caller that calls methods on the entity bean interfaces
    has to wrap the calls inside a transaction.
    "Roy Lu" <[email protected]> wrote:
    >
    I am getting the exact same exception. Is this a bug or am I missing
    something?
    Thanks.
    "A D" <[email protected]> wrote:
    Hi,
    I am using cmp entity beans on WebLogic Server 7. Assume bean 'A' to
    bean 'B' is
    1:M
    I get the following exception while trying to create bean B -
    <Exception in MyClass.createB(): javax.ejb.EJBException: EJB Exception::
    java.lang.IllegalStateException:
    Attempted to access the collection valued cmr-field, 'b', for bean,'A',
    in a transaction
    that is different than the transaction in which the collection was materialized.
    All access to the collection must be performed during the transaction
    in which the
    collection was initially retrieved.
    I upgraded from 6.1 sp2 to 7 and got this exception. I never got itin
    wls 6.1 sp2.
    Since my beans are cmp, the container handles all transactions and I
    have specified
    <trans-attribute>Required</trans-attribute> in ejb-jar.xml.
    How can I ensure that the container uses the same txn for accessingall
    cmr fields?
    I will appreciate if anyone can point me in the right direction.
    Thanks!

  • OC4J 9.0.4 / EJB-QL / cmr-field

    Hi,
    I'm using the OC4J 9.0.4 developer preview and am trying to construct some EJB-QL of the following form:
    select object(A) from MANYTABLE A, IN (A.cmr_field_to_ONETABLE) AS B
    where A.field = ?1 and B.pk_field = ?2
    where ONETABLE has a 1:m bidirectional relationship with MANYTABLE. The cmr-field entry for cmr_field_to_ONETABLE is present in the ejb-jar.xml.
    In the underlying database tables, the cmr_field_to_ONETABLE in A is a foreign key to pk_field of B.
    When I attempt to deploy the application, OC4J screams about an "Error translating EJBQL" saying that:
    Was expecting one of:
    "AbstractSchemaName" ...
    "IN" "(" "IdentificationVar" "." "SingleValuedCmrField" "." ...
    "IN" "(" "IdentificationVar" "." "CollectionValuedCmrField" ...
    This doesn't make sense to me. As far as I can see, the EJB-QL is correct.
    Suggestions?
    regards
    George

    Hi,
    I'm using the OC4J 9.0.4 developer preview and am trying to construct some EJB-QL of the following form:
    select object(A) from MANYTABLE A, IN (A.cmr_field_to_ONETABLE) AS B
    where A.field = ?1 and B.pk_field = ?2
    where ONETABLE has a 1:m bidirectional relationship with MANYTABLE. The cmr-field entry for cmr_field_to_ONETABLE is present in the ejb-jar.xml.
    In the underlying database tables, the cmr_field_to_ONETABLE in A is a foreign key to pk_field of B.
    When I attempt to deploy the application, OC4J screams about an "Error translating EJBQL" saying that:
    Was expecting one of:
    "AbstractSchemaName" ...
    "IN" "(" "IdentificationVar" "." "SingleValuedCmrField" "." ...
    "IN" "(" "IdentificationVar" "." "CollectionValuedCmrField" ...
    This doesn't make sense to me. As far as I can see, the EJB-QL is correct.
    Suggestions?
    regards
    George

  • Probloem with cmr field

    Hi friends i am doing one small project using weblogic,ejb and mysql
    When i try to retirive values from the table using CMR i am getting the error of
    bolderrorAttempt to serialize a collection that implements a cmr-field. Collections managed by the CMP RDBMS persistence manager may not be passed directly to a remote client.*bold*
    My EJBQL is
    bold
    **@ejb.finder
    * query="SELECT OBJECT(a) FROM NeworderSCHEMA as a WHERE a.po_no = ?1"
    * signature="java.util.Collection findByPo_noCMR(java.lang.String po_no)" bold
    My Session Bean who is calling this is NeworderBean
    bold
    public java.util.Collection getAllPendingOrdersnew()
                   throws javax.naming.NamingException, javax.ejb.FinderException {
              java.util.Collection pendorders = new java.util.ArrayList(); //to return all pending orders to web-client
              java.util.ArrayList pendorder = null; //to put one pending order attributes to collection of pendorders
              NeworderLocalHome home = NeworderUtil.getLocalHome();
              NeworderLocal localObject = null;
              java.util.Collection c = home.findByPo_noCMR("91");
              //loop to take one pendingorderLocal at a time and populate pedningorders collection
              for(java.util.Iterator i = c.iterator(); i.hasNext(); ){
                   //populating the arraylist with customer attributes
                   localObject = (NeworderLocal) i.next();
                   pendorder = new java.util.ArrayList();
                   pendorder.add(localObject.getPrimaryKey()); //index 0 -- stores the po_no
                   pendorder.add(localObject.getPo_date()); //index 1 -- stores the po_date
                   pendorder.add(localObject.getPo_status());//index 2 -- stores the po_status
                   pendorder.add(localObject.getPo_suppcode()); //index 3 -- stores the supplier code
                   pendorder.add(localObject.getUserid());//index 4 -- stores the user id
                   pendorder.add(localObject.getTimestamp());//index 5 -- stores the created date
                   pendorder.add(localObject.getItems());//for order detail table
                   //one customer data is filled. so, add this to customers arraylist
                   pendorders.add(pendorder);
              //return the collection of all customers
              return pendorders;
         }*bold*
    Please help me

    When i give with out @ejb-interface i am getting error of
    Exception:weblogic.management.ApplicationException: Prepare failed. Task Id = 29
         Module: New_OrderEJB.jar     Error: [EJB:011024]The XML parser encountered an error in your deployment descriptor. Please ensure that your deployment descriptor corresponds to the format in the DTD. The error was:
    Error parsing file 'META-INF/ejb-jar.xml' at line: 247 column: 26. XML document structures must start and end within the same entity..
    ejb-jar.xml file content is
    <?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 id="ejb-jar_1">
    <description><![CDATA[New_OrderEJB generated by eclipse wtp xdoclet extension.]]></description>
    <display-name>New_OrderEJB</display-name>
    <enterprise-beans>
    <!-- Session Beans -->
    <session id="Session_Head">
    <description><![CDATA[An EJB named Head]]></description>
    <display-name>Head</display-name>
    <ejb-name>Head</ejb-name>
    <home>order.headsess.HeadHome</home>
    <remote>order.headsess.Head</remote>
    <local-home>order.headsess.HeadLocalHome</local-home>
    <local>order.headsess.HeadLocal</local>
    <ejb-class>order.headsess.HeadSession</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    <!--
    To add session beans that you have deployment descriptor info for, add
    a file to your XDoclet merge directory called session-beans.xml that contains
    the <session></session> markup for those beans.
    -->
    <!-- Entity Beans -->
    <entity id="ContainerManagedEntity_Neworder">
    <description><![CDATA[<!-- begin-xdoclet-definition -->]]></description>
    <ejb-name>Neworder</ejb-name>
    <home>order.headentity.NeworderHome</home>
    <remote>order.headentity.Neworder</remote>
    <local-home>order.headentity.NeworderLocalHome</local-home>
    <local>order.headentity.NeworderLocal</local>
    <ejb-class>order.headentity.NeworderCMP</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.String</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>NeworderSCHEMA</abstract-schema-name>
    <cmp-field id="CMPAttribute_1">
    <description><![CDATA[<!-- begin-user-doc --> CMP Field po_no Returns the po_no]]></description>
    <field-name>po_no</field-name>
    </cmp-field>
    <cmp-field id="CMPAttribute_2">
    <description><![CDATA[<!-- begin-user-doc --> CMP Field po_date Returns the po_date]]></description>
    <field-name>po_date</field-name>
    </cmp-field>
    <cmp-field id="CMPAttribute_3">
    <description><![CDATA[<!-- begin-user-doc --> CMP Field po_suppcode Returns the po_suppcode]]></description>
    <field-name>po_suppcode</field-name>
    </cmp-field>
    <cmp-field id="CMPAttribute_4">
    <description><![CDATA[<!-- begin-user-doc --> CMP Field po_reference_no Returns the po_reference_no]]></description>
    <field-name>po_reference_no</field-name>
    </cmp-field>
    <cmp-field id="CMPAttribute_5">
    <description><![CDATA[<!-- begin-user-doc --> CMP Field userid Returns the userid]]></description>
    <field-name>userid</field-name>
    </cmp-field>
    <cmp-field id="CMPAttribute_6">
    <description><![CDATA[<!-- begin-user-doc --> CMP Field timestamp Returns the timestamp]]></description>
    <field-name>timestamp</field-name>
    </cmp-field>
    <cmp-field id="CMPAttribute_7">
    <description><![CDATA[<!-- begin-user-doc --> CMP Field approved_by Returns the approved_by]]></description>
    <field-name>approved_by</field-name>
    </cmp-field>
    <cmp-field id="CMPAttribute_8">
    <description><![CDATA[<!-- begin-user-doc --> CMP Field po_status Returns the po_status]]></description>
    <field-name>po_status</field-name>
    </cmp-field>
    <primkey-field>po_no</primkey-field>
    <query>
    <query-method>
    <method-name>findAll</method-name>
    <method-params>
    </method-params>
    </query-method>
    <ejb-ql><![CDATA[SELECT OBJECT(a) FROM NeworderSCHEMA as a]]></ejb-ql>
    </query>
    <query>
    <query-method>
    <method-name>findByStatus</method-name>
    <method-params>
    <method-param>java.lang.String</method-param>
    </method-params>
    </query-method>
    <ejb-ql><![CDATA[SELECT OBJECT(a) FROM NeworderSCHEMA as a WHERE a.po_status = ?1]]></ejb-ql>
    </query>
    <query>
    <query-method>
    <method-name>findByPo_no</method-name>
    <method-params>
    <method-param>java.lang.String</method-param>
    </method-params>
    </query-method>
    <ejb-ql><![CDATA[SELECT OBJECT(a) FROM NeworderSCHEMA as a WHERE a.po_no = ?1]]></ejb-ql>
    </query>
    <query>
    <query-method>
    <method-name>findByPo_noCMR</method-name>
    <method-params>
    <method-param>java.lang.String</method-param>
    </method-params>
    </query-method>
    <ejb-ql><![CDATA[SELECT OBJECT(a) FROM NeworderSCHEMA as a WHERE a.po_no = ?1]]></ejb-ql>
    </query>
         <!-- Write a file named ejb-finders-NeworderBean.xml if you want to define extra finders. -->
    </entity>
    <entity id="ContainerManagedEntity_OrderDetail">
    <description><![CDATA[<!-- begin-xdoclet-definition -->]]></description>
    <ejb-name>OrderDetail</ejb-name>
    <home>order.detailentity.OrderDetailHome</home>
    <remote>order.detailentity.OrderDetail</remote>
    <local-home>order.detailentity.OrderDetailLocalHome</local-home>
    <local>order.detailentity.OrderDetailLocal</local>
    <ejb-class>order.detailentity.OrderDetailCMP</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Integer</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>OrderDetailSCHEMA</abstract-schema-name>
    <cmp-field id="CMPAttribute_9">
    <description><![CDATA[<!-- begin-user-doc --> CMP Field serial_no Returns the serial_no]]></description>
    <field-name>serial_no</field-name>
    </cmp-field>
    <cmp-field id="CMPAttribute_10">
    <description><![CDATA[<!-- begin-user-doc --> CMP Field po_no Returns the po_no]]></description>
    <field-name>po_no</field-name>
    </cmp-field>
    <cmp-field id="CMPAttribute_11">
    <description><![CDATA[<!-- begin-user-doc --> CMP Field model_code Returns the model_code]]></description>
    <field-name>model_code</field-name>
    </cmp-field>
    <cmp-field id="CMPAttribute_12">
    <description><![CDATA[<!-- begin-user-doc --> CMP Field color_code Returns the color_code]]></description>
    <field-name>color_code</field-name>
    </cmp-field>
    <cmp-field id="CMPAttribute_13">
    <description><![CDATA[<!-- begin-user-doc --> CMP Field order_qty Returns the order_qty]]></description>
    <field-name>order_qty</field-name>
    </cmp-field>
    <cmp-field id="CMPAttribute_14">
    <description><![CDATA[<!-- begin-user-doc --> CMP Field prod_yr Returns the prod_yr]]></description>
    <field-name>prod_yr</field-name>
    </cmp-field>
    <cmp-field id="CMPAttribute_15">
    <description><![CDATA[<!-- begin-user-doc --> CMP Field prod_mth Returns the prod_mth]]></description>
    <field-name>prod_mth</field-name>
    </cmp-field>
    <cmp-field id="CMPAttribute_16">
    <description><![CDATA[<!-- begin-user-doc --> CMP Field recd_qty Returns the recd_qty]]></description>
    <field-name>recd_qty</field-name>
    </cmp-field>
    <primkey-field>serial_no</primkey-field>
    <query>
    <query-method>
    <method-name>findAll</method-name>
    <method-params>
    </method-params>
    </query-method>
    <ejb-ql><![CDATA[SELECT OBJECT(a) FROM OrderDetailSCHEMA as a]]></ejb-ql>
    </query>
         <!-- Write a file named ejb-finders-OrderDetailBean.xml if you want to define extra finders. -->
    </entity>
    <!--
    To add entity beans that you have deployment descriptor info for, add
    a file to your XDoclet merge directory called entity-beans.xml that contains
    the <entity></entity> markup for those beans.
    -->
    <!-- Message Driven Beans -->
    <!--
    To add message driven beans that you have deployment descriptor info for, add
    a file to your XDoclet merge directory called message-driven-beans.xml that contains
    the <message-driven></message-driven> markup for those beans.
    -->
    </enterprise-beans>
    <!-- Relationships -->
    <relationships id="Relationships_1">
    <ejb-relation id="EJBRelation_1">
    <ejb-relation-name>Neworder</ejb-relation-name>
    <ejb-relationship-role id="EJBRelationshipRole_1">
    <ejb-relationship-role-name>Order-contains-Items</ejb-relationship-role-name>
    <multiplicity>One</multiplicity>
    <relationship-role-source id="RoleSource_1">
    <ejb-name>Neworder</ejb-name>
    </relationship-role-source>
    <cmr-field id="CMRField_1">
    <cmr-field-name>items</cmr-field-name>
    <cmr-field-type>java.util.Collection</cmr-field-type>
    </cmr-field>
    </ejb-relationship-role>
    <ejb-relationship-role id="EJBRelationshipRole_2">
    <ejb-relationship-role-name>item-contained-in-order</ejb-relationship-role-name>
    <multiplicity>Many</multiplicity>
    <cascade-delete/>
    <relationship-role-source id="RoleSource_2">
    <ejb-name>OrderDetail</ejb-name>
    </relationship-role-source>
    </ejb-relationship-role>
    </ejb-relation>
    <ejb-relation id="EJBRelation_2">
    <ejb-relation-name>Order-Items</ejb-relation-name>
    <ejb-relationship-role id="EJBRelationshipRole_3">
    <ejb-relationship-role-name>Order-has-Items</ejb-relationship-role-name>
    <multiplicity>One</multiplicity>
    <relationship-role-source id="RoleSource_3">
    <ejb-name>Neworder</ejb-name>
    </relationship-role-source>
    <cmr-field id="CMRField_2">
    <cmr-field-name>itemValue</cmr-field-name>
    <cmr-field-type>java.util.Collection</cmr-field-type>
    </cmr-field>
    </ejb-relationship-role>
    <ejb-relationship-role id="EJBRelationshipRole_4">
    <multiplicity>Many</multiplicity>
    <relationship-role-source id="RoleSource_4">
    <ejb-name>
    once again thank you

  • EJB QL with cmr field sintax error

    Hello I have some EJBs related to some tables .
    In particular I have 2 EJB with follow schema and relathionship:
    EJB_T (n)<----------------------->(1) EJB_C
    So I have the CMR field in EJB_C named transactions
    THE query
    SELECT OBJECT(trans) FROM EJB_C_NAME AS c, IN (c.transactions) AS trans WHERE c.id = ?2 AND trans.data >= ?1
    It seems all ok but embeded OC4J (1.3.1) don't deploy application and throw an Exception related to QUERY PARSING .
    can anyone help me ? please.
    thanks in advance

    OC4J used is 10g

  • DSO - What key fields and data fields in dso

    Hi experts,
    I need to create a dso in between the cube and 2 data sources(2lis_11_vaitm, 2lis_12_vcscl) to stage the data. My question is: what key fields and data fields to choose for the dso? is there a standard dso to copy? please explain in detail the model to set up, whether to connect both the ds's to dso and then to cube or one ds to dso and the other to the cube. more details will help.

    Check this for standard DSO:
    http://help.sap.com/saphelp_nw04/helpdata/en/43/fcdc387f34384f94c3227baf3837a8/content.htm
    Thanks...
    Shambhu

  • While inserting numeric data into a character datatype field and vice versa

    Sir,
        I have a very basic qiestion.Why am i not getting any error while inserting to say employees table a character type data to a numeric type field and vice versa?Iam using Oracle Database 10g Enterprise edition.

    Why am i not getting any error while inserting to say employees table a character type data to a numeric type field and vice versa?
    Oracle tries an automatic conversion, when possible. Post an example of a character type data inserted into a numeric column.

  • How to add extension fields and mashups to partner solution?

    To add extension fields and mashups I have log on to the system using a user with adaptation rights.
    There's no possibility to do that from within the UI designer, right?
    Now, if I adapt the screens with extension fields or by creating and adding mashups, how do I add these enhancements to my partner solution?
    Or in other words, how do I ship extension fields and mashups with my partner solution?

    Before you use the key user tools, you must "enable key user tools" in copernicus by right click on the solution. Now the changes will be added to the partner soltution transport order.
    But you can add extension field in copernicus as well by adding new item "business object extension" to the partner solution.

  • Key fields and data fields in a DSO  ??

    i have a question regarding key fields and data fields in a Standard DSO...
    i am using 2 datasources to build a open sales report 2LIS_11_VASTH  and  2LIS_11_VASTI   i am pulling in data from these 2 data sources to a DSO and i am wondering what infoobjects should be in the key fields and data fields .....does this reflect back to table VBUK and VBUP tables and does the key field in the DSO have to be the key fields in VBUK and VBUP tables  ????  or what really should be included as key fields and data fields   ????  
    please help....

    If you look at the various SD tables, VBELN and POSNR are commonly used as the document number and document line item.
    For VBAP and VBUP, it's referring to the Sales Order Line Item with the columns VBELN and POSNR as the key for both tables. However, if you look at the LIPS table, which is the Delivery Line Item table, it too has VBELN and POSNR as the key. Likewise, the VTTP table, which is the Shipment Line Item table, also has VBELN and POSNR as the key.
    While using RSOSFIELDMAP as a map is a fairly good "rule of thumb", it still needs to be used with a level of skepticism.

Maybe you are looking for

  • Adobe acrobat 9.0 testversion

    hi ich habe mir vor kurzen versucht die Testversion von adobe acrobat 9.0 zu downloaden doch leider funktioniert es nicht habe schon java installiert aber wenn ich downloade dann sagt er sofort fehler und wenn ich neu anfage genau das gleiche ???????

  • Closed lid during DVD reinstallation - opend lid but no power

    The DVD still appears to be clicking and I assume the installation is still commencing but I can't get the screen on. Is there a manual shortcut to toggle the screen on/off? If I hard shut down using power button will it damage/corrupt hard disk?

  • Problem while Integrating workflow with OID.

    Hi I have a problem with integrating workflow with OID.I must execute the wf_ldap.synch_all() but I couldn't find WF_LDAP package body in the database.There is only package specification.How I can restore the wf_ldap package. Thanks for help..

  • Cisco Call Manager License

    Can anyone please tell me if Cisco CME Voice Recording licences need to be annually updated? Also Call Manager Express licences cover the users indefinitely?

  • IPad OBIEE 11g : Create Analysis

    Hi, With the Ipad app , it is possible to view dashbords and analysis ... But is it possible to create a new analysis and use metadata ( Drag dimensions and mesures to create new analysis just like the normal web app ) ?? It that posible ? Thank all.