Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Java] [Flight] NullPointerException when trust store password not specified on Linux #15274

Closed
mumblepins opened this issue Jan 9, 2023 · 0 comments · Fixed by #15276
Closed

Comments

@mumblepins
Copy link
Contributor

Describe the bug, including details regarding any error messages, version, and platform.

When using the Flight JDBC driver on Linux (JDBC version 10.0.0, Ubuntu 22.04, using DBeaver 22.3.2 as the JDBC GUI) with a secure endpoint, a NullPointerException is thrown.

NullPointerException
java.lang.NullPointerException
        at org.apache.arrow.driver.jdbc.client.utils.ClientAuthenticationUtils.getCertificateInputStreamFromSystem(ClientAuthenticationUtils.java:163)
        at org.apache.arrow.driver.jdbc.client.ArrowFlightSqlClientHandler$Builder.build(ArrowFlightSqlClientHandler.java:564)
        at org.apache.arrow.driver.jdbc.ArrowFlightConnection.createNewClientHandler(ArrowFlightConnection.java:109)
        at org.apache.arrow.driver.jdbc.ArrowFlightConnection.createNewConnection(ArrowFlightConnection.java:88)
        at org.apache.arrow.driver.jdbc.ArrowFlightJdbcDriver.connect(ArrowFlightJdbcDriver.java:80)
        at org.apache.arrow.driver.jdbc.ArrowFlightJdbcDriver.connect(ArrowFlightJdbcDriver.java:48)
        at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.lambda$0(JDBCDataSource.java:206)
        at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.lambda$1(JDBCDataSource.java:225)
        at org.jkiss.dbeaver.utils.SecurityManagerUtils.wrapDriverActions(SecurityManagerUtils.java:96)
        at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.openConnection(JDBCDataSource.java:223)
        at org.jkiss.dbeaver.ext.generic.model.GenericDataSource.openConnection(GenericDataSource.java:143)
        at org.jkiss.dbeaver.model.impl.jdbc.JDBCExecutionContext.connect(JDBCExecutionContext.java:103)
        at org.jkiss.dbeaver.model.impl.jdbc.JDBCRemoteInstance.initializeMainContext(JDBCRemoteInstance.java:102)
        at org.jkiss.dbeaver.model.impl.jdbc.JDBCRemoteInstance.<init>(JDBCRemoteInstance.java:61)
        at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.initializeRemoteInstance(JDBCDataSource.java:128)
        at org.jkiss.dbeaver.ext.generic.model.GenericDataSource.<init>(GenericDataSource.java:109)
        at org.jkiss.dbeaver.ext.generic.model.meta.GenericMetaModel.createDataSourceImpl(GenericMetaModel.java:91)
        at org.jkiss.dbeaver.ext.generic.GenericDataSourceProvider.openDataSource(GenericDataSourceProvider.java:106)
        at org.jkiss.dbeaver.registry.DataSourceDescriptor.openDataSource(DataSourceDescriptor.java:1159)
        at org.jkiss.dbeaver.registry.DataSourceDescriptor.connect(DataSourceDescriptor.java:1028)
        at org.jkiss.dbeaver.runtime.jobs.ConnectJob.run(ConnectJob.java:70)
        at org.jkiss.dbeaver.runtime.jobs.ConnectionTestJob.run(ConnectionTestJob.java:103)
        at org.jkiss.dbeaver.model.runtime.AbstractJob.run(AbstractJob.java:105)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

It seems to be caused by the driver requiring a trust store password on Linux, even though that shouldn't be required. A workaround that seems to work is specifying the connection URI as jdbc:arrow-flight://<SERVER.NAME>:32010/?trustStorePassword=changeit

Component(s)

FlightRPC, Java

lidavidm pushed a commit that referenced this issue Jan 13, 2023
Fixes #15274 by handling trust store passwords that are null.
* Closes: #15274

Authored-by: Daniel Sullivan <daniel.j.sullivan@state.mn.us>
Signed-off-by: David Li <li.davidm96@gmail.com>
@lidavidm lidavidm added this to the 11.0.0 milestone Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants