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

[KYUUBI #6291] Avoid NPE in MySQLErrPacket #6292

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion kyuubi-server/src/main/resources/dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
<title>Apache Kyuubi Dashboard</title>
</head>
<body>
<div>This is a dummy page for development.</div>
<h2 style="text-align: center;">🙁 The Web UI is currently unavailable.</h2>
<h4 style="text-align: center;">👉 To enable Web UI, `--web-ui` is required when using `build/dist` tool to create binary distributions, e.g.</h4>
<pre style="text-align: center;"><code class="language-shell">
./build/dist --tgz --web-ui --spark-provided --flink-provided --hive-provided
</code></pre>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ object MySQLErrPacket {
case kse: KyuubiSQLException if kse.getCause != null =>
// prefer brief nested error message instead of whole stacktrace
apply(kse.getCause)
case e: Exception if e.getMessage contains "NoSuchDatabaseException" =>
case e: Exception
if e.getMessage != null && e.getMessage.contains("NoSuchDatabaseException") =>
MySQLErrPacket(1, MySQLErrorCode.ER_BAD_DB_ERROR, cause.getMessage)
case se: SQLException if se.getSQLState == null =>
MySQLErrPacket(1, MySQLErrorCode.ER_INTERNAL_ERROR, cause.getMessage)
Expand Down
Loading