Jason-arm64 opened a new issue, #7352:
URL: https://github.com/apache/gravitino/issues/7352

   ### Version
   
   main branch
   
   ### Describe what's wrong
   
   flink 1.20.1
   gravitino 0.9.0
   
   ### Error message and/or stacktrace
   
   
org.apache.flink.shaded.netty4.io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)\n\tat
 
org.apache.flink.shaded.netty4.io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)\n\tat
 java.lang.Thread.run(Thread.java:750)\nCaused by: 
org.apache.flink.table.gateway.api.utils.SqlGatewayException: Failed to 
fetchResults.\n\tat 
org.apache.flink.table.gateway.service.SqlGatewayServiceImpl.fetchResults(SqlGatewayServiceImpl.java:231)\n\tat
 
org.apache.flink.table.gateway.rest.handler.statement.FetchResultsHandler.handleRequest(FetchResultsHandler.java:89)\n\t...
 48 more\nCaused by: 
org.apache.flink.table.gateway.service.utils.SqlExecutionException: Failed to 
execute the operation e5a75192-dbba-4b76-a0ff-fec7a6398c2e.\n\tat 
org.apache.flink.table.gateway.service.operation.OperationManager$Operation.processThrowable(OperationManager.java:414)\n\tat
 
org.apache.flink.table.gateway.service.operation.OperationManager$Operation.lambda$run
 $0(OperationManager.java:267)\n\tat 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)\n\tat 
java.util.concurrent.FutureTask.run(FutureTask.java:266)\n\tat 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)\n\tat 
java.util.concurrent.FutureTask.run(FutureTask.java:266)\n\tat 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\n\tat
 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\n\t...
 1 more\nCaused by: org.apache.flink.table.api.ValidationException: Unable to 
create catalog 'mysql_catalog'.\n\nCatalog options 
are:\n'base-url'='jdbc:mysql://localhost:3306/'\n'password'='******'\n'type'='gravitino-jdbc-mysql'\n'username'='sample'\n\tat
 
org.apache.flink.table.factories.FactoryUtil.createCatalog(FactoryUtil.java:517)\n\tat
 
org.apache.flink.table.catalog.CatalogManager.initCatalog(CatalogManager.java:376)\n\tat
 org.apache.flink.table.catalog.CatalogManager.lambda$getCatalog$0(CatalogMa
 nager.java:463)\n\tat java.util.Optional.map(Optional.java:215)\n\tat 
org.apache.flink.table.catalog.CatalogManager.getCatalog(CatalogManager.java:461)\n\tat
 
org.apache.flink.table.catalog.CatalogManager.getCatalogOrThrowException(CatalogManager.java:471)\n\tat
 
org.apache.flink.table.operations.ShowDatabasesOperation.execute(ShowDatabasesOperation.java:84)\n\tat
 
org.apache.flink.table.api.internal.TableEnvironmentImpl.executeInternal(TableEnvironmentImpl.java:1102)\n\tat
 
org.apache.flink.table.gateway.service.operation.OperationExecutor.callOperation(OperationExecutor.java:687)\n\tat
 
org.apache.flink.table.gateway.service.operation.OperationExecutor.executeOperation(OperationExecutor.java:522)\n\tat
 
org.apache.flink.table.gateway.service.operation.OperationExecutor.executeStatement(OperationExecutor.java:243)\n\tat
 
org.apache.flink.table.gateway.service.operation.OperationExecutor.executeStatement(OperationExecutor.java:199)\n\tat
 org.apache.flink.table.gateway.service.SqlGatewaySer
 viceImpl.lambda$executeStatement$1(SqlGatewayServiceImpl.java:214)\n\tat 
org.apache.flink.table.gateway.service.operation.OperationManager.lambda$submitOperation$1(OperationManager.java:119)\n\tat
 
org.apache.flink.table.gateway.service.operation.OperationManager$Operation.lambda$run$0(OperationManager.java:258)\n\t...
 7 more\nCaused by: java.lang.NullPointerException: default-database should not 
be null.\n\tat 
org.apache.flink.util.Preconditions.checkNotNull(Preconditions.java:76)\n\tat 
org.apache.gravitino.flink.connector.jdbc.GravitinoJdbcCatalogFactory.createCatalog(GravitinoJdbcCatalogFactory.java:48)\n\tat
 
org.apache.flink.table.factories.FactoryUtil.createCatalog(FactoryUtil.java:514)\n\t...
 21 more\n\nEnd of exception on server side>"]}(base) 
   
   ### How to reproduce
   
   1. Create mysql catalog in gravitino
   props : jdbc-driver, jdbc-url, jdbc-user, jdbc-password
   
   2. sql-gateway
   curl --request POST 
http://localhost:8084/v1/sessions/a8eea722-c202-4c9c-a92f-669fffea8fa9/statements/
 --data '{"statement": "use catalog mysql_catalog"}'   
   
   JdbcPropertiesConstants.java
   
       gravitinoToFlinkMap.put(GRAVITINO_JDBC_USER, FLINK_JDBC_USER);
       gravitinoToFlinkMap.put(GRAVITINO_JDBC_PASSWORD, FLINK_JDBC_PASSWORD);
   
   not have default-database.
   
   ### Additional context
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to