Summary
The root pom.xml declares <jdk>1.8</jdk> / <java.source>1.8</java.source>, but the Shiro artifacts in modules/shindig-uber/pom.xml resolve to version 2.1.0, which is Java 11 bytecode (major version 55). Shiro 2.0+ requires Java 11; the highest Java 1.8 compatible line is 1.13.0 (major version 52).
This is the second half of the bytecode-mismatch bug originally tracked in #74. The BouncyCastle half was fixed by #77 (migrated to the bc*-jdk15to18 artifact line). This issue tracks the Shiro half, which is a clean version pin.
Affected artifacts
| GAV |
Current |
Highest Java 1.8 compatible |
Bytecode gap |
org.apache.shiro:shiro-core |
2.1.0 (major 55 = Java 11) |
1.13.0 (major 52 = Java 8) |
2.0+ = Java 11 |
org.apache.shiro:shiro-web |
2.1.0 (Java 11) |
1.13.0 (Java 8) |
2.0+ = Java 11 |
org.apache.shiro:shiro-spring |
(transitive) |
1.13.0 (Java 8) |
2.0+ = Java 11 |
org.apache.shiro:shiro-config-core |
(transitive) |
1.13.0 (Java 8) |
2.0+ = Java 11 |
org.apache.shiro:shiro-config-ogdl |
(transitive) |
1.13.0 (Java 8) |
2.0+ = Java 11 |
org.apache.shiro:shiro-lang |
(transitive) |
1.13.0 (Java 8) |
2.0+ = Java 11 |
org.apache.shiro:shiro-crypto-hash |
(transitive) |
1.13.0 (Java 8) |
2.0+ = Java 11 |
org.apache.shiro:shiro-crypto-cipher |
(transitive) |
1.13.0 (Java 8) |
2.0+ = Java 11 |
org.apache.shiro:shiro-event |
(transitive) |
1.13.0 (Java 8) |
2.0+ = Java 11 |
Direct declaration
modules/shindig-uber/pom.xml declares org.apache.shiro:shiro-web directly at 2.1.0 (no property indirection). The other shiro-* artifacts come in transitively.
How to verify
JAR=~/.m2/repository/org/apache/shiro/shiro-core/2.1.0/shiro-core-2.1.0.jar
/usr/lib/jvm/java-8-openjdk/bin/javap -v -classpath "$JAR" $(unzip -l "$JAR" | awk '/\.class$/ {print $4; exit}' | sed 's|/|.|g; s|\.class$||') | grep 'major version'
# Expected (current): major version: 55
# Expected (target): major version: 52
Proposed fix
Two options:
Option A (minimal — matches #75's approach)
Add a <shiro.version> property to the root pom.xml at 1.13.0 and add the corresponding <dependencyManagement> entries for all shiro-* artifacts that flow in transitively. Then update modules/shindig-uber/pom.xml to use <version>${shiro.version}</version> instead of the hard-coded 2.1.0.
Option B (also acceptable)
Just update the one direct declaration in modules/shindig-uber/pom.xml from 2.1.0 to 1.13.0 and rely on Maven's nearest-version rule to pin the transitive Shiro artifacts to 1.13.0 as well. Smaller diff, but less explicit and the transitive shiro-* are still Java 11 bytecode unless an exclusion is added.
Acceptance criteria
shiro-core, shiro-web, and any transitive shiro-* artifacts resolve at 1.13.0 or earlier
./mvn-env.sh clean install -DskipTests succeeds on a Java 1.8 JDK with no UnsupportedClassVersionError
javap -v on the resolved shiro-core-1.13.0.jar reports major version: 52 (Java 8 bytecode)
- A full
./mvn-env.sh clean install -DskipTests still passes
Dependabot
org.apache.shiro* and org.apache.shiro:* are already in the .github/dependabot.yml full-ignore list (from before #75) so this won't get auto-bumped to 2.x in the future.
Out of scope
References
Co-Authored by Mavis v1.0.0 using minimax-m3 with agent mavis.
Summary
The root
pom.xmldeclares<jdk>1.8</jdk>/<java.source>1.8</java.source>, but the Shiro artifacts inmodules/shindig-uber/pom.xmlresolve to version 2.1.0, which is Java 11 bytecode (major version 55). Shiro 2.0+ requires Java 11; the highest Java 1.8 compatible line is 1.13.0 (major version 52).This is the second half of the bytecode-mismatch bug originally tracked in #74. The BouncyCastle half was fixed by #77 (migrated to the
bc*-jdk15to18artifact line). This issue tracks the Shiro half, which is a clean version pin.Affected artifacts
org.apache.shiro:shiro-coreorg.apache.shiro:shiro-weborg.apache.shiro:shiro-springorg.apache.shiro:shiro-config-coreorg.apache.shiro:shiro-config-ogdlorg.apache.shiro:shiro-langorg.apache.shiro:shiro-crypto-hashorg.apache.shiro:shiro-crypto-cipherorg.apache.shiro:shiro-eventDirect declaration
modules/shindig-uber/pom.xmldeclaresorg.apache.shiro:shiro-webdirectly at2.1.0(no property indirection). The othershiro-*artifacts come in transitively.How to verify
Proposed fix
Two options:
Option A (minimal — matches #75's approach)
Add a
<shiro.version>property to the rootpom.xmlat1.13.0and add the corresponding<dependencyManagement>entries for allshiro-*artifacts that flow in transitively. Then updatemodules/shindig-uber/pom.xmlto use<version>${shiro.version}</version>instead of the hard-coded2.1.0.Option B (also acceptable)
Just update the one direct declaration in
modules/shindig-uber/pom.xmlfrom2.1.0to1.13.0and rely on Maven's nearest-version rule to pin the transitive Shiro artifacts to 1.13.0 as well. Smaller diff, but less explicit and the transitiveshiro-*are still Java 11 bytecode unless an exclusion is added.Acceptance criteria
shiro-core,shiro-web, and any transitiveshiro-*artifacts resolve at1.13.0or earlier./mvn-env.sh clean install -DskipTestssucceeds on a Java 1.8 JDK with noUnsupportedClassVersionErrorjavap -von the resolvedshiro-core-1.13.0.jarreportsmajor version: 52(Java 8 bytecode)./mvn-env.sh clean install -DskipTestsstill passesDependabot
org.apache.shiro*andorg.apache.shiro:*are already in the.github/dependabot.ymlfull-ignore list (from before #75) so this won't get auto-bumped to 2.x in the future.Out of scope
References