Ejb 3.0 entity relationship (data order)

Hi,
I have got two entity classes (Team, Player) with one-to-many relationship. e.g. A Team can have many players. I have used annotations in my class to set the relationship between them.
Now when I display a team's data, the list of players are not in order as they were inserted in that collection.
insertion ==> team.getPlayers().add(player);
p1 -> T1
p4 -> T1
p2 -> T1
display data ===> team.getPlayers();
p1, p2, p4
My question is how can I maintain the order of data (as they were inserted) in an entity relationship.
Many thanks.
S.A.

You could add a field Player.timeAdded to Player and specify that field in @OrderBy for Team.players, ie.
@Entity public class Team {
@OneToMany(mappedBy="team")
@OrderBy("timeAdded ASC")
public List<Player> getPlayers() {...};
}

Similar Messages

  • EJB-QL with CMR relationship

    I have the following:-
    COUNTRY has 1-M relationship with its NCAs (members).
    I want to get all the Members for a given country, so can you please scan through the descriptors and let me know where I a missing something.
    ejb-jar.xml:
    COUNTRY:-
    <entity>
    <description>Entity Bean ( CMP )</description>
    <display-name>Country</display-name>
    <ejb-name>Country</ejb-name>
    <local-home>inspections.ejb.entity.CountryLocalHome</local-home>
    <local>inspections.ejb.entity.CountryLocal</local>
    <ejb-class>inspections.ejb.entity.CountryBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Long</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>Country</abstract-schema-name>
    <cmp-field>
    <field-name>pkCountry</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>ecdDn</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>active</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>countryCode</field-name>
    </cmp-field>
    <primkey-field>pkCountry</primkey-field>
    </entity>
    NCA:-
    <entity>
    <description>Entity Bean ( CMP )</description>
    <display-name>NCA</display-name>
    <ejb-name>NCA</ejb-name>
    <local-home>inspections.ejb.entity.NCALocalHome</local-home>
    <local>inspections.ejb.entity.NCALocal</local>
    <ejb-class>inspections.ejb.entity.NCABean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Long</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>NCA</abstract-schema-name>
    <cmp-field>
    <field-name>pkNca</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>ecdDn</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>active</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>cmrMemberState</field-name>
    </cmp-field>
    <primkey-field>pkNca</primkey-field>
    <query>
    <query-method>
    <method-name>findAll</method-name>
    <method-params/>
    </query-method>
    <ejb-ql>select object(o) from NCA o</ejb-ql>
    </query>
    <query>
    <description>This finds the NCA based on given country</description>
    <query-method>
    <method-name>findNCAByCountry</method-name>
    <method-params>
    <method-param>java.lang.Long</method-param>
    </method-params>
    </query-method>
    <ejb-ql>select object(o) from NCA o, IN (o.cmrMemberState) AS cmr where cmr.pkCountry = ?1</ejb-ql>
    </query>
    </entity>
    ================================================
    orion-ejb-jar.xml
    COUNTRY:-
    <entity-deployment name="Country" data-source="jdbc/DBCorporate" table="CORE.COUNTRY" copy-by-value="false" exclusive-write-access="false">
    <primkey-mapping>
    <cmp-field-mapping name="pkCountry" persistence-name="PK_COUNTRY" persistence-type="NUMBER(10)"/>
    </primkey-mapping>
    <cmp-field-mapping name="pkCountry" persistence-name="PK_COUNTRY" persistence-type="NUMBER(10)"/>
    <cmp-field-mapping name="ecdDn" persistence-name="ECD_DN" persistence-type="VARCHAR2(4000)"/>
    <cmp-field-mapping name="countryCode" persistence-name="COUNTRY_CODE" persistence-type="VARCHAR2(2)"/>
    <cmp-field-mapping name="NCA_cmrMemberState">
    <collection-mapping table="CORE.NCA">
    <primkey-mapping>
    <cmp-field-mapping>
    <entity-ref home="Country">
    <cmp-field-mapping name="cmrMemberState_pkMs" persistence-name="FK_COUNTRY" persistence-type="NUMBER(10)"/>
    </entity-ref>
    </cmp-field-mapping>
    </primkey-mapping>
    <value-mapping type="inspections.ejb.entity.NCALocal" immutable="true">
    <cmp-field-mapping>
    <entity-ref home="NCA">
    <cmp-field-mapping name="pkNca" persistence-name="PK_NCA" persistence-type="NUMBER(10)"/>
    </entity-ref>
    </cmp-field-mapping>
    </value-mapping>
    </collection-mapping>
    </cmp-field-mapping>
    <entity-deployment>
    NCA:-
    <entity-deployment name="NCA" data-source="jdbc/DBCorporate" table="CORE.NCA" copy-by-value="false" exclusive-write-access="false">
    <primkey-mapping>
    <cmp-field-mapping name="pkNca" persistence-name="PK_NCA" persistence-type="NUMBER(10)"/>
    </primkey-mapping>
    <cmp-field-mapping name="pkNca" persistence-name="PK_NCA" persistence-type="NUMBER(10)"/>
    <cmp-field-mapping name="ecdDn" persistence-name="ECD_DN" persistence-type="VARCHAR2(4000)"/>
    <cmp-field-mapping name="cmrMemberState" persistence-name="FK_COUNTRY">
    <entity-ref home="Country">
    <cmp-field-mapping persistence-name="FK_COUNTRY" persistence-type="NUMBER(10)"/>
    </entity-ref>
    <entity-deployment>
    ============================================================
    DEPLOY ERROR:-
    05/08/24 11:20:18 Auto-deploying - inspections-EJB.jar (No previous deployment found)...
    05/08/24 11:20:25 Encountered "IN ( o . cmrMemberState" at line 1, column 13.
    Was expecting one of:
    "AbstractSchemaName" ...
    "IN" "(" "IdentificationVar" "." "SingleValuedCmrField" ...
    "IN" "(" "IdentificationVar" "." "CollectionValuedCmrField" ...
    EJB QL statement : 'select object(o) from NCA o, IN (o.cmrMemberState) AS cmr where cmr.pkCountry = ?1'
    EJB QL method : public abstract java.util.Collection inspections.ejb.entity.NCALocalHome.findNCAByCountry(java.lang.Long) throws javax.ejb.FinderException

    OC4J used is 10g

  • CRM Relationship data

    Hi All
    Does anyone know how i could get relationship data from CRM Interaction centre 4.0. eg: I have 1000 Sold to BP's and need the relevant SHIP to / contact persons linked to them.
    I think it will probably be stored in a table similar to SE16N in R3 but have no clue where to get this data.
    Any help will be appreciated and points awarded.
    Regards
    Avi Patel

    Hi Avinash,
    The shipment details/ related attributes will be available in order level. if you want to do something in IC Web with that.. I think you have to check the entity named something like shippingset ( in 4.0 ).
    Regards, Sudeep..

  • EJB 3.0 entity tables not getting created

    I'm trying to use EJB 3.0 and can't seem to get JDeveloper to create a table in the database for an EJB 3.0 entity.
    I'm using JDeveloper Studio Edition Version 10.1.3.1.0.3914 on WinXP SP 2, Java 1.5.0_06, with Oracle Express, running in the debugger using the embedded OC4J server.
    I have created 1 entity (Customer), 1 stateless session bean (CustomerFacade), and 1 JSF (index.jspx, which allows data entry to create a Customer entity). I'm able to input fields for a Customer instance on the index.jspx form, and transmit that to the CustomerFacadeBean to persist. The call to em.persist(entity) returns without error, however, when the transaction is committed, I get the following exception indicating that the table CUSTOMER does not exist.
    Partial Exception Trace:
    javax.faces.FacesException: #{customer.saveCustomer}: javax.faces.el.EvaluationException: javax.ejb.EJBException: An exception occurred during transaction completion: ; nested exception is:
         javax.transaction.RollbackException: returning error in transaction: Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.7 (Build 060720)): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00942: table or view does not exist
    Error Code: 942
    Call:INSERT INTO CUSTOMER (ID, EMAILADDR, LASTNAME, VERSION, FIRSTNAME) VALUES (?, ?, ?, ?, ?)
         bind => [null, [email protected], Hart, 1, Rick]
    Query:InsertObjectQuery(com.toolcafe.model.Customer@11ca701); nested exception is: oracle.oc4j.rmi.OracleRemoteException: An exception occurred during transaction completion: ; nested exception is:
         javax.transaction.RollbackException: returning error in transaction: Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.7 (Build 060720)): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00942: table or view does not exist
    Error Code: 942
    The full stack trace is at the bottom of this message if that will help.
    I want to generate the database schema from the EJB entities, and have setup persistence.xml to do so -- at least I think so.
    Following is all the relevant data. I sure hope someone can help with this. I've been struggling with various problems for days (for something that should just easily work) and I'm on a tight schedule. Please help!!
    persisence.xml:
    <?xml version="1.0" encoding="windows-1252" ?>
    <persistence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
    version="1.0" xmlns="http://java.sun.com/xml/ns/persistence">
    <persistence-unit name="SmashPU">
    <properties>
    <property name="toplink.logging.level" value="FINEST"/>
    <property name="toplink.ddl-generation" value="drop-and-create-tables"/>
    </properties>
    </persistence-unit>
    </persistence>
    Customer.java
    package com.toolcafe.model;
    import java.io.Serializable;
    import javax.persistence.Entity;
    import javax.persistence.GeneratedValue;
    import javax.persistence.GenerationType;
    import javax.persistence.Id;
    import javax.persistence.NamedQuery;
    import javax.persistence.SequenceGenerator;
    import javax.persistence.TableGenerator;
    import javax.persistence.Version;
    @Entity
    @NamedQuery(name = "Customer.findAll", query = "select o from Customer o")
    @SequenceGenerator(name="myseq")
    public class Customer implements Serializable {
    private Integer id;
    private Integer version;
    private String firstName;
    private String lastName;
    private String emailAddr;
    public Customer() {
    @Id
    public Integer getId() {
    return id;
    public void setId(Integer id) {
    this.id = id;
    @Version
    public Integer getVersion() {
    return version;
    public void setVersion(Integer version) {
    this.version = version;
    public String getFirstName() {
    return firstName;
    public void setFirstName(String firstName) {
    this.firstName = firstName;
    public String getLastName() {
    return lastName;
    public void setLastName(String lastName) {
    this.lastName = lastName;
    public String getEmailAddr() {
    return emailAddr;
    public void setEmailAddr(String emailAddr) {
    this.emailAddr = emailAddr;
    Database Info:
    I created a schema called, "SMASH", in Oracle Express.
    he Offline Database Sources contain the Customer table, but only the ID and VERSION columns, as does the Oracle Express schema.
    Exception Trace:
    javax.faces.FacesException: #{customer.saveCustomer}: javax.faces.el.EvaluationException: javax.ejb.EJBException: An exception occurred during transaction completion: ; nested exception is:
         javax.transaction.RollbackException: returning error in transaction: Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.7 (Build 060720)): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00942: table or view does not exist
    Error Code: 942
    Call:INSERT INTO CUSTOMER (ID, EMAILADDR, LASTNAME, VERSION, FIRSTNAME) VALUES (?, ?, ?, ?, ?)
         bind => [null, [email protected], Hart, 1, Rick]
    Query:InsertObjectQuery(com.toolcafe.model.Customer@11ca701); nested exception is: oracle.oc4j.rmi.OracleRemoteException: An exception occurred during transaction completion: ; nested exception is:
         javax.transaction.RollbackException: returning error in transaction: Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.7 (Build 060720)): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00942: table or view does not exist
    Error Code: 942
    Call:INSERT INTO CUSTOMER (ID, EMAILADDR, LASTNAME, VERSION, FIRSTNAME) VALUES (?, ?, ?, ?, ?)
         bind => [null, [email protected], Hart, 1, Rick]
    Query:InsertObjectQuery(com.toolcafe.model.Customer@11ca701)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:98)
         at javax.faces.component.UICommand.broadcast(UICommand.java:332)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:287)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:401)
         at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:95)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:367)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:336)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:196)
         at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:105)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: javax.faces.el.EvaluationException: javax.ejb.EJBException: An exception occurred during transaction completion: ; nested exception is:
         javax.transaction.RollbackException: returning error in transaction: Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.7 (Build 060720)): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00942: table or view does not exist
    Error Code: 942
    Call:INSERT INTO CUSTOMER (ID, EMAILADDR, LASTNAME, VERSION, FIRSTNAME) VALUES (?, ?, ?, ?, ?)
         bind => [null, [email protected], Hart, 1, Rick]
    Query:InsertObjectQuery(com.toolcafe.model.Customer@11ca701); nested exception is: oracle.oc4j.rmi.OracleRemoteException: An exception occurred during transaction completion: ; nested exception is:
         javax.transaction.RollbackException: returning error in transaction: Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.7 (Build 060720)): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00942: table or view does not exist
    Error Code: 942
    Call:INSERT INTO CUSTOMER (ID, EMAILADDR, LASTNAME, VERSION, FIRSTNAME) VALUES (?, ?, ?, ?, ?)
         bind => [null, [email protected], Hart, 1, Rick]
    Query:InsertObjectQuery(com.toolcafe.model.Customer@11ca701)
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:150)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:92)
         ... 25 more
    Caused by: javax.ejb.EJBException: An exception occurred during transaction completion: ; nested exception is:
         javax.transaction.RollbackException: returning error in transaction: Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.7 (Build 060720)): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00942: table or view does not exist
    Error Code: 942
    Call:INSERT INTO CUSTOMER (ID, EMAILADDR, LASTNAME, VERSION, FIRSTNAME) VALUES (?, ?, ?, ?, ?)
         bind => [null, [email protected], Hart, 1, Rick]
    Query:InsertObjectQuery(com.toolcafe.model.Customer@11ca701); nested exception is: oracle.oc4j.rmi.OracleRemoteException: An exception occurred during transaction completion: ; nested exception is:
         javax.transaction.RollbackException: returning error in transaction: Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.7 (Build 060720)): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00942: table or view does not exist
    Error Code: 942
    Call:INSERT INTO CUSTOMER (ID, EMAILADDR, LASTNAME, VERSION, FIRSTNAME) VALUES (?, ?, ?, ?, ?)
         bind => [null, [email protected], Hart, 1, Rick]
    Query:InsertObjectQuery(com.toolcafe.model.Customer@11ca701)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.ejb.EJBUtils.createEJBException(EJBUtils.java:365)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.ejb.EJBUtils.createEJBException(EJBUtils.java:356)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.ejb.AbstractEJBObject.OC4J_handleUncheckedException(AbstractEJBObject.java:396)
         at CustomerFacade_RemoteProxy_51ldkeg.persistEntity(Unknown Source)
         at form.CustomerForm.saveCustomer(CustomerForm.java:66)
         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:585)
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:146)
         ... 26 more
    Caused by: oracle.oc4j.rmi.OracleRemoteException: An exception occurred during transaction completion: ; nested exception is:
         javax.transaction.RollbackException: returning error in transaction: Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.7 (Build 060720)): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00942: table or view does not exist
    Error Code: 942
    Call:INSERT INTO CUSTOMER (ID, EMAILADDR, LASTNAME, VERSION, FIRSTNAME) VALUES (?, ?, ?, ?, ?)
         bind => [null, [email protected], Hart, 1, Rick]
    Query:InsertObjectQuery(com.toolcafe.model.Customer@11ca701)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.ejb.EJBTransactionManager.end(EJBTransactionManager.java:141)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:57)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
         ... 33 more
    Caused by: javax.transaction.RollbackException: returning error in transaction: Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.7 (Build 060720)): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00942: table or view does not exist
    Error Code: 942
    Call:INSERT INTO CUSTOMER (ID, EMAILADDR, LASTNAME, VERSION, FIRSTNAME) VALUES (?, ?, ?, ?, ?)
         bind => [null, [email protected], Hart, 1, Rick]
    Query:InsertObjectQuery(com.toolcafe.model.Customer@11ca701)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.ApplicationServerTransaction.checkForRollbackOnlyWhileInCommit(ApplicationServerTransaction.java:582)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.ApplicationServerTransaction.doCommit(ApplicationServerTransaction.java:247)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.ApplicationServerTransaction.commit(ApplicationServerTransaction.java:130)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.ApplicationServerTransactionManager.commit(ApplicationServerTransactionManager.java:433)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.ejb.EJBTransactionManager.end(EJBTransactionManager.java:132)
         ... 39 more
    Caused by: Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.7 (Build 060720)): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00942: table or view does not exist
    Error Code: 942
    Call:INSERT INTO CUSTOMER (ID, EMAILADDR, LASTNAME, VERSION, FIRSTNAME) VALUES (?, ?, ?, ?, ?)
         bind => [null, [email protected], Hart, 1, Rick]
    Query:InsertObjectQuery(com.toolcafe.model.Customer@11ca701)
         at oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:295)
         at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:639)
         at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:688)
         at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:477)
         at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:437)
         at oracle.toplink.essentials.internal.sessions.AbstractSession.executeCall(AbstractSession.java:675)
         at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:213)
         at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:199)
         at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.insertObject(DatasourceCallQueryMechanism.java:331)
         at oracle.toplink.essentials.internal.queryframework.StatementQueryMechanism.insertObject(StatementQueryMechanism.java:176)
         at oracle.toplink.essentials.internal.queryframework.StatementQueryMechanism.insertObject(StatementQueryMechanism.java:192)
         at oracle.toplink.essentials.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(DatabaseQueryMechanism.java:457)
         at oracle.toplink.essentials.queryframework.InsertObjectQuery.executeCommit(InsertObjectQuery.java:74)
         at oracle.toplink.essentials.internal.queryframework.DatabaseQueryMechanism.performUserDefinedWrite(DatabaseQueryMechanism.java:635)
         at oracle.toplink.essentials.internal.queryframework.DatabaseQueryMechanism.performUserDefinedInsert(DatabaseQueryMechanism.java:599)
         at oracle.toplink.essentials.internal.queryframework.DatabaseQueryMechanism.insertObjectForWriteWithChangeSet(DatabaseQueryMechanism.java:495)
         at oracle.toplink.essentials.queryframework.WriteObjectQuery.executeCommitWithChangeSet(WriteObjectQuery.java:130)
         at oracle.toplink.essentials.internal.queryframework.DatabaseQueryMechanism.executeWriteWithChangeSet(DatabaseQueryMechanism.java:283)
         at oracle.toplink.essentials.queryframework.WriteObjectQuery.executeDatabaseQuery(WriteObjectQuery.java:67)
         at oracle.toplink.essentials.queryframework.DatabaseQuery.execute(DatabaseQuery.java:609)
         at oracle.toplink.essentials.queryframework.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:536)
         at oracle.toplink.essentials.queryframework.ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery(ObjectLevelModifyQuery.java:123)
         at oracle.toplink.essentials.queryframework.ObjectLevelModifyQuery.executeInUnitOfWork(ObjectLevelModifyQuery.java:95)
         at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2218)
         at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:937)
         at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:894)
         at oracle.toplink.essentials.internal.sessions.CommitManager.commitNewObjectsForClassWithChangeSet(CommitManager.java:254)
         at oracle.toplink.essentials.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:175)
         at oracle.toplink.essentials.internal.sessions.AbstractSession.writeAllObjectsWithChangeSet(AbstractSession.java:2638)
         at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.commitToDatabase(UnitOfWorkImpl.java:1030)
         at oracle.toplink.essentials.internal.ejb.cmp3.base.RepeatableWriteUnitOfWork.commitToDatabase(RepeatableWriteUnitOfWork.java:353)
         at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1112)
         at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.issueSQLbeforeCompletion(UnitOfWorkImpl.java:2428)
         at oracle.toplink.essentials.internal.ejb.cmp3.base.RepeatableWriteUnitOfWork.issueSQLbeforeCompletion(RepeatableWriteUnitOfWork.java:177)
         at oracle.toplink.essentials.transaction.AbstractSynchronizationListener.beforeCompletion(AbstractSynchronizationListener.java:116)
         at oracle.toplink.essentials.transaction.JTASynchronizationListener.beforeCompletion(JTASynchronizationListener.java:76)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.ApplicationServerTransaction.callBeforeCompletion(ApplicationServerTransaction.java:1019)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.ApplicationServerTransaction.doCommit(ApplicationServerTransaction.java:246)
         ... 42 more
    Caused by: java.sql.SQLException: ORA-00942: table or view does not exist
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:282)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:639)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:185)
         at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatement.java:633)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1161)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3001)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3074)
         at oracle.oc4j.sql.proxy.PreparedStatementBCELProxy.executeUpdate(PreparedStatementBCELProxy.java:37)
         at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:632)
         ... 78 more

    You have to add the property toplink.ddl-generation.output-mode to your persistence.xml file, for example:
    <?xml version="1.0" encoding="windows-1252" ?>
    <persistence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
    version="1.0" xmlns="http://java.sun.com/xml/ns/persistence">
    <persistence-unit name="model">
    <jta-data-source>jdbc/jdm-akoDS</jta-data-source>
    <properties>
    <property name="toplink.logging.level" value="INFO"/>
    <property name="toplink.target-database" value="Oracle"/>
    <property name="toplink.ddl-generation" value="drop-and-create-tables"/>
    <property name="toplink.ddl-generation.output-mode" value="database"/>
    </properties>
    </persistence-unit>
    </persistence>

  • EJB 3.0 Entity Synchronization

    Can I synchronize an EJB 3.0 entity object with a database table?
    I ask specifically for a foreign key I added to the the table after the
    creation of the entity object.
    If I can't how can I do it manually?

    Ok, I misunderstood you. You can do it manually, something like
    // User entity
    @OneToMany(mappedBy = "user")
    private List<UserLoginAttempt> userLoginAttempts;
    // UserLoginAttempt entity
    @ManyToOne // this, by default, expects the foreign key column to be user_id (if 'id' is the name of the primary key field in User); use @JoinColumn(name = "otherName") to specify different name
    private User user;
    ....You can get some automation by creating an entity diagram (New -> Diagrams -> EJB diagram) and dropping your entities on it. Then you can create an entity relationship between them (Bidirectional * to 1).
    Pedja

  • Deployment descriptor error for an EJB 3.0 entity bean module

    Hi all,
    i'm facing an error deploying an EJB 3.0 entity bean module wrapped in an enterprise application on WebLogic 10.
    The application is composed as follows:
    WASEnterprise.ear
    |-META-INF
    |-application.xml
    |-WAS.jar
    |-META-INF
    |-persistence.xml
    In other words the application server is unable to load persistence.xml deployment descriptor and,during deployment, it throws an error message like this:
    <Error> <J2EE> <BEA-160197> <Unable to load descriptor C:\bea\user_projects\domains\base_domain\autodeploy\WASEnterprise\WAS/META-INF/persistence.xml of module WAS. The error is weblogic.descriptor.DescriptorException: Unmarshaller failed
    I suppose that the persistence.xml is correct since i can deploy the application on jboss without any problem.
    The persistence.xml deployment descriptor is:
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence>
    <persistence-unit name="CNT4">
    <non-jta-data-source>cnt5ds</non-jta-data-source>
    <class>it.eni.italgas.was.db.entity.AsiDisco</class>
    <class>it.eni.italgas.was.db.entity.AsiErrori</class>
    <class>it.eni.italgas.was.db.entity.WasAsiRouting</class>
    <class>it.eni.italgas.was.db.entity.WasAsiRoutingId</class>
    <class>it.eni.italgas.was.db.entity.WasAsiSchemas</class>
    </persistence-unit>
    </persistence>
    and the application.xml deployment descriptor is:
    <?xml version="1.0" encoding="UTF-8"?>
    <application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="5" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd">
    <display-name>WASEnterprise</display-name>
    <module id="myeclipse.1188512259959">
    <ejb>WAS.jar</ejb>
    </module>
    </application>
    I don't use any other weblogic specific deployment descriptor.
    Have you ever experienced such a strange behaviour? Can you suggest something to solve the problem?
    Thanks inadvance.
    Denis Maggiorotto

    Hi all,
    i'm facing an error deploying an EJB 3.0 entity bean module wrapped in an enterprise application on WebLogic 10.
    The application is composed as follows:
    WASEnterprise.ear
    |-META-INF
    |-application.xml
    |-WAS.jar
    |-META-INF
    |-persistence.xml
    In other words the application server is unable to load persistence.xml deployment descriptor and,during deployment, it throws an error message like this:
    <Error> <J2EE> <BEA-160197> <Unable to load descriptor C:\bea\user_projects\domains\base_domain\autodeploy\WASEnterprise\WAS/META-INF/persistence.xml of module WAS. The error is weblogic.descriptor.DescriptorException: Unmarshaller failed
    I suppose that the persistence.xml is correct since i can deploy the application on jboss without any problem.
    The persistence.xml deployment descriptor is:
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence>
    <persistence-unit name="CNT4">
    <non-jta-data-source>cnt5ds</non-jta-data-source>
    <class>it.eni.italgas.was.db.entity.AsiDisco</class>
    <class>it.eni.italgas.was.db.entity.AsiErrori</class>
    <class>it.eni.italgas.was.db.entity.WasAsiRouting</class>
    <class>it.eni.italgas.was.db.entity.WasAsiRoutingId</class>
    <class>it.eni.italgas.was.db.entity.WasAsiSchemas</class>
    </persistence-unit>
    </persistence>
    and the application.xml deployment descriptor is:
    <?xml version="1.0" encoding="UTF-8"?>
    <application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="5" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd">
    <display-name>WASEnterprise</display-name>
    <module id="myeclipse.1188512259959">
    <ejb>WAS.jar</ejb>
    </module>
    </application>
    I don't use any other weblogic specific deployment descriptor.
    Have you ever experienced such a strange behaviour? Can you suggest something to solve the problem?
    Thanks inadvance.
    Denis Maggiorotto

  • Generating Entity - RelationShip in Oracle SQL Developer.

    Is it possible to generate an Entity - RelationShip diagram from Oracle SQL Developer?
    Thanks in advance,
    Jaime.

    If you're willing to pay the 3000 quid per seat (+ annual support costs), take a look at [Oracle SQL Developer Data Modeler|http://www.oracle.com/technology/products/database/datamodeler/index.html].
    Have fun,
    K.

  • BP - CP:  function modul for relationship-data ?

    Hello forum,
    we have relations between bp and cp. And in this relationship we have the
    contact data like phone/mail etc.
    Is there a function modul which gives me this relationship-data ?
    Thanks
    Gerd

    Hi Gerd,
    Try the FM "BAPI_BUPA_ADDRESS_GETDETAIL", In this FM you need to pass the address GUID and the partner number whic you will get from the table BUT020.
    In order to get the address GUID use the FM "BAPI_BUPA_ADDRESS_GET_NUMBERS" and pass the CP number.
    <b>Reward points if my post helps!!</b>
    Best regards,
    Vikash

  • Date ordered changing when certain parameters are updated.

    Hello All,
    I came across an Issue where DATE ORDERED is changing when certain parameters are updated, such as agreement. Any help is appreciated.
    Thanks in advance.
    Regards,
    Veronica.

    Hello Veronica,
    Negotiation Phase is only for Quotes - it does not apply to Sales orders. You need to create a Defaulting Condition template similar to that called 'In Fulfilment Phase' for Sales orders.
    Here are the details:
    (1) Navigate to Setup >> Rules >> Search for Application='Order Management' and Entity = 'Order Header' >> Once the rules appear click on 'Defaulting Condition template' >> Under 'In Negotiation Phase' create another Validaton template named 'In Fulfillment Phase' >> Enter any Group# >>Under Validation Rules, Select Attribute as 'Transaction Phase' >> Mark it '=' 'Fulfillment' >> Save
    (2) Click Tools (top menu option) >> Generate Defaulting Handler package (you can also run the conc program)
    (3) Go to the Ordered Date defaulting rule and do as I had mentioned below.
    Please let me know if that helped.
    Dipanjan

  • Photos. They are on my macBook, backed up on time machine. Copied them (hours and hours) to external hard drive. They are now in alphabetical order (19,000  of them) NOT IN THEIR EVENTS or date order-and have been taken with different cameras- help!!!!!!

    Photos.
    They are on my macBook, backed up on time machine. There are 19,000+ of them, some rescued from a pc crash- which I used the nifty iPhoto to put back into date order.    
    I want to take them all off my laptop, now............as I need to use it for WORK!!
    Copied them (hours and hours) to another external hard drive.
    They are now in alphabetical order (all 19,000+ of them) NOT IN THEIR EVENTS or date order. (-They have also been taken with different cameras over the years and some of the generic camera numbering remains.)
    I have tried to copy them (only a few as an experiment)  one event at a time, but that again "opens up" the Event "folder" and tips them out as individuals and therefore just lists image letters and numbers alphabetically.
    How can I copy
    the whole library still in  "Events" to an external hard drive?
    the folders/albums I have already made on to this hard drive?
    and how can I add to this back up monthly, again keeping events and folders separate and updated?
    Mac is so user friendly - there must be a way.........
    Thanks

    UPDATE : I have re-installed from disk, various apps that were no longer functioning such as iLife, iWork etc. So, I now can access my photos again.
    Also, I had to re-install all the software for my printer ( Stylus Pro 4880 ) and reset it so the printer is working again.
    Photoshop CS4 won't open. I think I will have to get in touch with Adobe as basically, I guess they have a built-in "blocker" which prevents me from opening the app as the license is for only 1 user and having re-installed the OS, there are now, in effect, 2 users ( Me and Me 1, I think ).
    So, having added on a new external HD, Time Machine has made a copy of most of the files, folders, apps etc onto the external HD. The internal HD is still nearly full ( 220 GBs out of 232 GBs ).
    I am guessing the way to go now in order to free up space on the internal HD is to delete/trash older photos from my iPhoto library and hope that if needed, I will be able to access them on the external HD.
    Am I correct ? Please advise before I do something I will regret.
    Thanks, Sean.

  • IP - characteristic relationship/ data slices

    Hi Guys,
    I am very new to IP and would like to have some help regarding the following with some simple example
    1) characteristic relationship
    2) data slices
    3) locking
    Some examples with the above is much appreciated.
    where can i get some good document explaining this ?
    Thanks in advance...

    Hi,
      Please find below the examples for characteristic relationship and data slice,
    1. Characteristic relationship:
                 Consider that you have characteristics called "Country" and "Continent" in your report (also in aggreagtion level).
    You cannot always expect the end user to enter the correct continent for a country. In this case, you can create a char rel
    based on the relastionship between these two characteristics (attribute, hierarchy or relationship data loaded to a DSO),where the source is "Country" and the target is "Continent". So when ever the user enters country and continent the char rel validates the entry based on the reference data (master data, hierrarchy or DSO data) and throws error if it s wrong. Apart from this by creating "With derivation" char rel, you can even derive continent value from country with out the user even entering the value in thye report.
    2. Data Slice:
              Consider that your planning requirement is you need to plan on a monthly basis which is like during current month you caa plan for the next month. In this case all other months except the next month should not be available for planning. In this case you can create a daat slice of type "Selection" where in you select '0CALMNONTH' and then filter it to the variable '0CMONTH' +1
    where in you "Exclude" this selection. So now all the other months except next month at any point of time will be disabled for planning.
    You can go through the following links for your reference,
    Char rel - [http://help.sap.com/SAPHELP_NW04s/helpdata/EN/43/1c3d0f31b70701e10000000a422035/frameset.htm]
    Data slice - [http://help.sap.com/SAPHELP_NW04s/helpdata/EN/43/1c3d0f31b70701e10000000a422035/frameset.htm]
    Hope this solves your doubt.
    Regards,
    Balajee

  • Apple TV (1st gen) photos in an Event not in date order

    I have synced selected Events from iPhoto to my Apple TV 1st gen with iTunes 11.0.1
    The events synced are "merged" events from 2 cameras on a month-by-month basis.
    In iPhoto, I have the event sorted by date, but on the Apple TV, the photos are NOT in date order.
    How can I get the Apple TV to reflect the choice I make in iPhoto ??

    Thanks Winston
    DIT-DIT-DIT-DAH

  • In the last 36 hours my photos have jumbled within various albums. Random photos have attached at the end of an unrelated album, old photos have appeared again on Recently Added, some photos are missing but still on "collections". No date order

    Within the last 36 hours my photo albums have turned into a real jumbled mess. Random photos have appeared at the bottom of my Recently Added album. In most cases it's a copy of a photo that was taken months or years ago so now it appears twice.. 200 random photos have appeared in an unrelated album.  Some photos are missing completely. The date order is correct in some places and then it goes back and forth over the months and years. The "collections" appears to be okay.  This morning when I went into the photo app About 50 photos that were permanently deleted 3 months ago reappeared on the Recently Added Album which  I deleted again.  if  I delete these irreplaceable photos from the unwanted album it will delete the photo completely. Help please - this is so annoying and frustrating. I hate to think when I turn the iPad on tmoor row what else will have changed .

    Quick Update:
    I usually have my Mac laptop up with Messages running on it.  As you know, it will receive the same messages you send/receive on your iPhone.  I thought all my old photos would be there too, but they have all disappeared as well except for the last few.
    Messages is supposed to archive all old photos to  a directory called ~/Library/Messages/Attachments.  On my mac, this was a 0 byte file that was created back in Jan 2014.  As a result, none of the old photos got saved on my Messages app either.  I looked at a Time Machine Backup and it has been the case since September (no earlier backups available).  So, it's unclear how long this issue has been going on for my Messages app and how related it is to my iPhone problem.
    In any case, if any of you use Messages, you may be able to recover your photos in that directory provided it didn't get trashed like mine did.  I moved the file and created a new Attachments directory.  Upon relaunch, Messages started properly storing new photos in there again.
    Either there was a really terrible bug in the Apple software or something malicious has happened.
    P.S.  I'm running OS 10.9.5 Mavericks.   There is a thread of people with this problem on Yosemite here:
    No pictures are shown in Message om Mac
    This seems like a pretty seriously terrible bug.  I will be talking again to AppleCare on Wednesday and I hope they can escalate this.

  • Dunning Letters- Invoice Date Order

    Hi all,
    When running Dunning the invoices are shown NOT in date order ie oldest invoice first in the list and then going through in date order to the latest at the bottom. Is it possible to have the oldest invoice at the top down and going down to the latest invoice at the bottom?
    Thank you,
    MB

    Hi,
    Yes you would think that but in fact the dates are all mixed up ie 11.09.10 then 11.08.10 then 08.11.10 etc
    Strange but true!
    Any ideas?
    MB

  • While trying to open the order in co03 or co02, It is not opening and showing the error message as "Inconsistent data : order 107434 16.09.2013, duplicate entry o 0020. is showing ?

    Hi,
    While trying to open the order in co03, co02, I am getting the below error message : Inconsistent data : order 107434 16.09.2013, duplicate entry o 0020 is showing. Please guide me the way forward.
    Regards,
    Mastan.

    Hi Mastan
    The report mentioned by Rajen should clear the inconsistent records.
    Please observe that you could have found this by yourself report with a quick note search for this error message or even searching for old threads.
    Even a google search points to the solution.
    You should do your own research before opening such kind of thread.
    BR
    Caetano

Maybe you are looking for

  • Remote Access Media Not Working correctly

    I just installed the newly released Media Plugin for Essentials Server 2012 R2. I was really hoping this would solve the problems I had with first version of Essentials 2012. The media worked fine on Windows Home Server 2011, but I've never been able

  • Who can tell me what's wrong about the weblogic server?

    Fri Nov 24 09:30:19 CST 2000:<I> <ServletContext-General> *.jsp: initialization complete Fri Nov 24 09:31:11 CST 2000:<E> <HTTP> Connection failure java.net.SocketException: Connection shutdown: JVM_recv in socket input stream read at java.net.Socket

  • CD Burn error message

    MacBook wii not burn CD and opens Error Message.  I went to system profile, then to cd disk, then to system preferences to set window to open iTunes for cd disk drive.  Fixed. :)

  • Nothing seems to be working. Help?

    Someone, help. I've tried resetting my iPod, and connecting it to my computer and charging it, but it has absolutely no response to anything. It won't even pop up as a removable disk on my computer. Help?

  • Time capsule does not show the blue bars near backing up.  Any idea why?

    Time Capsule is not showing that it is backing up.  Any idea why?