Copy entity between EntityManagers - Exception TOPLINK-7251

I am trying to copy rows from one database to another using Toplink. The tables have a composite primary key. Sample.java copies over three thousand rows successfully before an exception.
h3. Configuration
        <persistence-unit name="STLMOSQL">
          <provider>oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider</provider>
          <class>jpa.Ineligiblereasonxref</class>
          <class>jpa.IneligiblereasonxrefPK</class>
     </persistence-unit>
     <persistence-unit name="DataWareHouse">
          <provider>oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider</provider>
          <class>jpa.Ineligiblereasonxref</class>
          <class>jpa.IneligiblereasonxrefPK</class>
     </persistence-unit>
          </properties>
     </persistence-unit>h3. Sample.java
   public static void main(String[] args) {
      EntityManagerFactory emf1 = Persistence.createEntityManagerFactory("em1");
      EntityManager em1 = emf1.createEntityManager();
      EntityManagerFactory emf2 = Persistence.createEntityManagerFactory("em2");
      EntityManager em2 = emf2.createEntityManager();
      try {
         Query q = em1.createQuery("Select i from Ineligiblereasonxref i") ;
         List<Ineligiblereasonxref> xrefs = (List<Ineligiblereasonxref>) q.getResultList();
         em1.clear();
         for(Ineligiblereasonxref xref :  xrefs){
              em2.getTransaction().begin();
              em2.merge(xref);
              em2.getTransaction().commit();
      }finally {
          em2.close();
          emf2.close();
          em1.close();
          emf1.close();
   }h3. Ineligiblereasonxref.java
@Entity
public class Ineligiblereasonxref implements Serializable {
     @EmbeddedId
     private IneligiblereasonxrefPK pk;
     private String ineligiblereasoncode;
        ... deleted ...
}h3. IneligiblereasonxrefPK.java
@Embeddable
public class IneligiblereasonxrefPK implements Serializable {
     private String sourceineligiblereasoncode;
     private long datasourceid;
     private long sourcetableid;
        ... deleted ...
}h3. Exception
Exception [TOPLINK-7251] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.ValidationException
Exception Description: The attribute [sourceineligiblereasoncode] of class [jpa.IneligiblereasonxrefPK] is mapped to a primary key column in the database. Updates are not allowed.
     at oracle.toplink.essentials.exceptions.ValidationException.primaryKeyUpdateDisallowed(ValidationException.java:2222)
     at oracle.toplink.essentials.mappings.foundation.AbstractDirectMapping.writeFromObjectIntoRowWithChangeRecord(AbstractDirectMapping.java:750)
     at oracle.toplink.essentials.internal.descriptors.ObjectBuilder.buildRowWithChangeSet(ObjectBuilder.java:837)Edited by: timmaryson on May 11, 2009 1:52 PM

Thanks for the reply Chris. I actually had tried this, but it didn't help. I did find the problem though. Maybe someone else may run into this in the future, so I will explain.
I am copying rows between databases with different character set collations. The first database is case sensitive. The second database is case insensitive.
The first database has one row with the key '1,394,CM' and and another row with the key '1,394,cm'. The second database treats these as the same.
merge() flags this as an error when it notices that the combination of the new and old objects yields a new key.
I changed the collation to be case sensitive on MS SQL Server. [http://msdn.microsoft.com/en-us/library/aa258233(SQL.80).aspx]
CREATE TABLE  INELIGIBLEREASONXREF (
    SOURCEINELIGIBLEREASONCODE varchar(10) COLLATE SQL_Latin1_General_CP1_CS_AS NOT NULL,
)CP1 - Default code page
CS - Case Sensitive.
AS - Accent Sensitive
I am interested to know if Toplink's behavior is "correct". Some users may wish to configure this behavior.
I did not find any reference to collation nor case sensitivity in "JSR 220: Enterprise JavaBeansTM,Version 3.0
Java Persistence API" nor in TopLink. JDBC reports the column's case sensitivity. So the potential is there to extend Top Link.
Thanks again for the reply,
Tim
Edited by: timmaryson on May 11, 2009 12:29 PM
Edited by: timmaryson on May 11, 2009 1:52 PM
Edited by: timmaryson on May 11, 2009 2:07 PM

Similar Messages

  • EXCEPTION [TOPLINK-7056] The wrong object was registered into the UnitOfWor

    Hello,
    I am using Toplink 9.0.3.4. I have a one to many relationship defined. One DTOStep can have several DTOStepTexte. The XML descriptions for the relationship are:
    DTOStep:
                        <database-mapping>
                             <attribute-name>texteList</attribute-name>
                             <read-only>false</read-only>
                             <reference-class>com.bnpparibas.bfi.ttk.dto.DTOStepTexte</reference-class>
                             <is-private-owned>true</is-private-owned>
                             <uses-batch-reading>true</uses-batch-reading>
                             <indirection-policy>
                                  <mapping-indirection-policy>
                                       <type>oracle.toplink.internal.indirection.NoIndirectionPolicy</type>
                                  </mapping-indirection-policy>
                             </indirection-policy>
                             <container-policy>
                                  <mapping-container-policy>
                                       <container-class>java.util.ArrayList</container-class>
                                       <type>oracle.toplink.internal.queryframework.ListContainerPolicy</type>
                                  </mapping-container-policy>
                             </container-policy>
                             <ascending-order-by-query-key>noSeq</ascending-order-by-query-key>
                             <source-key-fields>
                                  <field>BATCH_SP2.ID_BATCH</field>
                             </source-key-fields>
                             <target-foreign-key-fields>
                                  <field>BATCH_SP2_TEXTE.ID_BATCH</field>
                             </target-foreign-key-fields>
                             <type>oracle.toplink.mappings.OneToManyMapping</type>
                        </database-mapping>
    DTOStepTexte:
                        <database-mapping>
                             <attribute-name>step</attribute-name>
                             <read-only>false</read-only>
                             <reference-class>com.bnpparibas.bfi.ttk.dto.DTOStep</reference-class>
                             <is-private-owned>true</is-private-owned>
                             <uses-batch-reading>true</uses-batch-reading>
                             <indirection-policy>
                                  <mapping-indirection-policy>
                                       <type>oracle.toplink.internal.indirection.NoIndirectionPolicy</type>
                                  </mapping-indirection-policy>
                             </indirection-policy>
                             <uses-joining>true</uses-joining>
                             <foreign-key-fields>
                                  <field>BATCH_SP2_TEXTE.ID_BATCH</field>
                             </foreign-key-fields>
                             <source-to-target-key-field-associations>
                                  <association>
                                       <association-key>BATCH_SP2_TEXTE.ID_BATCH</association-key>
                                       <association-value>BATCH_SP2.ID_BATCH</association-value>
                                  </association>
                             </source-to-target-key-field-associations>
                             <type>oracle.toplink.mappings.OneToOneMapping</type>
                        </database-mapping>
    I do the following:
    - A DTOStep containing 4 DTOStepTexte is read from the Oracle database in a session bean and sent to a swing client.
    - The DTOStep is modified on the client.
    - The modified DTOStep is sent back to the session bean where the following code is executed:
    public DTOStep modifyStep(DTOStep step) throws TTKDataNotFoundException
    Session session = null;
    try
         // Récupération de la session.
         session = getSession();
         // Récupération de l'unité de travail.
         UnitOfWork uow = session.getActiveUnitOfWork();
         uow.performFullValidation();
         // Vérification que le step existe. Lecture sur clé primaire.
         if (!session.doesObjectExist(step))
         throw new TTKDataNotFoundException();
         // Registration du step à modifier en incorporant les modifs utilisateur.
         m_logger.debug("step = " + FmkCommonUtilities.toStringFromGetters(step));
         DTOStep stepClone = (DTOStep) uow.mergeCloneWithReferences(step);
         m_logger.debug("stepClone = " + FmkCommonUtilities.toStringFromGetters(stepClone));
         // Mise à jour des champs techniques.
         Date date = new Date(System.currentTimeMillis());
         stepClone.setCUtiMaj(getCUti());
         stepClone.setDMaj(date);
         // Renvoi du step tel que dans la base.
         // Une copie en est faite puisque le clone ne doit pas être
         // utilisé en dehors de la transaction.
         DTOUtilities.setFromGetters(stepClone, step);
         return step;
    catch (TTKDataNotFoundException e)
    context.setRollbackOnly();
    throw e;
    catch (EJBException e)
    context.setRollbackOnly();
    throw e;
    catch (Throwable t)
    context.setRollbackOnly();
    m_logger.error("Error in " + FmkCommonUtilities.getCurrentMethodName(), t);
    throw new EJBException(t.toString());
    finally
    // On libère la session.
    if (session != null)
    session.release();
    I have the folowing behaviour:
    - if the list of DTOStepTexte is not modified, everything is ok.
    - if a new DTOStepTexte is added, everything is ok.
    - if a DTOStepTexte is removed, I have the following exception on the mergeCloneWithReferences() call:
    EXCEPTION [TOPLINK-7056] (TopLink - 9.0.3.4 (Build 432)): oracle.toplink.exceptions.ValidationException
    EXCEPTION DESCRIPTION: The wrong object was registered into the UnitOfWork. The object [com.bnpparibas.bfi.ttk.dto.DTOStep@1a772d] should be the object from the parent cache [com.bnpparibas.bfi.ttk.dto.DTOStep@2cfd62].
         at oracle.toplink.exceptions.ValidationException.wrongObjectRegistered(Unknown Source)
         at oracle.toplink.publicinterface.UnitOfWork.checkExistence(Unknown Source)
         at oracle.toplink.publicinterface.UnitOfWork.internalRegisterObject(Unknown Source)
         at oracle.toplink.internal.sessions.MergeManager.getTargetVersionOfSourceObject(Unknown Source)
         at oracle.toplink.mappings.ObjectReferenceMapping.mergeIntoObject(Unknown Source)
         at oracle.toplink.internal.descriptors.ObjectBuilder.mergeIntoObject(Unknown Source)
         at oracle.toplink.internal.sessions.MergeManager.mergeChangesOfCloneIntoWorkingCopy(Unknown Source)
         at oracle.toplink.internal.sessions.MergeManager.mergeChanges(Unknown Source)
         at oracle.toplink.mappings.CollectionMapping.mergeIntoObject(Unknown Source)
         at oracle.toplink.internal.descriptors.ObjectBuilder.mergeIntoObject(Unknown Source)
         at oracle.toplink.internal.sessions.MergeManager.mergeChangesOfCloneIntoWorkingCopy(Unknown Source)
         at oracle.toplink.internal.sessions.MergeManager.mergeChanges(Unknown Source)
         at oracle.toplink.publicinterface.UnitOfWork.mergeCloneWithReferences(Unknown Source)
         at com.bnpparibas.bfi.ttk.server.ejb.TestToplinkServiceBean.modifyStep(TestToplinkServiceBean.java:795)
         at TestToplinkService_StatelessSessionBeanWrapper2.modifyStep(TestToplinkService_StatelessSessionBeanWrapper2.java:2032)
         at java.lang.reflect.Method.invoke(Native Method)
         at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:119)
         at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:48)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:479)
    Can someone please tell me what is wrong in the way I use toplink ?
    Thank you in advance for your answer.
    Best regards.
    Pierre Laroche

    What does the method DTOUtilities.setFromGetters(stepClone, step); do? If you are copying from step into stepClone you must ensure that all of the references from step are registered first. You should not need to perform this copy anyway as the mergeCloneWithReferences would have copied the data from step.
    --Gordon                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Exception [TOPLINK-48] Multiple writable mappings exist for field

    Hi All
    I am quite new to JPA and Toplink and I am trying to write simple JPA application using toplink essentials as the persistence provider however, when I comppile the code, get errors below saying that Multiple writable mappings exist for a given field i.e. http://J2EEUSER.BANKS.BRANCH_ADDR_POSTCODE. The thing is, I havent tried to map this field i.e. J2EEUSER.BANKS.BRANCH_ADDR_POSTCODE to multiple maps so I'm a bit confused as to why I'm getting this error. I have attached all the the associated code and error messages. I was hoping that some one will be able to help. I am using Eclipse Galileo and OC4j Standalone 10.1.3.4
    The error are
    Runtime Exceptions:
    ; nested exception is:
    javax.persistence.PersistenceException: Exception TOPLINK-0 (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.IntegrityException
    Descriptor Exceptions:
    Exception TOPLINK-48 (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.DescriptorException
    Exception Description: Multiple writable mappings exist for the field http://J2EEUSER.BANKS.BRANCH_ADDR_POSTCODE. Only one may be defined as writable, all others must be specified read-only.
    Mapping: oracle.toplink.essentials.mappings.DirectToFieldMappinghttp://branch_Addr_Road_Name-->J2EEUSER.BANKS.BRANCH_ADDR_POSTCODE
    Descriptor: RelationalDescriptor(com.gworx.Bank --> http://DatabaseTable(J2EEUSER.BANKS))
    Exception TOPLINK-48 (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.DescriptorException
    Exception Description: Multiple writable mappings exist for the field http://J2EEUSER.BANKS.BRANCH_ADDR_POSTCODE. Only one may be defined as writable, all others must be specified read-only.
    Mapping: oracle.toplink.essentials.mappings.DirectToFieldMappinghttp://bankName-->J2EEUSER.BANKS.BRANCH_ADDR_POSTCODE
    Descriptor: RelationalDescriptor(com.gworx.Bank --> http://DatabaseTable(J2EEUSER.BANKS))
    Exception TOPLINK-48 (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.DescriptorException
    Exception Description: Multiple writable mappings exist for the field http://J2EEUSER.BANKS.BRANCH_ADDR_POSTCODE. Only one may be defined as writable, all others must be specified read-only.
    Mapping: oracle.toplink.essentials.mappings.DirectToFieldMappinghttp://branch_Addr_Locality-->J2EEUSER.BANKS.BRANCH_ADDR_POSTCODE
    Descriptor: RelationalDescriptor(com.gworx.Bank --> http://DatabaseTable(J2EEUSER.BANKS))
    The entity class is
    package com.gworx;
    import java.io.Serializable;
    import javax.persistence.*;
    import javax.persistence.CascadeType;
    @Entity
    @IdClass(BankPK.class)
    @Table(name = "BANKS", schema = "J2EEUSER")
    public class Bank implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Column(name = "BRANCH_SORTCODE", nullable = false, precision = 6, insertable=false, updatable=false)
    long sortcode;
    @Basic()
    @Column(name = "BANK_NAME", nullable = false, insertable=false, updatable=false)
    String bankName;
    @Basic()
    @Column(name = "BRANCH_NAME", nullable = false, insertable=false, updatable=false)
    String branchName;
    @Basic()
    @Column(name = "BRANCH_ADDR_HOUSE_NAME", nullable = false, insertable=false, updatable=false)
    String branch_Addr_House_Name;
    @Basic()
    @Column(name = "BRANCH_ADDR_ROAD_NAME",nullable = false, insertable=false, updatable=false)
    String branch_Addr_Road_Name;
    @Basic()
    @Column(name = "BRANCH_ADDR_LOCALITY", nullable = false, insertable=false, updatable=false)
    String branch_Addr_Locality;
    @Basic()
    @Column(name = "BRANCH_ADDR_CITY",nullable = false, insertable=false, updatable=false)
    String branch_Addr_City;
    @OneToOne(cascade=CascadeType.ALL)
    @Basic()
    @Column(name = "BRANCH_ADDR_POSTCODE", nullable = false)
    String branch_Addr_Postcode;
    public Bank(){}
    public Bank(
    String bankName,
    String branchName,
    long sortcode,
    String branch_Addr_House_Name,
    String branch_Addr_Road_Name,
    String branch_Addr_Locality,
    String branch_Addr_City,
    String branch_Addr_Postcode)
    this.bankName=bankName;
    this.sortcode=sortcode;
    this.branchName = branchName;
    this.branch_Addr_House_Name=branch_Addr_House_Name;
    this.branch_Addr_Road_Name=branch_Addr_Road_Name;
    this.branch_Addr_Locality=branch_Addr_Locality;
    this.branch_Addr_City=branch_Addr_City;
    this.branch_Addr_Postcode=branch_Addr_Postcode;
    public void setSortcode(long sortcode){
    this.sortcode =sortcode;
    public long getSortCode(){
    return this.sortcode;
    The PK class is
    public class BankPK implements Serializable {
    public long sortcode;
    public BankPK(long sortcode){
    this.sortcode = sortcode;
    public boolean equals(Object obj){
    if(obj==null || !(obj instanceof BankPK)){
    return false;
    else if (((BankPK)obj).sortcode ==sortcode)
    return true;
    else
    return false;
    public int hashCode(){
    StringBuffer buff = new StringBuffer();
    buff.append(sortcode);
    int hashCode =buff.hashCode();
    return hashCode;
    My stateless session bean that I use to create to create the entity is
    package com.gworx;
    import javax.ejb.Local;
    import javax.ejb.Stateless;
    import javax.persistence.*;
    import javax.ejb.Remote;
    import com.gworx.BankBeanRemote;
    @Stateless
    public class BankBean implements BankBeanRemote {
    @PersistenceContext
    EntityManager entMgr;
    public Account account;
    long sortcode, cust_id;
    //Bank Details
    String bankName,branchName,branch_Addr_House_Name,
    branch_Addr_Road_Name,branch_Addr_Locality,
    branch_Addr_City, branch_Addr_Postcode;
    public BankBean() {
    // TODO Auto-generated constructor stub
    // entMgr=emf.createEntityManager();
    public void make_A_Bank(
    String bankName,
    String branchName,
    long sortcode,
    String branch_Addr_House_Name,
    String branch_Addr_Road_Name,
    String branch_Addr_Locality,
    String branch_Addr_City,
    String branch_Addr_Postcode
    this.sortcode=sortcode;
    this.bankName =bankName;
    this.branchName = branchName;
    this.branch_Addr_House_Name=branch_Addr_House_Name;
    this.branch_Addr_Road_Name=branch_Addr_Road_Name;
    this.branch_Addr_Locality=branch_Addr_Locality;
    this.branch_Addr_City=branch_Addr_City;
    this.branch_Addr_Postcode=branch_Addr_Postcode;
    Bank bank = new Bank( bankName,branchName,sortcode,branch_Addr_House_Name,
    branch_Addr_Road_Name,branch_Addr_Locality,
    branch_Addr_City, branch_Addr_Postcode);
    entMgr.persist(bank);
    }

    Hi quophyie,
    try removing the @OneToOne annotation, after all your postcode is just a string, there's nothing to cascade.
    And it would help a lot if you formatted your code.
    Zsom

  • Copy Control between Sales Orders and Deliveries

    Hi Gurus,
    please can you tell me why copy control between Sales Order and Delivery doesn't work?
    At header level, into copy control, we can set 2 requirement routines, one as general requirement for copying (TVCPL-AUBED) and the other one as requirement for grouping orders into deliveries (TVCPL-AUZUS).
    At header level we can also set a routine for data transfer to define how data are passed from Sales Order header to Delivery header (TVCPL-GRUAK).
    Then we can set routines at item level, one as requirement (TVCPL-AUBED) and one as data transfer (TVCPL-GRUAP).
    When delivery is created with VL10A transaction, at header level only the first  general requirement routine is used (FV50B***). Grouping requirement is not used (we also set a break point and the program is not passing into this routine).
    Then it is used the requirement routine at item level (FV50B***).
    Please can you tel me how we camake working the routine for grouping requirement at header level?
    Thank you very much.
    Kind Regards
    Andrea

    Hi, we used standard routine even if to be sure we run also the generation report you mentioned.
    Please any other suggestions?
    Thank you very much.
    Kind Regards
    Andrea

  • How do I copy purchases between 2 itunes libraries on the same computer with different log ins and separate apple user ids?

    How do I copy purchases between 2 itunes libraries on the same computer with different log ins and separate apple user ids?

    Load the library which doesn't contain the songs and drag them into the open iTunes application window. If you need to move them between different computer user accounts, put them into /Users/Shared/.
    (74502)

  • Exception [TOPLINK-4002]

    Hi,I have no idea,help.thanks
    javax.ejb.EJBException: nested exception is: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
         java.rmi.RemoteException: null; nested exception is:
         Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0 (Build b40-rc (03/20/2007))): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: java.net.ConnectException: Error Code: 0
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
         java.rmi.RemoteException: null; nested exception is:
         Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0 (Build b40-rc (03/20/2007))): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: java.net.ConnectException:Connection refused: connect。
    Error Code: 0
         at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:191)
         at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:176)
         at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:123)
         at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(BCELStubBase.java:196)
         at org.acrowise.RCP.__SessionEJB_Remote_DynamicStub.getEmail(__SessionEJB_Remote_DynamicStub.java)
         at org.acrowise.RCP._SessionEJB_Wrapper.getEmail(org.acrowise.RCP._SessionEJB_Wrapper.java)
         at org.acrowise.client.testClient.main(testClient.java:21)
    Caused by: java.rmi.RemoteException: null; nested exception is:
         Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0 (Build b40-rc (03/20/2007))): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: java.net.ConnectException: Connection refused: connect。
    Error Code: 0
         at com.sun.enterprise.iiop.POAProtocolMgr.mapException(POAProtocolMgr.java:237)
         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1337)
         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1267)
         at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:197)
         at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:104)
         at $Proxy82.getEmail(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:585)
         at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:125)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:658)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:198)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1821)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1681)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:1063)
         at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:179)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:781)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.dispatch(CorbaMessageMediatorImpl.java:538)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.doWork(CorbaMessageMediatorImpl.java:2542)
         at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:502)
    Caused by: Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0 (Build b40-rc (03/20/2007))): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: java.net.ConnectException: Connection refused: connect。
    Error Code: 0
         at oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:290)
         at oracle.toplink.essentials.jndi.JNDIConnector.connect(JNDIConnector.java:135)
         at oracle.toplink.essentials.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:170)
         at oracle.toplink.essentials.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:537)
         at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:206)
         at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:212)
         at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:78)
         at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:111)
         at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:84)
         at com.sun.enterprise.util.EntityManagerWrapper._getDelegate(EntityManagerWrapper.java:335)
         at com.sun.enterprise.util.EntityManagerWrapper.createNamedQuery(EntityManagerWrapper.java:733)
         at org.acrowise.RCP.SessionEJBBean.getEmail(SessionEJBBean.java:98)
         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.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1055)
         at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:163)
         at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2846)
         at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3930)
         at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:190)
         ... 17 more
    Caused by: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: java.net.ConnectException: Connection refused: connect。
         at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:102)
         at oracle.toplink.essentials.jndi.JNDIConnector.connect(JNDIConnector.java:130)
         ... 36 more
    javax.ejb.EJBException: nested exception is: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
         java.rmi.RemoteException: null; nested exception is:
         Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0 (Build b40-rc (03/20/2007))): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: java.net.ConnectException Connection refused: connect。
    Error Code: 0
         at org.acrowise.RCP._SessionEJB_Wrapper.getEmail(org.acrowise.RCP._SessionEJB_Wrapper.java)
         at org.acrowise.client.testClient.main(testClient.java:21)

    TopLink Essentials is attempting to connect to a data source within your container and failing. Does the data source name provided in your persistence.xml match what is configured in the container?
    Doug

  • While scheduling I am getting the Exception [TOPLINK-4002] Error

    Dear All,
    While scheduling I am getting the following Error
    Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException Internal Exception: java.sql.SQLException: No more data to read from socketError Code: 17410 Call:UPDATE SEQUENCE SET SEQ_COUNT = SEQ_COUNT + 1 WHERE SEQ_NAME = 'SUBSCRIPTION_ID_SEQ' Query:DataModifyQuery()
    Error Detail
    I am Using BI Publisher 10.1.3.3.1

    Yes, Please I need your support
    I have this issue related to this subject.
    But I have two databases Oracle 10g release 2 and the toplink have thi url jdbc
    jdbc:oracle:thin:@
    (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.33.12.38)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.33.12.39)(PORT = 1521))
    (LOAD_BALANCE = yes)
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = MITDB)
    (FAILOVER_MODE =(TYPE = SELECT)(METHOD = BASIC)(RETRIES = 180)(DELAY = 5))
    for connecting two databases, now when i try to submit button this message was thrown, i need to apply RAC
    [TopLink Warning]: 2008.03.24 06:56:40.101--ClientSession(27665811)--Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: No more data to read from socketError Code: 17410
    Call:UPDATE SEQUENCE SET SEQ_COUNT = SEQ_COUNT + 1 WHERE SEQ_NAME = 'IND_REG_REQ_SEQ'
    Query:DataModifyQuery()
    [TopLink Warning]: 2008.03.24 06:56:40.101--ClientSession(27665811)--Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: OALL8 is in an inconsistent state.Error Code: 0
    Call:SELECT SEQ_COUNT FROM SEQUENCE WHERE SEQ_NAME = 'IND_REG_REQ_SEQ'
    Query:ValueReadQuery()
    [TopLink Warning]: 2008.03.24 06:56:40.101--ClientSession(27665811)--Exception [TOPLINK-4011] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException
    Exception Description: Error preallocating sequence numbers. The sequence table information is not complete.
    [TopLink Warning]: 2008.03.24 06:56:40.101--ClientSession(27665811)--Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: Io exception: Software caused connection abort: socket write errorError Code: 17002
    Call:UPDATE SEQUENCE SET SEQ_COUNT = SEQ_COUNT + 1 WHERE SEQ_NAME = 'MITREQUEST_SEQ'
    Query:DataModifyQuery()
    [TopLink Warning]: 2008.03.24 06:56:40.101--ClientSession(27665811)--Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: Closed ConnectionError Code: 17008
    Call:SELECT SEQ_COUNT FROM SEQUENCE WHERE SEQ_NAME = 'MITREQUEST_SEQ'
    Query:ValueReadQuery()
    [TopLink Warning]: 2008.03.24 06:56:40.101--ClientSession(27665811)--Exception [TOPLINK-4011] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException
    Exception Description: Error preallocating sequence numbers. The sequence table information is not complete.
    [TopLink Warning]: 2008.03.24 06:56:40.101--ClientSession(27665811)--Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: Closed ConnectionError Code: 17008
    Message was edited by:
    Mohammed Amr.

  • Exception [TOPLINK-6029] after upgrading from version 9.0.4.5 to 10.1.3.0.0

    In our project, we have made an upgrade to TopLink version 10.1.3.0.0. After replacing as much as possible deprecated Classes/methods, we get TopLink Exceptions when accessing attributes which are mapped via indirection. When TopLink tries to retrieve the reference records from the database, a [TOPLINK-6029] exception occurs. We do not execute a query with "readObject" but we only acces the attribute which is mapped via indirection.
    Exception-Stack:
    Exception [TOPLINK-6029] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.QueryException
    Exception-Beschreibung: Eine Referenzklasse muss angegeben werden.
    Abfrage: ReadObjectQuery()
         at oracle.toplink.exceptions.QueryException.referenceClassMissing(QueryException.java:858)
         at oracle.toplink.queryframework.ReadObjectQuery.checkDescriptor(ReadObjectQuery.java:198)
         at oracle.toplink.queryframework.ObjectLevelReadQuery.checkPrePrepare(ObjectLevelReadQuery.java:562)
         at oracle.toplink.queryframework.ObjectLevelReadQuery.isLockQuery(ObjectLevelReadQuery.java:1407)
         at oracle.toplink.internal.remote.RemoteValueHolder.isPessimisticLockingValueHolder(RemoteValueHolder.java:192)
         at oracle.toplink.internal.indirection.UnitOfWorkValueHolder.instantiateImpl(UnitOfWorkValueHolder.java:133)
         at oracle.toplink.internal.indirection.UnitOfWorkValueHolder.instantiate(UnitOfWorkValueHolder.java:217)
         at oracle.toplink.internal.indirection.DatabaseValueHolder.getValue(DatabaseValueHolder.java:61)
         at oracle.toplink.indirection.IndirectList.buildDelegate(IndirectList.java:184)
         at oracle.toplink.indirection.IndirectList.getDelegate(IndirectList.java:307)
         at oracle.toplink.indirection.IndirectList.toArray(IndirectList.java:646)
         at java.util.Collections.sort(Collections.java:158)
    With TopLink versio 9.0.4.5 everything works correctly.
    What could be the cause of this problem and what can we do to correct it.
    Regards,
    Hans.

    Hello James,
    Thanks for the quick answer!
    I have tested our program with the new TopLink version without making any change in the code, so definitely there a change in the behaviour in both TopLink versions. I have added the code where the descriptor and the onetomany mapping is created. I think the descriptor is ok, but the problem could have to do with the fact that in our program the business object is already registered in a unit of work.
    When I debug the situation in Eclipse and expand the IndirectList first on the original and afterwards on the clone, no exception occurs. When I directly expand the IndirectList in the clone the excpetion comes.
    // Descriptor creation
    private static Descriptor buildRentFunctionDescriptor()
    Descriptor desc = DescriptorLib.makeListDescriptor(RentFunction.class, RFU_TAB, RFU_TAB_KEY, RFU_PREFIX);
    DescriptorLib.addDirectToFieldMapping(desc, PropM.RentFun.KEY, RFU_TAB_KEY);
    DescriptorLib.addDirectToFieldMapping(desc, PropM.RentFun.NAME, RFU_TAB_NAME);
    DescriptorLib.addDirectToFieldMapping(desc, PropM.RentFun.ORDER, RFU_TAB_ORDER);
    DescriptorLib.addDirectToFieldMapping(desc, PropM.RentFun.RENT, RFU_TAB_RENT);
    DescriptorLib.addDirectToFieldMapping(desc, PropM.RentFun.ATYPE, RFU_TAB_ATYPE);
    DescriptorLib.addOneToManyMapping(desc, PropM.RentFun.HRENT, HistRent.class, HRE_TAB_LINK, true, true);
    DescriptorLib.addOneToOneMapping(desc, PropM.RentFun.PER, Period.class, RFU_TAB_PER, false, false);
    DescriptorLib.addOneToOneMapping(desc, PropM.RentFun.LEV, LocationLevel.class, RFU_TAB_LEV, false, false);
    DescriptorLib.addOneToOneMapping(desc, PropM.RentFun.ACC, Account.class, RFU_TAB_ACC, false, false);
    return desc;
    //Mapping creation
    public static OneToManyMapping addOneToManyMapping(Descriptor descriptor,
    String attributeName,
    Class referenceClass,
    String targetForeignKey,
    boolean useIndirection,
    boolean enableCascadingDelete)
    OneToManyMapping mapping = new OneToManyMapping();
    mapping.setAttributeName(attributeName);
    mapping.setReferenceClass(referenceClass);
    mapping.setTargetForeignKeyFieldName(targetForeignKey);
    if (useIndirection)
    mapping.useTransparentCollection();
    mapping.useCollectionClass(IndirectList.class);
    else
    mapping.dontUseIndirection();
    if (enableCascadingDelete)
    mapping.privateOwnedRelationship();
    descriptor.addMapping(mapping);
    return mapping;
    Maybe you could give some tips about how to deal with registering the business object in the unit of work in combination with attributes that use indirection.
    Regards,
    Hans
    Message was edited by:
    lammers1

  • Back To My Mac: why can't I copy files between Macs?

    I use Back To My Mac to connect between a Mac Book Pro and Mac Pro. These two machines have the same home directory name, but different passwords. My home network is on an Apple Airport Extreme.
    A recent, persistent bug is causing havoc when I try to copy files between computers. Here is what happens:
    1. I connect to the Mac Pro remotely from the MBP, using my Apple ID credentials.
    2. Using a finder window on my Mac Book Pro, I try to copy a file TO the Mac Pro desktop that I'm certain doesn't already exist there. A "Preparing to copy" window appears.
    3. After a few moments, a window appears: "Finder wants to make changes. Type your password to allow this." Again, I've already entered my Apple ID to connect to the Mac Pro. This window requires my Mac Book Pro sign-in in order to continue.
    4. The next message is 'A newer item named “FileName.pdf” already exists in this location. Do you want to replace it with the older one you’re moving?'
    Here are the results of my options from this dialog:
    >>If I choose 'Keep Both Files':
    -- A progress window appears (saying something like "copying 0 of 108 kb", but without any progress bar movement). I click the X button to stop the transfer, the progress window changes to "stopping" status, but remains on the screen for several minutes. My Mac Pro is unresponsive/unreachable via BTMM during this time.
    -- After several minutes, the file transfer progress window disappears and my Mac Pro becomes available again via BTMM. There are now several THOUSAND numbered copies of the original. Each is 0 kb in size.
    >>If I choose 'Replace':
    -- A progress window appears, quickly followed by this message: 'The operation can’t be completed because an item with the name “” already exists.' The message appears exactly as written, without the filename between the quotes.
    -- A file with the same name as the one I tried to copy over is now on the Mac Pro desktop, but it is 0 kb in size.
    I'm lost -- not sure if this is a permissions issue, a problem w/ BTMM, or something else. Any input, advice, questions, etc. are very welcome.
    Thanks

    I'm having the exact same issue, did you find a solution. It's annoying!

  • Different ways to copy data between two schemas in one instance

    Hi there,
    I am searching a good way to copy data between two schemas in the same instance.
    Both schemas have an identical structure such as triggers, tables, views and so on. The only difference is the purpose: one is the productivity system and one is for development.
    I looked at datapump but I do not explicit want to export / import. I want to keep the data in the productivity schema as well as copy it to the other schema. Any ideas? I found out there is a copy statement but I dont't know how that works.
    Thank you so far,
    Jörn

    Thank you for your replies!
    I also thought of creating a second instance for development and move the dev - schema to it. I just don't know whether our server can handle both (performance?). Anyway the idea is to have a possibility to quickly rebuild the data inside a schema without indixes or triggers, just pure data. I thought the easiest way would be to copy the data between the schemas as they are exactly the same. However if you tell me DataPunp is the best solution i won't deny using it :).
    When you export data a file is created. does that also mean that the exported data is deleted inside the schema?
    best regards
    Jörn
    Ps: Guido, you are following me, aren' t you? ;-)

  • Exception [TOPLINK-46] (OracleAS TopLink - 10g (9.0.4) (Build 031126))

    Hi,
    I am using TopLink for simple Department-Employee relation, i have my project xml configured, But i am facing the problem with following exception
    Descriptor Exceptions:
    Exception [TOPLINK-46] (OracleAS TopLink - 10g (9.0.4) (Build 031126)): oracle.toplink.exceptions.DescriptorException
    Exception Description: There should be one non-read-only mapping defined for the primary key field [emp.empno].
    Descriptor: Descriptor(com.oracle.mssql.emp.toplink.EmpTopLinkBean --> [DatabaseTable(emp)])
    Runtime Exceptions:
    What could be the reason?
    Thanks
    Madhu

    My best guess would be that you have a 1:1 mapping from Employee to Department. This mapping represents part of the primary key.
    Make sure that your 1:1 mapping is not configured as read-only. Another issue is that you may have set the relationship as target foreign key. This has the same effect as read-only and is not applicable in the 1:1 returning from a 1:M.
    Doug

  • A few days ago, I copied text from an iBook onto my text notebook. When I went to my kindle on my ipad and attempted to share a quote from it onto Facebook it pasted the previous quote from my iBook. I can't copy and paste anything except that quote. HELP

    A few days ago, I copied text from an iBook onto my text notebook. When I went to my kindle on my ipad and attempted to share a quote from it onto Facebook it pasted the previous quote from my iBook. I can't copy and paste anything except that quote. HELP

    BOILERPLATE TEXT:
    Note that this is boilerplate text.
    If you give complete and detailed information about your setup and the issue at hand,
    such as your platform (Mac or Win),
    exact versions of your OS, of Photoshop (not just "CS6", but something like CS6v.13.0.6) and of Bridge,
    your settings in Photoshop > Preference > Performance
    the type of file you were working on,
    machine specs, such as total installed RAM, scratch file HDs, total available HD space, video card specs, including total VRAM installed,
    what troubleshooting steps you have taken so far,
    what error message(s) you receive,
    if having issues opening raw files also the exact camera make and model that generated them,
    if you're having printing issues, indicate the exact make and model of your printer, paper size, image dimensions in pixels (so many pixels wide by so many pixels high). if going through a RIP, specify that too.
    etc.,
    someone may be able to help you (not necessarily this poster).
    a screen shot of your settings or of the image could be very helpful too.
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • Copy Files Between Two Unix Computers

    Hi,
    I am trying to write a piece of code that will copy bunch of files from one Unix computer on to another Unix computer. On windows it seems to be pretty straight but on Unix I am trying to understand best way of copying the files. I don't have much expertise in Unix.
    Is using FTP the only option for Unix?
    I am not able to create a FILE object by referring to a file on some other Unix box? I tried new File("//unixbox2/temp/123.txt");
    Please let me know the different ways to copy files between Unix computers.
    Thanks
    Gautham

    This's a simple example of how you can send a file form one computer to another
    import java.io.*;
    import java.net.*;
    public class Prf extends Thread {
         public void run() { //Read form file and writer to socket
              try {
                   Thread.sleep(100);//sleep(100) while server is getting ready to accept connection
                   System.out.println("Connecting...");
                   Socket soc = new Socket("localhost",4070);
                   OutputStream outS = soc.getOutputStream();
                   FileInputStream fis = new FileInputStream("input.dat");
                   int i = 0;
                   byte[] b = new byte[1000000]; //1MB buffer
                   for(;;) {
                        i = fis.read(b); //read from file (i - number of read bytes)
                        if (i != -1) {// checking for end of data
                             outS.write(b,0,i); //write portion (0..i) of bytes to socket
                        } else {
                             break;
                   fis.close();
                   outS.close();
                   soc.close();
              } catch (IOException e) {
                   System.out.println(e.getMessage());
              } catch (InterruptedException e) {
                   System.out.println(e.getMessage());
         public static void main(String[] args) {//Read from socket and write to file
              Prf prf = new Prf();
              try {
                   ServerSocket sSoc = new ServerSocket(4070);
                   prf.start(); //start writer
                   Socket soc = sSoc.accept();
                   System.out.println("Connection's accepted");
                   InputStream inS = soc.getInputStream();
                   FileOutputStream fos = new FileOutputStream("output.dat");
                   int i = 0;
                   byte [] b = new byte[1000000]; //buffer
                   while (true) {
                        i = inS.read(b);//read from socket (i - number of read bytes)
                        if (i != -1) { //check for end of date
                             fos.write(b,0,i); //write portion (0..i) of bytes to file
                        } else {
                             break;
                   fos.close();
                   inS.close();
                   soc.close();
                   sSoc.close();
              } catch (IOException e) {
                   System.out.println(e.getMessage());
    }

  • How can I use DOM to copy Nodes between different XML Document ?

    Can I copy one Node or Element from one XML Document to another Document by DOM ?
    Because I use the Xerces , but it is not work if I want to copy Node between different Document, or I am doing something wrong. Anyone can help me , I will deeply appreciated !!

    check out the importNode() method of Document.

  • Exception [TOPLINK-4002] : A lock could not be obtained within the time req

    Hi,
    i am using Toplink bundled with Netbeans 5.5.1.
    I have 2 projects : one with common objects and one with business objects. When a business session bean calls a common session bean in order to create and persist a common object used in business part, we have the following errors :
    Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0 (Build b41-beta2 (03/30/2007))): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: A lock could not be obtained within the time requested
    Error Code: -1
    Call: SELECT ID FROM IMAGESOWNER WHERE (ID = ?)
    bind => [2]
    Query: DoesExistQuery()
    at oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:304)
    at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:551)
    at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:437)
    at oracle.toplink.essentials.threetier.ServerSession.executeCall(ServerSession.java:465)
    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.selectRowForDoesExist(DatasourceCallQueryMechanism.java:642)
    at oracle.toplink.essentials.queryframework.DoesExistQuery.executeDatabaseQuery(DoesExistQuery.java:243)
    at oracle.toplink.essentials.queryframework.DatabaseQuery.execute(DatabaseQuery.java:609)
    at oracle.toplink.essentials.queryframework.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:536)
    at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2219)
    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.UnitOfWorkImpl.checkForUnregisteredExistingObject(UnitOfWorkImpl.java:516)
    at oracle.toplink.essentials.internal.ejb.cmp3.base.RepeatableWriteUnitOfWork$1.iterate(RepeatableWriteUnitOfWork.java:123)
    at oracle.toplink.essentials.internal.descriptors.DescriptorIterator.internalIterateReferenceObject(DescriptorIterator.java:174)
    at oracle.toplink.essentials.internal.descriptors.DescriptorIterator.iterateReferenceObjectForMapping(DescriptorIterator.java:281)
    at oracle.toplink.essentials.mappings.ObjectReferenceMapping.iterateOnRealAttributeValue(ObjectReferenceMapping.java:254)
    at oracle.toplink.essentials.internal.indirection.IndirectionPolicy.iterateOnAttributeValue(IndirectionPolicy.java:207)
    at oracle.toplink.essentials.mappings.ForeignReferenceMapping.iterate(ForeignReferenceMapping.java:571)
    at oracle.toplink.essentials.internal.descriptors.ObjectBuilder.iterate(ObjectBuilder.java:2061)
    at oracle.toplink.essentials.internal.descriptors.DescriptorIterator.iterateReferenceObjects(DescriptorIterator.java:296)
    at oracle.toplink.essentials.internal.descriptors.DescriptorIterator.startIterationOn(DescriptorIterator.java:469)
    at oracle.toplink.essentials.internal.ejb.cmp3.base.RepeatableWriteUnitOfWork.discoverUnregisteredNewObjects(RepeatableWriteUnitOfWork.java:145)
    at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.discoverAllUnregisteredNewObjects(UnitOfWorkImpl.java:1278)
    at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.assignSequenceNumbers(UnitOfWorkImpl.java:368)
    at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.collectAndPrepareObjectsForCommit(UnitOfWorkImpl.java:707)
    at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1098)
    at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.issueSQLbeforeCompletion(UnitOfWorkImpl.java:2429)
    at oracle.toplink.essentials.internal.ejb.cmp3.base.RepeatableWriteUnitOfWork.issueSQLbeforeCompletion(RepeatableWriteUnitOfWork.java:186)
    at oracle.toplink.essentials.transaction.AbstractSynchronizationListener.beforeCompletion(AbstractSynchronizationListener.java:116)
    at oracle.toplink.essentials.transaction.JTASynchronizationListener.beforeCompletion(JTASynchronizationListener.java:76)
    at com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:406)
    at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:358)
    at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3736)
    at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3515)
    at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1305)
    at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1267)
    at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:197)
    at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:104)
    at $Proxy190.createAMember(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:585)
    at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:204)
    at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:123)
    at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(BCELStubBase.java:196)
    at ppcobjectssessionbeans.__PpcMemberSessionRemote_Remote_DynamicStub.createAMember(__PpcMemberSessionRemote_Remote_DynamicStub.java)
    at ppcobjectssessionbeans._PpcMemberSessionRemote_Wrapper.createAMember(ppcobjectssessionbeans._PpcMemberSessionRemote_Wrapper.java)
    at polyplastoclub.admin.addMember_action(admin.java:630)
    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.el.parser.AstValue.invoke(AstValue.java:174)
    at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:284)
    at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
    at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
    at com.sun.rave.web.ui.appbase.faces.ActionListenerImpl.processAction(ActionListenerImpl.java:57)
    at javax.faces.component.UICommand.broadcast(UICommand.java:383)
    at com.sun.webui.jsf.component.WebuiCommand.broadcast(WebuiCommand.java:160)
    at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:447)
    at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:752)
    at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
    at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
    at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:398)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
    at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:240)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:217)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:258)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:189)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:611)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:564)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:81)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:193)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:611)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:558)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1067)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:611)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:558)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1067)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:255)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:618)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:549)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:790)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:326)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:248)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:199)
    at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
    at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:93)
    Caused by: java.sql.SQLException: A lock could not be obtained within the time requested
    at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source)
    at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
    at org.apache.derby.client.am.ResultSet.next(Unknown Source)
    at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:502)
    ... 97 more
    Caused by: org.apache.derby.client.am.SqlException: A lock could not be obtained within the time requested
    at org.apache.derby.client.am.ResultSet.completeSqlca(Unknown Source)
    at org.apache.derby.client.net.NetResultSetReply.parseFetchError(Unknown Source)
    at org.apache.derby.client.net.NetResultSetReply.parseCNTQRYreply(Unknown Source)
    at org.apache.derby.client.net.NetResultSetReply.readFetch(Unknown Source)
    at org.apache.derby.client.net.ResultSetReply.readFetch(Unknown Source)
    at org.apache.derby.client.net.NetResultSet.readFetch_(Unknown Source)
    at org.apache.derby.client.am.ResultSet.flowFetch(Unknown Source)
    at org.apache.derby.client.net.NetCursor.getMoreData_(Unknown Source)
    at org.apache.derby.client.am.Cursor.stepNext(Unknown Source)
    at org.apache.derby.client.am.Cursor.next(Unknown Source)
    at org.apache.derby.client.am.ResultSet.nextX(Unknown Source)
    ... 99 more
    If i persist the common object in business part, i have no problem : is it a toplink limit or there is something to do ?
    Best regards
    H. Deslandes

    Hi,
    I am getting same error code but with different error details.
    Whenever my BPEL process is idle for a long time and then if I execute the BPEL process, it gives me an error from db adapter as shown here:
    <remoteFault xmlns="http://schemas.oracle.com/bpel/extension">
    -<part name="code">
    <code>17002
    </code>
    </part>
    -<part name="summary">
    <summary>
    file:/oracle/product/Oracle_SOA_10.1.3/bpel/domains/default/tmp/.bpel_IHCloseTaskResponse_1.0_aaa6a3e5c7a3340eff9954dbeaf1e374.tmp/InsertIHCloseDB.wsdl [ InsertIHCloseDB_ptt::write(IhCloseMainCollection) ] - WSIF JCA Execute of operation 'write' failed due to: DBWriteInteractionSpec Execute Failed Exception.
    write failed. Descriptor name: [InsertIHCloseDB.IhCloseMain]. [Caused by: Io exception: Broken pipe]
    ; nested exception is:
         ORABPEL-11616
    DBWriteInteractionSpec Execute Failed Exception.
    write failed. Descriptor name: [InsertIHCloseDB.IhCloseMain]. [Caused by: Io exception: Broken pipe]
    Caused by Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.3.0) (Build 070608)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: Io exception: Broken pipeError Code: 17002
    Call:SELECT TIH_REFERENCE_NUMBER FROM IH_CLOSE_MAIN WHERE (TIH_REFERENCE_NUMBER = ?)
         bind => [IH1107100305]
    Query:DoesExistQuery().
    </summary>
    </part>
    -<part name="detail">
    <detail>
    Internal Exception: java.sql.SQLException: Io exception: Broken pipeError Code: 17002
    Call:SELECT TIH_REFERENCE_NUMBER FROM IH_CLOSE_MAIN WHERE (TIH_REFERENCE_NUMBER = ?)
         bind => [IH1107100305]
    Query:DoesExistQuery()
    </detail>
    </part>
    </remoteFault>
    Can any body help me to sort out this problem, please?
    Many thanks in advance.

Maybe you are looking for