Lumir Navrat created WFLY-14195:
-----------------------------------
Summary: Update javassist from 3.23.2-GA to 3.27.0-GA
Key: WFLY-14195
URL:
https://issues.redhat.com/browse/WFLY-14195
Project: WildFly
Issue Type: Component Upgrade
Affects Versions: 22.0.0.Alpha1, 21.0.1.Final
Reporter: Lumir Navrat
Assignee: Brian Stansberry
Current WF has javassist library that doesn't fully support JDK11
Problem is ConstPool#readOne method where is missing support for constant 17. This support
was added in later versions of Javassist.
this lead for us to failed test that is run in Arquillian 1.6.0 when is used jacoco
0.8.6.
Test are run via maven and maven compiler has set source/target compiler level to 11. When
it was 1.8 all was fine.
It seams that during instrumentation with jacoco is added this constant to classes so
later our test failed because Reflections cant create class.
{code}
Caused by: org.reflections.ReflectionsException: could not create class file from
InstancesAndTypesOrderedSetupService.class
at
deployment.test-application-ear.ear//org.reflections.adapters.JavassistAdapter.getOrCreateClassObject(JavassistAdapter.java:109)
at
deployment.test-application-ear.ear//org.reflections.adapters.JavassistAdapter.getOrCreateClassObject(JavassistAdapter.java:1)
at
deployment.test-application-ear.ear//org.reflections.scanners.AbstractScanner.scan(AbstractScanner.java:28)
... 169 more
Caused by: java.io.IOException: invalid constant type: 17 at 355
at org.javassist//javassist.bytecode.ConstPool.readOne(ConstPool.java:1355)
at org.javassist//javassist.bytecode.ConstPool.read(ConstPool.java:1279)
at org.javassist//javassist.bytecode.ConstPool.<init>(ConstPool.java:198)
at org.javassist//javassist.bytecode.ClassFile.read(ClassFile.java:794)
at org.javassist//javassist.bytecode.ClassFile.<init>(ClassFile.java:185)
at
deployment.test-application-ear.ear//org.reflections.adapters.JavassistAdapter.getOrCreateClassObject(JavassistAdapter.java:107)
... 171 more
{code}
I used from another issue this 2 lines to print used javassist version.
{code}
clazz = Class.forName("javassist.util.proxy.ProxyFactory");
System.out.println(clazz.getProtectionDomain().getCodeSource());
result in log:
09:34:16,882 INFO [stdout] (default task-2)
(jar:file:/D:/ide/wildfly/wildfly-21.0.0.Final/modules/system/layers/base/org/javassist/main/javassist-3.23.2-GA.jar!/
<no signer certificates>)
{code}
I tried exclude javassist from deployment in jboss-deployment-structure.xml. Next I tried
add it via Arquillian to test-ear but always it use WF provided javassist.
Not sure if provided custom module will take precedence.
I tried replace javassist in main slot with 3.27.0-GA now and the test works fine. But I
understood that there could be other places that are maybe still require javassist and
should be checked.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)