Community
Participate
Working Groups
Build Identifier: I20110525-0800 1. Go to a Java entity -> Secondary Tables to add a secondary table 2. Add the Java entity to a mapping xml 3. Go to Orm entity -> Secondary Tables and select "Define in XML" checkbox 4. Select the secondary table in the list and then click Remove button to remove the secondary table from the mapping xml An CCE exception is thrown saying org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.ClassCastException: org.eclipse.jpt.jpa.core.internal.context.orm.GenericOrmVirtualSecondaryTable cannot be cast to org.eclipse.jpt.jpa.core.context.SecondaryTable) The full stack trace is attached. Reproducible: Always
Created attachment 197145 [details] Stack Trace
Interesting...I'm not able to reproduce this one in the RC3 candidate. It would seem that in your case, after defining the table in XML, the secondary table is remaining virtual for some reason. You shouldn't be able to remove a virtual secondary table from that list, since once you have enabled the list (by defining the secondary table in XML), the contents should no longer be virtual. I suppose this is likely another race condition.
After selecting the "Define in XML" checkbox, the one defined on Java entity will be written to the mapping xml. At this point, trying to remove the one listed should be able to reproduce this problem.
This happens after removing all the listed secondary tables.
(In reply to comment #3) > After selecting the "Define in XML" checkbox, the one defined on Java entity > will be written to the mapping xml. At this point, trying to remove the one > listed should be able to reproduce this problem. Yes, I am sure it does in your case, but it doesn't happen for me. :) I was just saying that the secondary table shouldn't be virtual at the point of removing it from the list, but in your case it obviously is. : )
Moving JPA specific bugs to new JPA component in bugzilla.
Targeting to Juno release.
Note -> I can still reproduce this problem in 3.2 RC2 candidate.
I am not able to reproduce this problem with Juno release. Neil, should I close this bug or need to go back to maintenance to check?
Sorry, I forgot to open the Error Log. I still get the exception with Juno release.
I can not reproduce the problem with the latest head code thinking maybe Karen's recent big changes to the UI code have already fixed the problem so I close it for now.
Verified in build I-3.5.0-20121003040013 that you can remove secondary tables from the entity in the mapping file without error. To view steps to verify this issue go to http://wiki.eclipse.org/Dali_3.3_Release