|
Arco,--
That are great news, because it is what I expected to see. It seems
that it is time to contact IBM for that issue.
From my point of view it seems to be a defect that the following codedoes not return a connection when Kerberos comes into play:
private Connection getISphereJDBCConnection() {
Connection jdbcConnection = null;
try {
IBMiConnection ibmiConnection =
comboConnections.getISeriesConnection();
jdbcConnection = ibmiConnection.getJDBCConnection(null, false);
} catch (SQLException e) {
}
return jdbcConnection;
}
But according to your response the following code returns a Kerberos
JDBC connection:
private Connection getKerberosJDBCConnection() {
Connection jdbcConnection = null;
try {
AS400JDBCDriver as400JDBCDriver = new AS400JDBCDriver();
if (DriverManager.getDriver("jdbc:AS400") == null) {
DriverManager.registerDriver(as400JDBCDriver);
}
IBMiConnection ibmiConnection =
comboConnections.getISeriesConnection();
AS400 system = ibmiConnection.getAS400ToolboxObject();
jdbcConnection = as400JDBCDriver.connect(system);
} catch (Throwable e) {
}
return jdbcConnection;
}
From my point of view there is a bug in IBMiConnection.
I wonder whether it makes sense to open a PMR when I do not have the
equipment to do the tests myself.
Thank you,
Thomas.
Am 22.01.2018 um 20:11 schrieb Arco Simonse:
Hi Thomas,executeSql(TestKerberosView.java:178)
I'm getting a result for the "Execute Kerberos Java" button: Loaded
from
SYSIBM.SYSDUMMY1: Y
Using the "Execute iSphere Java" results in the error below.
Regards,
-Arco
!ENTRY org.eclipse.ui 4 0 2018-01-22 20:08:26.261 !MESSAGE Unhandled
event loop exception !STACK 0 java.lang.NullPointerException at
de.tools400.test.kerberos.views.TestKerberosView.
at1(TestKerberosView.java:174)
de.tools400.test.kerberos.views.TestKerberosView.access$
atTestKerberosView.java:87)
de.tools400.test.kerberos.views.TestKerberosView$1.widgetSelected(
atTypedListener.java:249)
org.eclipse.swt.widgets.TypedListener.handleEvent(
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)PartRenderingEngine.java:1121)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
at
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4236)
at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3824)
at
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(
atrunWithDefault(Realm.java:336)
org.eclipse.core.databinding.observable.Realm.
atPartRenderingEngine.java:1022)
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(
atcreateAndRunUI(E4Workbench.java:150)
org.eclipse.e4.ui.internal.workbench.E4Workbench.
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693)runWithDefault(Realm.java:336)
at
org.eclipse.core.databinding.observable.Realm.
atWorkbench.java:610)
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(
atstart(IDEApplication.java:138)
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
at
org.eclipse.ui.internal.ide.application.IDEApplication.
atEclipseAppHandle.java:196)
org.eclipse.equinox.internal.app.EclipseAppHandle.run(
atrunApplication(EclipseAppLauncher.java:134)
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.
atEclipseAppLauncher.java:104)
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(
atEclipseStarter.java:388)
org.eclipse.core.runtime.adaptor.EclipseStarter.run(
atEclipseStarter.java:243)
org.eclipse.core.runtime.adaptor.EclipseStarter.run(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) atNativeMethodAccessorImpl.java:90)
sun.reflect.NativeMethodAccessorImpl.invoke(
atDelegatingMethodAccessorImpl.java:55)
sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(Method.java:508)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
at org.eclipse.equinox.launcher.Main.run(Main.java:1519)
at org.eclipse.equinox.launcher.Main.main(Main.java:1492)
2018-01-20 22:44 GMT+01:00 Tools/400 <thomas.raddatz@xxxxxxxxxxx>:
I uploaded an Eclipse test project (Test Kerberos Connection.zip)
to SourceForge at:
https://sourceforge.net/projects/isphere/files
If was great if somebody, who knows how to import the project to
Eclipse and to launch an Eclipse application in debug mode, could
download and import the project to RDi 9.5 or RDi 9.6.
The project adds a "Tools/400 -> Kerberos Test" view, which
contains two
buttons:
Execute iSphere Java
Execute Kerberos Java
The first one uses the original iSphere Java code to get a JDBC
connection for executing a "select * from sysibm.sysdummy1" statement.
It uses the getJDBCConnection() method of class IBMiConnection to
get a JDBC connection.
The second button registers the AS400JDBCDriver JDBC driver and
uses method getAS400ToolboxObject() of class IBMiConnection to get
an AS400 object, which it passes to connect() of AS400JDBCDriver
for getting a JDBC connection.
I really would like to know if the second approach can connect to
an IBM i using Kerberos authentication.
Thomas.
--
This is the Rational Developer for IBM i / Websphere Development
Studio Client for System i & iSeries (WDSCI-L) mailing list To post a
message email: WDSCI-L@xxxxxxxxxxxx To subscribe, unsubscribe, or
change list options,
visit: https://lists.midrange.com/mailman/listinfo/wdsci-l
or email: WDSCI-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at https://archive.midrange.com/wdsci-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.