Error message
The following error is thrown during application startup:
java.lang.IllegalArgumentException: unsurpport serialize typeCause
The provider bean in your HSF configuration specifies an invalid value for the serializeType or preferSerializeType attribute. HSF rejects unrecognized serialization types at startup and throws this exception before the application can serve requests.
serializeTypecontrols serialization for HSF1.preferSerializeTypecontrols serialization for HSF2.
Valid serialization types
| Attribute | HSF version | Valid values | Default |
|---|---|---|---|
serializeType | HSF1 | Java, hessian | hessian |
preferSerializeType | HSF2 | Java, hessian, hessian2, kyro, Json | hessian2 |
Note:kyrois the HSF-specific spelling. Do not usekryo(the open-source project name) in HSF configuration.
Solution
Open the Spring configuration file that defines your provider bean.
Locate the
serializeTypeorpreferSerializeTypeattribute.Replace the invalid value with a supported value from the table above. We recommend that you set the value to
hessianorhessian2.