You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue is that the resources that are available in KeysProducer are not the resources that exits in the WAR file. The resources we see there are the resources in the test: target/test-classes
That is wrong, we expect to get the resources from the WAR file.
Find here the stacktrace when the pub.key is created in the WAR:
Thread [main] (Suspended (breakpoint at line 62 in ee.jakarta.tck.core.rest.jsonb.cdi.CustomJsonbSerializationIT))
ee.jakarta.tck.core.rest.jsonb.cdi.CustomJsonbSerializationIT.createTestArchive() line: 62
java.lang.invoke.DirectMethodHandle$Holder.invokeStatic(java.lang.Object) line: not available
java.lang.invoke.LambdaForm$MH.0x0000000801008000.invoke(java.lang.Object, java.lang.Object) line: not available
java.lang.invoke.Invokers$Holder.invokeExact_MT(java.lang.Object, java.lang.Object, java.lang.Object) line: not available
jdk.internal.reflect.DirectMethodHandleAccessor.invokeImpl(java.lang.Object, java.lang.Object[]) line: 154
jdk.internal.reflect.DirectMethodHandleAccessor.invoke(java.lang.Object, java.lang.Object[]) line: 104
java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object...) line: 578
org.jboss.arquillian.container.test.impl.client.deployment.AnnotationDeploymentScenarioGenerator.invoke(java.lang.Class<T>, java.lang.reflect.Method) line: 126
org.jboss.arquillian.container.test.impl.client.deployment.AnnotationDeploymentScenarioGenerator.generateDeploymentContent(java.lang.reflect.Method) line: 91
org.jboss.arquillian.container.test.impl.client.deployment.AnnotationDeploymentScenarioGenerator.generateDeploymentContent(org.jboss.arquillian.test.spi.TestClass) line: 50
org.jboss.arquillian.container.test.impl.client.deployment.AnnotationDeploymentScenarioGenerator(org.jboss.arquillian.container.test.impl.client.deployment.AbstractDeploymentScenarioGenerator).generate(org.jboss.arquillian.test.spi.TestClass) line: 30
org.jboss.arquillian.container.test.impl.client.deployment.DeploymentGenerator.generateDeployment(org.jboss.arquillian.container.test.impl.client.deployment.event.GenerateDeployment) line: 81
java.lang.invoke.DirectMethodHandle$Holder.invokeVirtual(java.lang.Object, java.lang.Object, java.lang.Object) line: not available
java.lang.invoke.LambdaForm$MH.0x00000008010a9000.invoke(java.lang.Object, java.lang.Object, java.lang.Object) line: not available
java.lang.invoke.Invokers$Holder.invokeExact_MT(java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object) line: not available
jdk.internal.reflect.DirectMethodHandleAccessor.invokeImpl(java.lang.Object, java.lang.Object[]) line: 155
jdk.internal.reflect.DirectMethodHandleAccessor.invoke(java.lang.Object, java.lang.Object[]) line: 104
java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object...) line: 578
org.jboss.arquillian.core.impl.ObserverImpl.invoke(org.jboss.arquillian.core.spi.Manager, java.lang.Object) line: 86
org.jboss.arquillian.core.impl.EventContextImpl<T>.invokeObservers() line: 103
org.jboss.arquillian.core.impl.EventContextImpl<T>.proceed() line: 90
org.jboss.arquillian.core.impl.ManagerImpl.fire(T, org.jboss.arquillian.core.spi.NonManagedObserver<T>) line: 133
org.jboss.arquillian.core.impl.ManagerImpl.fire(java.lang.Object) line: 105
org.jboss.arquillian.core.impl.EventImpl<T>.fire(T) line: 62
org.jboss.arquillian.container.test.impl.client.ContainerEventController.execute(org.jboss.arquillian.test.spi.event.suite.BeforeClass) line: 95
java.lang.invoke.DirectMethodHandle$Holder.invokeVirtual(java.lang.Object, java.lang.Object, java.lang.Object) line: not available
java.lang.invoke.LambdaForm$MH.0x0000000801105800.invoke(java.lang.Object, java.lang.Object, java.lang.Object) line: not available
java.lang.invoke.Invokers$Holder.invokeExact_MT(java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object) line: not available
jdk.internal.reflect.DirectMethodHandleAccessor.invokeImpl(java.lang.Object, java.lang.Object[]) line: 155
jdk.internal.reflect.DirectMethodHandleAccessor.invoke(java.lang.Object, java.lang.Object[]) line: 104
java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object...) line: 578
org.jboss.arquillian.core.impl.ObserverImpl.invoke(org.jboss.arquillian.core.spi.Manager, java.lang.Object) line: 86
org.jboss.arquillian.core.impl.EventContextImpl<T>.invokeObservers() line: 103
org.jboss.arquillian.core.impl.EventContextImpl<T>.proceed() line: 90
org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(org.jboss.arquillian.core.spi.EventContext<org.jboss.arquillian.test.spi.event.suite.ClassEvent>) line: 83
java.lang.invoke.DirectMethodHandle$Holder.invokeVirtual(java.lang.Object, java.lang.Object, java.lang.Object) line: not available
java.lang.invoke.LambdaForm$MH.0x0000000801105800.invoke(java.lang.Object, java.lang.Object, java.lang.Object) line: not available
java.lang.invoke.Invokers$Holder.invokeExact_MT(java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object) line: not available
jdk.internal.reflect.DirectMethodHandleAccessor.invokeImpl(java.lang.Object, java.lang.Object[]) line: 155
jdk.internal.reflect.DirectMethodHandleAccessor.invoke(java.lang.Object, java.lang.Object[]) line: 104
java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object...) line: 578
org.jboss.arquillian.core.impl.ObserverImpl.invoke(org.jboss.arquillian.core.spi.Manager, java.lang.Object) line: 86
org.jboss.arquillian.core.impl.EventContextImpl<T>.proceed() line: 95
org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(org.jboss.arquillian.core.spi.EventContext<org.jboss.arquillian.test.spi.event.suite.SuiteEvent>) line: 69
java.lang.invoke.DirectMethodHandle$Holder.invokeVirtual(java.lang.Object, java.lang.Object, java.lang.Object) line: not available
java.lang.invoke.LambdaForm$MH.0x0000000801105800.invoke(java.lang.Object, java.lang.Object, java.lang.Object) line: not available
java.lang.invoke.Invokers$Holder.invokeExact_MT(java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object) line: not available
jdk.internal.reflect.DirectMethodHandleAccessor.invokeImpl(java.lang.Object, java.lang.Object[]) line: 155
jdk.internal.reflect.DirectMethodHandleAccessor.invoke(java.lang.Object, java.lang.Object[]) line: 104
java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object...) line: 578
org.jboss.arquillian.core.impl.ObserverImpl.invoke(org.jboss.arquillian.core.spi.Manager, java.lang.Object) line: 86
org.jboss.arquillian.core.impl.EventContextImpl<T>.proceed() line: 95
org.jboss.arquillian.core.impl.ManagerImpl.fire(T, org.jboss.arquillian.core.spi.NonManagedObserver<T>) line: 133
org.jboss.arquillian.core.impl.ManagerImpl.fire(java.lang.Object) line: 105
org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.beforeClass(java.lang.Class<?>, org.jboss.arquillian.test.spi.LifecycleMethodExecutor) line: 89
org.jboss.arquillian.junit5.ArquillianExtension.beforeAll(org.junit.jupiter.api.extension.ExtensionContext) line: 35
org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllCallbacks$8(org.junit.jupiter.api.extension.BeforeAllCallback, org.junit.jupiter.api.extension.ExtensionContext) line: 368
org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor$$Lambda$287.0x00000008010a1848.execute() line: not available
org.junit.jupiter.engine.support.OpenTest4JAndJUnit4AwareThrowableCollector(org.junit.platform.engine.support.hierarchical.ThrowableCollector).execute(org.junit.platform.engine.support.hierarchical.ThrowableCollector$Executable) line: 73
org.junit.jupiter.engine.descriptor.ClassTestDescriptor(org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor).invokeBeforeAllCallbacks(org.junit.jupiter.engine.execution.JupiterEngineExecutionContext) line: 368
org.junit.jupiter.engine.descriptor.ClassTestDescriptor(org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor).before(org.junit.jupiter.engine.execution.JupiterEngineExecutionContext) line: 192
org.junit.jupiter.engine.descriptor.ClassTestDescriptor(org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor).before(org.junit.platform.engine.support.hierarchical.EngineExecutionContext) line: 78
org.junit.platform.engine.support.hierarchical.NodeTestTask<C>.lambda$executeRecursively$5() line: 136
org.junit.platform.engine.support.hierarchical.NodeTestTask$$Lambda$245.0x0000000801097248.execute() line: not available
org.junit.jupiter.engine.support.OpenTest4JAndJUnit4AwareThrowableCollector(org.junit.platform.engine.support.hierarchical.ThrowableCollector).execute(org.junit.platform.engine.support.hierarchical.ThrowableCollector$Executable) line: 73
org.junit.platform.engine.support.hierarchical.NodeTestTask<C>.lambda$executeRecursively$7(org.junit.platform.engine.support.hierarchical.EngineExecutionContext) line: 129
org.junit.platform.engine.support.hierarchical.NodeTestTask$$Lambda$244.0x0000000801097030.invoke(org.junit.platform.engine.support.hierarchical.EngineExecutionContext) line: not available
org.junit.jupiter.engine.descriptor.ClassTestDescriptor(org.junit.platform.engine.support.hierarchical.Node<C>).around(C, org.junit.platform.engine.support.hierarchical.Node.Invocation<C>) line: 137
org.junit.platform.engine.support.hierarchical.NodeTestTask<C>.lambda$executeRecursively$8() line: 127
org.junit.platform.engine.support.hierarchical.NodeTestTask$$Lambda$243.0x0000000801096c28.execute() line: not available
org.junit.jupiter.engine.support.OpenTest4JAndJUnit4AwareThrowableCollector(org.junit.platform.engine.support.hierarchical.ThrowableCollector).execute(org.junit.platform.engine.support.hierarchical.ThrowableCollector$Executable) line: 73
org.junit.platform.engine.support.hierarchical.NodeTestTask<C>.executeRecursively() line: 126
org.junit.platform.engine.support.hierarchical.NodeTestTask<C>.execute() line: 84
org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService$$Lambda$249.0x0000000801097d10.accept(java.lang.Object) line: not available
java.util.ArrayList<E>.forEach(java.util.function.Consumer<? super E>) line: 1511
org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(java.util.List<? extends org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutorService.TestTask>) line: 38
org.junit.platform.engine.support.hierarchical.NodeTestTask<C>.lambda$executeRecursively$5() line: 143
org.junit.platform.engine.support.hierarchical.NodeTestTask$$Lambda$245.0x0000000801097248.execute() line: not available
org.junit.jupiter.engine.support.OpenTest4JAndJUnit4AwareThrowableCollector(org.junit.platform.engine.support.hierarchical.ThrowableCollector).execute(org.junit.platform.engine.support.hierarchical.ThrowableCollector$Executable) line: 73
org.junit.platform.engine.support.hierarchical.NodeTestTask<C>.lambda$executeRecursively$7(org.junit.platform.engine.support.hierarchical.EngineExecutionContext) line: 129
org.junit.platform.engine.support.hierarchical.NodeTestTask$$Lambda$244.0x0000000801097030.invoke(org.junit.platform.engine.support.hierarchical.EngineExecutionContext) line: not available
org.junit.jupiter.engine.descriptor.JupiterEngineDescriptor(org.junit.platform.engine.support.hierarchical.Node<C>).around(C, org.junit.platform.engine.support.hierarchical.Node.Invocation<C>) line: 137
org.junit.platform.engine.support.hierarchical.NodeTestTask<C>.lambda$executeRecursively$8() line: 127
org.junit.platform.engine.support.hierarchical.NodeTestTask$$Lambda$243.0x0000000801096c28.execute() line: not available
org.junit.jupiter.engine.support.OpenTest4JAndJUnit4AwareThrowableCollector(org.junit.platform.engine.support.hierarchical.ThrowableCollector).execute(org.junit.platform.engine.support.hierarchical.ThrowableCollector$Executable) line: 73
org.junit.platform.engine.support.hierarchical.NodeTestTask<C>.executeRecursively() line: 126
org.junit.platform.engine.support.hierarchical.NodeTestTask<C>.execute() line: 84
org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutorService.TestTask) line: 32
org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor<C>.execute() line: 57
org.junit.jupiter.engine.JupiterTestEngine(org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine<C>).execute(org.junit.platform.engine.ExecutionRequest) line: 51
org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(org.junit.platform.engine.TestDescriptor, org.junit.platform.engine.EngineExecutionListener, org.junit.platform.engine.ConfigurationParameters, org.junit.platform.engine.TestEngine) line: 108
org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(org.junit.platform.launcher.core.LauncherDiscoveryResult, org.junit.platform.engine.EngineExecutionListener) line: 88
org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(org.junit.platform.launcher.core.InternalTestPlan, org.junit.platform.launcher.core.LauncherDiscoveryResult, org.junit.platform.launcher.TestExecutionListener) line: 54
org.junit.platform.launcher.core.EngineExecutionOrchestrator$$Lambda$207.0x0000000801088228.accept(java.lang.Object) line: not available
org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(org.junit.platform.engine.ConfigurationParameters, org.junit.platform.launcher.core.TestExecutionListenerRegistry, java.util.function.Consumer<org.junit.platform.launcher.TestExecutionListener>) line: 67
org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(org.junit.platform.launcher.core.InternalTestPlan, org.junit.platform.launcher.TestExecutionListener...) line: 52
org.junit.platform.launcher.core.DefaultLauncher.execute(org.junit.platform.launcher.core.InternalTestPlan, org.junit.platform.launcher.TestExecutionListener[]) line: 96
org.junit.platform.launcher.core.DefaultLauncher.execute(org.junit.platform.launcher.LauncherDiscoveryRequest, org.junit.platform.launcher.TestExecutionListener...) line: 75
org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.execute(org.apache.maven.surefire.api.util.TestsToRun, org.apache.maven.surefire.junitplatform.RunListenerAdapter) line: 188
org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(org.apache.maven.surefire.api.util.TestsToRun, org.apache.maven.surefire.api.report.RunListener) line: 154
org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(java.lang.Object) line: 128
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess() line: 428
org.apache.maven.surefire.booter.ForkedBooter.execute() line: 162
org.apache.maven.surefire.booter.ForkedBooter.run(org.apache.maven.surefire.booter.ForkedBooter, java.lang.String[]) line: 562
org.apache.maven.surefire.booter.ForkedBooter.main(java.lang.String[]) line: 548
jbescos
changed the title
Nima-Arquillian class loader issue
Nima-Arquillian tck core profile CustomJsonbSerializationIT failure
May 23, 2023
jbescos
changed the title
Nima-Arquillian tck core profile CustomJsonbSerializationIT failure
Nima-Arquillian tck core profile WebApp classpath is wrong
May 24, 2023
m0mus
changed the title
Nima-Arquillian tck core profile WebApp classpath is wrong
4.x Arquillian TCK core profile WebApp classpath is wrong
May 25, 2023
I was debugging this further and it seems Helidon-Arquillian creates a class loader that can be obtained in this way: Thread.currentThread().getContextClassLoader() -> HelidonContainerClassloader
But the TCK test is getting the resource in this other way: getClass().getClassLoader() -> jdk.internal.loader.ClassLoaders$AppClassLoader
It works with the first classloader, but it does not work with the second. I guess it should work with the second too, so it requires changes in Helidon Arquillian.
Environment Details
java 20.0.1 2023-04-18
Java(TM) SE Runtime Environment (build 20.0.1+9-29)
Java HotSpot(TM) 64-Bit Server VM (build 20.0.1+9-29, mixed mode, sharing)
I am working in this task related to integrate Core Profile TCKs in Helidon:
#6799
One of the tests creates one resource for the Arquillian deployment:
https://github.com/jakartaee/platform-tck/blob/dfccff1b15b0221f5b11dea2912b728d4853f366/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/rest/jsonb/cdi/CustomJsonbSerializationIT.java#L68
I have verified that file exists in the WAR file.
Later, that resource is obtained here:
https://github.com/jakartaee/platform-tck/blob/dfccff1b15b0221f5b11dea2912b728d4853f366/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/rest/jsonb/cdi/KeysProducer.java#L42
That is failing and an exception is thrown.
The issue is that the resources that are available in KeysProducer are not the resources that exits in the WAR file. The resources we see there are the resources in the test:
target/test-classes
That is wrong, we expect to get the resources from the WAR file.
Find here the stacktrace when the pub.key is created in the WAR:
And when the pub.key is read:
If you want to try it:
TCK Core Profile does not exist in maven repository yet, so you also need to do this:
The text was updated successfully, but these errors were encountered: