Skip to content

java.security.AccessControlException  #4

@acdickinson

Description

@acdickinson

In order to use this module, additional exceptions need to be added to the security policy.

The following should be no problem to add:
(java.util.PropertyPermission "hikaricp.configurationFile" "read")
(java.util.PropertyPermission "com.zaxxer.hikari.*" "read")

However, once these permissions are added to the policy (Mendix<version number>\modeler\runtemplates\deployment\data\security.policy) another permission is required.

java.security.AccessControlException / access denied ("java.util.PropertyPermission" "*" "read,write")

Due to the fact that the once a datasource is created with no name, a random number is generated and updated globally. As a result a read/write * is required. This can be solved by adjusting the JdbcConnectionManager with the attached version.

Changes are

  • 48 - passing the parameter of the connPoolKey to the function createHikariDataSource
  • 74 - extending the definition of the function createHikariDataSource with an integer parameter
  • 76 - inserted the setting of the poolName of the dataSource to prevent the generation of the poolnumber globally.

See pull request #5 for updated code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions