Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaks with XStream 1.4.18 #99

Open
injulkarnilesh opened this issue Sep 16, 2021 · 0 comments
Open

Breaks with XStream 1.4.18 #99

injulkarnilesh opened this issue Sep 16, 2021 · 0 comments

Comments

@injulkarnilesh
Copy link

XStream's latest release 1.4.18 introduced breaking changes as

when unmarshalling with an XStream instance using the default blacklist of an uninitialized security framework. XStream is therefore now using a whitelist by default.

With this, we need to explicitly whitelist model classes which we can use with XStream.

Currently, it is breaking with

com.googlecode.jmapper.exceptions.JMapperException: com.thoughtworks.xstream.security.ForbiddenClassException: 
com.googlecode.jmapper.xml.beans.XmlJmapper
at com.googlecode.jmapper.config.JmapperLog.error(JmapperLog.java:46)
at com.googlecode.jmapper.JMapper.<init>(JMapper.java:437)
at com.googlecode.jmapper.JMapper.<init>(JMapper.java:412)
Caused by: com.thoughtworks.xstream.security.ForbiddenClassException: com.googlecode.jmapper.xml.beans.XmlJmapper
at com.thoughtworks.xstream.security.NoTypePermission.allows(NoTypePermission.java:26)
at com.thoughtworks.xstream.mapper.SecurityMapper.realClass(SecurityMapper.java:74)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:125)
at com.thoughtworks.xstream.mapper.CachingMapper.realClass(CachingMapper.java:47)
at com.thoughtworks.xstream.core.util.HierarchicalStreams.readClassType(HierarchicalStreams.java:29)
at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:133)
at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1391)
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1376)
at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1270)
at com.googlecode.jmapper.util.FilesManager.toXmlJmapper(FilesManager.java:1048)
at com.googlecode.jmapper.util.FilesManager.readAtRuntime(FilesManager.java:1035)
at com.googlecode.jmapper.xml.XML.<init>(XML.java:66)
at com.googlecode.jmapper.xml.XmlBuilder.atRuntime(XmlBuilder.java:44)
at com.googlecode.jmapper.generation.MapperBuilder.generate(MapperBuilder.java:86)
at com.googlecode.jmapper.JMapper.createMapper(JMapper.java:450)
at com.googlecode.jmapper.JMapper.<init>(JMapper.java:432)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant