Open glassfishrobot opened 11 years ago
Reported by anand_h
snajper said: Adjusting priority, possible solution is to re-create unmarshaller instances in your code.
anand_h said: I would like to know if there is any way to identify a "corrupted" unmarshaller; so as to conditionally re-create the instance for the workaround. This is critical from the performance point-of-view.
File: jaxb_issue_test.zip Attached By: anand_h
Was assigned to yaroska
This issue was imported from java.net JIRA JAXB-931
I single unmarshaller instance is used to unmarshal an invalid XML payload; which runs into an Exeception (InstantiationException). Upon catching the exception and re-trying a valid payload, the unmarshaller still runs into a different type of Exception (ClassCast). Upon catching the exception during the 2nd try above and trying a valid payload again, unmarshaller successfully unmarshals the payload.
I have attached a sample (self-contained) eclipse based Java Project with the Main class, which is showing the above behavior.
Affected Versions
[2.2.6]