Heap Exhaustion Exception for One-to-One Unidirectional

Using Glassfish 2.1 with TopLink, EJB3 and JPA in WinXP SP2 environment. Am observing heap exhaustion exceptions apparently whenever an entity references a different entity via a one-to-one unidirectional relation.
Have resolved two heap exhaustion exception problems but have one more remaining.
The first heap exhaustion problem occurred when entity "A" declared a one-to-many relationship with entity "B", and entity "B" declared a many-to-one relationship with entity "A". But entity "A" also erroneously declared a one-to-one unidirectional relationship with entity "B". As soon as entity "A" had an entity "B" inserted into it, a heap exhaustion exception occurred when entity "A" was serialized in a return statement. As soon as the erroneous one-to-one unidirectional relationship was removed from entity "A", the heap exhaustion exceptions ceased.
The second heap exhaustion problem occurred when the same entity "A" mistakenly declared a one-to-one unidirectional relationship with entity "C", and entity "C" correctly declared a many-to-one relationship with entity "A". Once again as soon as entity "A" had an entity "C" inserted into it, a heap exhaustion exception occurred when entity "A" was serialized in a return statement. As soon as the erroneous one-to-one was corrected to a one-to-many, the heap exhaustion exceptions ceased.
But the third heap exhaustion problem occurs when the same entity "A" correctly declares a one-to-one unidirectional relationship with entity "D". As soon as entity "A" has an entity "D" inserted into it, a heap exhaustion exception occurs when entity "A" is serialized in a return statement. I cannot "fix" this as I did in the two above cases because this time the one-to-one unidirectional relationship is correct.
Have one-to-one bidirectional relationships as well as one-to-many / many-to-one that do not trigger heap exhaustion exceptions when serialized in a return statement.
Here is the Java code that declares the problem one-to-one bidirectional relationship in entity "A":
@OneToOne(cascade={CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }, optional=true, fetch=FetchType.LAZY)
@JoinColumn(name="fk_asset_type_id", referencedColumnName="asset_type_id", updatable=false)
public AssetType getAssetType() {
return this.assetType;
public void setAssetType(AssetType assetType) {
this.assetType = assetType;
Here is the SQL used to generate the table associated with entities "D" and "A":
CREATE TABLE [dbo].[asset_type](
     [asset_type_id] [numeric](18, 0) IDENTITY(1,1) NOT NULL,
     [asset_name] [varchar](40) NULL,
     [asset_description] [varchar](50) NULL,
     [last_user] [varchar](50) NULL,
     [last_mod] [timestamp] NOT NULL,
CONSTRAINT [PK_asset_type] PRIMARY KEY CLUSTERED
([asset_type_id] ASC)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]) ON [PRIMARY]
GO
CREATE TABLE [dbo].[server_asset](
     [server_asset_id] [numeric](18, 0) IDENTITY(1,1) NOT NULL,
     [nsn] [varchar](40) NULL,
     [gov_furnish_equip_asset_id] [varchar](255) NULL,
     [server_name] [varchar](255) NULL,
     [server_ip_addr] [varchar](255) NULL,
     [serial_nbr] [varchar](50) NULL,
     [outfitting_list] [text] NULL,
     [update_cst] [varchar](255) NULL,
     [update_pst] [varchar](255) NULL,
     [date_decommissioned] [datetime] NULL,
     [server_asset_org_date] [datetime] NULL,
     [server_asset_update_date] [datetime] NULL,
     [fk_manufacturer_id] [numeric](18, 0) NULL,
     [fk_trade_partner_id] [numeric](18, 0) NULL,
     [fk_asset_type_id] [numeric](18, 0) NULL,
     [fk_model_id] [numeric](18, 0) NULL,
     [fk_item_part_id] [numeric](18, 0) NULL,
     [fk_gold_disk_asset_id] [numeric](18, 0) NULL,
     [fk_jtdi_location_id] [numeric](18, 0) NULL,
     [last_user] [varchar](50) NULL,
     [last_mod] [timestamp] NOT NULL,
CONSTRAINT [PK_server_asset] PRIMARY KEY CLUSTERED
([server_asset_id] ASC)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [dbo].[server_asset] WITH CHECK ADD CONSTRAINT [FK_server_asset_asset_type] FOREIGN KEY([fk_asset_type_id])
REFERENCES [dbo].[asset_type] ([asset_type_id])
GO
Have been batting this issue around on the Manning Panda forum. Consensus there is that the problem may be TopLink related. Would be most grateful for any suggestions. The easy way out would be to change the one-to-one unidirectional to bidirectional but don't want to do that unless there is no alternative. Thanks.

Looking at the stack trace (found in your post on the GlassFish forum) it appears to be an issue with corba serialization in the container. I found this bug, https://glassfish.dev.java.net/issues/show_bug.cgi?id=2693 in which the stack looks almost identical to yours.
The only way that I think TopLink could be involved is that TopLink is weaving your code, and potentially so is corba. You can try turning off weaving to see if that 'solves' your problem. (Note: I am not confidant that this will work, but I notice that the corba stack may be doing some weaving of it's own.)
The persistence unit property is toplink.weaving. Setting it to false will turn off TopLink weaving.
<property name="toplink.weaving" value="false"/>

Similar Messages

  • TS3988 Can someone please help me?   I have an Iphone 5 and Love it except for one thing. I changed  email address from yahoo to Gmail and updated it on my Apple ID at Apple.  Apple recognizes and accepts this change but Icloud won't update the new email

    I have an Iphone 5 and Love it.  Except for one thing;  I recently changed from ymail email account to a gmail account. I updated it on the
    Apple/ Itunes site and it does accept the change.  I can still access the APP store and Itunes. 
    However, sometimes I get a pop up box from Apple showing the old email address and asking me to sign in..... I hit cancel and move on.   But, now Icloud keeps popping up promting me to sign in and it shows the old email which I don't have anymore.... I tried signing in with the old info to clear it off screen of my phone but, it doesn't allow and I hit cancel and it goes away. only to appear later again....  This is so frustrating and annoying.    Is there any way to get the Icloud to update the email address with my Apple ID log in info--without having to delete stuff or lose things on my phone? 
    Please help?  
    Dia

    Thank you for replying.    Yes I deleted the old email address..   

  • HT1386 My MacBook Pro HD crashed.  It is all up and runmning except for one issue.  I have about 200 songs on my iPhone but have only gotton 53 back on my laptop and those are the songs I purchased via iTunes. How do I get the rest of the songs from iPhon

    My MacBook Pro HD crashed.  It is all up and runmning except for one issue.  I have about 200 songs on my iPhone but have only gotton 53 back on my laptop from my iPhone and those are the songs I purchased via iTunes. How do I get the rest of the songs from my  iPhone back onto my HD. 
    The songs I'm not able to import casme from CD's.  Nothing from napster etc.
    I've tried and tried to import them rom iTunes vis "Library"  " Import"

    Hey kbert73
    I would do a transfer of purchases from the phone and not sync. If you sync then it will want to start over and sync music that is on the MacBook Pro. If you want to transfer the music, check out the article below that will give you multiple options on how to move. I have also provided on how to sync with multiple computers.
    iTunes: How to move your music to a new computer
    http://support.apple.com/kb/ht4527
    Using iPhone, iPad, or iPod with multiple computers
    http://support.apple.com/kb/ht1202
    Thanks for using Apple Support Communities.
    Regards,
    -Norm G.

  • Recently, U2 music appeared on my ipod without my requesting it or wanting it. I was able to delete all of the songs except for one. How do I delete the last one from my ipod? The song does not show up in iTunes when I plug my ipod into the computer.

    Recently, U2 music appeared on my ipod without my requesting it or wanting it. I was able to delete all of the songs except for one. How do I delete the last one from my ipod? The song does not show up in iTunes when I plug my ipod into the computer. The version installed on my ipod is 7.1.2(11D257).

    Hi donfrommars,
    Welcome to the Apple Support Communities!
    Please use the following article for information and instruction on deleting the U2 album from your devices and account.
    Remove iTunes gift album "Songs of Innocence" from your iTunes music library and purchases
    Have a great day,
    Joe

  • I have multiple devices with the same cerificate, once I have a an exception for one, FF denys access to the others. I cannot change the certificates, I need to stop FF blocking them.

    I have multiple devices with the same cerificate, once I have an exception for one, FF denys access to the others. I cannot change the certificates, I need to stop FF blocking them.
    == This happened ==
    Every time Firefox opened
    == I attempt to access a web front end on an IBM SVC device

    You can't use the same certificate more than once.
    See also [[Certificate contains the same serial number as another certificate]]

  • I recently purchased the new nano (7th generation) and I love it except for one issue.  On my old 2nd generation nano, when I played podcasts, it would play podcasts one at a time. So if I had 20 episodes of a podcast on the device, it would stop at the e

    I recently purchased the new nano (7th generation) and I love it except for one issue.  On my old 2nd generation nano, when I played podcasts, it would play podcasts one at a time. So if I had 20 episodes of a podcast on the device, it would stop at the end of each one.
    With the new nano, I can select and play a podcast, but when it’s over, it goes straight to the next one without prompting.  It keeps on playing all of the episodes of any podcast until you stop it manually.  Setting the repeat function differently does not prevent episodes from being played automatically.
    This can be very irritating when I only want to listen to one podcast.  I’ve often fallen asleep listening to one episode of a podcast, only to be woken up hours later by the iPod working its way through all subsequent episodes.  It is also annoying that any podcast which has started automatically in this way is marked as ‘played’ – even if you stop it within a few seconds.  This makes it hard to keep track of what you have actually listened to.
    Is there any way to set the iPod to play all the podcasts individually? I have read the User Guide from cover to cover, and can’t find a way of doing this.
    MD

    Dude or hot-spur,
    Not fishy at all!!!! You really think I would have taken any more of my time to post a bogus rant? We'll no, it is unfortunately all true. I want to hear from anyone who is experiencing such problems not anyone else that wants to put there two cents in. I really don't need anymore hate or negativity. Just people's experiences because I feel like I am the only one having so many problems. Thank you
    Yes, I have had some unfortunate bad luck to have so many problems at the same time, but some of them are just things you cannot do on the new OS.
    Thank you again

  • All music and other things on itouch GONE except for one series of podcasts

    I need help!
    My computer is low on memory, but I didn't think that would mess up me connecting my iPod touch to my computer. After connecting it, I did not look at my library, but later when I went to listen to something ALL my music, playlists, proof of purchases, were gone, except for one series of podcasts. I decided to connect my iPod to the computer again to see if I could igure out what was going on, and I got a thing that said I was using the iPod on a different account! confused it asked me if I wanted to get my purchased music switched over, so my sister suggested doing that, and so they are back on Itunes, but my computer is having problems because of low memory, so I haven't been able to get it to sync. (I have not tried a lot yet)
    can anyone help me? All my apps are there. It's just the music.

    When it asked if I wanted to transfer or erase or sync, I chose to transfer purchases, and ALL my music, including not purchased (CD's I had put on there) came back. ALL my music is back! Problem solved!

  • My bb curve got wet but is in top shape except for one

    My Blackberry curve 8520 got soaking wet a few weeks ago. Thankfully, I was able to revive it even though the wetness indicators of my device and battery turned red. After three days of drying my batt and device, everything is in top shape as if nothing happened. applause for blackberry for building really durable smartphones!!
    except for one problem. when i turned my device on, the signal goes to the SOS mode by itself. it recognizes the sim card, but still the signal stays the same.
    i've asked some repair shops and i was told that they need to upgrade the OS first even after i told them that i got it wet. i am doubtful of their diagnosis! haha imagine some shops even wanted to charge me just to upgrade the OS! i want to upgrade it on my own first before i go back to them coz indeed my device is still running on  OS 4.0....
    my questions are...is it possible to upgrade my OS with an SOS signal? i have a prepaid data plan by the way on my sim. and second question is..do i still need to hope that my device will get fixed? or is it a dead hardware failure problem and accept that its time to move on to another bb.. please help. THANK YOU SO MUCH!

    for the SOS, it is because it is not able to catch the signal. 1st please update the OS. You have to connect to your device to the system and then open the link in Internel Explorer (Active X should be enable) and then click Update.
    http://us.blackberry.com/apps-software/devices/#tab_tab_update
    It will automatically updates. Otherwise , you have to download the BlackBerry Desktop Sofware from
    http://us.blackberry.com/apps-software/desktop/
    Before or After updating the OS, please go to "Manage Connections" icon
    The Mobile Network option should be Checked. Then go to "Mobile Network Options"
    Data services should be On.
    Mobile Network will displays the name of the Carrier you are using only when it got the signal. if it is in SOS mode, go to the next option, Network Selection Mode: change it to Manual from Automatic. This will scans the available networks or you can also scan. Then it will scans the Available Networks. Choose your Carrier Network.
    As you told that Data Plan you have been activated, select the Network Mode: 3G or 2G according your plan.
    Then Close it.
    If your Carrier name is not showing scan it again manually.
    Once if you are confirmed that its working for some time, go to the same options, change it Automatic.
    This can be done before or after update. Over the Network you can update the software. But if you lose the connection, it is time waste. SOS means the BB device is not connected to any network, so no internet or no calls or nothing. it should be in EDGE (for 2G) in caps.
    Better to update the OS to 5.
    Regards

  • All Of A Sudden My Buddies On iChat Have Dissappeared Except for One

    Hi:
    I logged in to iChat and discovered that all of my listed buddies are gone except for one. Any help on how to recover them?
    thanks Kirk

    No Contradiction.
    iChat and in fact AIM for a Mac or PC or any other AIM client is "logged" into several AIM servers.
    The Main one is obviously login.oscar.AOL.com on port 5190 and the TCP protocol.
    Info for the Buddy list comes back on the same port but the UDP protocol.
    With some devices there seems to be a conflict if the Port Forwarding in a router or modem is done on the Same Port but both protocols. (Zyxel modems have this problem in particular).
    Therefore you can get iChat to tell the AIM server you are on-line but not get back any details about which of your Buddies are on line (Or Their Buddy pics are Not updated or Status Messages are not changed depending on which AIM server is effected).
    However if iChat is Logged in to any part of the AIM service then the Port setting in Server Settings as described earlier can not be changed
    So the Person has to make sure they are Logged Out (Completely if you like)
    7:40 PM Tuesday; May 15, 2007

  • It works perfectly fine in all wifi networks except for one

    Hi everybody!
    I have a black macbook from 2007. It works perfectly fine in all wifi networks except for one. It´s a new network, a much faster one they say, that has been installed where I work. It works perfectly fine in my home wifi network and in every other that I have tried to date. It´s just this one.
    Might it be that this new, faster wifi freezes the laptop? any experts that can shed some light?

    Do you have a case on it?
    If so, take it off.
    If not, probably an issue with the camera itself so get the iPad replaced.

  • I can use iMessage with all iPhone uses except for ONE person.  That person can use iMessage with all other users, but not with ME.  What's the problem???

    I can use iMessage with all other iPhone users that I communicate with, except for ONE person.  When I send to that person, it always goes through as a text message.  This person can use iMessage with pther people, but when they send me a message, it always goes as a text.  Why can we both communicate with other people using iMessage, but not with one another?

    Hi Russell,
    1) If you have OD set up and "editor" has UID 1111, then when they log in to any machine that's bound to OD as editor, they will get UID 1111. Therefore, there won't be any of these permission errors. This is typically the recommended approach.
    2) I assume you mean "You'd prefer to not using open directory?" Whatever the case, OD isn't mandatory with Xsan -- it's just that with multiple user accounts, managing them centrally tends to be easier. For 3 or 4 accounts and 3 or 4 machines maybe it's no big deal. If you go larger, it could get a lot more complicated. That said, if you set it up such that each machine has the exact same set of users (as you said, Mary = UID 502, Fred = UID 503, William = UID 504), then you can do what you want. Mary can log in from multiple machines at the same time, and in general you won't have permissions problems. Of course, if you try and read and write the same file from multiple workstations at the same time, you will get file locking issues, which will prohibit somebody from successfully writing the file.
    File locking issues are different from general permissions errors. The former basically says "hey, someone else is editing this file. Therefore I won't let you edit it right now... you can read it if you want though." Permissions means somebody saves it, and Xsan thinks you saved it and own the file, when you really don't.
    Quad-Core PMG5, 4 GB RAM, 7800 GT, 1 TB disk.   Mac OS X (10.4.4)  

  • Why does all of my Encore timeline audio play except for one section?

    I am authoring a bluray that contains 8 different (approx) 15 minute video files.  All of the audio plays except for one of the 15 minute files, which falls 7th in the sequence.  I am importing the sequence into Encore CS6 from Premiere CS6.  The audio plays fine in Premiere CS6, but when imported into Encore CS6, it is completely silent, only for that one 15 minute portion. All other audio in the sequence plays fine. I have tried re-importing the sequence under a different name, no success.  The video plays fine in Encore, just not the audio.
    Premiere CS6
    Encore CS6
    Windows 7

    Here's an odd note- I went through Premiere Elements 11 and turned all 8 clips into one big m2t file, whose audio played fine in Elements and Windows Media Player, and when I imported it into Encore, the audio failed in the exact same spot, even though Clip 7's Audio plays just fine when imported solo as an Asset into Encore.
    I have worked around this by importing everything as individual Assets/Timelines, but now I am for some reason not able to fit as much footage onto my disc.  This is all very aggravating and I am making it work for now but would like to figure out the root of this problem or determine if it is some unconquerable design flaw by Adobe.

  • I lost my wifi connections to all my PCs except for one

    I lost my wifi connections to all my PCs except for one. I cannot get a working IP address  for the others 2 pcs. anyone else have this problem? If so how did you fix it?

    Are all of the PCs connected by wireless? If so, what is the make & model of the wireless router that they are trying to connect to?

  • I purchased an album and all of it downloaded except for one song.  after a few auto attempts an error message comes up saying the file is corrupted. how do i get the song i paid for?

    i purchased an album and all of it downloaded except for one song.  after a few auto attempts an error message comes up saying the file is corrupted.  how do i get the song i paid for?
    oh the error msg    error= -100000

    I'd report the problem to the iTunes Store.
    Log in to the Store. Click on "Account" in your Quick Links. When you're in your Account information screen, go down to Purchase History and click "See all".
    Find the item that is not downloading properly. If you can't see "Report a Problem" next to the entry, click the "Report a problem" button. Now click the "Report a Problem" link next to the item.
    (Not entirely sure what happens after you click that link, but fingers crossed it should be relatively straightforward.)

  • When I Buy Something,all songs disapear except for ones bought in the store

    I Used to have two-hundred songs on my Video iPod, including ones from CD's. When I bought a new song all of my songs, except for ones that I have bought on itunes, disappeared. Now I Have 10 Songs...Is there ne way to know whats wrong...and to fix it?
    I also bought an audiobook. The Money was taken from my account and the book was never downlaoded. Is there any way to retrieve that?
    When i got a new iPod...a nano. i accidently didnt choose the option to have more than one iPod sync to this computer. So now both of my iPods are messed up.
    Last problem, I have about 10 tv shows, and only two of them sync to my ipod.

    How long since the purchase? It can take a while for the card to be debited.

Maybe you are looking for