Skip to content

Instantly share code, notes, and snippets.

[INFO] Running ee.jakarta.tck.persistence.ee.cdi.ServletEMLookupTest
[ERROR] Tests run: 3, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 3.930 s <<< FAILURE! -- in ee.jakarta.tck.persistence.ee.cdi.ServletEMLookupTest
[ERROR] ee.jakarta.tck.persistence.ee.cdi.ServletEMLookupTest.injectUtilitiesUsingQualifier -- Time elapsed: 0.019 s <<< ERROR!
java.lang.RuntimeException: java.lang.ClassNotFoundException: Provider for jakarta.ws.rs.client.ClientBuilder cannot be found
at jakarta.ws.rs.client.ClientBuilder.newBuilder(ClientBuilder.java:75)
at ee.jakarta.tck.persistence.ee.cdi.ServletEMLookupTest.injectUtilitiesUsingQualifier(ServletEMLookupTest.java:124)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at org.jboss.arquillian.junit5.ArquillianExtension$1.invoke(ArquillianExtension.java:284)
at org.jboss.arquillian.container.test.impl.execution.LocalTestExecuter.execute(LocalTestExecuter.java:57)
at java.base/java.lang.reflect.Method.invoke(Method.
@scottmarlow
scottmarlow / gist:192cf33e09cbe312559421a0f9aacf3b
Created July 28, 2025 18:07
WELD-001475: The following beans match by type, but none have matching qualifiers: - Configurator Bean [interface jakarta.persistence.EntityManagerFactory, types: Object, EntityManagerFactory, AutoCloseable, qualifiers: @Any @CtsEmQualifier] "}}}}
[INFO] Running ee.jakarta.tck.persistence.ee.cdi.ServletEMLookupTest
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.338 s <<< FAILURE! -- in ee.jakarta.tck.persistence.ee.cdi.ServletEMLookupTest
[ERROR] ee.jakarta.tck.persistence.ee.cdi.ServletEMLookupTest -- Time elapsed: 0.338 s <<< ERROR!
org.jboss.arquillian.container.spi.client.container.DeploymentException:
Cannot deploy 219590b4-f818-4e57-bed5-5d9fe19bb2be.war: {"WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-1" => {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"219590b4-f818-4e57-bed5-5d9fe19bb2be.war\".WeldStartService" => "Failed to start service
Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type EntityManagerFactory with qualifiers @CtsEm2Qualifier
at injection point [BackedAnnotatedField] @Inject @CtsEm2Qualifier private ee.jakarta.tck.persistence.ee.cdi.TestBeanEM.entityManagerFactory2
at ee.
2025-07-23 10:04:36,165 INFO [org.jboss.modules] (main) JBoss Modules version 2.1.6.Final
2025-07-23 10:04:36,374 INFO [org.jboss.msc] (main) JBoss MSC version 1.5.6.Final
2025-07-23 10:04:36,378 INFO [org.jboss.threads] (main) JBoss Threads version 3.9.1
2025-07-23 10:04:36,429 INFO [org.jboss.as] (MSC service thread 1-3) WFLYSRV0049: WildFly 37.0.0.Final-SNAPSHOT (WildFly Core 29.0.0.Beta6) starting
2025-07-23 10:04:36,430 DEBUG [org.jboss.as.config] (MSC service thread 1-3) Configured system properties:
[Standalone] =
file.encoding = UTF-8
file.separator = /
java.awt.headless = true
java.class.path = /home/smarlow/work/wildfly/dist/target/wildfly-37.0.0.Final-SNAPSHOT/jboss-modules.jar
@scottmarlow
scottmarlow / gist:eba75649528d4c1262eabb6a71c80fc7
Created July 18, 2025 19:59
https://github.com/scottmarlow/wildfly/tree/WFLY-19554_cdijpa32_six test fails with org.jboss.weld.contexts.ContextNotActiveException: WELD-001303: No active contexts for scope type jakarta.transaction.TransactionScoped
[INFO] Running org.jboss.as.test.integration.jpa.cdi.CDIPersistenceTestCase
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 5.455 s <<< FAILURE! -- in org.jboss.as.test.integration.jpa.cdi.CDIPersistenceTestCase
[ERROR] org.jboss.as.test.integration.jpa.cdi.CDIPersistenceTestCase.doCMTTest -- Time elapsed: 0.247 s <<< ERROR!
jakarta.ejb.EJBException: org.jboss.weld.contexts.ContextNotActiveException: WELD-001303: No active contexts for scope type jakarta.transaction.TransactionScoped
at org.jboss.as.ejb3@37.0.0.Final-SNAPSHOT//org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInNoTx(CMTTxInterceptor.java:222)
at org.jboss.as.ejb3@37.0.0.Final-SNAPSHOT//org.jboss.as.ejb3.tx.CMTTxInterceptor.never(CMTTxInterceptor.java:338)
at org.jboss.as.ejb3@37.0.0.Final-SNAPSHOT//org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:130)
at org.jboss.invocation@2.0.1.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
Application improvements using transactions that are marked STATUS_MARKED_ROLLBACK in that the application was actually using a transaction but application was treated as if didn't have an active transaction:
1. TransactionScopedEntityManager.isInTx() (org.jboss.as.jpa.container) calls to TransactionUtil.isInTx(TransactionManager) (org.jboss.as.jpa.transaction)
AbstractEntityManager.detachQueryNonTxInvocation(EntityManager, Query) (org.jboss.as.jpa.container)
!this.isInTx() check so we changed from if ! (tx.getStatus() == Status.STATUS_ACTIVE) to if ! (tx.getStatus() == Status.STATUS_ACTIVE || tx.getStatus() == Status.STATUS_MARKED_ROLLBACK)
I think that this change is more correct for the STATUS_MARKED_ROLLBACK case.
// used by TransactionScopedEntityManager to detach entities loaded by a query in a non-Jakarta Transactions invocation.
Previously if transaction is STATUS_MARKED_ROLLBACK we would of treated that as non-active transaction and we would of cleared persistence context after query.getResu
@scottmarlow
scottmarlow / gist:13ce48bfda9a0556bb43653aa8acfc97
Created June 16, 2025 20:56
hackretryloadingdefiningloop.java
diff --git a/hibernate-core/src/main/java/org/hibernate/bytecode/internal/bytebuddy/ByteBuddyState.java b/hibernate-core/src/main/java/org/hibernate/bytecode/internal/bytebuddy/ByteBuddyState.java
index 2bdfb646bf..613604561c 100644
--- a/hibernate-core/src/main/java/org/hibernate/bytecode/internal/bytebuddy/ByteBuddyState.java
+++ b/hibernate-core/src/main/java/org/hibernate/bytecode/internal/bytebuddy/ByteBuddyState.java
@@ -237,22 +237,25 @@ public final class ByteBuddyState {
catch (ClassNotFoundException e) {
// Ignore
}
- try {
- return make( makeClassFunction.apply( byteBuddy, new FixedNamingStrategy( className ) ) )
load:217, ByteBuddyState (org.hibernate.bytecode.internal.bytebuddy)
loadProxy:133, ByteBuddyState (org.hibernate.bytecode.internal.bytebuddy)
buildProxy:57, ByteBuddyProxyHelper (org.hibernate.proxy.pojo.bytebuddy)
postInstantiate:56, ByteBuddyProxyFactory (org.hibernate.proxy.pojo.bytebuddy)
createProxyFactory:280, EntityRepresentationStrategyPojoStandard (org.hibernate.metamodel.internal)
resolveProxyFactory:169, EntityRepresentationStrategyPojoStandard (org.hibernate.metamodel.internal)
<init>:135, EntityRepresentationStrategyPojoStandard (org.hibernate.metamodel.internal)
resolveStrategy:48, ManagedTypeRepresentationResolverStandard (org.hibernate.metamodel.internal)
<init>:517, AbstractEntityPersister (org.hibernate.persister.entity)
<init>:116, SingleTableEntityPersister (org.hibernate.persister.entity)
public Class<?> load(Class<?> referenceClass, String className, BiFunction<ByteBuddy, NamingStrategy, DynamicType.Builder<?>> makeClassFunction) {
if (result.getClassLoader() == referenceClass.getClassLoader()) {
try {
return referenceClass.getClassLoader().loadClass(className);
}
catch (ClassNotFoundException e) {
// Ignore
}
2025-06-09 14:48:56,493 INFO [org.hibernate.bytecode.internal.bytebuddy.ByteBuddyState] (ServerService Thread Pool -- 10) xxx ByteBuddyState.load detected problem where loading generated class "com.sun.ts.tests.jpa.core.annotations.access.property.DataTypes2$HibernateAccessOptimizeratimeDataatsData" from a subdeployment is actually loading the generated class in the ear lib.
Details: referenceClass.getClassLoader() == ModuleClassLoader for Module "deployment.jpa_core_annotations_access_property_vehicles.ear.jpa_core_annotations_access_property_pmservlet_vehicle_web.war" from Service Module Loader
Loaded class classloader = ModuleClassLoader for Module "deployment.jpa_core_annotations_access_property_vehicles.ear" from Service Module Loader
2025-06-09 14:48:56,493 ERROR [stderr] (ServerService Thread Pool -- 10) java.lang.Exception: Stack trace
2025-06-09 14:48:56,493 ERROR [stderr] (ServerService Thread Pool -- 10) at java.base/java.lang.Thread.dumpStack(Thread.java:1389)
2025-06-09 14:48:56,493 ERROR [stde
2025-06-06 10:48:36,337 INFO [stdout] (default task-1) ************************************************************
2025-06-06 10:48:36,337 INFO [stdout] (default task-1) * props file set to "/tmp/smarlow-cts-props.txt"
2025-06-06 10:48:36,337 INFO [stdout] (default task-1) ************************************************************
2025-06-06 10:48:36,337 INFO [stdout] (default task-1) In doPost!
2025-06-06 10:48:36,340 INFO [stdout] (default task-1) ServletVehicle - got InputStream
2025-06-06 10:48:36,347 INFO [stdout] (default task-1) read properties!!!
2025-06-06 10:48:36,372 INFO [stdout] (default task-1) got outputstream
2025-06-06 10:48:36,467 INFO [org.hibernate.persister.entity.AbstractEntityPersister] (default task-1) xxx AbstractEntityPersister.getPropertyValuesToInsert called with entity DataTypes[id: 1, Character: a, Short: 100, Integer: 500, Long: 300, Double: 50.0, Float: 1.0, CharacterArrayData: [a],, ByteArrayData: [100],, shouldNotPersist: null] class from classloader ModuleClassLo