Skip to content

Commit

Permalink
Merge pull request #30834 from mswatosh/db2-jcc
Browse files Browse the repository at this point in the history
Fixes for Db2 JCC 12 driver
  • Loading branch information
mswatosh authored Feb 25, 2025
2 parents 1fd5a45 + f591abd commit 7fb4b94
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@

<variable name="onError" value="FAIL"/>

<javaPermission className="java.util.PropertyPermission" name="sqlj.runtime.uncustomizedWarningOrException" actions="read"/>
<javaPermission className="java.util.PropertyPermission" name="sqlj.runtime" actions="read"/>
<javaPermission className="java.sql.SQLPermission" name="setNetworkTimeout"/>
<javaPermission className="java.lang.RuntimePermission" name="getClassLoader"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2020 IBM Corporation and others.
* Copyright (c) 2020, 2025 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-2.0/
*
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
Expand All @@ -21,7 +21,7 @@
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.SQLInvalidAuthorizationSpecException;
import java.sql.SQLNonTransientException;
import java.sql.Statement;
import java.util.HashSet;
import java.util.Set;
Expand Down Expand Up @@ -86,7 +86,7 @@ public class DB2KerberosTestServlet extends FATServlet {
public void testNonKerberosConnectionRejected() throws Exception {
try (Connection con = noKrb5.getConnection()) {
throw new Exception("Should not be able to obtain a non-kerberos connection from a kerberos-only database");
} catch (SQLInvalidAuthorizationSpecException e) {
} catch (SQLNonTransientException e) {
System.out.println("Got expected error getting non-kerberos connection");
}
}
Expand Down

0 comments on commit 7fb4b94

Please sign in to comment.