Skip to content

PluginBundleGenerator fails with java 9+ #588

@javierlores

Description

@javierlores

Problem Description

The PluginBundleGenerator is experiencing a ClassCastException when attempting to generate plugin bundles on Java 9+ due to changes in the classloader architecture.

Specific Error

java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoader

Impact

  • Breaks plugin bundle generation for Java 9 and newer versions
  • Prevents testing and deployment of plugins on modern Java environments
  • Requires manual workarounds for development and testing

Root Cause

  • Pre-Java 9 code assumes URLClassLoader for classpath scanning
  • Java 9+ introduced the Java Platform Module System (JPMS)
  • AppClassLoader replaced traditional URLClassLoader

Location

  • File: PluginBundleGenerator.java
  • Problematic method: generateBundleZip()
  • Specific line: Classloader casting and classpath iteration

Priority

  • High (Blocks plugin development and testing)

Affected Versions

  • Java 9+
  • Concourse versions using this bundle generator

Metadata

Metadata

Assignees

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