So I have been seeing alot of people run into this issue & alot of people ask about it aswell including myself I was once asking about it.. But the problem here is pretty self explained if you really put thought into it..
If you're running into this error -
Code:
com.thoughtworks.xstream.security.ForbiddenClassException: com.client.ItemBonusDefinition
at com.thoughtworks.xstream.security.NoTypePermission.allows(NoTypePermission.java:26)
Heres the simple fix..
First off you need to update your XStream from the 1.3.1 version to this current version.
XStream Updated version.
And if you look at the error it includes
Code:
NoTypePermission.java:26
Its implying at the ItemDef folder XStream needs to have permission there in order for your client to work.
So what you have to do is allow xstreams security permission. As shown below.
CTRL H - FIND
Code:
xStream.alias("ItemBonusDefinition", ItemBonusDefinition.class);
And right below ItemBonusDefinition Class post this
Code:
xStream.addPermission(AnyTypePermission.ANY);
& this should fix your error.