Have trouble with CMP and relationships

Hello and Thank you for your time.
I'm having a bit of trouble using entity beans and CMP, I'm probably doing some thing wrong. The main problem I am having is with a many to many relationship. Let's say I have the following code:
ClassA.java
@Entity
public class ClassA implements Serializable {
<other variables>
private Collection<Class1> class1Collection;
<other methods>
@ManyToMany(cascade=CascadeType.ALL, mappedBy = "classACollection")
public Collection<Class1> getClass1Collection() {
return class1Collection;
public void setClass1Collection(Collection<Class1> class1Collection) {
this.class1Collection = class1Collection;
Class1.java
@Entity
public class Class1 implements Serializable {
<other variables>
private Collection<ClassA> classACollection;
<other methods>
@ManyToMany
public Collection<ClassA> getClassACollection() {
return class1Collection;
public void setClassACollection(Collection<ClassA> classACollection) {
this.class1Collection = class1Collection;
In the 'other variables' each table has a @Id field and setters and getters for the Id.
This code half works. If I set the collection in ClassA with a Collection of Class1 objects this is populated in to the database and the getClass1Collection method for this also works. If I then try to use the getClassACollection method from a Class1 object the entity manager throws a relationship not complete exception (or some thing to that effect). it is also the case that if I create a list of ClassA objects and place it in to the Class1 objects variable, this does not populate in to the database.
Some thing similar also happens with OneToMany and ManyToOne relationship (only one side of the relationship seems to be part of the relationship)
What am I doing wrong?
Edited by: tehBoris on Mar 26, 2010 1:18 PM

Yes, that's as it should be, but I think the problem is the default for adding the auto page numbers. The default on the top of the dialog box that appears when you choose Auto Page Numbers from the menu says:
Show in Document.
That seems to be the default.  Page numbers in sections won't work with that default. To get it to work, you have to select:
Show in Current Section.
I think I'm right on this, but I'm not sure. I'll have to practice some more. Perhaps this is a default that should be changed in the next version, but I don't know.
Tom

Similar Messages

  • Just bought a new iPhone and am having trouble with iTunes and App Store. I can log in to Cloud, iTunes, and app store but once I try to download, it says "Youe apple id has been disabled". I've reset my password three times and have no issue on my Pad.

    Just bought a new iPhone and am having trouble with iTunes and App Store. I can log in to Cloud, iTunes, and app store but once I try to download, it says "Youe apple id has been disabled". I've reset my password three times and have no issue on my Pad.

    Hi FuzzyDunlopIsMe,
    Welcome to the Support Communities!
    It's possible that resetting your password multiple times has triggered this security.  Click on the link below for assistance with your Apple ID Account:
    Apple ID: Contacting Apple for help with Apple ID account security
    http://support.apple.com/kb/HT5699
    Here is some additional information regarding your Apple ID:
    Apple ID: 'This Apple ID has been disabled for security reasons' alert appears
    http://support.apple.com/kb/ts2446
    Frequently asked questions about Apple ID
    http://support.apple.com/kb/HT5622
    Click on My Apple ID to access and edit your account.
    Cheers,
    - Judy

  • I always have trouble with my mailbox. It is always asking for my passwords but everything has been verified. How can I get it to stop doing it and start working????

    I always have trouble with my mailbox. It is always asking for my passwords but everything has been verified. How can I get it to stop doing it and start working????

    There is only one thing that happens -- the Server does not respond.
    Your mac concludes that you must have entered the wrong password. That may happen once, but then other issues become more likely, and it keeps asking for a new password.
    Sometimes the Server is down for maintenance. Sometimes something is configured wrong. Some services do this on purpose to get you to use WebMail (pick up your Mail with your Browser) so they can show you some ads.

  • I downloaded Firefox 4.0 and it says to re-install the toolbar but I have not been successful in doing so. Can I go back to the older version? I had no trouble with that and I do not like this new version at all.

    I downloaded Firefox 4.0 and it says to re-install the toolbar but I have not been successful in doing so. I went to the forums and tried all the suggested fixes but none worked. Can I go back to the older version? I had no trouble with that and I do not like this new version at all. I tried a system restore twice and it did not fix the problem.

    I would imagine it's the MyWay Searchbar which is classified by most anti-malware scanners as adware, or even worse as spyware. I say that because I see "SmileyCentral" in your list of plugins and that's an add-on for that particular toolbar. You can disable that via Tools | Add-ons | Plugins.
    There are a number of toolbars which won't work with Firefox 4 anymore due to the enhanced protection mechanisms in the browser.
    Mozilla recommends that you only install add-ons from its own security site @ https://addons.mozilla.org/en-US/firefox/?browse=featured Generally speaking, those have all been tested and approved. The exceptions are those currently under review which are marked with a yellow banner to warn users that they haven't passed Mozilla's labs yet.

  • Several of us have a iPhone 6s and are having trouble with hearing and speaking at the same time when using the phone. ? The speakers seem to be too far apart? Are others having this issue? Solutions?

    Several of us have a iPhone 6plus and are having trouble with hearing and speaking at the same time when using the phone. ? The speakers seem to be too far apart? Are others having this issue? Solutions?

    Not having the problem, don't personally know anyone who is.

  • If i made an appt. with Apple, and i asked them if i could switch my black Iphone 5 to a white Iphone 5, because i always have trouble with black Iphones, would they let me?

    if i made an appt. with Apple, and i asked them if i could switch my black Iphone 5 to a white Iphone 5, because i always have trouble with black Iphones, would they let me?

    i've had black iphones in the past, and the same thing always gets messed up, the network, i will not have service what-so ever, and when my mother's iphone will be right next to me and she will have full service. Also the lock screen button/power button broke on both of my black iphones as well. i was just wondering if they would consider. Does apple have an email i could contact?

  • Does anyone have trouble with the iPad booting you off of the internet?  I will be in the middle of something (i.e. Facebook), and it boots me out and I have to sign in again.

    Does anyone have trouble with the iPad booting you off of the internet?  I will be in the middle of something (i.e. Facebook), and it boots me out and I have to sign in again.

    Jon....
    Don't confuse the threads here with 'typical' experience.  Most of the stuff here is from brand new users, and those that have problems, and considering the 30 million pads in use, represent a very small sliver.
    If you are having repeated crashes it is really pretty basic.  You either have a physical problem with your pad, or you are using too much memory.
    The iOS system is supposed to monitor memory, and shut down previously used apps automatically to free up memory for what you are doing now.  That part of ios is not perfect, and if an app introduces an unexpected memory load, sometimes it gets over whelmed.  
    This happens, more often than not, when using safari with multiple windows open on graphic intense sites.  It can also happen with a memory intensive game, and residual apps in the background.
    Double  tap the home key and take a peek at the recently used list, and shut them down completely, and often the problem goes away.
    If the problem persists, you may have a software issue, and a trip to the genius bar may be in order.

  • I have trouble with my computer accepting an audio CD for I Tunes to download.  It remains in the computer for about 10- 15 seconds and then spits it out again.  Why???

    I have trouble with my computer accepting an audio CD that I want to download to ITunes.  It will remain in the computer for 10 - 15 seconds before ejecting it and not allowing me to download.  My ITunes is open.  Why does this happen or what am I doing wrong?  I have done this dozens of times before.  What makes this different and does it have anything to do with recent upgrades?

    I'm not sure? I'm new to lightroom and it's lightroom 5 that I'm using. What is happening is I go to develop the picture in the developing section in lightroom and it gives me this message that says " Develop module is disabled Please purchase a license to reactivate the develop module." I shouldnt have to do anything else after already buying the cd and downloading it initially. It's already paid for? I'm so confused!!
    why is the adobe lightroom 5 asking me to keep downloading the CD I bought at Best Buy store. I have already bought the CD and downloaded it on my computer but for some reason it gives me 10 days a then I have to download it again!!! Why is this its so an 

  • HT1338 I have a Leopard desktop 10.5.8 and I have trouble with MAIL. My draft folder does not work and my draft messages will not delete.        delete

    I have a Leopard desktop 10.5.8 and I have trouble with my Email Apple MAIL draft folder. First of all after I typed my draft and sent to draft, the folder would not open at a later date to send. In all I have 10 messages, mainly test which I cannot delete from my Draft folder.
    My draft system is now working but I cannot get rid of the  10 messages which sit in my INBOX and DRAFT folders.
    These messages appear in Application - Mail but they will not go.
    How do I delete, or is it best to use My Disc 1# and delete all my software and replace with the Disc in order to have a new MAIL program?
    Any advice would be welcome.

    HI,
    Not certain, but this can fix myriad Mail problems...
    Safe Boot from the HD, (holding Shift key down at bootup),  it will try to repair your Disk Directory while the spinning radian is happening, so let it go, run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, then move this folder & file to the Desktop.
    Move this Folder to the Desktop...
    /Users/YourUserName/Library/Caches/Mail/
    Move this file to the Desktop...
    /Users/YourUserName/Library/Mail/Envelope Index
    Reboot.
    If that doesn't do it and you can afford to redo all your Rules, try these & reboot...
    /Users/YourUserName/Library/Mail/MessageRules.plist
    /Users/YourUserName/Library/Mail/MessageRules.plist.backup
    Note, in 10.5 & up /Users/YourUserName/Library/Caches/Mail/ may or may not exist.

  • Do you have trouble with iPod Classic and Ford's SYNC?

    Anyone have trouble with Ford SYNC recognizing iPod Classic? When I first bought my Lincoln my iPod Classic worked perfectly--just like it should with Ford SYNC. But a few months ago, when I plug in the iPod using a USB cable I get the message on Ford Sync that says, "incompatible device". At first I thought it was a ford problem so I began testing using a 2010 Buick and a 2010 Lincoln Navigator. My iPod classic doesn't work in either. However, a iPod nano works perfectly in either car. Also if I put some of my music on a flash drive it works fine in the Lincoln. So, I'm convinced that the problem is some type of update that occurred to my iPod or to iTunes.
    I have tried several iPod Classics and several USB cables so it is definitely aiPod Classic software problem. By the way, my iPod Classics work fine by themselves--just not through Ford's SYNC.
    I'm pretty lost as to possible solutions.
    Thanks,

    I have done some experimenting and testing with my old Classic iPod that uses operating system 3.1.1. I don't think this operating system has changed. However, later generation iPods such as nano, shuffle that use a different operating system seem to work absolutely perfectly in my 2010 Lincoln Navigator, especially the ones without a hard drive (i.e. flash drive). My conclusion is that the Ford SYNC updates have somehow not been backward compatible with the older operating system. I know this can be attributed to Apple for part of the problem but I suspect that Ford somehow did not do enough testing with the older iPod operating systems. Turns out there are probably 7 or more operating systems on iPods and while you would assume that "backward compatibility" is a no-brainer, that seems not to be the case with second party vendors such as Ford SYNC. Personally, I have given up trying to solve this problem and have gone to flash drive and a "line in" option. My old Classic iPod works exceptionally well, plus I have a spare so I can probably use these thing till "H freezes over". Being a older retired American these things may actually last a life time!

  • I have an iPhone and just goy I pad but no computer I'm trying to synch them together but having trouble with iCloud and I can't seem to subscribe for iTunes match from either devise

    I have an iPhone and just goy I pad but no computer I'm trying to synch them together but having trouble with iCloud and I can't seem to subscribe for iTunes match from either devise

    You first have to subscribe to iTunes Match through iTunes on your computer and have your music library in iTunes uploaded/matched before you can enable it on your iOS devices (see http://www.apple.com/itunes/itunes-match/).  Without a computer you won't be able to use iTunes Match.

  • I am having all kinds of trouble with itunes and updating my ipad. when I open up itunes, it seems to just sit there, never going to itunes store. when I connect my ipad, I check update and it starts, but then I get this message:backup can't be saved on

    I am having all kinds of trouble with itunes and updating my ipad. I open itunes up but it doesn't do anything except open to a blank screen. I try to access the itunes store but it won't go there. When I connect my ipad, and try to update it, it starts and then I get a message that says backup cannot be saved on this computer. I have tried everything suggested to no avail. This is the 2nd or 3rd time I have had problems with itunes. Sometimes I even get a message that I am not connected to the internet.
    I have uninstalled and re-installed. Any help?

    You might not have enough space left on your hardrive.

  • Trouble with export and import

    I am having trouble with export and import
    here is what I did...
    exp "'/ as sysdba'" PARFILE=parfile.txt
    PAFILE
    TABLES=user1.Table1
    file=Table1_1006.dmp
    LOG=Table1_1006.log
    query="where to_char(processeddate,'YYYYMMDDHHMISS') between to_char(to_timestamp('1911-01-01 00:00:00','YYYY-MM-DD HH24:MI:SS'),'YYYYMMDDHHMISS') and to_char(to_timestamp('2011-10-06 16:46:26','YYYY-MM-DD HH24:MI:SS'),'YYYYMMDDHHMISS')"here is my log from export
    set and AL16UTF16 NCHAR character set
    About to export specified tables via Conventional Path ...
    Current user changed to user1
    . . exporting table               Table1   16019049 rows exported
    EXP-00091: Exporting questionable statistics.
    EXP-00091: Exporting questionable statistics.
    EXP-00091: Exporting questionable statistics.
    EXP-00091: Exporting questionable statistics.
    EXP-00091: Exporting questionable statistics.
    EXP-00091: Exporting questionable statistics.
    EXP-00091: Exporting questionable statistics.
    EXP-00091: Exporting questionable statistics.
    Export terminated successfully with warnings.Then I started importing
    /database2/rdbm15> imp "'/ as sysdba'" file=Table1_1006.dmp fromuser=user1 touser=user1 tables=Table1 log=imp_Table1_1006.log
    Import: Release 10.2.0.5.0 - Production on Thu Oct 6 19:57:01 2011
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    Export file created by EXPORT:V10.02.01 via conventional path
    import done in US7ASCII character set and AL16UTF16 NCHAR character set
    . importing user1's objects into user1
    IMP-00015: following statement failed because the object already exists:
    "CREATE TABLE "Table1" ("APPROVALTRACEID" VARCHAR2(64), "REQUESTOR"
    "EID" VARCHAR2(9), "EID" VARCHAR2(9), "FIRSTNAME" VARCHAR2(32), "LASTNAME" V"
    "ARCHAR2(32), "MIDDLEINITIAL" VARCHAR2(8), "TIER" VARCHAR2(3), "JOBTITLE" VA"
    "RCHAR2(64), "JOBCODE" VARCHAR2(10), "EMPLOYEETYPE" VARCHAR2(2), "CONTRACTOR"
    "TYPE" VARCHAR2(2), "EMPLOYEESTATUS" VARCHAR2(2), "COSTCENTER" VARCHAR2(10),"
    " "COSTCENTERDESCRIPTION" VARCHAR2(50), "CONTRACTENDINGDATE" VARCHAR2(8), "A"
    "CCOUNTSTATUS" VARCHAR2(2), "LOGINID" VARCHAR2(70), "APPLICATIONGROUP" VARCH"
    "AR2(50), "APPLICATIONNAME" VARCHAR2(50), "APPLICATIONID" VARCHAR2(12), "LEV"
    "EL1" VARCHAR2(512), "LEVEL2" VARCHAR2(512), "LEVEL3" VARCHAR2(512), "LEVEL4"
    "" VARCHAR2(512), "LEVEL5" VARCHAR2(512), "PROFILECODE" VARCHAR2(50), "PROCE"
    "SSEDDATE" DATE, "APPROVERMANAGEREID" VARCHAR2(9), "APPROVERMANAGERDELEGATEE"
    "ID" VARCHAR2(9), "APPROVERT4MANAGEREEID" VARCHAR2(9), "APPROVERT4MANAGERDEL"
    "EGATEEID" VARCHAR2(9), "APPROVERAPPOWNEREID" VARCHAR2(9), "APPROVERAPPOWNER"
    "DELEGATEEID" VARCHAR2(9), "PERFORMEREID" VARCHAR2(9), "NATIONALID" VARCHAR2"
    "(30), "COUNTRYCODE" VARCHAR2(9), "PASSPORTID" VARCHAR2(20), "DATEOFBIRTH" V"
    "ARCHAR2(15), "CITYOFBIRTH" VARCHAR2(15), "VENDORNAME" VARCHAR2(50), "VENDOR"
    "MANAGERNAME" VARCHAR2(50), "VENDORMANAGERID" VARCHAR2(9), "VENDORADDRESS1" "
    "VARCHAR2(100), "VENDORADDRESS2" VARCHAR2(100), "VENDORSTATEPROVINCE" VARCHA"
    "R2(15), "VENDORCOUNTRYCODE" VARCHAR2(9), "VENDORZIPPOSTALCODE" VARCHAR2(9))"
    "  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 STORAGE(INITIAL 4076863488 "
    "NEXT 1048576 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)            "
    "                   LOGGING NOCOMPRESS"
    Import terminated successfully with warnings.but I did not get rows to database2
    [server1]database2
    /database2/rdbm15> sqlplus / as sysdba
    SQL*Plus: Release 10.2.0.5.0 - Production on Thu Oct 6 19:59:17 2011
    Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> select count(*) from user1.Table1;
      COUNT(*)
             0
    SQL> exit
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
    PL/SQL Release 10.2.0.5.0 - Production
    CORE    10.2.0.5.0      Production
    TNS for HPUX: Version 10.2.0.5.0 - Production
    NLSRTL Version 10.2.0.5.0 - ProductionEdited by: user3636719 on Oct 6, 2011 5:23 PM

    user3636719 wrote:
    Thanks for the reply...
    Old EXP IMP doesnt have capability to append the row, since you're using 10g use datapump instead. use option TABLE_EXISTS_ACTION=APPENDso my import should be like this
    imp "'/ as sysdba'" file=Table1_1006.dmp fromuser=user1 touser=user1 tables=Table1 log=imp_Table1_1006.log TABLE_EXISTS_ACTION=APPEND
    Did you look up the command line syntax and control options for imp?
    You should make it a habit that whenever anyone - especially a stranger on the web - gives you a bit of code or references a command or init parm or any some such, the VERY FIRST thin you should ALWAYS do is look it up for yourself and see exactly where and how it is used and what it means. That is how you grow beyond having to be spoon fed every little thing and become more self-sufficient.
    If you had, you would have seen that there is no TABLE_EXISTS_ACTION option for imp and seen that it is an option for impdp. And realized that exp and imp are NOT the same thing as expdp and impdp.
    =================================================
    Learning how to look things up in the documentation is time well spent investing in your career. To that end, you should drop everything else you are doing and do the following:
    Go to tahiti.oracle.com.
    Drill down to your product and version.
    <b><i><u>BOOKMARK THAT LOCATION</u></i></b>
    Spend a few minutes just getting familiar with what is available here. Take special note of the "books" and "search" tabs. Under the "books" tab you will find the complete documentation library.
    Spend a few minutes just getting familiar with what <b><i><u>kind</u></i></b> of documentation is available there by simply browsing the titles under the "Books" tab.
    Open the Reference Manual and spend a few minutes looking through the table of contents to get familiar with what <b><i><u>kind</u></i></b> of information is available there.
    Do the same with the SQL Reference Manual.
    Do the same with the Utilities manual.
    You don't have to read the above in depth. They are <b><i><u>reference</b></i></u> manuals. Just get familiar with <b><i><u>what</b></i></u> is there to <b><i><u>be</b></i></u> referenced. Ninety percent of the questions asked on this forum can be answered in less than 5 minutes by simply searching one of the above manuals.
    Then set yourself a plan to dig deeper.
    - Read a chapter a day from the Concepts Manual.
    - Take a look in your alert log. One of the first things listed at startup is the initialization parms with non-default values. Read up on each one of them (listed in your alert log) in the Reference Manual.
    - Take a look at your listener.ora, tnsnames.ora, and sqlnet.ora files. Go to the Network Administrators manual and read up on everything you see in those files.
    - When you have finished reading the Concepts Manual, do it again.
    Give a man a fish and he eats for a day. Teach a man to fish and he eats for a lifetime.
    =================================

  • I have trouble with APSDeamon.exe

    I also have trouble with starting I Tunes. Can you send a programtool to solve this problem?

    Hi Tonnie Blommaart,
    If you are having issues with APSDaemon.exe and iTunes not launching, you may find the following article helpful:
    Apple Support: iTunes for Windows and the iCloud Control Panel may not launch when APSDaemon (Apple Push) is running
    http://support.apple.com/kb/TS4194
    Regards,
    - Brenden

  • TO ALL THOSE HAVING TROUBLE WITH ICHAT AND AIM ON MACBOOKS

    I've had a lot of trouble with AIM and iChat on my new Macbook, but I believe I've figured out the answers to all the problems I and others have encountered.
    Firstly, for those who's AIM continually crashes and displays the message "The application AIM unexpectedly shut down," my answer to your problem is too many sent messages. Watch the bar in the bottom left of your chat window, when it reaches red, your application will probably shut down.
    Secondly, for those experiencing difficulties with iChat, it's most likely a problem with communitcation between your wireless router and your computer. Try these steps:
    1. From the Apple menu, choose System Preferences.
    2. From the View, choose Sharing.
    3. Click the Firewall tab.
    4. Click New.
    5. From the Port Name pop-up menu, choose Other.
    If you have a Macbook, you'll probably have a TCP Port Number Bar and a UDP Port Number Bar. Try these steps:
    1. In the TCP Port Number(s) Bar, type: 5190, 5298
    2. In the UDP Port Number(s) Bar, type: 1024-5219, 5221, 5223-65535
    3. In the Description Bar, type: iChat AV
    4. Click OK
    5. Click Start above the window with your firewall settings, and make sure the box next to iChat AV is checked
    6. Relaunch iChat
    Good Luck! I hope this solves some of the problems that people have been encountering.

    Rob
    My Linksys is the WAG54G, which might be different from your WRT54G. Currently, UPnP is disabled and the Router ports are a bit of a mystery, because they're forwarded to an IP address that's outside of the current DHCP Address Range! Once I got it working, I was reluctant to change it even though it looked anomalous.
    The Firewall is on, with the iChat ports open that I listed in the previous post.
    My two regular buddies are my sons, who both use Trillian Pro on a Windows machine. Works pretty well despite occasional freezes or garbled sound.
    Hope you get sorted soon.
    Dave

Maybe you are looking for