Bug 1255404 - Cannot open persistence.xml if transaction-type attribute not present
Summary: Cannot open persistence.xml if transaction-type attribute not present
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: Data Modeler
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ER4
: 6.2.0
Assignee: Walter Medvedeo
QA Contact: Jiri Locker
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-20 13:41 UTC by Jiri Locker
Modified: 2020-03-27 19:09 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2020-03-27 19:09:15 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Exception stack trace from server.log (1.48 KB, text/plain)
2015-08-20 15:07 UTC, Jiri Locker
no flags Details

Description Jiri Locker 2015-08-20 13:41:24 UTC
Description of problem:
The transaction-type attribute is optional so Persistence Descriptor editor shouldn't fail to open persistence.xml where persistence-unit element does not have that attribute.

Version-Release number of selected component (if applicable):
6.2.0.ER1

Comment 1 Jiri Locker 2015-08-20 15:07:17 UTC
Created attachment 1065297 [details]
Exception stack trace from server.log

Comment 2 Jiri Locker 2015-08-20 15:12:45 UTC
It is caused by the fact that element.getAttribute() on line 64 returns empty String, not null, if the attribute doesn't exists, and so the null check on line 65 doesn't avoid the attempt to convert the empty String to enum value.

https://github.com/droolsjbpm/kie-wb-common/blob/4b92a5b692c91f73e667a2adbeacb1d4ae325117/kie-wb-common-screens/kie-wb-common-data-modeller/kie-wb-common-data-modeller-api/src/main/java/org/kie/workbench/common/screens/datamodeller/util/DOM2PersistenceDescriptorVisitor.java#L64


Note You need to log in before you can comment on or make changes to this bug.