Paul Rütter created FELIX-6869:
----------------------------------

             Summary: Felix HTTP integration tests cannot run on JDK 27 and pin 
a three-year-old framework
                 Key: FELIX-6869
                 URL: https://issues.apache.org/jira/browse/FELIX-6869
             Project: Felix
          Issue Type: Improvement
          Components: HTTP Service
    Affects Versions: http.jetty12-2.0.8, http.jetty-5.2.6
            Reporter: Paul Rütter


*1. The ITs cannot run on JDK 27*

{{JettySniHostCheckIT}} fails on JDK 27 while passing on 17, 21 and 25. It 
times out after 30 seconds waiting for an {{HttpService}} that never registers:
org.awaitility.core.ConditionTimeoutException: Condition with alias 
'httpServiceRegistered' didn't complete within 30 seconds
 
The container log shows the real cause:
org.apache.aries.spifly.dynamic.bundle [Events.Framework] ERROR : 
FrameworkEvent ERROR java.lang.ClassFormatError: Weaving hook failed. Caused 
by: java.lang.IllegalArgumentException: Unsupported class file major version 71
 
{{AbstractJettyTestSupport.spifly()}} pins 
{{org.apache.aries.spifly.dynamic.bundle}} {*}1.3.7{*}, which imports 
{{org.objectweb.asm;version="[9.6,10)"}} and resolves to ASM 9.6. ASM 9.6 does 
not know class file major version 71 (Java 27), so SpiFly’s weaving hook throws 
for every class it is asked to weave and Jetty never finishes starting.

This is not specific to SNI or TLS — the test keystore is fine (PBES2/AES-256, 
2048-bit RSA, SHA384withRSA) and Jetty 12.1.14 starts normally up to the 
weaving failure. {{JettySniHostCheckIT}} is simply the test that waits on a 
service that never arrives.

SpiFly *1.3.8* bundles ASM 9.10.1, which declares {{{}V27 = 71{}}}, so it is 
the obvious fix — but it is {*}not drop-in{*}. Bumping it alone makes the 
container fail with {{{}There are unresolved bundles{}}}, because 1.3.8’s 
{{Import-Package}} changed substantially (it now imports the {{java.*}} 
packages explicitly). The test container’s wiring needs adjusting to match.

Both {{http/jetty}} and {{http/jetty12}} pin 1.3.7 in their copies of 
{{{}AbstractJettyTestSupport{}}}.

*2. The ITs run against Felix Framework 7.0.5, hardcoded*

http/jetty12/pom.xml declares:

 
<dependency>
<groupId>org.apache.felix</groupId> 
<artifactId>org.apache.felix.framework</artifactId> <version>7.0.5</version> 
<scope>test</scope>
</dependency>
 
pax-exam uses whatever framework is on the test classpath as its OSGi 
container, so these ITs always run against released 7.0.5 from the local 
repository, never against the framework built in the reactor. Confirmed in the 
IT logs, which attribute a warning to 
{{~/.m2/repository/org/apache/felix/org.apache.felix.framework/7.0.5/...}} 
rather than to {{{}framework/target/classes{}}}.

Consequences: the ITs do not exercise framework changes made in the same build, 
and they are silently testing against a framework released in 2022. The same 
applies to other pinned bundles in {{AbstractJettyTestSupport}} — 
{{org.apache.felix.http.servlet-api}} 6.1.0, {{org.apache.felix.configadmin}} 
1.9.26.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to