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

Custom image resources do not have permissions, ForbiddenClassException #685

Open
xcfdszzr opened this issue Nov 30, 2021 · 2 comments
Open
Assignees
Labels
Projects
Milestone

Comments

@xcfdszzr
Copy link

xcfdszzr commented Nov 30, 2021

image

design-library-icons.xml

   <IconSet id="design-editor" nearClass="com.cxplan.rpa.ui.extension.DesignLibraryIconSet" base="icons/"
     xmlns="http://weblookandfeel.com/XmlIconSet">

            <!-- Java 32x32 icon -->
        <!-- File Chooser icons -->
        <SvgIcon id="icon_add_image" path="javatest.svg" size="16,16"/>
    </IconSet>

design-library-extension.xml

image

@xcfdszzr xcfdszzr reopened this Nov 30, 2021
@mgarin
Copy link
Owner

mgarin commented Dec 2, 2021

This is a pretty weird error. I've never encountered it before, but judging by a few topics on SO like -
https://stackoverflow.com/questions/30812293/com-thoughtworks-xstream-security-forbiddenclassexception
it is most probably something related to the permission settings introduced in recent XStream update.

So a few things to pinpoint the problem:

  • Which WebLaF version are you using?
  • Which XStream version are you using? (maybe you have a newer version than WebLaF uses)
  • Which Java version are you running the code on?

@mgarin mgarin self-assigned this Dec 2, 2021
@mgarin
Copy link
Owner

mgarin commented Dec 2, 2021

Also, as a possible temporary/quick fix - does this solve the issue for you?

XmlUtils.getXStream ().addPermission ( AnyTypePermission.ANY );

I already have this added in latest snapshot versions, but I'm pretty sure it was missing in previous release version.

@mgarin mgarin added the bug label Dec 2, 2021
@mgarin mgarin added this to Planned in v1.3.0 via automation Dec 2, 2021
@mgarin mgarin added this to the v1.2.14 milestone Dec 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
v1.3.0
  
Planned
Development

No branches or pull requests

2 participants