dyrnq / cdc-vagrant

CDC(Change Data Capture) is made up of two components, the CDD and the CDT. CDD is stand for Change Data Detection and CDT is stand for Change Data Transfer.
https://nightlies.apache.org/flink/flink-cdc-docs-stable/
0 stars 0 forks source link

Exception in thread "main" java.lang.RuntimeException: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '=' (code 61); expected a semi-colon after the reference for entity 'useSSL' #27

Open dyrnq opened 1 year ago

dyrnq commented 1 year ago
Exception in thread "main" java.lang.RuntimeException: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '=' (code 61); expected a semi-colon after the reference for entity 'useSSL'
 at [row,col,system-id]: [22,87,"file:/opt/hive/conf/hive-site.xml"]
    at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:3092)
    at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:3041)
    at org.apache.hadoop.conf.Configuration.loadProps(Configuration.java:2914)
    at org.apache.hadoop.conf.Configuration.addResourceObject(Configuration.java:1034)
    at org.apache.hadoop.conf.Configuration.addResource(Configuration.java:939)
    at org.apache.hadoop.hive.conf.HiveConf.initialize(HiveConf.java:5154)
    at org.apache.hadoop.hive.conf.HiveConf.<init>(HiveConf.java:5107)
    at org.apache.hive.beeline.HiveSchemaTool.<init>(HiveSchemaTool.java:96)
    at org.apache.hive.beeline.HiveSchemaTool.main(HiveSchemaTool.java:1473)
    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.hadoop.util.RunJar.run(RunJar.java:323)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:236)
Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '=' (code 61); expected a semi-colon after the reference for entity 'useSSL'
 at [row,col,system-id]: [22,87,"file:/opt/hive/conf/hive-site.xml"]
    at com.ctc.wstx.sr.StreamScanner.throwUnexpectedChar(StreamScanner.java:666)
    at com.ctc.wstx.sr.StreamScanner.parseEntityName(StreamScanner.java:2080)
    at com.ctc.wstx.sr.StreamScanner.fullyResolveEntity(StreamScanner.java:1538)
    at com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2818)
    at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1121)
    at org.apache.hadoop.conf.Configuration$Parser.parseNext(Configuration.java:3396)
    at org.apache.hadoop.conf.Configuration$Parser.parse(Configuration.java:3182)
    at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:3075)
    ... 14 more
org.apache.hadoop.hive.metastore.HiveMetaException: Failed to load driver
Underlying cause: java.lang.ClassNotFoundException : com.mysql.jdbc.Driver
org.apache.hadoop.hive.metastore.HiveMetaException: Failed to load driver
    at org.apache.hadoop.hive.metastore.tools.HiveSchemaHelper.getConnectionToMetastore(HiveSchemaHelper.java:97)
    at org.apache.hive.beeline.HiveSchemaTool.getConnectionToMetastore(HiveSchemaTool.java:169)
    at org.apache.hive.beeline.HiveSchemaTool.testConnectionToMetastore(HiveSchemaTool.java:475)
    at org.apache.hive.beeline.HiveSchemaTool.doInit(HiveSchemaTool.java:581)
    at org.apache.hive.beeline.HiveSchemaTool.doInit(HiveSchemaTool.java:567)
    at org.apache.hive.beeline.HiveSchemaTool.main(HiveSchemaTool.java:1517)
    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.hadoop.util.RunJar.run(RunJar.java:323)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:236)
Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
    at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:264)
    at org.apache.hadoop.hive.metastore.tools.HiveSchemaHelper.getConnectionToMetastore(HiveSchemaHelper.java:85)
    ... 11 more
NnWan38 commented 2 days ago

so how address this problem?

dyrnq commented 2 days ago

hive-site.xml

  <property>
    <name>javax.jdo.option.ConnectionURL</name>
    <value>jdbc:mysql://your-mysql-ip:3306/metastore_db?characterEncoding=utf-8&amp;useSSL=false&amp;autoReconnect=true</value>
  </property>