try {
entity = helper.newDynamicEntity(type);
} catch (IllegalArgumentException e) {
ClassDescriptor descriptor = getDescriptor(type);
if (descriptor != null) {
DynamicType jaxbType = (DynamicType) descriptor.getProperty(DynamicType.DESCRIPTOR_PROPERTY);
if (jaxbType != null) {
return jaxbType.newDynamicEntity();
}
}
JPARSLogger.exception("exception_thrown_while_creating_dynamic_entity", new Object[] { type }, e);
throw e;
}