Font Size:

How to Fix Plugin Auto uninstall due to Restricted Classes

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

When encountering the plugin error “xxx for containing disallowed class yyy”, please proceed as follows:

Update the build tag in your pom.xml file as shown in the reference below.

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>

 

Especially, the following configuration in pom.xml triggers the auto-uninstall:

<Private-Package>org.joget.*</Private-Package>

Updating it as shown below allows the plugin to be imported successfully:

<Private-Package>{local-packages}</Private-Package>

After making the changes, rebuild the plugin using Maven.


Reference links:

https://github.com/jogetoss/full-text-search/blob/main/pom.xml

Created by Selvavignesh Last modified by Selvavignesh on Aug 22, 2025