Font Size:

How to Fix Plugin Auto-uninstall due to Restricted Classes

Introduction

If the custom plugins are being automatically uninstalled in Joget, you may apply the following steps to resolve the issue.

You may encounter warning messages like the following when custom plugins are automatically uninstalled.

Warning message:
WARN 20 Aug 2025 04:00:20 org.joget.plugin.base.MultiTenantPluginManager - Uninstall plugin (com.custom.CustomPDFPrint) for containing disallowed class org.springframework.core.env.AbstractEnvironment

WARN 20 Aug 2025 04:00:20 org.joget.plugin.base.MultiTenantPluginManager - Uninstall plugin (com.custom.GetAddressByCode) for containing disallowed class org.springframework.core.env.AbstractEnvironment

WARN 20 Aug 2025 04:00:21 org.joget.plugin.base.MultiTenantPluginManager - Uninstall plugin (com.custom.UserViewGroup) for containing disallowed class javax.wsdl.factory.WSDLFactory

You can resolve this issue by following the steps below:

  1. Update the build tag in your pom.xml file as shown in the reference below.
  2. Replace the corresponding section in your pom.xml with the updated configuration.
    <build>
            <plugins>
                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>2.0.2</version>
                    <configuration>
                        <source>1.7</source>
                        <target>1.7</target>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.4.3</version>
                    <configuration>
                        <skipTests>false</skipTests>
                    </configuration>
                    <executions>
                        <execution>
                            <id>integration-test</id>
                            <phase>integration-test</phase>
                            <goals>
                                <goal>test</goal>
                            </goals>
                            <configuration>
                                <skipTests>false</skipTests>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <extensions>true</extensions>
                    <version>5.1.8</version>
                    <configuration>
                        <instructions>
                            <!-- Change package and plugin class here -->
                            <Export-Package></Export-Package>
                            <Private-Package>{local-packages}</Private-Package>
                            <Bundle-Activator>${dollar}{groupId}.Activator</Bundle-Activator>
                            <Import-Package>!*,org.joget.report.dao,org.joget.report.model,org.joget.report.service,org.joget.commons.util,org.joget.plugin.base,org.joget.plugin.property.model,org.joget.plugin.property.service,org.joget.directory.model,org.joget.directory.model.service,org.joget.directory.dao,org.joget.workflow.model,org.joget.workflow.model.dao,org.joget.workflow.model.service,org.joget.workflow.util,org.joget.apps.app.dao,org.joget.apps.app.lib,org.joget.apps.app.model,org.joget.apps.app.service,org.joget.apps.datalist.lib,org.joget.apps.datalist.model,org.joget.apps.datalist.service,org.joget.apps.form.lib,org.joget.apps.form.dao,org.joget.apps.form.model,org.joget.apps.form.service,org.joget.apps.list.service,org.joget.apps.userview.lib,org.joget.apps.userview.model,org.joget.apps.userview.service,org.joget.apps.workflow.lib,javax.servlet,javax.servlet.http,org.osgi.framework;version="1.3.0"</Import-Package>
                            <!-- End change package and plugin class here -->
                            <Embed-Dependency>*;scope=compile|runtime;inline=false</Embed-Dependency>
                            <Embed-Transitive>true</Embed-Transitive>
                            <Embed-Directory>dependency</Embed-Directory>
                            <Embed-StripGroup>true</Embed-StripGroup>
                            <DynamicImport-Package>*</DynamicImport-Package>
    
    
                            <!-- Plugin Information -->
                            <Joget-Name>${label}</Joget-Name>
                            <Joget-Description>${description}</Joget-Description>
                        </instructions>
                    </configuration>
                </plugin>
            </plugins>
        </build>
    Markup
     
  3. Especially, the following configuration in pom.xml triggers the auto-uninstall:
    <Private-Package>org.joget.*</Private-Package>
    Markup
     
  4. Updating it as shown below allows the plugin to be imported successfully:
    <Private-Package>{local-packages}</Private-Package>
    Markup
     
  5. After making the changes, rebuild the plugin using Maven.


Reference links

Created by Debanraj Last modified by Debanraj on Aug 25, 2025