Descriptor Exception

I have four classes : A, B, C, D
The first class A is abstract and it is the root of the tree. The class B (Article class in the message) is a child of A and should be instantiated (persistant class).
The C and D classes are the only two leaves of the tree. These two classes are child of B (persistant classes too).
The exception is :
Exception [TOPLINK-108] (OracleAS TopLink - 10g (9.0.4.2) (Build 040311)): oracle.toplink.exceptions.DescriptorException
Description de l'exception : Valeur introuvable dans le mapping d'indicateurs de classe du descripteur parent [null].
Descripteur : Descriptor(clara.prototype.accesdonnees.modelepersistant.Article --> [DatabaseTable(root.article)])
The mapping workbench doesn't show any errors.
What I'm guessing is that Toplink is complaining that I have not provided a type mapping to indicate the root class A, but I don't want there to be a type for it as it is abstract and should never be instantiated anyway.
Any ideas?
Thanks in advance.

In the 904 mapping workbench, when you map an inheritance hierarchy with a class indicator, it gives you the option of including any of the subclasses. There is a check-box that says "include", and if it's selected, you should choose the indicator value. As long as you haven't selected "include" for class A, this should not be the issue...
- Don

Similar Messages

  • Descriptor exception for "missing mapping for field"

    I am using TopLink 9.0.3, oracle database 9, JVM 1.4.
    I got one DescirptorException that states that the descriptor misses mapping for one database field.
    However I have such field mapped through workbench.
    The is the exception.
    -----------------exception-----------------------
    LOCAL EXCEPTION STACK:
    EXCEPTION [TOPLINK-45] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exceptions.DescriptorException
    EXCEPTION DESCRIPTION: Missing mapping for field [DatabaseField(DEVICEDB.DEVICEID)].
    DESCRIPTOR: Descriptor(ContactDB --> [DatabaseTable(DEVICEDB)])
    at oracle.toplink.exceptions.DescriptorException.missingMappingForField(Unknown Source)
    at oracle.toplink.internal.descriptors.ObjectBuilder.extractValueFromObjectForField(Unknown Source)
    at oracle.toplink.internal.descriptors.ObjectBuilder.extractValueFromObjectForField(Unknown Source)
    at oracle.toplink.mappings.OneToManyMapping.extractForeignKeyFromReferenceObject(Unknown Source)
    at oracle.toplink.mappings.OneToManyMapping.executeBatchQuery(Unknown Source)
    at oracle.toplink.mappings.OneToManyMapping.extractResultFromBatchQuery(Unknown Source)
    at oracle.toplink.internal.indirection.NoIndirectionPolicy.valueFromBatchQuery(Unknown Source)
    at oracle.toplink.mappings.ForeignReferenceMapping.batchedValueFromRow(Unknown Source)
    at oracle.toplink.mappings.ForeignReferenceMapping.valueFromRow(Unknown Source)
    at oracle.toplink.mappings.DatabaseMapping.readFromRowIntoObject(Unknown Source)
    at oracle.toplink.internal.descriptors.ObjectBuilder.buildAttributesIntoObject(Unknown Source)
    at oracle.toplink.internal.descriptors.ObjectBuilder.buildObject(Unknown Source)
    at oracle.toplink.internal.descriptors.ObjectBuilder.buildObjectsInto(Unknown Source)
    at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.buildObjectsFromRows(Unknown Source)
    at oracle.toplink.queryframework.ReadAllQuery.execute(Unknown Source)
    at oracle.toplink.queryframework.DatabaseQuery.execute(Unknown Source)
    at oracle.toplink.queryframework.ReadQuery.execute(Unknown Source)
    at oracle.toplink.publicinterface.Session.internalExecuteQuery(Unknown Source)
    at oracle.toplink.threetier.ServerSession.internalExecuteQuery(Unknown Source)
    at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
    at oracle.toplink.internal.indirection.QueryBasedValueHolder.instantiate(Unknown Source)
    at oracle.toplink.internal.indirection.DatabaseValueHolder.getValue(Unknown Source)
    at oracle.toplink.indirection.IndirectList.buildDelegate(Unknown Source)
    at oracle.toplink.indirection.IndirectList.getDelegate(Unknown Source)
    at oracle.toplink.indirection.IndirectList.isEmpty(Unknown Source)
    The is my mapping file for DeviceDB and ContactDB. The ContactDB is a subclass of the DeviceDB.
    Clearly from the mapping below, the DeviceDB has a mapping for the database filed DeviceID.
    The ContactDB is a subclass of DeviceDB. Therefore the ContactDB also should have a mapping for
    database field deviceID
    ----------------------- partial mapping file for DeviceDB----------
    public Descriptor buildDeviceDBDescriptor() {
         Descriptor descriptor = new Descriptor();
         descriptor.setJavaClass(DeviceDB.class);
         descriptor.addTableName("DEVICEDB");
         descriptor.addPrimaryKeyFieldName("DEVICEDB.DBID");
         // Inheritance properties.
         descriptor.getInheritancePolicy().setClassIndicatorFieldName("DEVICEDB.CLASS");
         descriptor.getInheritancePolicy().addClassIndicator(ContactDB.class, "c");
         descriptor.getInheritancePolicy().addClassIndicator(ContentDB.class, "f");
         OneToOneMapping deviceMapping = new OneToOneMapping();
         deviceMapping.setAttributeName("device");
         deviceMapping.setReferenceClass(Device.class);
         deviceMapping.setRelationshipPartnerAttributeName("databases");
         deviceMapping.dontUseIndirection();
         deviceMapping.readOnly();
         deviceMapping.addForeignKeyFieldName("DEVICEDB.DEVICEID", "DEVICE.DEVICEID");
         descriptor.addMapping(deviceMapping);
         return descriptor;
    ---------------------------partial mapping for ContactDB --------------
    public Descriptor buildContactDBDescriptor() {
         Descriptor descriptor = new Descriptor();
         descriptor.setJavaClass(com.access.sync.business.contact.ContactDB.class);
         descriptor.addTableName("DEVICEDB");
         // Inheritance properties.
         descriptor.getInheritancePolicy().setParentClass(com.access.sync.framework.systemObj.DeviceDB.class);
    Any help is really appreciated.
    jason

    Your 1-1 mapping must not be read-only.
    deviceMapping.readOnly();Read-only means the mapping will not write the field, and should only be used when another mapping does write the field.

  • "IOException: Bad file descriptor" thrown during readline()

    I'm working on a system to send data to bluetooth devices. Currently I have a dummy program that "finds" bluetooth devices by listening for input on System.in, and when one is found, the system sends some data to the device over bluetooth. Here is the code for listening for input on System.in
    InputStreamReader isr = new InputStreamReader(System.in);
    BufferedReader br = new BufferedReader(isr);
    boolean streamOpen = true;
    while(streamOpen) {
         String next = "";
         System.out.println("waiting for Input: ");
         try {
              next = br.readLine();
               // other code here
          } catch (IOException ioe) {
               ioe.printStackTrace();
    } // end of whileThis is running in it's own thread, constantly listening for input from System.in. There is also another thread that handles pushing the data to the bluetooth device. It works the first time it reads input, then the other thread starts running also, printing output to System.out. When the data has successfully been pushed to the device, the system waits for me to enter more information. As soon as I type something and press return, i get an endless (probably infinte if I don't kill the process) list of IOExceptions:Bad file descriptor exceptions that are thrown from the readline() method.
    Here is what is being printed:
    Waiting for Input: // <-- This is the thread listening for input on System.in
    system started with 1 Bluetooth Chip // From here down is the thread that pushing data to the BT device
    next device used 0
    default device 0000000000
    start SDP for 0000AA112233
    *** obex_push: 00:00:AA:11:22:33@9, path/to/file.txt, file.txt
    I'm not even sure which line it's trying to read when the exception gets thrown, whether it's the first line after "Waiting for Input: " or it's the line where I actually type something and hit return.
    Any ideas why this might be happening? Could it have something to do with reading from System.in from a thread that is not the main thread?
    Also, this is using java 1.6

    Actually, restarting the stream doesn't work either..... here's a sample program that I wrote.
    public class ExitListener extends Thread {
         private BufferedReader br;
         private boolean threadRunning;
         public ExitListener(UbiBoardINRIA ubiBoard) {
              super("Exit Listener");
              threadRunning = true;
              InputStreamReader isr = new InputStreamReader(System.in);
              br = new BufferedReader(isr);
         public void run() {
              while (threadRunning) {
                   try {
                        String read = br.readLine();
                        if (read.equalsIgnoreCase("Exit")) {
                             threadRunning = false;
                   } catch (IOException ioe) {
                        System.out.println("Can you repeat that?");
                        try {
                             br.close();
                             br = new BufferedReader(new InputStreamReader(System.in));
                        } catch (IOException ioe2) {
                             ioe2.printStackTrace();
                             System.out.println("Killing this thread");
                             threadRunning = false;
                   } // end of catch
         } // end of run
    }output:
    I'm sorry, can you repeat that command? - Stream closed
    Closed Stream
    Ready?: false
    I'm sorry, can you repeat that command? - Stream closed
    Closed Stream
    Ready?: false
    I'm sorry, can you repeat that command? - Stream closed
    Closed Stream
    Ready?: false
    I'm sorry, can you repeat that command? - Stream closed
    Closed Stream
    Ready?: false
    I know that this is probably not enough code to really see the problem, but my main question is what could be going on somewhere else in the code that could cause this BufferedReader to not be able to re-open

  • 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

  • Error initializing descriptor

    Any idea why this kind of error would occur? It happens only when I create a one-one mapping between Transcation and Attachment. If I remove the mapping it works fine.
    Thanks,
    Rajiv
    EXCEPTION [TOPLINK-0] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exceptions.IntegrityException
    DESCRIPTOR EXCEPTIONS:
    EXCEPTION [TOPLINK-93] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exceptions.DescriptorException
    EXCEPTION DESCRIPTION: The table [TRX_ATTACHMENT] is not present in this descriptor.
    DESCRIPTOR: Descriptor(gov.usdoj.ojp.gms.toplink.jdo.transaction.Transaction --> [DatabaseTable(TRX_TRANSACTION)])
    EXCEPTION [TOPLINK-41] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exceptions.DescriptorException
    EXCEPTION DESCRIPTION: A non-read-only mapping must be defined for the sequence number field.
    DESCRIPTOR: Descriptor(gov.usdoj.ojp.gms.toplink.jdo.transaction.Transaction --> [DatabaseTable(TRX_TRANSACTION)])

    Darren,
    Below are the descriptors generated by Toplink for the Transaction and Attachment descriptors. At the bottom of the method for buildAttachmentDescriptor there is a One to One mapping. If I remove that mapping the descriptors initialize fine. I'm not sure how adding the mapping makes the sequence field read only.
    <pre>
    public Descriptor buildAttachmentDescriptor() {
         Descriptor descriptor = new Descriptor();
         descriptor.setJavaClass(gov.usdoj.ojp.gms.toplink.jdo.transaction.Attachment.class);
         descriptor.addTableName("TRX_ATTACHMENT");
         descriptor.addPrimaryKeyFieldName("TRX_ATTACHMENT.TRX_ATTACHMENT_ID");
         // Descriptor properties.
         descriptor.useSoftCacheWeakIdentityMap();
         descriptor.setIdentityMapSize(100);
         descriptor.useRemoteSoftCacheWeakIdentityMap();
         descriptor.setRemoteIdentityMapSize(100);
         descriptor.setSequenceNumberFieldName("TRX_ATTACHMENT.TRX_ATTACHMENT_ID");
         descriptor.setSequenceNumberName("TRX_ATTACHMENT_SEQ");
         descriptor.setAlias("Attachment");
         // Query manager.
         descriptor.getQueryManager().checkCacheForDoesExist();
         //Named Queries
         // Event manager.
         // Mappings.
         DirectToFieldMapping idMapping = new DirectToFieldMapping();
         idMapping.setAttributeName("id");
         idMapping.setFieldName("TRX_ATTACHMENT.TRX_ATTACHMENT_ID");
         descriptor.addMapping(idMapping);
         DirectToFieldMapping nameMapping = new DirectToFieldMapping();
         nameMapping.setAttributeName("name");
         nameMapping.setFieldName("TRX_ATTACHMENT.FILE_NAME");
         descriptor.addMapping(nameMapping);
    //!!!!!!!!PROBLEM MAPPING!!!!!!!//     
         OneToOneMapping blobMapping = new OneToOneMapping();
         blobMapping.setAttributeName("blob");
         blobMapping.setReferenceClass(gov.usdoj.ojp.gms.toplink.jdo.transaction.BlobData.class);
         blobMapping.useBasicIndirection();
         blobMapping.addForeignKeyFieldName("TRX_BLOB.TRX_ATTACHMENT_ID", "TRX_ATTACHMENT.TRX_ATTACHMENT_ID");
         descriptor.addMapping(blobMapping);
         return descriptor;
    public Descriptor buildBlobDataDescriptor() {
         Descriptor descriptor = new Descriptor();
         descriptor.setJavaClass(gov.usdoj.ojp.gms.toplink.jdo.transaction.BlobData.class);
         descriptor.addTableName("TRX_BLOB");
         descriptor.addPrimaryKeyFieldName("TRX_BLOB.TRX_BLOB_ID");
         // Descriptor properties.
         descriptor.useSoftCacheWeakIdentityMap();
         descriptor.setIdentityMapSize(100);
         descriptor.useRemoteSoftCacheWeakIdentityMap();
         descriptor.setRemoteIdentityMapSize(100);
         descriptor.setSequenceNumberFieldName("TRX_BLOB.TRX_BLOB_ID");
         descriptor.setSequenceNumberName("TRX_BLOB_SEQ");
         descriptor.setAlias("BlobData");
         // Query manager.
         descriptor.getQueryManager().checkCacheForDoesExist();
         //Named Queries
         // Event manager.
         // Mappings.
         DirectToFieldMapping dataMapping = new DirectToFieldMapping();
         dataMapping.setAttributeName("data");
         dataMapping.setFieldName("TRX_BLOB.BLOB_INFO");
         descriptor.addMapping(dataMapping);
         DirectToFieldMapping idMapping = new DirectToFieldMapping();
         idMapping.setAttributeName("id");
         idMapping.setFieldName("TRX_BLOB.TRX_BLOB_ID");
         descriptor.addMapping(idMapping);
         return descriptor;
    </pre>
    Hello,
    I'm guessing that by looking at the error message that the sequence number field is not writable. Also, ensure that the TRX_ATTACHMENT table is in the database.
    Darren

  • Exception thrown when start OC4J

    Sometimes, I got the folloowing exceptions when I started OC4J.
    Exception Description: Several [9] SessionLoaderExceptions were thrown:
    Exception [TOPLINK-9005] (OracleAS TopLink - 10g (9.0.4.7) (Build 050405)): orac
    le.toplink.exceptions.SessionLoaderException
    Exception Description: An exception was thrown while loading the <project-xml> f
    ile [config/toplink.xml].
    Internal Exception: Exception [TOPLINK-98] (OracleAS TopLink - 10g (9.0.4.7) (Bu
    ild 050405)): oracle.toplink.exceptions.DescriptorException
    Exception Description: The underlying descriptor callback method [applyAmendment
    Method], with parameter (DescriptorEvent), triggered an exception.
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: Exception [TOPLINK-165] (OracleAS TopLink - 10g (9.
    0.4.7) (Build 050405)): oracle.toplink.exceptions.DescriptorException
    Exception Description: This descriptor's amendment method triggered an exception
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: java.lang.Error: Unresolved compilation problem:
    Descriptor: Descriptor(com.celeres.pago.valueobject.royalties.RoyaltyRate --> [D
    atabaseTable(ROYALTY_RATES)])
    Descriptor: XMLDescriptor(oracle.toplink.publicinterface.Descriptor --> [Databas
    eTable(descriptor)])
    Exception [TOPLINK-9005] (OracleAS TopLink - 10g (9.0.4.7) (Build 050405)): orac
    le.toplink.exceptions.SessionLoaderException
    Exception Description: An exception was thrown while loading the <project-xml> f
    ile [config/toplink.xml].
    Internal Exception: Exception [TOPLINK-98] (OracleAS TopLink - 10g (9.0.4.7) (Bu
    ild 050405)): oracle.toplink.exceptions.DescriptorException
    Exception Description: The underlying descriptor callback method [applyAmendment
    Method], with parameter (DescriptorEvent), triggered an exception.
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: Exception [TOPLINK-165] (OracleAS TopLink - 10g (9.
    0.4.7) (Build 050405)): oracle.toplink.exceptions.DescriptorException
    Exception Description: This descriptor's amendment method triggered an exception
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: java.lang.Error: Unresolved compilation problem:
    Descriptor: Descriptor(com.celeres.pago.valueobject.royalties.RoyaltyRate --> [D
    atabaseTable(ROYALTY_RATES)])
    Descriptor: XMLDescriptor(oracle.toplink.publicinterface.Descriptor --> [Databas
    eTable(descriptor)])
    Exception [TOPLINK-9005] (OracleAS TopLink - 10g (9.0.4.7) (Build 050405)): orac
    le.toplink.exceptions.SessionLoaderException
    Exception Description: An exception was thrown while loading the <project-xml> f
    ile [config/toplink.xml].
    Internal Exception: Exception [TOPLINK-98] (OracleAS TopLink - 10g (9.0.4.7) (Bu
    ild 050405)): oracle.toplink.exceptions.DescriptorException
    Exception Description: The underlying descriptor callback method [applyAmendment
    Method], with parameter (DescriptorEvent), triggered an exception.
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: Exception [TOPLINK-165] (OracleAS TopLink - 10g (9.
    0.4.7) (Build 050405)): oracle.toplink.exceptions.DescriptorException
    Exception Description: This descriptor's amendment method triggered an exception
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: java.lang.Error: Unresolved compilation problem:
    Descriptor: Descriptor(com.celeres.pago.valueobject.royalties.RoyaltyRate --> [D
    atabaseTable(ROYALTY_RATES)])
    Descriptor: XMLDescriptor(oracle.toplink.publicinterface.Descriptor --> [Databas
    eTable(descriptor)])
    Exception [TOPLINK-9005] (OracleAS TopLink - 10g (9.0.4.7) (Build 050405)): orac
    le.toplink.exceptions.SessionLoaderException
    Exception Description: An exception was thrown while loading the <project-xml> f
    ile [config/toplink.xml].
    Internal Exception: Exception [TOPLINK-98] (OracleAS TopLink - 10g (9.0.4.7) (Bu
    ild 050405)): oracle.toplink.exceptions.DescriptorException
    Exception Description: The underlying descriptor callback method [applyAmendment
    Method], with parameter (DescriptorEvent), triggered an exception.
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: Exception [TOPLINK-165] (OracleAS TopLink - 10g (9.
    0.4.7) (Build 050405)): oracle.toplink.exceptions.DescriptorException
    Exception Description: This descriptor's amendment method triggered an exception
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: java.lang.Error: Unresolved compilation problem:
    Descriptor: Descriptor(com.celeres.pago.valueobject.royalties.RoyaltyRate --> [D
    atabaseTable(ROYALTY_RATES)])
    Descriptor: XMLDescriptor(oracle.toplink.publicinterface.Descriptor --> [Databas
    eTable(descriptor)])
    Exception [TOPLINK-9005] (OracleAS TopLink - 10g (9.0.4.7) (Build 050405)): orac
    le.toplink.exceptions.SessionLoaderException
    Exception Description: An exception was thrown while loading the <project-xml> f
    ile [config/toplink.xml].
    Internal Exception: Exception [TOPLINK-98] (OracleAS TopLink - 10g (9.0.4.7) (Bu
    ild 050405)): oracle.toplink.exceptions.DescriptorException
    Exception Description: The underlying descriptor callback method [applyAmendment
    Method], with parameter (DescriptorEvent), triggered an exception.
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: Exception [TOPLINK-165] (OracleAS TopLink - 10g (9.
    0.4.7) (Build 050405)): oracle.toplink.exceptions.DescriptorException
    Exception Description: This descriptor's amendment method triggered an exception
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: java.lang.Error: Unresolved compilation problem:
    Descriptor: Descriptor(com.celeres.pago.valueobject.royalties.RoyaltyRate --> [D
    atabaseTable(ROYALTY_RATES)])
    Descriptor: XMLDescriptor(oracle.toplink.publicinterface.Descriptor --> [Databas
    eTable(descriptor)])
    Exception [TOPLINK-9005] (OracleAS TopLink - 10g (9.0.4.7) (Build 050405)): orac
    le.toplink.exceptions.SessionLoaderException
    Exception Description: An exception was thrown while loading the <project-xml> f
    ile [config/toplink.xml].
    Internal Exception: Exception [TOPLINK-98] (OracleAS TopLink - 10g (9.0.4.7) (Bu
    ild 050405)): oracle.toplink.exceptions.DescriptorException
    Exception Description: The underlying descriptor callback method [applyAmendment
    Method], with parameter (DescriptorEvent), triggered an exception.
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: Exception [TOPLINK-165] (OracleAS TopLink - 10g (9.
    0.4.7) (Build 050405)): oracle.toplink.exceptions.DescriptorException
    Exception Description: This descriptor's amendment method triggered an exception
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: java.lang.Error: Unresolved compilation problem:
    Descriptor: Descriptor(com.celeres.pago.valueobject.royalties.RoyaltyRate --> [D
    atabaseTable(ROYALTY_RATES)])
    Descriptor: XMLDescriptor(oracle.toplink.publicinterface.Descriptor --> [Databas
    eTable(descriptor)])
    Exception [TOPLINK-9005] (OracleAS TopLink - 10g (9.0.4.7) (Build 050405)): orac
    le.toplink.exceptions.SessionLoaderException
    Exception Description: An exception was thrown while loading the <project-xml> f
    ile [config/toplink.xml].
    Internal Exception: Exception [TOPLINK-98] (OracleAS TopLink - 10g (9.0.4.7) (Bu
    ild 050405)): oracle.toplink.exceptions.DescriptorException
    Exception Description: The underlying descriptor callback method [applyAmendment
    Method], with parameter (DescriptorEvent), triggered an exception.
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: Exception [TOPLINK-165] (OracleAS TopLink - 10g (9.
    0.4.7) (Build 050405)): oracle.toplink.exceptions.DescriptorException
    Exception Description: This descriptor's amendment method triggered an exception
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: java.lang.Error: Unresolved compilation problem:
    Descriptor: Descriptor(com.celeres.pago.valueobject.royalties.RoyaltyRate --> [D
    atabaseTable(ROYALTY_RATES)])
    Descriptor: XMLDescriptor(oracle.toplink.publicinterface.Descriptor --> [Databas
    eTable(descriptor)])
    Exception [TOPLINK-9005] (OracleAS TopLink - 10g (9.0.4.7) (Build 050405)): orac
    le.toplink.exceptions.SessionLoaderException
    Exception Description: An exception was thrown while loading the <project-xml> f
    ile [config/toplink.xml].
    Internal Exception: Exception [TOPLINK-98] (OracleAS TopLink - 10g (9.0.4.7) (Bu
    ild 050405)): oracle.toplink.exceptions.DescriptorException
    Exception Description: The underlying descriptor callback method [applyAmendment
    Method], with parameter (DescriptorEvent), triggered an exception.
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: Exception [TOPLINK-165] (OracleAS TopLink - 10g (9.
    0.4.7) (Build 050405)): oracle.toplink.exceptions.DescriptorException
    Exception Description: This descriptor's amendment method triggered an exception
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: java.lang.Error: Unresolved compilation problem:
    Descriptor: Descriptor(com.celeres.pago.valueobject.royalties.RoyaltyRate --> [D
    atabaseTable(ROYALTY_RATES)])
    Descriptor: XMLDescriptor(oracle.toplink.publicinterface.Descriptor --> [Databas
    eTable(descriptor)])
    Exception [TOPLINK-9005] (OracleAS TopLink - 10g (9.0.4.7) (Build 050405)): orac
    le.toplink.exceptions.SessionLoaderException
    Exception Description: An exception was thrown while loading the <project-xml> f
    ile [config/toplink.xml].
    Internal Exception: Exception [TOPLINK-98] (OracleAS TopLink - 10g (9.0.4.7) (Bu
    ild 050405)): oracle.toplink.exceptions.DescriptorException
    Exception Description: The underlying descriptor callback method [applyAmendment
    Method], with parameter (DescriptorEvent), triggered an exception.
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: Exception [TOPLINK-165] (OracleAS TopLink - 10g (9.
    0.4.7) (Build 050405)): oracle.toplink.exceptions.DescriptorException
    Exception Description: This descriptor's amendment method triggered an exception
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: java.lang.Error: Unresolved compilation problem:
    Descriptor: Descriptor(com.celeres.pago.valueobject.royalties.RoyaltyRate --> [D
    atabaseTable(ROYALTY_RATES)])
    Descriptor: XMLDescriptor(oracle.toplink.publicinterface.Descriptor --> [Databas
    eTable(descriptor)])
    at oracle.toplink.exceptions.SessionLoaderException.finalException(Sessi
    onLoaderException.java:89)
    at oracle.toplink.tools.sessionconfiguration.XMLLoader.load(XMLLoader.ja
    va:156)
    at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Sess
    ionManager.java:219)
    at org.springframework.orm.toplink.LocalSessionFactory.loadDatabaseSessi
    on(LocalSessionFactory.java:320)
    at org.springframework.orm.toplink.LocalSessionFactory.createSessionFact
    ory(LocalSessionFactory.java:258)
    at org.springframework.orm.toplink.LocalSessionFactoryBean.afterProperti
    esSet(LocalSessionFactoryBean.java:51)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBean
    Factory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:937)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBean
    Factory.createBean(AbstractAutowireCapableBeanFactory.java:334)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
    (AbstractBeanFactory.java:222)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
    (AbstractBeanFactory.java:146)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver
    .resolveReference(BeanDefinitionValueResolver.java:176)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver
    .resolveValueIfNecessary(BeanDefinitionValueResolver.java:105)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBean
    Factory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:891)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBean
    Factory.populateBean(AbstractAutowireCapableBeanFactory.java:707)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBean
    Factory.createBean(AbstractAutowireCapableBeanFactory.java:316)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
    (AbstractBeanFactory.java:222)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
    (AbstractBeanFactory.java:146)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver
    .resolveReference(BeanDefinitionValueResolver.java:176)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver
    .resolveValueIfNecessary(BeanDefinitionValueResolver.java:105)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBean
    Factory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:891)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBean
    Factory.populateBean(AbstractAutowireCapableBeanFactory.java:707)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBean
    Factory.createBean(AbstractAutowireCapableBeanFactory.java:316)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
    (AbstractBeanFactory.java:222)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
    (AbstractBeanFactory.java:146)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.
    preInstantiateSingletons(DefaultListableBeanFactory.java:277)
    at org.springframework.context.support.AbstractApplicationContext.refres
    h(AbstractApplicationContext.java:310)
    at org.springframework.web.context.support.AbstractRefreshableWebApplica
    tionContext.refresh(AbstractRefreshableWebApplicationContext.java:133)
    at org.springframework.web.context.ContextLoader.createWebApplicationCon
    text(ContextLoader.java:230)
    at org.springframework.web.context.ContextLoader.initWebApplicationConte
    xt(ContextLoader.java:156)
    at org.springframework.web.context.ContextLoaderListener.contextInitiali
    zed(ContextLoaderListener.java:48)
    at com.celeres.pago.presentation.servlet.SpringContainerLoaderListener.c
    ontextInitialized(SpringContainerLoaderListener.java:33)
    at com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.
    java:668)
    at com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:
    435)
    at com.evermind.server.Application.getHttpApplication(Application.java:6
    95)
    at com.evermind.server.http.HttpServer.getHttpApplication(HttpServer.jav
    a:676)
    at com.evermind.server.http.HttpSite.initApplications(HttpSite.java:528)
    at com.evermind.server.http.HttpSite.setConfig(HttpSite.java:231)
    at com.evermind.server.http.HttpServer.setSites(HttpServer.java:247)
    at com.evermind.server.http.HttpServer.setConfig(HttpServer.java:150)
    at com.evermind.server.ApplicationServer.initializeHttp(ApplicationServe
    r.java:1959)
    at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.jav
    a:1294)
    at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLa
    uncher.java:93)
    at java.lang.Thread.run(Thread.java:534)
    SessionLoaderExceptions:

    Target Invocation Exception: java.lang.Error: Unresolved compilation problem:Looks like your VM is throwing the following Error. Most likely you have not compiled your classes correctly, possibly the class that defines your Mapping Workbench amendment methods. If the print the stack trace on one of the exceptions nested in the SessionLoaderException, it would probably show the class with issues in the caused by stack.

  • Toplink exception

    Hi ,
    In asyncronous process , i am trying to connect database using DB adapter , i am getting this error . ( If i restart the server it is working for some time again same error getting)
    file:/opt/oracle/product/10.1.3.1/OracleAS1/bpel/domains/usa/tmp/.bpel_MesaReclass_1.0_9bf2415563f0b0f620c92a46ef10d243.tmp/selectifibpelk.wsdl [ selectifibpelk_ptt::selectifibpelkSelect(selectifibpelkSelect_inparameters,IfibpelkCollection) ] - WSIF JCA Execute of operation 'selectifibpelkSelect' failed due to: Could not create/access the TopLink Session.
    This session is used to connect to the datastore.
    ; nested exception is:
         ORABPEL-11622
    Could not create/access the TopLink Session.
    This session is used to connect to the datastore.
    See root exception for the specific exception. You may need to configure the connection settings in the deployment descriptor (i.e. $J2EE_HOME/application-deployments/default/DbAdapter/oc4j-ra.xml) and restart the server. Caused by Exception [TOPLINK-0] (Oracle TopLink - 10g Release 3 (10.1.3.1.0) (Build 061004)): oracle.toplink.exceptions.IntegrityException
    Descriptor Exceptions:
    Exception [TOPLINK-48] (Oracle TopLink - 10g Release 3 (10.1.3.1.0) (Build 061004)): oracle.toplink.exceptions.DescriptorException
    Exception Description: Multiple writable mappings exist for the field [@version]. Only one may be defined as writable, all others must be specified read-only.
    Mapping: oracle.toplink.ox.mappings.XMLTransformationMapping[null]
    Descriptor: XMLDescriptor(oracle.toplink.sessions.Project --> [DatabaseTable(toplink:object-persistence)])
    Runtime Exceptions:
    java.lang.NullPointerException
    java.lang.NullPointerException
    Any one please provide solution
    Regards
    janardhan

    11622 this is the error where your connection pool and the data source for the connection pool might not be the same all you need to do is to create a connection pool and data source with same JNDI name and make use of that jndi name in your database adapter configuration as
    eg: eis/db/*******(watever name u create for the connection pool)
    this can solve your top link issue

  • Internal Exception: java.lang.NoSuchFieldException

    i have a java app that displays data from a table called MasterScrip using jpa. i wish to add an extra field to my table but, when i add an extra field named 'change' to my database table MasterScrip i get following exception, when i remove the field, the app works fine
    Exception [EclipseLink-0] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.IntegrityException
    Descriptor Exceptions:
    Exception [EclipseLink-59] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.DescriptorException
    Exception Description: The instance variable [change] is not defined in the domain class [entity.MasterScrip], or it is not accessible.
    Internal Exception: java.lang.NoSuchFieldException: change
    Mapping: org.eclipse.persistence.mappings.DirectToFieldMapping[change-->StockCommodityDB.MasterScrip.Change]
    Descriptor: RelationalDescriptor(entity.MasterScrip --> [DatabaseTable(StockCommodityDB.MasterScrip)])
    //stack trace with ejbTransactionRolledBackException
    entity MasterScrip.java:
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package entity;
    import java.io.Serializable;
    import java.util.Collection;
    import javax.persistence.Basic;
    import javax.persistence.CascadeType;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.FetchType;
    import javax.persistence.GeneratedValue;
    import javax.persistence.GenerationType;
    import javax.persistence.Id;
    import javax.persistence.JoinColumn;
    import javax.persistence.ManyToOne;
    import javax.persistence.NamedQueries;
    import javax.persistence.NamedQuery;
    import javax.persistence.OneToMany;
    import javax.persistence.Table;
    import javax.validation.constraints.NotNull;
    import javax.validation.constraints.Size;
    import javax.xml.bind.annotation.XmlRootElement;
    import javax.xml.bind.annotation.XmlTransient;
    * @author root
    @Entity
    @Table(name = "MasterScrip", catalog = "StockCommodityDB", schema = "")
    @XmlRootElement
    @NamedQueries({
    @NamedQuery(name = "MasterScrip.findAll", query = "SELECT m FROM MasterScrip m"),
    @NamedQuery(name = "MasterScrip.findByScripID", query = "SELECT m FROM MasterScrip m WHERE m.scripID = :scripID"),
    @NamedQuery(name = "MasterScrip.findByScripSymbol", query = "SELECT m FROM MasterScrip m WHERE m.scripSymbol = :scripSymbol"),
    @NamedQuery(name = "MasterScrip.findByType", query = "SELECT m FROM MasterScrip m WHERE m.type = :type"),
    @NamedQuery(name = "MasterScrip.findByCompanyName", query = "SELECT m FROM MasterScrip m WHERE m.companyName = :companyName"),
    @NamedQuery(name = "MasterScrip.findByLastTradedPrice", query = "SELECT m FROM MasterScrip m WHERE m.lastTradedPrice = :lastTradedPrice"),
    @NamedQuery(name = "MasterScrip.findByLastTradedQuantity", query = "SELECT m FROM MasterScrip m WHERE m.lastTradedQuantity = :lastTradedQuantity"),
    @NamedQuery(name = "MasterScrip.findByOpenPrice", query = "SELECT m FROM MasterScrip m WHERE m.openPrice = :openPrice"),
    @NamedQuery(name = "MasterScrip.findByHighPrice", query = "SELECT m FROM MasterScrip m WHERE m.highPrice = :highPrice"),
    @NamedQuery(name = "MasterScrip.findByLowPrice", query = "SELECT m FROM MasterScrip m WHERE m.lowPrice = :lowPrice"),
    @NamedQuery(name = "MasterScrip.findByTotalTradedQuantity", query = "SELECT m FROM MasterScrip m WHERE m.totalTradedQuantity = :totalTradedQuantity"),
    @NamedQuery(name = "MasterScrip.findByVolume", query = "SELECT m FROM MasterScrip m WHERE m.volume = :volume"),
    @NamedQuery(name = "MasterScrip.findByExchange", query = "SELECT m FROM MasterScrip m WHERE m.exchange = :exchange"),
    @NamedQuery(name = "MasterScrip.findByBrokerageCharge", query = "SELECT m FROM MasterScrip m WHERE m.brokerageCharge = :brokerageCharge"),
    @NamedQuery(name = "MasterScrip.findByPreviousClose", query = "SELECT m FROM MasterScrip m WHERE m.previousClose = :previousClose"),
    @NamedQuery(name = "MasterScrip.findByChange", query = "SELECT m FROM MasterScrip m WHERE m.change = :change")})
    public class MasterScrip implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @NotNull
    @Column(name = "ScripID", nullable = false)
    private Integer scripID;
    @Size(max = 15)
    @Column(name = "ScripSymbol", length = 15)
    private String scripSymbol;
    @Size(max = 10)
    @Column(name = "Type", length = 10)
    private String type;
    @Size(max = 50)
    @Column(name = "CompanyName", length = 50)
    private String companyName;
    // @Max(value=?) @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Column(name = "LastTradedPrice", precision = 22)
    private Double lastTradedPrice;
    @Column(name = "LastTradedQuantity")
    private Integer lastTradedQuantity;
    @Column(name = "OpenPrice", precision = 22)
    private Double openPrice;
    @Column(name = "HighPrice", precision = 22)
    private Double highPrice;
    @Column(name = "LowPrice", precision = 22)
    private Double lowPrice;
    @Column(name = "TotalTradedQuantity")
    private Integer totalTradedQuantity;
    @Column(name = "Volume")
    private Integer volume;
    @Size(max = 30)
    @Column(name = "Exchange", length = 30)
    private String exchange;
    @Column(name = "BrokerageCharge", precision = 22)
    private Double brokerageCharge;
    @Column(name = "PreviousClose", precision = 22)
    private Double previousClose;
    @Column(name = "Change", precision = 22)
    private Double change;
    @JoinColumn(name = "CommoditySubCategoryID", referencedColumnName = "CommoditySubCategoryID")
    @ManyToOne(fetch = FetchType.EAGER)
    private CommoditySubCategoryMaster commoditySubCategoryID;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "scripID", fetch = FetchType.EAGER)
    private Collection<UserStock> userStockCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "scripID", fetch = FetchType.EAGER)
    private Collection<UserTrack> userTrackCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "scripID", fetch = FetchType.EAGER)
    private Collection<OrderStock> orderStockCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "scripID", fetch = FetchType.EAGER)
    private Collection<TradeStock> tradeStockCollection;
    public MasterScrip() {
    public MasterScrip(Integer scripID) {
    this.scripID = scripID;
    public Integer getScripID() {
    return scripID;
    public void setScripID(Integer scripID) {
    this.scripID = scripID;
    public String getScripSymbol() {
    return scripSymbol;
    public void setScripSymbol(String scripSymbol) {
    this.scripSymbol = scripSymbol;
    public String getType() {
    return type;
    public void setType(String type) {
    this.type = type;
    public String getCompanyName() {
    return companyName;
    public void setCompanyName(String companyName) {
    this.companyName = companyName;
    public Double getLastTradedPrice() {
    return lastTradedPrice;
    public void setLastTradedPrice(Double lastTradedPrice) {
    this.lastTradedPrice = lastTradedPrice;
    public Integer getLastTradedQuantity() {
    return lastTradedQuantity;
    public void setLastTradedQuantity(Integer lastTradedQuantity) {
    this.lastTradedQuantity = lastTradedQuantity;
    public Double getOpenPrice() {
    return openPrice;
    public void setOpenPrice(Double openPrice) {
    this.openPrice = openPrice;
    public Double getHighPrice() {
    return highPrice;
    public void setHighPrice(Double highPrice) {
    this.highPrice = highPrice;
    public Double getLowPrice() {
    return lowPrice;
    public void setLowPrice(Double lowPrice) {
    this.lowPrice = lowPrice;
    public Integer getTotalTradedQuantity() {
    return totalTradedQuantity;
    public void setTotalTradedQuantity(Integer totalTradedQuantity) {
    this.totalTradedQuantity = totalTradedQuantity;
    public Integer getVolume() {
    return volume;
    public void setVolume(Integer volume) {
    this.volume = volume;
    public String getExchange() {
    return exchange;
    public void setExchange(String exchange) {
    this.exchange = exchange;
    public Double getBrokerageCharge() {
    return brokerageCharge;
    public void setBrokerageCharge(Double brokerageCharge) {
    this.brokerageCharge = brokerageCharge;
    public Double getPreviousClose() {
    return previousClose;
    public void setPreviousClose(Double previousClose) {
    this.previousClose = previousClose;
    public Double getChange() {
    return change;
    public void setChange(Double change) {
    this.change = change;
    public CommoditySubCategoryMaster getCommoditySubCategoryID() {
    return commoditySubCategoryID;
    public void setCommoditySubCategoryID(CommoditySubCategoryMaster commoditySubCategoryID) {
    this.commoditySubCategoryID = commoditySubCategoryID;
    @XmlTransient
    public Collection<UserStock> getUserStockCollection() {
    return userStockCollection;
    public void setUserStockCollection(Collection<UserStock> userStockCollection) {
    this.userStockCollection = userStockCollection;
    @XmlTransient
    public Collection<UserTrack> getUserTrackCollection() {
    return userTrackCollection;
    public void setUserTrackCollection(Collection<UserTrack> userTrackCollection) {
    this.userTrackCollection = userTrackCollection;
    @XmlTransient
    public Collection<OrderStock> getOrderStockCollection() {
    return orderStockCollection;
    public void setOrderStockCollection(Collection<OrderStock> orderStockCollection) {
    this.orderStockCollection = orderStockCollection;
    @XmlTransient
    public Collection<TradeStock> getTradeStockCollection() {
    return tradeStockCollection;
    public void setTradeStockCollection(Collection<TradeStock> tradeStockCollection) {
    this.tradeStockCollection = tradeStockCollection;
    @Override
    public int hashCode() {
    int hash = 0;
    hash += (scripID != null ? scripID.hashCode() : 0);
    return hash;
    @Override
    public boolean equals(Object object) {
    // TODO: Warning - this method won't work in the case the id fields are not set
    if (!(object instanceof MasterScrip)) {
    return false;
    MasterScrip other = (MasterScrip) object;
    if ((this.scripID == null && other.scripID != null) || (this.scripID != null && !this.scripID.equals(other.scripID))) {
    return false;
    return true;
    @Override
    public String toString() {
    return "entity.MasterScrip[ scripID=" + scripID + " ]";
    what could be the reason of this exception? how do i solve it?

    i cleaned and built the app and redeployed it. now i am getting the following exception:
    Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Change, CompanyName, Exchange, HighPrice, LastTradedPrice, LastTradedQuantity, L' at line 1
    Error Code: 1064
    Call: SELECT ScripID, BrokerageCharge, Change, CompanyName, Exchange, HighPrice, LastTradedPrice, LastTradedQuantity, LowPrice, OpenPrice, PreviousClose, ScripSymbol, TotalTradedQuantity, Type, Volume, CommoditySubCategoryID FROM StockCommodityDB.MasterScrip
    Query: ReadAllQuery(name="MasterScrip.findAll" referenceClass=MasterScrip sql="SELECT ScripID, BrokerageCharge, Change, CompanyName, Exchange, HighPrice, LastTradedPrice, LastTradedQuantity, LowPrice, OpenPrice, PreviousClose, ScripSymbol, TotalTradedQuantity, Type, Volume, CommoditySubCategoryID FROM StockCommodityDB.MasterScrip")
         at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:333)
    where am i wrong?

  • 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

  • Problems with Toplink Essentials on OracleAS 10.1.3.1 / OC4J 10.1.3.2

    Hi, all.
    I successfully installed OracleAS 10.1.3.0 and applied patch 5906151 to update do OAS 10.1.3.1 and OC4J 10.1.3.2, running on both Windows and AIX.
    I deployed a j2ee app (ejb-jar and ear/war separatelly) on both. My application runs very well on Windows platform, but fails on AIX.
    In order to get my app running with EJB 3.0, JPA and Toplink, I had to copy toplink-essentials.jar to $ORACLE_HOME/j2ee/home/applib/ directory.
    On AIX I was getting the following error:
    exception occurred during method invocation: javax.ejb.EJBException:
       java.lang.RuntimeException: javax.ejb.EJBException: oracle.toplink.essentials.exceptions.ValidationException
              Exception Description: Error encountered when building the @NamedQuery [MyClass.findAll]
                 from entity class [class oracle.toplink.essentials.internal.ejb.cmp3.metadata.queries.MetadataNamedQuery].
             Internal Exception: java.lang.IllegalStateException: ClassLoader "myApp.root:0.0.1"
               (from  in /oracle/product/10.1.3.0/j2ee/OC4J_1/applications/myApp/):
      This loader has been closed and should not be in use.;
    But I found a known issue on Metalink [Note:427650.1] (bug 5928776) - https://metalink.oracle.com/metalink/plsql/f?p=130:14:11405609768040641618::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,427650.1,1,1,1,helvetica
    I replaced the toplink-essentials.jar and toplink-essentials-agent.jar as stated on the metalink for the version build 41, and tested. And later for the latest build 58.
    But I am getting another error message:
    Exception [TOPLINK-46] (Oracle TopLink Essentials - 2.0 (Build b58-rc1 (08/05/2007))): oracle.toplink.essentials.exceptions.DescriptorException
    Exception Description: There should be one non-read-only mapping defined for the primary key field [MY_TABLE.MY_FIELD].
    Descriptor: RelationalDescriptor(xyz.MyClass --> [DatabaseTable(MY_TABLE)])
    Runtime Exceptions:
    ; nested exception is: javax.persistence.PersistenceException: Exception [TOPLINK-0] (Oracle TopLink Essentials - 2.0 (Build b58-rc1 (08/05/2007))): oracle.toplink.essentials.exceptions.IntegrityException
    Descriptor Exceptions:
    ---------------------------------------------------------Does anyone have any idea about this issue?

    Seems to be a bug. That was the response from Oracle support (Metalink)
    Response:
    Your issue seems to be related to bug 5594702 - Abstract: EJB30 ENTITY BEAN WITH @ID AND @COLUMN ANNOTATION FAILS TO DEPLOY ON AIX.
    There is an issue with the IBM JDK/JRE 1.5's processing of annotations.
    Links:
    http://www.theserverside.com/discussions/thread.tss?thread_id=37764
    http://www-128.ibm.com/developerworks/forums/dw_thread.jsp?forum=367&thread=112543&cat=10
    When processing annotations it returns boolean values as false.
    Work-around:
    Fully specify the @Column annotation's boolean values. If insertable and updatable are set to false (which will happen due to this bug) then TopLink sets the PK
    mapping to read-only and the exception seen is expected.
    Note: nullable attribute of the @Colmun is not used in the EJB3/JPA preview of 10.1.3.0 If the customer MUST override the default column name then they should use:
    @Column(name="column-name", insertable=true, updatable=true)
    If they do not wish to override the default column name then simply do not use an @Column annotation.
    It can be deleted or commented out in the JDev generated code.
    There are two reported annotation processing issues with the AIX JVM. One was fixed in SR1 and the other is fixed
    in SR3 (due out Oc 11 - today). Upgrading to these more recent JVM releases may also address this issue.
    RECOMMENDED SOLUTIONS:
    1. Upgrade the IBM AIX JVM to SR3.
    OR
    2. Fix all generated @Column annotations as described above

  • Can't remove a node from a tree

    I am using the custom tree dataDescriptor provided in Flex live
    doc. It works for creating the tree and add notes, however when I
    try to remove a node from the tree it cant work. Does anyone have
    any idea?
    This is the code for MyCustomeTreeDataDescriptor.as
    package
    import mx.collections.ArrayCollection;
    import mx.collections.CursorBookmark;
    import mx.collections.ICollectionView;
    import mx.collections.IViewCursor;
    import mx.events.CollectionEvent;
    import mx.events.CollectionEventKind;
    import mx.controls.treeClasses.*;
    public class MyCustomTreeDataDescriptor implements
    ITreeDataDescriptor
    // The getChildren method requires the node to be an Object
    // with a children field.
    // If the field contains an ArrayCollection, it returns the
    field
    // Otherwise, it wraps the field in an ArrayCollection.
    public function getChildren(node:Object,
    model:Object=null):ICollectionView
    try
    if (node is Object) {
    if(node.children is ArrayCollection){
    return node.children;
    }else{
    return new ArrayCollection(node.children);
    catch (e:Error) {
    trace("[Descriptor] exception checking for getChildren");
    return null;
    // The isBranch method simply returns true if the node is an
    // Object with a children field.
    // It does not support empty branches, but does support null
    children
    // fields.
    public function isBranch(node:Object,
    model:Object=null):Boolean {
    try {
    if (node is Object) {
    if (node.children != null) {
    return true;
    catch (e:Error) {
    trace("[Descriptor] exception checking for isBranch");
    return false;
    // The hasChildren method Returns true if the node actually
    has children.
    public function hasChildren(node:Object,
    model:Object=null):Boolean {
    if (node == null)
    return false;
    var children:ICollectionView = getChildren(node, model);
    try {
    if (children.length > 0)
    return true;
    catch (e:Error) {
    return false;
    // The getData method simply returns the node as an Object.
    public function getData(node:Object,
    model:Object=null):Object {
    try {
    return node;
    catch (e:Error) {
    return null;
    // The addChildAt method does the following:
    // If the parent parameter is null or undefined, inserts
    // the child parameter as the first child of the model
    parameter.
    // If the parent parameter is an Object and has a children
    field,
    // adds the child parameter to it at the index parameter
    location.
    // It does not add a child to a terminal node if it does not
    have
    // a children field.
    public function addChildAt(parent:Object, child:Object,
    index:int,
    model:Object=null):Boolean {
    var event:CollectionEvent = new
    CollectionEvent(CollectionEvent.COLLECTION_CHANGE);
    event.kind = CollectionEventKind.ADD;
    event.items = [child];
    event.location = index;
    if (!parent) {
    var iterator:IViewCursor = model.createCursor();
    iterator.seek(CursorBookmark.FIRST, index);
    iterator.insert(child);
    else if (parent is Object) {
    if (parent.children != null) {
    if(parent.children is ArrayCollection) {
    parent.children.addItemAt(child, index);
    if (model){
    model.dispatchEvent(event);
    model.itemUpdated(parent);
    return true;
    else {
    parent.children.splice(index, 0, child);
    if (model)
    model.dispatchEvent(event);
    return true;
    return false;
    // The removeChildAt method does the following:
    // If the parent parameter is null or undefined, removes
    // the child at the specified index in the model.
    // If the parent parameter is an Object and has a children
    field,
    // removes the child at the index parameter location in the
    parent.
    public function removeChildAt(parent:Object, child:Object,
    index:int, model:Object=null):Boolean
    var event:CollectionEvent = new
    CollectionEvent(CollectionEvent.COLLECTION_CHANGE);
    event.kind = CollectionEventKind.REMOVE;
    event.items = [child];
    event.location = index;
    //handle top level where there is no parent
    if (!parent)
    var iterator:IViewCursor = model.createCursor();
    iterator.seek(CursorBookmark.FIRST, index);
    iterator.remove();
    if (model)
    model.dispatchEvent(event);
    return true;
    else if (parent is Object)
    if (parent.children != undefined)
    parent.children.splice(index, 1);
    if (model)
    model.dispatchEvent(event);
    return true;
    return false;
    This is my tree definition:
    <mx:Tree width="143" top="0" bottom="0" left="0"
    height="100%"
    id="publicCaseTree"
    dataDescriptor="{new MyCustomTreeDataDescriptor()}"
    dataProvider="{ac}"
    defaultLeafIcon="@Embed('assets/caseIcon.png')"
    change="publicTreeChanged(event)"
    dragEnabled="true"
    dragMoveEnabled="false"/>
    This is how I remove the selected node from the tree. When
    Delete button is clicked, the doDeleteCase function is
    exectuted.
    public function publicTreeChanged(event:Event):void {
    selectedNode =
    publicCaseTree.dataDescriptor.getData(Tree(event.target).selectedItem,
    ac);
    public function doDeleteCase(event:Event):void{
    publicCaseTree.dataDescriptor.removeChildAt(publicCaseTree.firstVisibleItem,
    selectedNode, 0, ac);
    Any help would be appreciated.Thanks.

    Finally I removed nodes from tree, but not sure I did in the
    right way. Anybody encounter the same problem, please
    discuss.

  • Primary Key in INSERTs

    Hi!! :-)
    Im currently trying to access some Postgres-database from an Enterprise-App running inside Sun App Server 9... Some of th tables have a primary-key-field with type SERIAL, so Postgres creates the value for those fields!!
    Now: How can i achieve, that the app-server does not try to write into those fields??
    Specifying insertable=false is ignored and when i specify insertable=false and updatable=false i get the following error on deployment:
    Deploying application in domain failed; Exception [TOPLINK-0] (Oracle TopLink Essentials - 2006.4 (Build 060412)): oracle.toplink.essentials.exceptions.IntegrityException Descriptor Exceptions: --------------------------------------------------------- Exception [TOPLINK-46] (Oracle TopLink Essentials - 2006.4 (Build 060412)): oracle.toplink.essentials.exceptions.DescriptorException Exception Description: There should be one non-read-only mapping defined for the primary key field [dsl_payments.id]. Descriptor: RelationalDescriptor(de.meitnerweg.netzag.dsl.persistence.DslPayment --> [DatabaseTable(dsl_payments)]) Runtime Exceptions: --------------------------------------------------------- Exception [TOPLINK-0] (Oracle TopLink Essentials - 2006.4 (Build 060412)): oracle.toplink.essentials.exceptions.IntegrityException Descriptor Exceptions: --------------------------------------------------------- Exception [TOPLINK-46] (Oracle TopLink Essentials - 2006.4 (Build 060412)): oracle.toplink.essentials.exceptions.DescriptorException Exception Description: There should be one non-read-only mapping defined for the primary key field [dsl_payments.id]. Descriptor: RelationalDescriptor(de.meitnerweg.netzag.dsl.persistence.DslPayment --> [DatabaseTable(dsl_payments)]) Runtime Exceptions: ---------------------------------------------------------
    Anyone ideas??
    :-)

    The blog here describes how to work with this situation.
    http://blogs.sun.com/Glassfish_PostgreSQL/entry/introducing_support_for_postgresql_in
    Look into known Issues / Workaround sections.

  • Unable to call another program in servlet

    Hi,
    I'm developing a Java program in Netweaver. It is a servlet program. External server will call this servlet program to pass the value in and then i use the value and pass to a stateless session bean. But now i'm required to make some change but in certain condition, it will use the value and pass to another servlet in another server.
    So i had changed my code as below.
         protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              String xml_response = "";
              String msg = request.getParameter("message").trim();
              FileReader fread = null;
              BufferedReader bread = new BufferedReader(new FileReader("D:\\filter.txt"));
              String line;
              ArrayList moList = new ArrayList();
              while((line = bread.readLine())!=null)
                    String[] moNum = line.split(",");
                    for(int i=0; i<moNum.length;i++)
                          moList.add(moNum<i>);
            bread.close();
               try {
                   xml_response = "700";
                   response.setContentType("text/html");
                   PrintWriter out = response.getWriter();
                   out.println("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
                   out.println("<status>" + xml_response + "</status>");
                   out.close();
                            if (moList.contains(ms)) {
                        response.sendRedirect("http://192.168.1.1:50000/adapter/msgtext?sms=" + sms + "&moid=" + mo_id + "&msisdn=" + msisdn);
                            } else {
               } catch ......
    I have a xml to response to the server that pass me the value. Need that to inform them i had received the msg. So now i not sure the error is it caused by the XML part. I already close it but when i try to run this i get this error message.
    #com.sap.engine.services.servlets_jsp.client.RequestInfoServer#sap.com/AdapterWSEAR#com.sap.engine.services.servlets_jsp.client.RequestInfoServer#J2EE_GUEST#0####9f7f9e100bc411debf5b001a6467cb54#SAPEngine_Application_Thread[impl:3]_30##0#0#Error##Plain###application [moadapter] Processing HTTP request to servlet [SendMOText] finished with error. The error is: java.io.IOException: Bad file descriptor
         at java.io.FileOutputStream.write(Native Method)
         at java.io.DataOutputStream.writeBytes(DataOutputStream.java:254)
         at net.emisolutions.controller.adapter.servlet.SendMOText.doPost(SendMOText.java:163)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    #com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl#sap.com/AdapterWSEAR#com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl#J2EE_GUEST#0####9f7f9e100bc411debf5b001a6467cb54#SAPEngine_Application_Thread[impl:3]_30##0#0#Error#1#/System/Server/WebRequests#Plain###application [moadapter] Processing HTTP request to servlet [SendMOText] finished with error.
    The error is: java.io.IOException: Bad file descriptor
    Exception id: [001A6467CB54005E0000475100001A740004649841331F6F]#
    #com.sap.engine.services.servlets_jsp.client.RequestInfoServer#sap.com/AdapterWSEAR#com.sap.engine.services.servlets_jsp.client.RequestInfoServer#J2EE_GUEST#0####9f7f9e100bc411debf5b001a6467cb54#SAPEngine_Application_Thread[impl:3]_30##0#0#Error##Plain###application [moadapter] Cannot send an HTTP error response [500 Application error occurred during request processing. (details: java.io.IOException: Bad file descriptor)]. The error is: com.sap.engine.services.servlets_jsp.server.exceptions.WebIOException: The stream is closed.
         at com.sap.engine.services.servlets_jsp.server.runtime.client.ServletOutputStreamImpl.write(ServletOutputStreamImpl.java:170)
         at javax.servlet.ServletOutputStream.print(ServletOutputStream.java:135)
         at com.sap.engine.services.servlets_jsp.server.runtime.client.HttpServletResponseFacade.sendBodyText(HttpServletResponseFacade.java:996)
         at com.sap.engine.services.servlets_jsp.server.runtime.client.HttpServletResponseFacade.writeError(HttpServletResponseFacade.java:987)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.sendError(HttpHandlerImpl.java:973)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleGeneralException(HttpHandlerImpl.java:878)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.processError(HttpHandlerImpl.java:869)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:412)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Appreciate if anyone can help. I tried to google and find the error message that is given but unable to find it. What i think of is the XML that cause error. Any idea for this?
    Thanks.

    Solved.
    The XML caused the problem. I need to include the XML in the if statement instead of outside.

  • Non-Breaking Hyphen in MIF String ?

    I'm using a spreadsheet (LibreOffice Calc) to generate the MIF for a Framemaker table: Paste in lines of tab-separated part_numbers and descriptors, copy out raw MIF that opens in Frame as a 3-column table with callout#, part_number and descriptor, each having a unique Xref Marker with marker text based on the p/n & descriptor. It works (including escaping any Frame-special chars in the descriptors), except for one extra feature I'd like to have.
    I'd like to make all dashes in the part-numbers into non-breaking hyphens (\x15). Using the Calc function SUBSTITUTE, I can change any character to any arbitrary string. Part numbers may have zero or more dashes.
    So for raw string 123-456A, where "-" is an NBH, I'd generate:
    <ParaLine <String `123-456A'>
    According to the MIF(7) reference, either of these MIFs should work:
    <ParaLine <String `123\x15456A'>
    <ParaLine <String `123<Char HardHyphen>456A'>
    They don't.
    They both throw a parsing error on open in Frame.
    This doesn't work either:
    <ParaLine <String `123\\x15456A'>
    It ends up as a literal \x15 in the final table.
    This Calc function doesn't work either (where decimal 21 is hex 15):
    =SUBSTITUTE($RawData.A3;"-";"CHAR(21)")
    The character doesn't survive copy and paste through a plaintext editor, even if a raw 0x15 is valid MIF (which it may not be).
    This is FM7.1 Unix, so I can't use the Unicode code point for an NBH (this is the suggest route for MIF8 or later).
    The following MIF is valid, but may require more parsing of my strings than I care to invest in:
    <String `123'><Char HardHyphen><String `456A'>
    I could use:
    =SUBSTITUTE($RawData.A3;"-";"'><Char HardHyphen><String `")
    If I were sure that no partnumbers began or ended with a dash.
    Any other ideas?

    <String `123\x15456A'> parse fail
    <String `123 \x15 456A'> nbh, but leading space (fail)
    <String `123\x15 456A'> nbh, no spaces, works perfectly, thank you
    Amusingly, if you re-save the same document as MIF, Frame(7) re-codes the nbh as:
    <String `123'>
    <Char HardHyphen>
    <String `456A'>
    ... as does MIF9, saving as MIF9,
    even though the MIF9 reference says that as of MIF8, HardHyphen and 9 of its pals are no longer represented by name - use the UTF-8 code points. I'm guessing that intended policy change had some unintended results.

  • Persisting Entities in different databases

    Hello! In our compony we need to store information in two different databases. To check if this is possible I've written a simple program, in which part of the entities is stored in one DB, and the other part - in another. And I have an error during deployment whith the following stack trace:
    Deployment Error -- Exception [TOPLINK-0] (Oracle TopLink Essentials - 2006.4 (Build 060412)): oracle.toplink.essentials.exceptions.IntegrityException
    Descriptor Exceptions:
    Exception [TOPLINK-94] (Oracle TopLink Essentials - 2006.4 (Build 060412)): oracle.toplink.essentials.exceptions.DescriptorException
    Exception Description: Descriptors must have a table name defined.
    Descriptor: RelationalDescriptor(entity.Specification --> [])
    Exception [TOPLINK-74] (Oracle TopLink Essentials - 2006.4 (Build 060412)): oracle.toplink.essentials.exceptions.DescriptorException
    Exception Description: The primary key fields are not set for this descriptor.
    Descriptor: RelationalDescriptor(entity.Specification --> [])
    Exception [TOPLINK-108] (Oracle TopLink Essentials - 2006.4 (Build 060412)): oracle.toplink.essentials.exceptions.DescriptorException
    Exception Description: Cannot find value in class indicator mapping in parent descriptor [null].
    Descriptor: RelationalDescriptor(entity.Specification --> [])All I want is to store Specification entity and SalesLineItem entity in different databases, while there's a OneToOne unidirectional relationship between them. Here is part of SalesLineItem entity:
    @Entity
    public class SalesLineItem implements Serializable {
         private int quantity;
         private Specification productSpec;
         private int id;
         private Sale sale;
         @OneToOne
         public Specification getSpecification() {
              return this.productSpec;
         }And here's my persistence.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence">
      <persistence-unit name="pu1" transaction-type="JTA">
        <jta-data-source>jdbc/__default</jta-data-source>
        <class>entity.Payment</class>
        <class>entity.Sale</class>
        <class>entity.SalesLineItem</class>
        <exclude-unlisted-classes>true</exclude-unlisted-classes>
        <properties>
          <property name="toplink.ddl-generation" value="drop-and-create-tables"/>
          <property name="toplink.platform.class.name" value="oracle.toplink.essentials.platform.database.DerbyPlatform"/>
        </properties>
      </persistence-unit>
      <persistence-unit name="pu2" transaction-type="JTA">
        <jta-data-source>jdbc/__resource</jta-data-source>
        <class>entity.Catalog</class>
        <class>entity.Specification</class>
        <exclude-unlisted-classes>true</exclude-unlisted-classes>
        <properties>
          <property name="toplink.ddl-generation" value="drop-and-create-tables"/>
          <property name="toplink.platform.class.name" value="oracle.toplink.essentials.platform.database.DerbyPlatform"/>
        </properties>
      </persistence-unit>
    </persistence>Then, I suppose, I create two EntityManger is session beans, each associated with one specific persistence unit.
    When I use one database (one pesistence-unit in persistence.xml), everything works fine. I wonder, if it's possible to persist entities in a such way that entities with relationships between them are stored in different databases. Any help is greatly appreciated.

    If I could know, how to perform or some sample code, for the following two steps it would be great.
    Write descriptor ammendment code to bind together that go from (A) to (B) and (B) to (A).
    Be sure to map the ammendment descriptors in the mapping workbench.Or please point me to the right toplink documentation or examples.
    Thanks a lot for your help.

Maybe you are looking for

  • What are the minimum SAP processes for public sector ?.

    Dear  Expert I would understand that SAP Public Sector - Business Process has the following key: Shared Services Human Capital Management Government Purchases Formulation of Public Sector Accounting and Budget Social Services Social Security Governme

  • Photo Gallery shows error message when opening and closes right after it

    Hi, I have Photo Gallery installed on my computer and my photos are in an external hard drive. At the beginning worked well. But today I tried opening Photo Gallery and it shows an error only giving you the option to click "Accept". After you accept

  • SAP 4.6 installation aborted.

    Hi All My sap 4.6installation aborted with given below error.. My OS is Windows 2003Server and oracle 8i Info: DBR3LOADEXEC_NT_ORA R3loadPrepare 2 710 Total number of processes: 20 17 process(es) finished successfully: 0 4 5 6 7 8 9 10 11 12 13 14 15

  • Help with Spry Menubar and slideshow widget in IE

    I have a spry slideshow and menubar created in dreamweaver CS4.  Both work in Firefox, Safari, Chrome, etc. but not IE. Here's the link: http://www.salmonrunvacations.com/test/ Check in firefox first, then IE. For the menu, what I've done is created

  • Print Screen not working for user but working for Administrator

    Satellite A100 Laptop Print Screen Not working for USER but is working for Administrator[ New ] 09-14-2009 11:25 AM Hi I am new to this forum and am asking for your  help.  We are sharing a computer, the PrtSc key is working for the Administrator but