Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Trivial
-
Resolution: Cannot Reproduce
-
Affects Version/s: JiBX 1.1.6
-
Fix Version/s: None
-
Component/s: core
-
Labels:None
-
Number of attachments :
Description
When using a custom marshaller/unmarshaller that doesn't have a no-argument constructor (just the aliased constructor), the JiBX binding compiler will output the following error message:
-
-
- Error during code generation for file 'binding.xml' - please enter a bug report for this error in Jira if the problem is not listed as fixed on the online status page ***
-
This error no longer occurs once a no-argument constructor is added to the class.
I was originally under the assumption that I had the option of using a no-argument constructor or the aliased constructor, but it appears the no-argument constructor is required. This being the case, the compiler should output a more informative error message as it does for other binding problems.
Activity
Dennis Sosnoski
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Assignee | Dennis Sosnoski [ dsosnoski ] |
Dennis Sosnoski
made changes -
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Resolution | Cannot Reproduce [ 5 ] |
Dennis Sosnoski
made changes -
| Status | Resolved [ 5 ] | Closed [ 6 ] |
It's not necessary to supply a default constructor if the class is only being used with an element name provided. I've added a test case to verify that this works correctly in the current code.
If there's some location in the binding where the marshaller/unmarshaller is being used without providing an element name that would explain why the default constructor is being accessed.
It would be good to provide a better warning for this case, but that's difficult to do in the current code - and since this is not a common problem it's probably not worth the effort.