diff --git a/model/jpa/src/main/java/org/keycloak/authorization/jpa/entities/PermissionTicketEntity.java b/model/jpa/src/main/java/org/keycloak/authorization/jpa/entities/PermissionTicketEntity.java
index c607bece68..1cd8d07780 100644
--- a/model/jpa/src/main/java/org/keycloak/authorization/jpa/entities/PermissionTicketEntity.java
+++ b/model/jpa/src/main/java/org/keycloak/authorization/jpa/entities/PermissionTicketEntity.java
@@ -34,7 +34,7 @@ import javax.persistence.UniqueConstraint;
* @author Pedro Igor
*/
@Entity
-@Table(name = "RESOURCE_SERVER_PERMISSION_TICKET", uniqueConstraints = {
+@Table(name = "RESOURCE_SERVER_PERM_TICKET", uniqueConstraints = {
@UniqueConstraint(columnNames = {"OWNER", "RESOURCE_SERVER_ID", "RESOURCE_ID", "SCOPE_ID"})
})
@NamedQueries(
diff --git a/model/jpa/src/main/resources/META-INF/jpa-changelog-authz-4.0.0.CR1.xml b/model/jpa/src/main/resources/META-INF/jpa-changelog-authz-4.0.0.CR1.xml
index aa3d17e3d1..1b72a34564 100755
--- a/model/jpa/src/main/resources/META-INF/jpa-changelog-authz-4.0.0.CR1.xml
+++ b/model/jpa/src/main/resources/META-INF/jpa-changelog-authz-4.0.0.CR1.xml
@@ -17,8 +17,8 @@
-->
-
-
+
+
@@ -45,11 +45,11 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/testsuite/integration-arquillian/servers/auth-server/undertow/src/main/java/org/keycloak/testsuite/arquillian/undertow/SimpleWebXmlParser.java b/testsuite/integration-arquillian/servers/auth-server/undertow/src/main/java/org/keycloak/testsuite/arquillian/undertow/SimpleWebXmlParser.java
index 47bdcea681..f5eafa9b53 100644
--- a/testsuite/integration-arquillian/servers/auth-server/undertow/src/main/java/org/keycloak/testsuite/arquillian/undertow/SimpleWebXmlParser.java
+++ b/testsuite/integration-arquillian/servers/auth-server/undertow/src/main/java/org/keycloak/testsuite/arquillian/undertow/SimpleWebXmlParser.java
@@ -28,6 +28,7 @@ import javax.servlet.Filter;
import javax.servlet.Servlet;
import io.undertow.servlet.api.DeploymentInfo;
+import io.undertow.servlet.api.ErrorPage;
import io.undertow.servlet.api.FilterInfo;
import io.undertow.servlet.api.LoginConfig;
import io.undertow.servlet.api.SecurityConstraint;
@@ -183,9 +184,19 @@ class SimpleWebXmlParser {
cfg.setName(cookieName);
di.setServletSessionConfig(cfg);
}
+
+ // ERROR PAGES
+ List errorPages = document.getElementsByTagName("error-page");
+ for (ElementWrapper errorPage : errorPages) {
+ int errorCode = Integer.parseInt(errorPage.getElementByTagName("error-code").getText());
+ String location = errorPage.getElementByTagName("location").getText();
+ di.addErrorPage(new ErrorPage(location, errorCode));
+ }
} catch (ClassNotFoundException cnfe) {
throw new RuntimeException(cnfe);
+ } catch (NullPointerException npe) {
+ throw new RuntimeException("Error parsing web.xml of " + di.getDeploymentName(), npe);
}
}
diff --git a/testsuite/integration-arquillian/test-apps/servlets/pom.xml b/testsuite/integration-arquillian/test-apps/servlets/pom.xml
index 1755ffd722..38d38a0742 100644
--- a/testsuite/integration-arquillian/test-apps/servlets/pom.xml
+++ b/testsuite/integration-arquillian/test-apps/servlets/pom.xml
@@ -14,9 +14,8 @@
- javax.servlet
- javax.servlet-api
- 3.1.0
+ org.jboss.spec.javax.servlet
+ jboss-servlet-api_3.0_spec
junit
diff --git a/testsuite/integration-arquillian/test-apps/servlets/src/main/java/org/keycloak/testsuite/adapter/servlet/ErrorServlet.java b/testsuite/integration-arquillian/test-apps/servlets/src/main/java/org/keycloak/testsuite/adapter/servlet/ErrorServlet.java
index afe41ead6b..9f322eb091 100644
--- a/testsuite/integration-arquillian/test-apps/servlets/src/main/java/org/keycloak/testsuite/adapter/servlet/ErrorServlet.java
+++ b/testsuite/integration-arquillian/test-apps/servlets/src/main/java/org/keycloak/testsuite/adapter/servlet/ErrorServlet.java
@@ -23,22 +23,34 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
+import org.keycloak.adapters.spi.AuthenticationError;
/**
* @author Marek Posolda
*/
public class ErrorServlet extends HttpServlet {
+ public static AuthenticationError authError;
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
+ authError = (AuthenticationError)req.getAttribute(AuthenticationError.class.getName());
-
+ Integer statusCode = (Integer) req.getAttribute("javax.servlet.error.status_code");
+
resp.setContentType("text/html");
PrintWriter pw = resp.getWriter();
pw.printf("%s", "Error Page");
- pw.print("There was an error
");
+ pw.print("There was an error
");
+ if (statusCode != null)
+ pw.print("
HTTP status code: " + statusCode);
+ if (authError != null)
+ pw.print("
Error info: " + authError.toString());
+ pw.print("