簡體   English   中英

POSTGRESQL JDBC錯誤無法從支持的錯誤重新創建異常:java.io.IOException:JDBC錯誤

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

我正在嘗試運行豬腳本

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(?,?,?)');

我從蜂巢中獲取數據,但無法寫入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 -這是您的錯誤。

請記住,根據經驗,在Java堆棧strace中,最后一個Caused By:子句是最相關的異常。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM