NoClassDefFoundError for ProductFilterUtil when enabling plugin in confluence 10

I’m currently migrating a plugin for Confluence 10 and encountering a persistent error related to ProductFilterUtil. Despite not referencing this class in my code, the plugin fails to start with a NoClassDefFoundError for com.atlassian.plugin.spring.scanner.util.ProductFilterUtil.

Plugin OverView
Type: Custom internal plugin
Status: Builds successfully, but fails to enable on Confluence 10

Component Version
Confluence 10.x (hosted locally)
Atlassian SDK 9.1.1 (via Homebrew)
AMPS 9.4.1
Java Temurin 17.0.13
Maven 3.9.8
Spring Scanner 3.0.0

pom.xml

  • Java version set to 17
  • Spring Scanner version: 3.0.0
  • Explicit exclusion of commons-lang:2.x
  • Explicit import of commons-lang3:3.12.0
  • OSGi Import-Package includes:
<Import-Package>
  com.atlassian.plugin.spring.scanner.util;version="[2,3]",
  ...
</Import-Package>

plugin-context.xml

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:atlassian-scanner="http://www.atlassian.com/schema/atlassian-scanner"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
        http://www.atlassian.com/schema/atlassian-scanner
        http://www.atlassian.com/schema/atlassian-scanner/atlassian-scanner.xsd">
    <atlassian-scanner:scan-indexes/>
</beans>

atlassian-plugin.xml

  • Standard definition with rest, web-resource, and plugin-info
  • No <component-import> used

Troubleshooting So Far

  1. Classpath Checks
  • Verified the class ProductFilterUtil is not referenced anywhere in my source.
  • Confirmed it doesn’t appear in the compiled output (target/classes) or .jar.
  1. Manifest & OSGi
  • MANIFEST.MF includes expected Import-Package instructions.
  • Verified plugin JAR is correctly built using atlas-package.
  1. Java Version
  • Ensured Java 17.0.13 (Temurin) is active with:
which java -> /Library/Java/JavaVirtualMachines/temurin-17.jdk
java -version -> openjdk 17.0.13
  1. Maven Dependency Cleanup
  • Removed transitive commons-lang:2.x conflicts.
  • Clean mvn dependency:tree confirms no old versions.
  1. Build Validation
  • Build passes.
  • However, enabling the plugin in Confluence fails due to this runtime error.

Stack Trace (Trimmed)

Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.atlassian.plugin.spring.scanner.util.ProductFilterUtil
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.NoClassDefFoundError: com/atlassian/plugin/spring/scanner/ProductFilter

Appears during Spring context initialization from:

META-INF/spring/plugin-context.xml

What I Need Help With

  • Has ProductFilterUtil been deprecated or moved in Spring Scanner 3.x or Confluence 10?
  • Is there a recommended version of atlassian-spring-scanner compatible with Confluence 10?
  • Is it required to downgrade Spring Scanner (e.g. to 2.1.13) or remove scanner altogether?
  • Any known conflicts between Spring Scanner and Atlassian-Plugin-Key based plugins?

I’d appreciate any guidance to resolve this or understand whether Spring Scanner is the root issue in Confluence 10

First, a note about your java version, the only supported java version I think is supported is java 21. Support for Java 17 has been removed - Preparing for Confluence 10.0 | Confluence Data Center 9.5 | Atlassian Documentation

I’m using atlassian-spring-scanner version 6.0.0 and it’s going okay.
Atlassian-Plugin-Key based plugins are supported, the original transformed plugins are not (where components and component-imports are defined in the atlassian-plugin.xml )

I’m not sure about what ProductFilterUtil, but there is a ProductFilter at com.atlassian.plugin.spring.scanner.ProductFilter; in the com.atlassian.plugin_atlassian-spring-scanner-annotation v6.0.0

Sorry it’s not a full solution, but I hope this helps.