完整日志乳如下:


Traceback (most recent call last):

  File 
"/Users/bjhl/PycharmProjects/flink-example/com.baijiahulian/connecthive/HiveTest.py",
 line 26, in <module>

    t_env.register_catalog("default", hive_catalog)

  File 
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pyflink/table/table_environment.py",
 line 133, in register_catalog

    self._j_tenv.registerCatalog(catalog_name, catalog._j_catalog)

  File 
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/py4j/java_gateway.py",
 line 1286, in __call__

    answer, self.gateway_client, self.target_id, self.name)

  File 
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pyflink/util/exceptions.py",
 line 147, in deco

    return f(*a, **kw)

  File 
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/py4j/protocol.py",
 line 332, in get_return_value

    format(target_id, ".", name), value)

py4j.protocol.Py4JJavaError: An error occurred while calling 
o10.registerCatalog.

: java.lang.NullPointerException

at org.apache.hadoop.util.StringUtils.stringifyException(StringUtils.java:90)

at 
org.apache.hadoop.hive.metastore.HiveMetaStoreClient.open(HiveMetaStoreClient.java:512)

at 
org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:244)

at 
org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:187)

at 
org.apache.flink.table.catalog.hive.client.HiveShimV100.getHiveMetastoreClient(HiveShimV100.java:97)

at 
org.apache.flink.table.catalog.hive.client.HiveMetastoreClientWrapper.createMetastoreClient(HiveMetastoreClientWrapper.java:240)

at 
org.apache.flink.table.catalog.hive.client.HiveMetastoreClientWrapper.<init>(HiveMetastoreClientWrapper.java:71)

at 
org.apache.flink.table.catalog.hive.client.HiveMetastoreClientFactory.create(HiveMetastoreClientFactory.java:35)

at org.apache.flink.table.catalog.hive.HiveCatalog.open(HiveCatalog.java:223)

at 
org.apache.flink.table.catalog.CatalogManager.registerCatalog(CatalogManager.java:191)

at 
org.apache.flink.table.api.internal.TableEnvironmentImpl.registerCatalog(TableEnvironmentImpl.java:337)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at 
org.apache.flink.api.python.shaded.py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244)

at 
org.apache.flink.api.python.shaded.py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)

at org.apache.flink.api.python.shaded.py4j.Gateway.invoke(Gateway.java:282)

at 
org.apache.flink.api.python.shaded.py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)

at 
org.apache.flink.api.python.shaded.py4j.commands.CallCommand.execute(CallCommand.java:79)

at 
org.apache.flink.api.python.shaded.py4j.GatewayConnection.run(GatewayConnection.java:238)

at java.lang.Thread.run(Thread.java:748)














在 2020-09-03 16:15:30,"Dian Fu" <dian0511...@gmail.com> 写道:
>有更完整的log吗?
>
>> 在 2020年9月3日,下午4:12,程龙 <13162790...@163.com> 写道:
>> 
>> 使用hivecatalog连接 抱一下错误
>> 
>> 
>> 
>> 
>> flink py4j.protocol.Py4JJavaError: An error occurred while calling 
>> o10.registerCatalog. : java.lang.NullPointerException

回复