简体   繁体   English

POSTGRESQL JDBC错误无法从支持的错误重新创建异常:java.io.IOException:JDBC错误

[英]POSTGRESQL JDBC Error Unable to recreate exception from backed error: java.io.IOException: JDBC Error

I am trying to run a pig script 我正在尝试运行猪脚本

register 'hdfs://localhost:8020/user/pig/jars/postgresql-9.3-1100.jdbc4.jar';
register 'hdfs://localhost:8020/user/pig/jars/piggybank.jar';
a = load 'hdfs://localhost:8020/user/hive/warehouse/outage' USING PigStorage(',') AS (no:int, name:chararray, age:int);
STORE a INTO 'test' USING org.apache.pig.piggybank.storage.DBStorage('org.postgresql.Driver','jdbc:postgresql://127.0.0.1:5432/hivedata','postgres','123','INSERT INTO test (no, name, age)values(?,?,?)');

I am getting the data from hive but cannot write to postgresql 我从蜂巢中获取数据,但无法写入PostgreSQL

ERROR org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.Launcher - Backend     error message
java.io.IOException: java.lang.RuntimeException: JDBC error

database "hivedata" does not exist - here's your error. database "hivedata" does not exist -这是您的错误。

Remember that as a rule of thumb, in Java stack straces the last Caused By: clause is the most relevant exception. 请记住,根据经验,在Java堆栈strace中,最后一个Caused By:子句是最相关的异常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM