Repository: incubator-sentry
Updated Branches:
  refs/heads/master c7f7fa57a -> 5743455f9


SENTRY-220: Trivial fix to SentrySchemaTool to set default driver (Sravya 
Tirukkovalur via Prasad Mujumdar)


Project: http://git-wip-us.apache.org/repos/asf/incubator-sentry/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-sentry/commit/5743455f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-sentry/tree/5743455f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-sentry/diff/5743455f

Branch: refs/heads/master
Commit: 5743455f99b400b0be6f75e5f0f753c2a044d86d
Parents: c7f7fa5
Author: Prasad Mujumdar <[email protected]>
Authored: Wed May 21 01:04:30 2014 -0700
Committer: Prasad Mujumdar <[email protected]>
Committed: Wed May 21 01:04:30 2014 -0700

----------------------------------------------------------------------
 .../org/apache/sentry/provider/db/tools/SentrySchemaTool.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/5743455f/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/tools/SentrySchemaTool.java
----------------------------------------------------------------------
diff --git 
a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/tools/SentrySchemaTool.java
 
b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/tools/SentrySchemaTool.java
index 1aa767e..0afb00f 100644
--- 
a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/tools/SentrySchemaTool.java
+++ 
b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/tools/SentrySchemaTool.java
@@ -87,7 +87,7 @@ public class SentrySchemaTool {
         ServiceConstants.ServerConfig.SENTRY_STORE_JDBC_PASS_DEFAULT);
     try {
       connectionURL = 
getValidConfVar(ServiceConstants.ServerConfig.SENTRY_STORE_JDBC_URL);
-      if(dbType == SentrySchemaHelper.DB_DERBY) {
+      if(dbType.equalsIgnoreCase(SentrySchemaHelper.DB_DERBY)) {
         driver = 
sentryConf.get(ServiceConstants.ServerConfig.SENTRY_STORE_JDBC_DRIVER,
             ServiceConstants.ServerConfig.SENTRY_STORE_JDBC_DRIVER_DEFAULT);
       } else {
@@ -96,7 +96,7 @@ public class SentrySchemaTool {
       // load required JDBC driver
       Class.forName(driver);
     } catch (IOException e) {
-      throw new SentryUserException("Missing property", e);
+      throw new SentryUserException("Missing property: " + e.getMessage());
     } catch (ClassNotFoundException e) {
       throw new SentryUserException("Failed to load driver", e);
     }

Reply via email to