1:n Relationship with one EJB

Hello,
I want to create an EntityBean with a self-referencing relationship - for example one manager with many employees. OC4J V9.0.3 deploys my EAR-file correctly but doesn't build up the correct relationship-table, because the primary key fields are equal. So i got a table only with the primary keys of the bean.
Does anybody had this problem before or isn't it possible to create such an ejb?
regards
Hendrik Brandes

I think it would depend on your implementation design and code, what relation suits you, however without digging into your design it would not be possible to tell why not 1:n and why n:n works.
Regards,
Nitin
Edited by: Nitin Mahajan on May 28, 2009 7:32 PM

Similar Messages

  • Defining a many-to-many relationship with CMP EJBs  : does it work for you

    Curious to know whether someone has been able to set up a many to many relationship between two entity beans.
    I have been struggling with this for days now and I can't get it to work.
    In my test project I have two entity beans, resp. Consultant and Solution.
    Consultant has a cmr field called 'solutions', which is a collection object from the opposite side (Solution).
    This is the source of the ejb-jar.xml file
    <?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>
         <description>EJB JAR description</description>
         <display-name>EJB JAR</display-name>
         <enterprise-beans>
              <session>
                   <ejb-name>ProfilerBean</ejb-name>
                   <home>com.atosorigin.tcc.testing.ejbses.profiling.ProfilerHome</home>
                   <remote>com.atosorigin.tcc.testing.ejbses.profiling.Profiler</remote>
                   <local-home>com.atosorigin.tcc.testing.ejbses.profiling.ProfilerLocalHome</local-home>
                   <local>com.atosorigin.tcc.testing.ejbses.profiling.ProfilerLocal</local>
                   <ejb-class>com.atosorigin.tcc.testing.ejbses.profiling.ProfilerBean</ejb-class>
                   <session-type>Stateless</session-type>
                   <transaction-type>Container</transaction-type>
                   <ejb-local-ref>
                        <ejb-ref-name>EJBTesting/Solution</ejb-ref-name>
                        <ejb-ref-type>Entity</ejb-ref-type>
                        <local-home>com.atosorigin.tcc.testing.ejbcmp.profiling.SolutionLocalHome</local-home>
                        <local>com.atosorigin.tcc.testing.ejbcmp.profiling.SolutionLocal</local>
                        <ejb-link>SolutionBean</ejb-link>
                   </ejb-local-ref>
                   <ejb-local-ref>
                        <ejb-ref-name>EJBTesting/Consultant</ejb-ref-name>
                        <ejb-ref-type>Entity</ejb-ref-type>
                        <local-home>com.atosorigin.tcc.testing.ejbcmp.profiling.ConsultantLocalHome</local-home>
                        <local>com.atosorigin.tcc.testing.ejbcmp.profiling.ConsultantLocal</local>
                        <ejb-link>ConsultantBean</ejb-link>
                   </ejb-local-ref>
              </session>
              <entity>
                   <ejb-name>ConsultantBean</ejb-name>
                   <home>com.atosorigin.tcc.testing.ejbcmp.profiling.ConsultantHome</home>
                   <remote>com.atosorigin.tcc.testing.ejbcmp.profiling.Consultant</remote>
                   <local-home>com.atosorigin.tcc.testing.ejbcmp.profiling.ConsultantLocalHome</local-home>
                   <local>com.atosorigin.tcc.testing.ejbcmp.profiling.ConsultantLocal</local>
                   <ejb-class>com.atosorigin.tcc.testing.ejbcmp.profiling.ConsultantBean</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>Consultant</abstract-schema-name>
                   <cmp-field>
                        <field-name>firstname</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>lastname</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>country</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>id</field-name>
                   </cmp-field>
                   <primkey-field>id</primkey-field>
                   <query>
                        <query-method>
                             <method-name>findBySolution</method-name>
                             <method-params>
                                  <method-param>java.lang.String</method-param>
                             </method-params>
                        </query-method>
                        <ejb-ql>SELECT Object(c) FROM Consultant AS c,
                        IN(c.solutions) s WHERE s.id = ?1 </ejb-ql>
                   </query>
              </entity>
              <entity>
                   <ejb-name>SolutionBean</ejb-name>
                   <home>com.atosorigin.tcc.testing.ejbcmp.profiling.SolutionHome</home>
                   <remote>com.atosorigin.tcc.testing.ejbcmp.profiling.Solution</remote>
                   <local-home>com.atosorigin.tcc.testing.ejbcmp.profiling.SolutionLocalHome</local-home>
                   <local>com.atosorigin.tcc.testing.ejbcmp.profiling.SolutionLocal</local>
                   <ejb-class>com.atosorigin.tcc.testing.ejbcmp.profiling.SolutionBean</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>Solution</abstract-schema-name>
                   <cmp-field>
                        <field-name>description</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>name</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>parent</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>id</field-name>
                   </cmp-field>
                   <primkey-field>id</primkey-field>
                   <query>
                        <query-method>
                             <method-name>findChildSolutions</method-name>
                             <method-params>
                                  <method-param>java.lang.String</method-param>
                             </method-params>
                        </query-method>
                        <ejb-ql>SELECT Object(s) FROM Solution AS s WHERE
                        s.parent = ?1</ejb-ql>
                   </query>
                   <query>
                        <query-method>
                             <method-name>findTopLevelSolutions</method-name>
                             <method-params/>
                        </query-method>
                        <ejb-ql>Select Object(s) FROM Solution AS s WHERE
                        (s.parent = &apos;none&apos;)</ejb-ql>
                   </query>
              </entity>
         </enterprise-beans>
         <relationships>
              <ejb-relation>
                   <description>A consultant may have one or more areas of expertise</description>
                   <ejb-relation-name>Consultant_Solutions</ejb-relation-name>
                   <ejb-relationship-role>
                        <ejb-relationship-role-name>com.atosorigin.tcc.testing.ejbcmp.profiling.ConsultantBean</ejb-relationship-role-name>
                        <multiplicity>Many</multiplicity>
                        <relationship-role-source>
                             <ejb-name>ConsultantBean</ejb-name>
                        </relationship-role-source>
                        <cmr-field>
                             <cmr-field-name>solutions</cmr-field-name>
                             <cmr-field-type>java.util.Collection</cmr-field-type>
                        </cmr-field>
                   </ejb-relationship-role>
                   <ejb-relationship-role>
                        <ejb-relationship-role-name>com.atosorigin.tcc.testing.ejbcmp.profiling.SolutionBean</ejb-relationship-role-name>
                        <multiplicity>Many</multiplicity>
                        <relationship-role-source>
                             <ejb-name>SolutionBean</ejb-name>
                        </relationship-role-source>
                   </ejb-relationship-role>
              </ejb-relation>
         </relationships>
         <assembly-descriptor>
              <container-transaction>
                   <description>container-transaction</description>
                   <method>
                        <ejb-name>SolutionBean</ejb-name>
                        <method-name>*</method-name>
                   </method>
                   <method>
                        <ejb-name>ProfilerBean</ejb-name>
                        <method-name>*</method-name>
                   </method>
                   <method>
                        <ejb-name>ConsultantBean</ejb-name>
                        <method-name>*</method-name>
                   </method>
                   <trans-attribute>Required</trans-attribute>
              </container-transaction>
         </assembly-descriptor>
    </ejb-jar>
    I created a stateless session bean as a business facade for the two entity beans. I then created a webservice to test the beans.
    What works :
    - create a consultant
    - get a consultant
    - create a solution
    - get a solution
    (basically everything that doesn't involve the relationship field.
    However, what doesn't work is the method call assignSolution:
    - assign solution : this is implemented as follows
    Business Method.
         public void assignSolution(String consultantID, String solutionID)
              throws ProfilingException {
              // TODO : Implement
              ConsultantLocal cons = null;
              SolutionLocal sol = null;
              try {
                   cons = consHome.findByPrimaryKey(consultantID);
                   sol = solHome.findByPrimaryKey(solutionID);
                   Collection solutions = cons.getSolutions();
                   solutions.add(sol);
                   //sol.getConsultants().add(cons);
              } catch (FinderException ex) {
                   ex.printStackTrace();
                   throw new ProfilingException("failed to retrieve data from DB", ex);
    As you can see I am trying to use the CM Relationship in this methhod. Adding the solution to a consultant should be as simple as adding a solution object to the collection retrieved with the getSolutions accessor. The Container is expected to persist the information in my MAXDB database.
    However this doesn't happen.
    The ORM details as defined in the persistent.xml follows :
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE persistent-ejb-map SYSTEM "persistent.dtd">
    <persistent-ejb-map>
         <locking
              type="Table"/>
         <db-properties>
              <data-source-name>TCC_PORTAL_PROFILER</data-source-name>
              <database-vendor
                   name="SAPDB"/>
         </db-properties>
         <entity-beans>
              <entity-bean>
                   <ejb-name>ConsultantBean</ejb-name>
                   <table-name>PFL_CONSULTANTS</table-name>
                   <field-map
                        key-type="NoKey">
                        <field-name>firstname</field-name>
                        <column>
                             <column-name>FIRSTNAME</column-name>
                        </column>
                   </field-map>
                   <field-map
                        key-type="NoKey">
                        <field-name>lastname</field-name>
                        <column>
                             <column-name>LASTNAME</column-name>
                        </column>
                   </field-map>
                   <field-map
                        key-type="NoKey">
                        <field-name>country</field-name>
                        <column>
                             <column-name>COUNTRY</column-name>
                        </column>
                   </field-map>
                   <field-map
                        key-type="PrimaryKey">
                        <field-name>id</field-name>
                        <column>
                             <column-name>ID</column-name>
                        </column>
                   </field-map>
                   <finder-descriptor>
                        <method-name>findBySolution</method-name>
                        <method-params>
                             <method-param>java.lang.String</method-param>
                        </method-params>
                        <load-selected-objects
                             lock="read"/>
                   </finder-descriptor>
              </entity-bean>
              <entity-bean>
                   <ejb-name>SolutionBean</ejb-name>
                   <table-name>PFL_SAPSOLUTIONS</table-name>
                   <field-map
                        key-type="NoKey">
                        <field-name>description</field-name>
                        <column>
                             <column-name>DESCRIPTION</column-name>
                        </column>
                   </field-map>
                   <field-map
                        key-type="NoKey">
                        <field-name>name</field-name>
                        <column>
                             <column-name>NAME</column-name>
                        </column>
                   </field-map>
                   <field-map
                        key-type="NoKey">
                        <field-name>parent</field-name>
                        <column>
                             <column-name>PARENTID</column-name>
                        </column>
                   </field-map>
                   <field-map
                        key-type="PrimaryKey">
                        <field-name>id</field-name>
                        <column>
                             <column-name>ID</column-name>
                        </column>
                   </field-map>
                   <finder-descriptor>
                        <method-name>findChildSolutions</method-name>
                        <method-params>
                             <method-param>java.lang.String</method-param>
                        </method-params>
                        <load-selected-objects
                             lock="read"/>
                   </finder-descriptor>
                   <finder-descriptor>
                        <method-name>findTopLevelSolutions</method-name>
                        <method-params/>
                        <load-selected-objects
                             lock="read"/>
                   </finder-descriptor>
              </entity-bean>
         </entity-beans>
         <relationships>
              <table-relation>
                   <help-table>PFL_CONS_SOL_MAP</help-table>
                   <table-relationship-role
                        key-type="PrimaryKey">
                        <ejb-name>ConsultantBean</ejb-name>
                        <cmr-field>solutions</cmr-field>
                        <fk-column>
                             <column-name>CONSULTANTID</column-name>
                             <pk-field-name>id</pk-field-name>
                        </fk-column>
                   </table-relationship-role>
                   <table-relationship-role
                        key-type="PrimaryKey">
                        <ejb-name>SolutionBean</ejb-name>
                        <fk-column>
                             <column-name>SOLUTIONID</column-name>
                             <pk-field-name>id</pk-field-name>
                        </fk-column>
                   </table-relationship-role>
              </table-relation>
         </relationships>
    </persistent-ejb-map>
    The error in the default trace file when calling the method states, there is an "inconsistency in the number of primary keys". Details follow.
    #1.5#000F1F188E5C004400000000000010480003E76C80EFD57A#1098880364327#com.sap.engine.services.ejb#com.atosorigin.tcc/EJBCMPProfilingTest#com.sap.engine.services.ejb#Guest#2####4d2b2370281411d9a40d000f1f188e5c#SAPEngine_Application_Thread[impl:3]_31##0#0#Error##Java###
    [EXCEPTION]
    #1#com.sap.engine.services.ejb.exceptions.BaseRemoteException: Exception in method assignSolution.
         at com.atosorigin.tcc.testing.ejbses.profiling.ProfilerObjectImpl0.assignSolution(ProfilerObjectImpl0.java:822)
         at com.atosorigin.tcc.testing.ejbses.profiling.Profiler_Stub.assignSolution(Profiler_Stub.java:533)
         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.sap.engine.services.ejb.session.stateless_sp5.ObjectStubProxyImpl.invoke(ObjectStubProxyImpl.java:187)
         at $Proxy73.assignSolution(Unknown Source)
         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.sap.engine.services.webservices.runtime.EJBImplementationContainer.invokeMethod(EJBImplementationContainer.java:126)
         at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:146)
         at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:68)
         at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:92)
         at SoapServlet.doPost(SoapServlet.java:51)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:385)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:263)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:339)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:317)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:810)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:238)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:147)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
         at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)
    Caused by: com.sap.engine.services.applocking.exception.SAPAppLockingIllegalArgumentException: Inconsistency in number of primary keys
         at com.sap.engine.services.applocking.TableLockingImpl.getArgument(TableLockingImpl.java:385)
         at com.sap.engine.services.applocking.TableLockingImpl.lock(TableLockingImpl.java:128)
         at com.sap.engine.services.applocking.TableLockingImpl.lock(TableLockingImpl.java:138)
         at com.sap.engine.services.ejb.entity.pm.lock.TableLockingSystem.write(TableLockingSystem.java:82)
         at com.sap.engine.services.ejb.entity.pm.PersistentM2M.create(PersistentM2M.java:172)
         at com.sap.engine.services.ejb.entity.pm.PersistentCacheM2M.add(PersistentCacheM2M.java:197)
         at com.sap.engine.services.ejb.entity.pm.multiple.CollectionM2M.add(CollectionM2M.java:57)
         at com.atosorigin.tcc.testing.ejbses.profiling.ProfilerBean.assignSolution(ProfilerBean.java:201)
         at com.atosorigin.tcc.testing.ejbses.profiling.ProfilerObjectImpl0.assignSolution(ProfilerObjectImpl0.java:771)
         ... 32 more
    I can't figure out what the problem is with the ORM mapping defined.
    On the database level I have three tables. Consultant maps to PFL_CONSULTANT, Solution to PFL_SAPSOLUTIONS. The third table PFL_CONS_SOL_MAP is the help table used for the relationship (having two fields, which are in fact foreign keys from the other two tables to express the assignment of solutions to consultants (where a consultant can have one or more solutions).
    ps. : I am running Netweaver Developer Workplace (Netweaver 2004, at stack level 5)
    Message was edited by: Theo Paesen

    Hm, after disabling 'automatic locking' it works.

  • HOW to handle a situation where 3 tables have on to many relationship with one single table?

    Hi fellows!
    i have three tables named
    Teacher_T(UserName, Pwd, Phone, Email, Experience, Academics) //here UserName is the PK
    Student_T(UserName, Pwd, Phone, Email) //here UserName is the PK
    Ad_T(UserName, Title, Description) //here UserName is the FK
    i want to enable both the teacher and the student to post their ads and in the Ad_T table ... for which i have created 2 relationships in Ad_T table:
    1) among Ad_T and Teacher_T using the UserName of Teacher_T as FK in Ad_T
    2) among Ad_T and Student_T using the UserName of Student_T as FK in Ad_T
    but this would not work as FK constraint requires that the value must be corresponding to a row in the PK table and problem here is that i am having two PK tables instead of one ... 
    one way to solve this problem is to create two separate tables         1) Student_Ad_T           2)Teacher_Ad_T         but i dont want to do so .......
    Any suggestions? 
    farooq.hnf

    Try:
    CREATE TABLE Teacher_T(UserName varchar(30) PRIMARY KEY, Pwd varchar(30),
    Phone varchar(30), Email varchar(30), Experience varchar(30), Academics varchar(30));
    CREATE TABLE Student_T(UserName varchar(30) PRIMARY KEY, Pwd varchar(30), Phone varchar(30), Email varchar(30))
    CREATE TABLE Ad_T(UserNameT varchar(30) NULL REFERENCES Teacher_T,
    UserNameS varchar(30) NULL REFERENCES Student_T, Title varchar(30), Description varchar(30))
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Database Design
    New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014

  • If Company has one to one relationship with Company code

    Dear All,
    If Company has one to one relationship with company code in the transaction system (ECC),
    can we use company in place off company code - in the BCS system?
    That is, in this case - under consolidation units
    - company,
    i will be using the ECC companies rather than ECC company codes as consolidation units.
    Request your insights.
    Cheers
    Kumar

    Actually, I almost always use the company, not the company code. The difference is in the different number of attributes, and the type CHAR 4 or 6. 0COMPANY is the standard infoobject for using in SEM-BCS.
    Though, I also used the custom infoobject for ConsUnit. Not a problem. Everything works. Just one needs to be careful with infoobjects which are the references to the Company IO.

  • One to many circular relationship with CMP

    Hello,
    I cannot get to solve this problem. I hope someone in the community could help me with it.
    I have an Entity Bean "Group", and I want to establish a 1:* relationship with other "Group" beans.
    I try to accomplish it by using an attribute "members".
    I have defined these two methods in Group:
    public abstract Collection getMembers();
    public void setMembers(Collection members);
    But when I call setMembers from a Session Bean I get the following exception:
    javax.ejb.TransactionRolledbackLocalException: Exception thrown fr
    om bean; nested exception is: javax.ejb.EJBException: nested exception is: SQL Exception: Syntax error: Encountered "<EO
    F>" at line 1, column 75.
    Does anybody know where the problem could be?
    Any tips would be really apreciated.
    Thanks in advance

    Hi,
    Circular relationship are never supported by any server, an example would be
    A has a relation with B, B has a relation with C, and C to A
    Self relation means A has a relation with its own kind (A).
    If a bean A has relation with B and B has relation with A, you dont call it circular its bidirectional relation.
    Basically directionality depends how do you want to navigate your relations, viz., which bean needs to keep track of which bean.
    Regards
    Meka Toka
    PS: And yeah, environment means, what server you are using, what OS, what version number etc etc.

  • Problem with one to one unidirectional relation

    Hi,
    I have one problem with one to one relation ship. While i am trying to persist the objects it is showing that "parent key not found" exception. Is there any problem with my class configuration ?..
    Table description:having two tables with same composite primary key
    ECommSchema table has one composite primay key and the ECommSchemaDet table also has the same composite primary key. In second table (ECommSchemaDet) composite primary key fields are refering(foreign key relation ship) from the first table.
    My entity classes are....
    @Entity(name = "E_COMM_SCHEMA")
    @Table(name = "E_COMM_SCHEMA", uniqueConstraints = {})
    public class ECommSchema extends ParentEntity implements java.io.Serializable{
    // Fields
    private ECommSchemaDet eCommSchemaDet;
    // Constructors
    /** default constructor */
    public ECommSchema(){
    /** minimal constructor */
    public ECommSchema(ECommSchemaId id, String descBriefEng, Date effectiveFrom, Currencies currencies){
    this.id = id;
    this.descBriefEng = descBriefEng;
    this.effectiveFrom = effectiveFrom;
    this.currencies = currencies;
    /** full constructor */
    @OneToOne(cascade = { CascadeType.ALL })
    @PrimaryKeyJoinColumns({ @PrimaryKeyJoinColumn(name = "COMP_CODE", referencedColumnName = "COMP_CODE"),
    @PrimaryKeyJoinColumn(name = "CODE", referencedColumnName = "SCHEMA_CODE") })
    public ECommSchemaDet getECommSchemaDet(){
    return eCommSchemaDet;
    public void setECommSchemaDet(ECommSchemaDet commSchemaDet){
    eCommSchemaDet = commSchemaDet;
    @SuppressWarnings("serial")
    @Entity(name = "E_COMM_SCHEMA_DET")
    @Table(name = "E_COMM_SCHEMA_DET", uniqueConstraints = {})
    public class ECommSchemaDet implements java.io.Serializable{
    private ECommSchema ECommSchema;
    // Constructors
    /** default constructor */
    public ECommSchemaDet(){
    /** minimal constructor */
    public ECommSchemaDet(ECommSchemaDetId id, ECommSchema ECommSchema, String calcBase, String multiTier, String distMethod,
    Double brokerRebate, Double ticketCharge){
    this.id = id;
    this.ECommSchema = ECommSchema;
    this.calcBase = calcBase;
    this.multiTier = multiTier;
    this.distMethod = distMethod;
    this.brokerRebate = brokerRebate;
    this.ticketCharge = ticketCharge;
    /** full constructor */
    public ECommSchemaDet(ECommSchemaDetId id, ECommSchema ECommSchema, String calcBase, String multiTier, String distMethod,
    Double brokerRebate, Double ticketCharge, String distMethodClient){
    this.id = id;
    this.ECommSchema = ECommSchema;
    this.calcBase = calcBase;
    this.multiTier = multiTier;
    this.distMethod = distMethod;
    this.brokerRebate = brokerRebate;
    this.ticketCharge = ticketCharge;
    this.distMethodClient = distMethodClient;
    // Property accessors
    @OneToOne(cascade = { CascadeType.REFRESH }, fetch = FetchType.EAGER, mappedBy = "eCommSchemaDet")
    public ECommSchema getECommSchema(){
    return this.ECommSchema;
    public void setECommSchema(ECommSchema ECommSchema){
    this.ECommSchema = ECommSchema;
    Error message is
    Local Exception Stack:
    Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-02291: integrity constraint (ETRADE_4BM.FK_ECOMM_SCH_DET) violated - parent key not found
    Error Code: 2291
    Call: INSERT INTO E_COMM_SCHEMA_DET (DIST_METHOD, BROKER_REBATE, CALC_BASE, TICKET_CHARGE, DIST_METHOD_CLIENT, MULTI_TIER, SCHEMA_CODE, COMP_CODE) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
         bind => [T, 23.0, A, 23.0, T, N, 8, 1]
    Query: InsertObjectQuery(com.path.tradeManager.entities.ECommSchemaDet@44fbf5)
         at oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:311)
         at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:654)
         at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:703)
         at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:492)
         at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:452)
         at oracle.toplink.essentials.internal.sessions.AbstractSession.executeCall(AbstractSession.java:690)
         at oracle.toplink.essentials.internal.sessions.IsolatedClientSession.executeCall(IsolatedClientSession.java:150)
         at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:228)
         at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:214)
         at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.insertObject(DatasourceCallQueryMechanism.java:346)
         at oracle.toplink.essentials.internal.queryframework.StatementQueryMechanism.insertObject(StatementQueryMechanism.java:191)
         at oracle.toplink.essentials.internal.queryframework.StatementQueryMechanism.insertObject(StatementQueryMechanism.java:205)
         at oracle.toplink.essentials.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(DatabaseQueryMechanism.java:564)
         at oracle.toplink.essentials.queryframework.InsertObjectQuery.executeCommit(InsertObjectQuery.java:89)
         at oracle.toplink.essentials.internal.queryframework.DatabaseQueryMechanism.performUserDefinedWrite(DatabaseQueryMechanism.java:750)
         at oracle.toplink.essentials.internal.queryframework.DatabaseQueryMechanism.performUserDefinedInsert(DatabaseQueryMechanism.java:714)
         at oracle.toplink.essentials.internal.queryframework.DatabaseQueryMechanism.insertObjectForWriteWithChangeSet(DatabaseQueryMechanism.java:602)
         at oracle.toplink.essentials.queryframework.WriteObjectQuery.executeCommitWithChangeSet(WriteObjectQuery.java:162)
         at oracle.toplink.essentials.internal.queryframework.DatabaseQueryMechanism.executeWriteWithChangeSet(DatabaseQueryMechanism.java:390)
         at oracle.toplink.essentials.queryframework.WriteObjectQuery.executeDatabaseQuery(WriteObjectQuery.java:109)
         at oracle.toplink.essentials.queryframework.DatabaseQuery.execute(DatabaseQuery.java:628)
         at oracle.toplink.essentials.queryframework.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:555)
         at oracle.toplink.essentials.queryframework.ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery(ObjectLevelModifyQuery.java:138)
         at oracle.toplink.essentials.queryframework.ObjectLevelModifyQuery.executeInUnitOfWork(ObjectLevelModifyQuery.java:110)
         at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2233)
         at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:952)
         at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:909)
         at oracle.toplink.essentials.internal.sessions.CommitManager.commitNewObjectsForClassWithChangeSet(CommitManager.java:269)
         at oracle.toplink.essentials.internal.sessions.CommitManager.commitAllObjectsForClassWithChangeSet(CommitManager.java:246)
         at oracle.toplink.essentials.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:202)
         at oracle.toplink.essentials.internal.sessions.AbstractSession.writeAllObjectsWithChangeSet(AbstractSession.java:2657)
         at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.commitToDatabase(UnitOfWorkImpl.java:1044)
         at oracle.toplink.essentials.internal.ejb.cmp3.base.RepeatableWriteUnitOfWork.commitToDatabase(RepeatableWriteUnitOfWork.java:403)
         at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithPreBuiltChangeSet(UnitOfWorkImpl.java:1160)
         at oracle.toplink.essentials.internal.ejb.cmp3.base.RepeatableWriteUnitOfWork.writeChanges(RepeatableWriteUnitOfWork.java:276)
         at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerImpl.flush(EntityManagerImpl.java:350)
         at com.sun.enterprise.util.EntityManagerWrapper.flush(EntityManagerWrapper.java:626)
         at com.path.tradeManager.dao.ECommSchemaDaoBean.save(ECommSchemaDaoBean.java:86)
         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:597)
         at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
         at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
         at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2895)
         at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3986)
         at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:203)
         at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:117)
         at $Proxy133.save(Unknown Source)
         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:597)
         at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:233)
         at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:152)
         at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(BCELStubBase.java:225)
         at com.path.tradeManager.daoInterface.__ECommSchemaDaoInterface_Remote_DynamicStub.save(com/path/tradeManager/daoInterface/__ECommSchemaDaoInterface_Remote_DynamicStub.java)
         at com.path.tradeManager.daoInterface._ECommSchemaDaoInterface_Wrapper.save(com/path/tradeManager/daoInterface/_ECommSchemaDaoInterface_Wrapper.java)
         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:597)
         at com.path.tradeManager.tunnelGate.RequestHandler.callMethodByReflection(RequestHandler.java:181)
         at com.path.tradeManager.tunnelGate.RequestHandler.handle(RequestHandler.java:150)
         at com.path.tradeManager.tunnelGate.TunnelServlet.doPost(TunnelServlet.java:37)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
         at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:290)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
         at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
         at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
         at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
         at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
         at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
         at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
         at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
         at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:380)
         at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
         at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
    Caused by: java.sql.SQLException: ORA-02291: integrity constraint (ETRADE_4BM.FK_ECOMM_SCH_DET) violated - parent key not found
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:124)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:304)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:271)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:622)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:180)
         at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatement.java:542)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1027)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2887)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:2959)
         at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:647)
         ... 92 more
    Jul 8, 2008 4:17:07 PM com.sun.enterprise.server.logging.SystemOutandErrHandler$LoggingByteArrayOutputStream flush
    INFO: FATAL[08-07-08 16:17:07][com.path.tradeManager.dao.ECommSchemaDaoBean->save][javax.persistence.PersistenceException: Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-02291: integrity constraint (ETRADE_4BM.FK_ECOMM_SCH_DET) violated - parent key not found
    Thanks in advance
    Anish

    Hello,
    I'm not sure what the FK_ECOMM_SCH_DET constraint refers to, but I assume it is to the only OneToOne reference defined. Based on the mappings shown, you have told TopLink that ECommSchema has a 1:1 to ECommSchemaDet, so that ECommSchemaDet has to be inserted first. My guess is your constraint is the oposite, requiring that ECommSchema be inserted before ECommSchemaDet. If so, just change the by directional 1:1 so that ECommSchema->ECommSchemaDet is mapped by the ECommSchemaDet->ECommSchema relationship (ie switch things).
    Best Regards,
    Chris

  • One-to-many relationship within one bean

    hello all,
    Does S1 support a container managed one-to-many relationship to itself?
    I used the verifer to verify my DD and the error is reported. (this prototype is migrated from weblogic6.1 and I use the S1 migration tool for the DD generation)
    -----------------database schema-----------------
    CREATE TABLE t_class_a
    c_name VARCHAR2(255),
    one_class_a_for_ma2918_id VARCHAR2(32), /* untruncated name: one_class_a_for_many_class_a_id */
    object_id VARCHAR2(32) NOT NULL
    CREATE UNIQUE INDEX t_class_a_id_PK ON t_class_a ( object_id );
    ALTER TABLE t_class_a ADD ( CONSTRAINT t_class_a_id_PK PRIMARY KEY ( object_id ) USING INDEX );
    ALTER TABLE t_class_a ADD ( CONSTRAINT FK_0 FOREIGN KEY ( one_class_a_for_ma2918_id ) REFERENCES t_class_a ( object_id ) );
    ---------------------------ejb-jar.xml------------------
    <abstract-schema-name>ClassABean</abstract-schema-name>
    <cmp-field>
    <field-name>objectId</field-name></cmp-field>
    <cmp-field>
    <field-name>name</field-name></cmp-field>
    <primkey-field>objectId</primkey-field>
    <relationships>
    <ejb-relation>
    <ejb-relation-name>manyClassA_oneClassA</ejb-relation-name>
    <ejb-relationship-role>
    <description>optional</description>
    <ejb-relationship-role-name>OneClassA-in-manyClassA_oneClassA</ejb-relationship-role-name>
    <multiplicity>One</multiplicity>
    <relationship-role-source>
    <ejb-name>ClassAEJB</ejb-name></relationship-role-source>
    <cmr-field>
    <cmr-field-name>manyClassAsForOneClassA</cmr-field-name>
    <cmr-field-type>java.util.Collection</cmr-field-type></cmr-field></ejb-relationship-role>
    <ejb-relationship-role>
    <description>optional</description>
    <ejb-relationship-role-name>ManyClassA-in-manyClassA_oneClassA</ejb-relationship-role-name>
    <multiplicity>Many</multiplicity>
    <relationship-role-source>
    <ejb-name>ClassAEJB</ejb-name></relationship-role-source>
    <cmr-field>
    <cmr-field-name>oneClassAForManyClassA</cmr-field-name>
    </cmr-field>
    </ejb-relationship-role>
    </ejb-relation>
    </relationships>
    -----------sun-cmp-mapping.xml--------
    <sun-cmp-mapping>
    <schema>mySchema</schema>
    <entity-mapping>
    <ejb-name>ClassAEJB</ejb-name>
    <table-name>T_CLASS_A</table-name>
    <cmp-field-mapping>
    <field-name>objectId</field-name>
    <column-name>OBJECT_ID</column-name></cmp-field-mapping>
    <cmp-field-mapping>
    <field-name>name</field-name>
    <column-name>C_NAME</column-name></cmp-field-mapping>
    <cmr-field-mapping>
    <cmr-field-name>manyClassAsForOneClassA</cmr-field-name>
    <column-pair>
    <column-name>T_CLASS_A.OBJECT_ID</column-name>
    <column-name>T_CLASS_A.ONE_CLASS_A_FOR_MA2918_ID</column-name></column-pair></cmr-field-mapping></entity-mapping></sun-cmp-mapping></sun-cmp-mappings>
    I beleive the migration tool missing the cmr-filed mapping for the oneClassAForManyClassA relation role.
    but even if I add this mapping it still can't pass the verifiy.
    So do I miss any thing or I can conclude S1 not support this one-to many self relation?
    Any hint would be welcome.

    It does.
    There is a known problem with parsing self-referenced relationship info - the one side (with <multiplicity> Many) must be the first in the <ejb-relation> entry.
    Regards,
    Marina

  • Love / Hate Relationship with Photoshop Elements

    I am having a love/hate relationship with Photoshop Elements!  Love the page design capabilities and hate the lack of capability on the print end.  Kodak does not give any choice in the book they will print from Elements.  All I can get is a #$%& die cut cover!  Is there anyway that I can order other options that I know Kodak has available when creating a book using Elements and their site.  I want to be able to choose a custom cover!  I have tried Kodak to get answers.  I have tried Adobe (impossible, unless maybe you pay).  Neither are very helpful!  The only answers I get are use the Elements designed pages and place them onto pages that you create in their software.  Problem is that one needs a jpeg file to do this.  No online program seems to recognize .PSD or .PSE file types.   HELP!
    Bob, Barbara you both seem to be very knowledgable...any ideas...
    Anyone with any help can answer here or [email protected]
    Terry

    Terry:
    Yeah, the photobook print options are limited. (Although, the built in Kodak and Shutterfly books are very nice)
    One thing to try differently is to use the Print At Home selection on that first screen after the clicking on the PhotoBook option (assuming you are using PSE8 here) (use Photo Collage with PSE7)
    Down that path, you will get a few more choices in page size. It will still create a multi-page document (a .pse) while your building your book, and when done, you can print the pages of the book out as a .pdf. Many book printing services will take in a PDF.
    Another option is to do a single page at a time and save them as .jpg's. A little more work in keeping your various files together and ordered properly, but it would give you ultimate flexibility.

  • Characteristic relationship with Exit class is not applied correctly

    We are using a characteristic relationship (with derivation) type Exit class. For that we have created class ZCL_RSPLS_ARTICLE_FROM_PLMOD as a copy of the standard class CL_RSPLS_CR_EXIT_BASE.
    Target and source characteristics are members of the aggregation level.
    We want to generate a list of valid combinations of characteristics planning models and articles which should be planned in the planning query.
    For that we are using the method IF_RSPLS_CR_METHODS~CREATE:
    Source is characteristic Model ZMATMOD and we determine in the exit class all active articles ZMATART.
    We get a list of active (planning relevant) models and articles in our exit class (table e_th_chas).
    --> For instance 6 combinations
    Until here everything works fine.
    The problem is that in the query 8 combinations are displayed.
    We have no idea why more than the generated combinations are displayed.
    One reason could be that the characteristic article ZMATART is an attribute from characteristic model ZMATMOD.
    So from a master data point of view 8 combinations would be relevant.
    But we use the exit class in order to reduce the number of combinations to planning relevant items.
    If we use the method IF_RSPLS_CR_METHODS~CHECK we could flag the 2 combinations which are not planning relevant to not valid.
    But these are then displayed in the query. 6 combinations in change mode; 2 combinations in display mode. This would not help us.
    We would like to see only the planning relevant combinations  6 combinations
    Can anyone please help me urgently?
    Best regards
    Martin

    Hi,
    set a break-point in the factory method get_instance to check whether the class is called. In the planning modeler make sure that you  use an external break-point.
    Or use rsrt an change a cell value: Derivation is called in the delta buffer to derive from the fields contained in the aggregation level. So check also that the source fields are contained in the aggregation level or can be derived via a a chain of derivations.
    Also make sure that all source fields have to be non-initial. The system will not call derivation for initial source fields since in this case there is not unique target, cf. http://help.sap.com/saphelp_nw70/helpdata/en/43/1c3d0f31b70701e10000000a422035/frameset.htm
    Remark: The attached document of note 994853 is about the disaggregation feature but it also contains a section about the characteristic relationships. Observe also that the template exit classes are documented in SE24.
    Regards,
    Gregor

  • How to call one EJB in another EJB?

    How to call one EJB in another EJB? Please explain with some example code.

    To refer a Ejb from another Ejb include <ejb-ref> element in ejb-jar.xml
    <session>
    <ejb-name>EjbA</ejb-name>
    <ejb-ref>
    <ejb-ref-name>EjbB</ejb-ref-name>
    <ejb-ref-type>Entity</ejb-ref-type>
    <home>com.ejb.EjbBHome</home>
    <remote>com.ejb.EjbB</remote>
    </ejb-ref>
    </session>
    Include a <reference-descriptor> in weblogic-ejb-jar.xml
    <weblogic-enterprise-bean>
    <ejb-name>EjbA</ejb-name>
    <reference-descriptor>
    <ejb-reference-description>
    <ejb-ref-name>EjbB</ejb-ref-name>
    <jndi-name>com.ejb.EjbBHome</jndi-name>
    </ejb-reference-description>
    </reference-descriptor>
    </weblogic-enterprise-bean>
    In EjbA Bean class refer to EjbB with
    a remote reference to EjbB.
    InitialContext initialContext=new InitialContext();
    EjbBHome EjbBHome=(EjbBHome)
    initialContext.lookup("com.ejb.EjbBHome");
    EjbB ejbB=EjbBHome.findByPrimaryKey(primarykey);

  • HP sweetens relationships with customers by making CRM social

    Social Media is the fastest growing channel of customer service at HP.  This is no surprise as more and more customers are seeking help on Twitter, Facebook, and other social media sites.
    According to a Simply Measured 2014 report*, “Users are adopting Twitter as a legitimate and valid customer service channel. Mentions of dedicated customer service handles increased by44% year-over-year.”
    While marketing may have created the Facebook page or Twitter handle to promote products, customers see it as an opportunity to get help. In customer service, we had two choices: put our head in the sand and hope the customer goes away or help them.
    For example, Ethel lk promised to never buy HP products ever again.
    We had the chance to see if we could turn her around.
    We took the conversation offline and worked with her and earned her loyalty back.
    Engaging with customers gives us an opportunity to build a relationship with them. In some cases their plea for help on Twitter may be the first direct interaction that many customers have with HP. After all, they may have bought their printer or PC from Costco or Best Buy and never have talked with an HP sales representative.
    We need to make sure that the interaction they have with us on Twitter is the same experience as on Facebook or if they pick up the phone. Our relationship with them depends on our ability to provide a consistent support experience.
    Right now we have 150 million products in warranty, get 28 million phone and chat interactions each year. Every second four customers look for help in social media in 180 countries around the world.
    Each one of these interactions gives us the chance to earn their loyalty by building a relationship with us. To do that, we need to answer their questions quickly and effectively. If they come back 6 months later, they expect to have a similar experience regardless of how they contact us.
    With so many customers depending on us, we rely on a Customer Relationship Management system to tie customers and products together; steer agents through an effective troubleshooting process; and track the entire support interaction. After all, the “R” in CRM is relationship, and it is critical in our ability to foster a good one with our customers.
    While thousands of agents use this tool for phone and chat, our social media agents couldn’t use our CRM system.  It couldn’t handle social media data -- or at least it couldn’t before 2014.
    This means that our agents were tracking customers manually. If a customer came back a few months later, the agent needed to turn into a detective to figure out who the customer was what the product was and understand what had transpired.
    Something had to change as the volume of customers contacting us in Twitter and Facebook increased hitting more than 25,000 incoming tweets or comments a month.
    To handle the increased volume and improve our relationship with our customers, we made significant investments to integrate social media into our Customer Relationship Management system.
    HP is quite possibly the first company to be able to take social media content from Twitter and Facebook in different languages and turn them into cases worked on by social media agents in different countries around the world.  Right now we are averaging 10,000 cases a month in Twitter and Facebook in English, Spanish, Portuguese, French, and German.
    By having an integrated CRM system with all support channels, we get a 360 degree view of customer’s support interactions.  This improvement helps three key groups.
    Customers: Today, customers choosing Facebook or Twitter have a seamless support experience. HP Support saw a 2 percent increase in Net Promoter Score since the integration with the CRM system went live. Because of the efficiencies gained in the tool, agents reply to customers more quickly. We were able to cut response times by 60 percent, shaving hours off of the time it took an agent to find and reply to the customer. Decreasing response times was challenging because more customers were tweeting and posting than ever before. Since September, we have seen a 103 percent increase in the number of customers reaching out to us for help in Twitter and Facebook. Because of the integration with our CRM system, we are able to reply to more customers more quickly and increase their satisfaction with HP.
    Agents: Today agents have a comprehensive view of the customer at their fingertips. The entire online conversation in Facebook or Twitter is threaded together along with any past history. It is easier for agents to see where to take the conversation and how to help the customer. This makes for much happier agents and as a result happier customers. Agent dissatisfaction has turned into satisfaction as a result of an improved tool.  Their engagement with customers has increased 187 percent, as measured by the increase in the number of tweets and posts agents made.
    HP: HP has the ability to track whether customers are promoters or detractors, and capture the change in sentiment through the support experience. It also has the ability to mine the data for insights and to gain a deeper understanding of global social care metrics. This will enrich the data fed into the teams supervising quality and enable HP to deliver better products. Also, it will help the company identify issues quickly. Early detection of issue through social media has saved the company millions and is now easier to do.
    While the results are impressive, building something that has never existed before isn’t easy.
    The biggest challenge was that CRM systems are built with fields requiring serial numbers and real names. How do you create a case when MagicPuppy123 tweets, “Please help me @HP!”  There is no name, no product, no description of an issue – none of the information that a phone agent would be able to get. Also, how do you figure out that MagicPuppy123 also made a post on the HP Facebook wall asking for help but this time her handle is Tara Jane Willis.
    Should this be a case? Is it possible to relate the tweet and post? What is the priority level? Who is the right agent and what is the right country to route this to?
    Step by step we went through the various scenarios we have encountered since we began supporting customers in Twitter in 2009 and Facebook in 2010.
    We created processes and business rules to filter and route posts to agents with right skill set. Also, we outlined how relevant tweets or posts from a customer had to be threaded together to give the agent a complete account of the conversation to date, even if the customer went on vacation for 3 weeks and just came back. Customers expect to be remembered and bristle at repeating themselves.
    When you are building something new, you won’t fully understand the limitations until it is built. There will be features that don’t work as planned that need to be recreated. Also, you learn to identify and build strong relationships with key players: IT, partners, service delivery, analytics, consultants, and agents.
    Moving into 2015, HP is working to bring more social media sites into its CRM environment. The integration makes it possible to have blended channel agents: phone, chat, and social media. As social media grows, we can improve trained agents effectiveness by expanding from phone into online communities and social networking sites as the volume shifts over a day or month.
    As Forrester noted**, “In the past 12 months, 68% of customers used the phone, 60% used help or frequently asked questions (FAQs), 54% used email, 37% used chat, 20% used SMS, and 19% used Twitter. Customer service agents supporting these media types need access to the same information in order to ensure consistent service.”
    Getting all agents on the same CRM environment for all support channels globally is the challenge HP tackled in 2014 and continues to innovate and enhance the support experience for customers.
    * Customer Service on Twitter
    **Transform The Contact Center: Forrester's Playbook For Customer Service Excellence
    I work for HP, supporting the HP Experts who volunteer their time and technical knowledge to help others.

    Having used HP/Compaq products for a number of years now we must agree that HP Customer Support is #1 in all areas.
    From the data stored for all models, to the HP Support Forums we find excellence in all we search for.
    Congradulations Katie_H in all you do in providing help sources for our clients.
    "Hoping I have assisted you, George"

  • How to model parent child relationship with DPL? @Transient?

    Hello All,
    I want to model a parent entity object with a collection of child entities:
    @Entity
    public class Parent{
    @PrimaryKey
    String uuid;
    List&lt;Child&gt; children;
    @Entity
    public class Child{
    @PrimaryKey
    String id;
    I know that the DPL won't support automatic persistence where it'll recursively go through my parent bean and persist my children with one call. Is there a way of applying the equivalent to JPA's @Transient annotation on "children" so I can persist the children manually and have the engine ignore the collection?
    If not and I want to return to the user a Parent with a List named "children," do I have to create a new object which is identical to Parent, but doesn't have the BDB annotations and manually assemble everything? If possible, I'd like to avoid defining redundant objects.
    Thanks in advance,
    Steven
    Harvard Children's Hospital Informatics Program
    Edited by: JavaGeek_Boston on Oct 29, 2008 2:22 PM

    Hi Steven,
    The definition of persistence is here:
    http://www.oracle.com/technology/documentation/berkeley-db/je/java/com/sleepycat/persist/model/Entity.html
    And includes this: "All non-transient instance fields of an entity class, as well as its superclasses and subclasses, are persistent. static and transient fields are not persistent."
    So you can use the Java transient keyword. If that isn't practical because you're using transient in a different way for Java serialization, see the JE @NotPersistent annotation.
    In general a parent-child relationship between entities is implemented almost as you've described, but with a parentId secondary key in the Child to index all children by their parent. This enables a fast lookup of children by their parent ID.
    I suggest looking at this javadoc:
    http://www.oracle.com/technology/documentation/berkeley-db/je/java/com/sleepycat/persist/SecondaryIndex.html
    as it describes all types of entity relationships and the trade-offs involved. The department-employee relationship in these examples is a parent-child relationship.
    --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Deploying  wl7 restriction : can't deploy ear if one ejb failed

    In weblogic 6, I was able to deploy an ear even if one ejb of the ear could not
    deploy. With weblogic 7 if one ejb failed, the all ear fail to deploy (There is
    no cmr relation between those ejb). This a realy big restriction in development
    mode, if you don't care about the failed ejb. You need to remove it from your
    ear build and redeploy... Is there any way to have the same behaviour than in
    wl6 ?
    thank's
    Nicolas FRANK

    In weblogic 6, I was able to deploy an ear even if one ejb of the ear could not
    deploy. With weblogic 7 if one ejb failed, the all ear fail to deploy (There is
    no cmr relation between those ejb). This a realy big restriction in development
    mode, if you don't care about the failed ejb. You need to remove it from your
    ear build and redeploy... Is there any way to have the same behaviour than in
    wl6 ?
    thank's
    Nicolas FRANK

  • More than one ejb in ejb-jar.xml ?

    Can i have more than one ejb in a jar file ??

    Include session and entity beans in your ejb-jar.xml with <session> &
    <entity> tags.
    <enterprise-beans>
    <session>
    </session>
    <entity>
    </entity>
    </enterprise-beans>
    David wrote:
    Can i have more than one ejb in a jar file ??

  • A mapped elements relationship with other elements cannot be preserved

    Hi,
    I am trying to create an XML file from an XSD using excel macros and data from excel worksheet. The mapping takes place fine. However, when I try to save the mapped items into an XML file using SaveAsXML function, it gives me the following reason why the
    XML is not exportable:
    A mapped elements relationship with other elements cannot be preserved
    Could someone please help is resolving this issue?
    Thanks

    Preamble: I am not a specialist, on the contrary. I discovered xml a few days ago trying to submit returns based on two quite different compulsory xsd schemas established by local authorities. So this note has no other pretention than
    to try to help others starting from same level.
    The plus: I discovered I could do it (with limitations) from Excel 2010 by attaching the provided xsd and mapping the relevant fields to excel data cells. This is reasonably described on MS sites & elsewhere, although the MS tutorials
    do not focus on this particular objective, which is important as authorities are using more and more XML to expect returns.
    The minus: I stumbled across stupid issues (in fact pulling my hair...), which could be better highlighted in MS doc for the newbies like me, because at that stage of knowledge and on your own, all seems unsurmountable. When Excel gives
    the error messages, there is little indication on why and where the error occurs. My two common errors difficult to debug:
    1. Denormalized data error
    2. Relationship cannot be preserved error
    What I was doing wrong for the first xsd then even for the second by accident:
    1. In error, I was mapping an element occurring max once in the XSD schema to an element in an "Excel Table" (the “new” table formatting available in Excel 2010). I solved this by de-mapping the culprit element, converting the "Excel Table"
    to ordinary ranges using the button provided in the ribbon for this, and re-mapping. From there, (nearly) each time I was mapping a new element / attribute to a cell in the worksheet, I used the button "Verify map for Export" giving me debugging message soon
    enough before mapping the whole data set and finding it was wrong a bit late and not knowing exactly where it started to go wrong. Also, for the repeating component, I had set manually the Excel table for the whole recursive element beforehand as I found out
    that when using the dragging process, the results could be random (some attributes in the table, others in other tables resulting in errors type 2 relationship).
    2. Relationship error is a more nagging issue as it seems to relate to a structural limitation of this Excel 2010 export mechanism. Flattening a database with several depth levels (list of lists) is not trivial, so Microsoft stipulates
    a bit buried in notes while it should be in bold at the top that Excel (which version? also 2013?) "does not support recursive structures that are more than one level deep". Happily, while the xml schemas I had to follow where providing for several levels
    deep (3 in my case), I needed only one for both xml files.  So, I copied the “too complex” xsd schema, updated it manually to suppress 2 levels. I remapped and tested. The error messages had gone. I exported. Then, I had to simply add the
    previously deleted opening & closing tags manually using a free editor (Vim with thanks to that author).  
    But unless my understanding is wrong, which is quite possible, readers should understand that this documented limitation can become a structural stumbling block if they need absolutely recursivity with more than one level depth (list of lists). So, if
    I can do it in Access from a DB (I still need to find out how & forum guidance is more than welcomed), this will be my future way to explore.
    To finish, I validated the exported xml against the compulsory xsd schema using the online tool provided free by CoreFiling to ensure basic formatting mistakes had not been committed before submitting the returns for online validation
    by Authorities application. I have MS Visual Studio Express installed which may help as well but I don’t know how to use it for this.
    NB: I found also easier to copy (dragging top of the xsd tree) all the xsd elements /attributes in bulk from the xsd schema from the box on the right to a worksheet. While results would not be useable “as is” to map (it would most probably
    give errors), at least, it provides a good initial template with the right headings for all the elements / attributes facilitating restructuring (occurring once, elements part of a recursive table) then map properly and reasonably fast. Before doing this,
    I was copying manually the xml headings from the Word documentation provided by Authorities, which worked but was more cumbersome and risky.
    Conclusion
    I had never read about xml before (just heard often about it). It took me around 6-7 hours to learn some critical basics about it and about these specific xsd schemas. With a few trials & errors, I could use Excel 2010 to produce the
    xml files required for the two schemas I needed. The great advantage compared to an online submission of data to Authorities is that it a process easy to repeat quietly at work (or at home) and enabling to check peacefully and thoroughly the xml data files
    before submitting them.  If wrong submissions have been made, it enables automated corrections much easier as well. It is within reach for users with reasonable but not outstanding Excel / Xml knowledge but it requires some initial time investment.  
    Hope this saves time for others.
    acontrario
    Brussels

Maybe you are looking for