Fixes are available
Rational Software Architect Designer 9.6.0
Rational Software Architect Designer for WebSphere Software 9.6.0
Rational Software Architect Designer for WebSphere Software Fix Pack 3 (9.5.0.3) for 9.5.0
Rational Software Architect Designer Fix Pack 3 (9.5.0.3) for 9.5.0
Rational Software Architect Fix Pack 3 (9.1.2.3) for 9.1.2
Rational Software Architect for WebSphere Software Fix Pack 1 (9.1.2.3) for 9.1.2
APAR status
Closed as program error.
Error description
In IBM Rational Software Architect (RSA), if you run a JPA-to-UML transformation on code with the "DETACH" cascade type, stereotypes applied to model elements and diagram elements will be removed. The following steps reproduce the problem: 1. Create a UML project, JPA project, model, UML-to-JPA transformation and JPA-to-UML transformation 2. Apply the "JPA Transformation" profile to the model 3. Add two classes to the model and apply the JPA "Entity" stereotype to them 4. Drop the classes onto a diagram, draw a bi-directional association between them, and apply the "Relationship Options" and "RelationshipOptionsNonOwningSide" stereotypes as well as the "PERSIST", "REFRESH" and "ALL" options from "Properties > JPA Profile > Relationship Options > Details > Cascade" to the association 5. Save the changes and run the UML-to-JPA transformation 6. Add "Cascade.DETACH" to the code and save the change (NOTE: The code will contain validation errors at this point, but these can be ignored for the purpose of reproducing the customer's problem.) 7. Run the JPA-to-UML transformation in order to update the model EXPECTED RESULT: The presence of "Cascade.DETACH" in the code gives a message that this value is invalid, as the "DETACH" Cascade type is not currently supported with the JPA transformations (See Request for Enhancement ID 97483 on the "RFE Community"), but the model is otherwise not affected. ACTUAL RESULT: In addition to the "Value 'DETACH' is not legal .. error occurs and the following output in the ".log" file: [<BEGIN>] !ENTRY com.ibm.xtools.modeler.ui 4 5 2016-11-24 12:30:19.225 !MESSAGE Value 'DETACH' is not legal. (platform:/resource/[EMX file], 392, 30) !STACK 0 org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'DETACH' is not legal. (platform:/resource/[EMX file], 392, 30) at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHan dler.jav a:2658) at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHan dler.jav a:2643) at org.eclipse.emf.ecore.xmi.impl.XMLHandler.endElement(XMLHandler. java:156 5) at org.eclipse.emf.ecore.xmi.impl.SAXWrapper.endElement(SAXWrapper. java:98) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndEle ment(Unk nown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentCo ntentDis patcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocume nt(Unkno wn Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source) at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java :175) [</END>] the diagram elements from "Step 4." above are removed and replaced by two "Invalid view - remove from diagram" rectangles. Also, stereotypes will be removed from the model elements upon closing & reopening the model.
Local fix
There is no workaround.
Problem summary
**************************************************************** * USERS AFFECTED: * * - * **************************************************************** * PROBLEM DESCRIPTION: * * In Java Persistence API (JPA) modeling, there is no support * * for the DETACH cascade type. Because of this, when user runs * * the reverse transformation from the JPA source code that has * * the DETACH cascade type, the JPA model created will have the * * DETACH cascade type stored in the list of cascade types. * * When user closes the model and tries to reopen, the model * * open fails as there is no DETACH cascade type in the JPA * * profile. * **************************************************************** * RECOMMENDATION: * ****************************************************************
Problem conclusion
In Java Persistence API (JPA) modeling, there is no support for the DETACH cascade type. Because of this, when user runs the reverse transformation from the JPA source code that has the DETACH cascade type, the JPA model created will have the DETACH cascade type stored in the list of cascade types. When user closes the model and tries to reopen, the model open fails as there is no DETACH cascade type in the JPA profile. The missing DETACH cascade type is now supported as per JPA specification so that when user runs the reverse transformation from the JPA source code that has the DETACH cascade type, the JPA model will be created properly without any issue. UI support for modeling the DETACH cascade type is also supported.
Temporary fix
Comments
APAR Information
APAR number
PI72986
Reported component name
RATL SW ARCHITE
Reported component ID
5725A3000
Reported release
911
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2016-11-30
Closed date
2017-01-09
Last modified date
2017-01-09
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
RATL SW ARCHITE
Fixed component ID
5725A3000
Applicable component levels
R911 PSY
UP
R912 PSY
UP
R950 PSY
UP
[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSYK2S","label":"Rational Software Architect Designer"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"911","Line of Business":{"code":"LOB45","label":"Automation"}}]
Document Information
Modified date:
18 October 2021