From 946eacd5b6092cd9ae954de2169253823616196e Mon Sep 17 00:00:00 2001 From: Peter Zaoral Date: Fri, 10 Feb 2023 10:51:52 +0100 Subject: [PATCH] Quarkus3 branch sync no. 5 10.2.2023: * renamed imports from javax to jakarta as a part of the migration from JavaEE to JakartaEE * fixed Undertow server not starting due to ClassNotFoundException: javax.transaction.TransactionManager Signed-off-by: Peter Zaoral --- .../HotRodRemoteTransactionWrapper.java | 14 +++++++------- .../HotRodTransactionManagerLookup.java | 2 +- .../context/PreAuthorizationRequestContext.java | 2 +- .../services/testsuite-providers/pom.xml | 6 ++++++ .../broker/KcOidcBrokerTokenExchangeTest.java | 12 ++++++------ .../KcSamlAdvancedAttributeToGroupMapperTest.java | 2 +- 6 files changed, 22 insertions(+), 16 deletions(-) diff --git a/model/map-hot-rod/src/main/java/org/keycloak/models/map/storage/hotRod/transaction/HotRodRemoteTransactionWrapper.java b/model/map-hot-rod/src/main/java/org/keycloak/models/map/storage/hotRod/transaction/HotRodRemoteTransactionWrapper.java index d7c0c8a4e9..f2beff64e2 100644 --- a/model/map-hot-rod/src/main/java/org/keycloak/models/map/storage/hotRod/transaction/HotRodRemoteTransactionWrapper.java +++ b/model/map-hot-rod/src/main/java/org/keycloak/models/map/storage/hotRod/transaction/HotRodRemoteTransactionWrapper.java @@ -19,13 +19,13 @@ package org.keycloak.models.map.storage.hotRod.transaction; import org.keycloak.models.KeycloakTransaction; -import javax.transaction.HeuristicMixedException; -import javax.transaction.HeuristicRollbackException; -import javax.transaction.NotSupportedException; -import javax.transaction.RollbackException; -import javax.transaction.Status; -import javax.transaction.SystemException; -import javax.transaction.TransactionManager; +import jakarta.transaction.HeuristicMixedException; +import jakarta.transaction.HeuristicRollbackException; +import jakarta.transaction.NotSupportedException; +import jakarta.transaction.RollbackException; +import jakarta.transaction.Status; +import jakarta.transaction.SystemException; +import jakarta.transaction.TransactionManager; /** * When no JTA transaction is present in the runtime this wrapper is used diff --git a/model/map-hot-rod/src/main/java/org/keycloak/models/map/storage/hotRod/transaction/HotRodTransactionManagerLookup.java b/model/map-hot-rod/src/main/java/org/keycloak/models/map/storage/hotRod/transaction/HotRodTransactionManagerLookup.java index e51d83582c..f28c7ceb20 100644 --- a/model/map-hot-rod/src/main/java/org/keycloak/models/map/storage/hotRod/transaction/HotRodTransactionManagerLookup.java +++ b/model/map-hot-rod/src/main/java/org/keycloak/models/map/storage/hotRod/transaction/HotRodTransactionManagerLookup.java @@ -22,7 +22,7 @@ import org.infinispan.commons.tx.lookup.TransactionManagerLookup; import org.keycloak.models.KeycloakSession; import org.keycloak.transaction.JtaTransactionManagerLookup; -import javax.transaction.TransactionManager; +import jakarta.transaction.TransactionManager; /** * HotRod client provides its own {@link org.infinispan.client.hotrod.transaction.lookup.GenericTransactionManagerLookup} diff --git a/services/src/main/java/org/keycloak/services/clientpolicy/context/PreAuthorizationRequestContext.java b/services/src/main/java/org/keycloak/services/clientpolicy/context/PreAuthorizationRequestContext.java index 41b5ab33c0..ee51c88c7a 100644 --- a/services/src/main/java/org/keycloak/services/clientpolicy/context/PreAuthorizationRequestContext.java +++ b/services/src/main/java/org/keycloak/services/clientpolicy/context/PreAuthorizationRequestContext.java @@ -17,7 +17,7 @@ package org.keycloak.services.clientpolicy.context; -import javax.ws.rs.core.MultivaluedMap; +import jakarta.ws.rs.core.MultivaluedMap; import org.keycloak.services.clientpolicy.ClientPolicyContext; import org.keycloak.services.clientpolicy.ClientPolicyEvent; diff --git a/testsuite/integration-arquillian/servers/auth-server/services/testsuite-providers/pom.xml b/testsuite/integration-arquillian/servers/auth-server/services/testsuite-providers/pom.xml index 8c757e183f..7f5cba4c10 100644 --- a/testsuite/integration-arquillian/servers/auth-server/services/testsuite-providers/pom.xml +++ b/testsuite/integration-arquillian/servers/auth-server/services/testsuite-providers/pom.xml @@ -87,6 +87,12 @@ org.infinispan infinispan-tasks-api ${infinispan.version} + + + org.infinispan + infinispan-core + + diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/broker/KcOidcBrokerTokenExchangeTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/broker/KcOidcBrokerTokenExchangeTest.java index 758755a959..52a99fedb7 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/broker/KcOidcBrokerTokenExchangeTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/broker/KcOidcBrokerTokenExchangeTest.java @@ -23,12 +23,12 @@ import static org.hamcrest.Matchers.notNullValue; import static org.keycloak.testsuite.broker.BrokerTestConstants.IDP_OIDC_ALIAS; import static org.keycloak.testsuite.util.ProtocolMapperUtil.createHardcodedClaim; -import javax.ws.rs.client.Client; -import javax.ws.rs.client.Entity; -import javax.ws.rs.client.WebTarget; -import javax.ws.rs.core.Form; -import javax.ws.rs.core.HttpHeaders; -import javax.ws.rs.core.Response; +import jakarta.ws.rs.client.Client; +import jakarta.ws.rs.client.Entity; +import jakarta.ws.rs.client.WebTarget; +import jakarta.ws.rs.core.Form; +import jakarta.ws.rs.core.HttpHeaders; +import jakarta.ws.rs.core.Response; import org.junit.Test; import org.keycloak.OAuth2Constants; import org.keycloak.admin.client.resource.ClientResource; diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/broker/KcSamlAdvancedAttributeToGroupMapperTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/broker/KcSamlAdvancedAttributeToGroupMapperTest.java index 2e18e72469..1de261214a 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/broker/KcSamlAdvancedAttributeToGroupMapperTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/broker/KcSamlAdvancedAttributeToGroupMapperTest.java @@ -13,7 +13,7 @@ import org.keycloak.representations.idm.IdentityProviderMapperRepresentation; import org.keycloak.representations.idm.IdentityProviderRepresentation; import org.keycloak.representations.idm.UserRepresentation; -import javax.ws.rs.core.Response; +import jakarta.ws.rs.core.Response; import java.util.List; import static org.keycloak.testsuite.broker.KcSamlBrokerConfiguration.ATTRIBUTE_TO_MAP_FRIENDLY_NAME;