The following fields have multiple writable mappings: field name

Hi,
I keep getting this error when I map
tables to EJB 2.0 CMP.
What does exactly mean ?

It means that you have mapped multiple mappings/attributes in your bean to the same database fields. Single only one of the mappings can write the value TopLink requires to know which one it should use, you must make the other ones read-only.
Check your mappings and make sure they are not mapping the same fields, make sure you check 1-1 mappings and they map the foreign key fields (TopLink does not require that you have attributes for the foreign key fields). You may also have incorrectly mapped a 1-1 target foreign key relationship.

Similar Messages

  • 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

  • The following objects have previous versions that are no longer active

    I am getting this error for one of my receiver determination  when I try to edit and activate it .
    The following objects have previous versions that are no longer active:  Receiver Determination urn:sap-com:document:sap:idoc:messages | HRMD_A.HRMD_A07 | DEHCLNTXXX | * | * Open these objects in the editor and perform a conflict resolution . I am using the IDOC as source .
    I try to resolve it by selecting the active version, i got the "Merge relation is null" error.
    Any ideas?

    I am getting this error for one of my receiver determination when I try to edit and activate it .
    The following objects have previous versions that are no longer active: Receiver Determination urn:sap-com:document:sap:idoc:messages | HRMD_A.HRMD_A07 | DEHCLNTXXX | * | * Open these objects in the editor and perform a conflict resolution . I am using the IDOC as source .
    I try to resolve it by selecting the active version, i got the "Merge relation is null" error.
    Any ideas?

  • The following items have not been completely assigned to shipping group

    I am getting the below error:
    "The following items have not been completely assigned to shipping groups."
    We are using simple checkout with only shipping group applicable for order(HardgoodShippingGroup). It seems during some scenarios, ATG is creating one more shipping group of same type due to which I am getting the above error.
    Any pointers will be helpful

    HI,
    The error is displayed when the withholding tax has been changed in the master record of the vendor or customer. The change has been made after posting the invoice document, then at moment of payment there is a difference between withholding tax information in the invoice and the new withholding tax information changed in the master record.
    In order to prevent the system from the inconsistencies and to avoid the error message, please run report RFWT0010.
    Also, I would like to clarify the functionality of the report RFWT0010. If you have posted a vendor invoice relevant to withholding tax at time of invoice and later you change the master data so this withholding tax type is not longer relevant, this change will not take affect for the already posted invoice, althought you run report RFWT0010. Withholding tax amount at time of invoice is already posted and deducted If you later modify vendor master record and add a new withholding tax
    type relevant at time of payment, you will need to run report RFWT0010 before payment in order to take this withholding tax type into consideration, since it is relevant for payments.
    Please assign points if it useful.
    Regards
    Ravinagh Boni

  • Why do the tabs now have multiple favicon images showing after the last update?

    The last update to Firefox has created a problem with the tabs. The tabs now have multiple images of the websites favicon showing. When I open a tab and go to a website, when the favicon shows it will then create multiple images of that favicon. When I click off the tab and back on it, they disappear but this obviously should not be happening and didn't start until the last update was installed. I even did a Refresh and that didn't fix the problem. I tried to upload an image but the area just has a spinning wheel and the image size was only 5.41kb. Apparently that isn't working so well either. It appears Mozilla Firefox has created some bugs for it's browser and help forum.
    If anyone knows how to fix this or to get Mozilla to fix their problem, it would be appreciated. Thank you!

    You can try to disable hardware acceleration in Firefox.
    *Tools > Options > Advanced > General > Browsing: "Use hardware acceleration when available"
    You need to close and restart Firefox after toggling this setting.
    *https://support.mozilla.org/kb/upgrade-graphics-drivers-use-hardware-acceleration
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem.
    *Switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance
    *Do NOT click the Reset button on the Safe Mode start window
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • After effects warning: the following plugin have failed to load

    i'm open after effecs but it says: after effects warning: the following plugin have failed to load. there reinstall plugin: C:program file......\support files\(media core plugin\common\importerwwindowsmedia.pm
    Does anyone know what I can do to fix this problem?
    Thanks.

    1/ i use after efects cc 2014 (i don't know version number)
    3/ windows 8.1 64bit
    4/
    5/ info my computer: core i7, ram 8G, graphics nvidia quadro 1000

  • DRM-61026: Unable to create user session for the following reason: Login failed. Invalid user name or password.

    All Im very new to Oracle DRM and Im trying to get the app setup on Windows server running SQL Server 2008.  When I try to login to the Web Client I keep getting this error.
    DRM-61026: Unable to create user session for the following reason: Login failed. Invalid user name or password.
    Can you please help

    This might be due to The 'Oracle Instance' path may not have been set to a path relative to the 'CSS Bridge Host' (i.e. the Foundation Services machine) on the Configuration > Host Machines > CSS > General tab of the DRM Configuration Utility.
    if this is the case then
    1. Open the DRM Configuration Console.
    2. Go to the Configuration > Host Machines > CSS > General tab of the DRM Configuration Utility.
    3. Ensure that the path in 'Oracle Instance' has been set relative to the 'CSS Bridge Host' (i.e. the Foundation Services machine defined in 'CSS Bridge Host').
    4. If corrections are made to 'Oracle Instance' then restart the DRM services to pick up the change.
    Thanks,
    ~KKT~

  • When I attempt to purchase a song from itunes, I keep getting the following error message: Could not purchase "song name". An unknown error occurred (-42408). There was an error in the itunes store. Please try again later

    When I attempt to purchase a song from itunes, I keep getting the following error message: Could not purchase "song name". An unknown error occurred (-42408). There was an error in the itunes store. Please try again later
    Can anyone help solve this problem?

    I've done a search on here and haven't found any solutions posted for it for windows computers. You could try posting in the iTunes For Windows forum and see if you get any suggestions in there (are you able to download other items from the store e.g. a free app ?) - I use a Mac, the only things that I could think of to suggest trying is see if you get the same error on a different iTunes library :
    creating and/or opening a different iTunes library : http://support.apple.com/kb/HT1589
    or using a different user account on your computer in case it's a problem with that user account.
    But you may want to try the iTunes For Windows forum first, apart from anything else you are likely to get better help for the above

  • Can you have multiple revers mappings point to the same destination?

    I am trying to configure a reverse proxy to have multiple "Prefix" (location from redirects coming from the server) entries to be mapped to a single "Map to"(returned to the client). When I try this I get an error message that says:
    "Incorrect usage: Destination already exists Please enter another Destination to map"
    I need to be able to map multiple destinations back to the same location. I have an application that redirect to both / and http://server.domain.com, and I need to map both of these to https://proxy.domain.com, and can not. I have tweaked it to work by using proxy chaining and pointing one to the back end proxy, and one to the front end proxy instance that points to the same back end proxy, but this starts to get very complicated as the number of prefixes goes up that need to get to the same proxy interface.
    Is there some way to get around this, and have a many to one mapping for reverse mappings?
    Thanks in advance for you assistance.

    Couple of workarounds:
    1) Edit obj.conf manually
    2) Add the mapping as a regular one first (as opposed to reverse) and then use the edit option to change it to a reverse mapping.

  • Can I have the same printer installed multiple times under different names?

    On WIndows I have the same printer installed multiple times
    All using the same driver
    I have a Canon printer that has a rear tray and a bottom tray
    So, I will have one printer that prints to the rear and the other to the bottom
    Other printers (the same one) will be set so that they print in high quality and in duplex for example
    I'll name the printers 1.Canon 2.Canon 3.Canon etc
    So, when I go to print, I just hit a number on the keyboard and the printer I want is selected
    Can I do the same on my laptop?
    Thanks
    Omar

    Back Up - that's in case things go wrong.
    In the case you cite:
    You have
    Mother
    Mother Maiden Name
    as Faces, right?
    In the Corkboard view click on Mother Maiden Name and delete the 'Maiden Name'.
    It will disappear and all the photos will be in the Mother face.
    Note that 'Mother' and 'Mother ' (that is, with a trailing space) are not the same.
    You can  also just edit the name 'Mother Maiden Name' to 'Mother'
    As for photos staying in manual sort, I can only say that mine do. But as I've no idea what troubleshooting steps you've used.
    Regards
    TD

  • HT1725 When I click on a Movie I get the following "You have already purchased this item but it has not been downloaded. To download it, select Check For Available Downloads from the Store menu." Then get err = 11111

    iTunes quit unexpectedly during the download of a movie.  When I click on that movie now I get the following message: "You have already purchased this item but it has not been downloaded. To download it, select Check For Available Downloads from the Store menu."
    I follow the instructions, but the download still doesn't resume - err = 11111
    Any advice?

    Yeah, I am going to blast my iPhone for the 4th time today and pray this goes away. I had 6 apps showing updates, the 6 badge icon shows on the App Store on my iPhone and, having run them all, the 6 apps have two copies each on my iPhone: one that is the old version of the app and will not run and the other is a faded version of the app with an empty progress bar on the icon. Click those and you get an error message about connecting to iTunes, etc. as described in the article I linked to above.
    It gets stranger than this. If I install a completely NEW app, the 6 that are stuck mid-update heal themselves and appear with the new version only, however now completely different apps (Hold Em for instance - which I did not update and didn't need an update) will not launch "app name Cannot Launch" message comes up.
    Agh!

  • Entourage has the ability to have multiple identities, can Mail do this?

    In Enttourage, you can have multiple email users in the same local user account, and you can switch identities to access the different email account. This is really useful if multiple people share a login, but want to have access to their own email...
    Eudora had a similar trick, you could copy the settings, then change them for each user, then the user just dbl clicks their settings file and has access to their own email account....
    Does Mail.app have similar capabilities?
    Thanks in advance

    John Public wrote:
    The reason we don't was to use FUS is because the users share documents on the desktop....
    Could you use the Shared directory instead of the desktop for these files?

  • HT200194 What happened to the ability to have multiple prossesors running at the same time? I have 8 cpu's. I would like compressor to use more than one at a time.

    The older compessor allows multiple cpus to run, to process footage.

    You should find this article , which discusses the subject you raise, useful.
    Russ

  • AE Error message when opening:  The following plugins have failed to load

    I am getting the following message when I open AE.  I reinstalled AE and am getting the same message.  I don't know how to just reinstall plugins.  Thanks! 

    See this thread:
    Re: Cineform Plugins failure to load

  • Assigning a numerical value to the answers of a multiple choice text field

    I have searched and searched thru a million articles but there does not seem to be a simple way to do this, and I hope like heck that I am just overthinking it.  I tend to fall back on years of coding and completely miss a simple answer when doing this
    kind of thing so I hope someone can help.
    I'm developing a scorecard.  I have a list that has a form on it that asks a series of questions on it.  Some are yes/no.
    I want to assign the numerical value of "1" to "yes", and "0" to "No".
    This is so that when I create the actual scorecard, I can add up all the answers and generate a calculated score.
    Example:
    Was this incident properly classified?
    [Dropdown]
    Yes
    No
    Do I need an extra column assigning the values?  Can I assign the values within the column itself? Any assistance will be really helpful. 

    there are several options:
    - calculated column with something along the lines of =IF([dropdowncolumn] = "YES", 1, 0)
    - separate lookup list with values
    - if you're using infopath, your column could be numeric, and just use a DropDown as the visualization, and populate the DDL with key/values of "Yes"/1 and "No"/0 (though in this case, when viewing the list as a native grid, the column
    would only show 1/0, not "yes / no"
    - depending on how you're creating the scorecard, use a yes/no (boolean) column and just convert during the calculation
    lots of options come to mind.
    Scott Brickey
    MCTS, MCPD, MCITP
    www.sbrickey.com
    Strategic Data Systems - for all your SharePoint needs

Maybe you are looking for

  • I have a MacBook Pro and downloaded new operating system Maverick

    I have a MacBook Pro with the leopard operating system. When the Maverick operating system was offered as a free download, I downloaded it but iphoto and imovie didn't download what should I do?

  • OracleCommand + multiple query

    I'm making some backup scripts using dbms_metadata.get_dll and and let's say i have a result like that ([...] - i've cut some info, cause it's long): CREATE TABLESPACE "TEST" DATAFILE 'E:\ORACLEXE\ORADATA\TEST.DBF' SIZE [...] CREATE TABLE "SYSTEM"."O

  • Glossy screen vs. standard screen

    I've read the pros and cons on both but wondering what the consensus is out there about which is preferable, especially for editing video? Any help is appreciated. I'm about to purchase a Macbook Pro.

  • WRT400N data loss

    Have new WRT400N router and 2 laptops running Windows/XP SP3.  Copied a 2.3GB folder of photos from PC A to PC B.  Lost 152 photos on 1st attempt (wired); 3 photos on 2nd attempt (wired); 8 photos on 3rd attempt (wireless).  Normally did 10-16GB mach

  • Exadel JavaFX plug-in for Eclipse version 1.3.3

    Another small update to Exadel JavaFX Plug-in for Eclipse. Product info, download and Eclipse update: [http://exadel.org/javafxplugin] Release notes, what's new in this version: [http://exadel.org/javafxplugin-releasenotes] Updated user guide: [http: