You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Felipe Lolas (JIRA)" <ji...@apache.org> on 2016/09/03 16:54:21 UTC

[jira] [Created] (AIRFLOW-485) GenericTransfer Operator don't work with two Jdbc Hooks

Felipe Lolas created AIRFLOW-485:
------------------------------------

             Summary: GenericTransfer Operator don't work with two Jdbc Hooks
                 Key: AIRFLOW-485
                 URL: https://issues.apache.org/jira/browse/AIRFLOW-485
             Project: Apache Airflow
          Issue Type: Bug
          Components: operators
    Affects Versions: Airflow 1.7.0
            Reporter: Felipe Lolas
            Priority: Minor


If you use GenericTransfer with Jdbc Hook on destination and source connection, destination source don't find java classes:

[2016-09-03 16:52:15,544] {models.py:1219} INFO - Executing <Task(GenericTransfer): Carga_A_Teradata> on 2016-06-06 00:00:00
[2016-09-03 16:52:15,559] {base_hook.py:53} INFO - Using connection to: jdbc:mysql://192.168.1.63:5029
[2016-09-03 16:52:15,665] {generic_transfer.py:53} INFO - Extracting data from infobright_jdbc
[2016-09-03 16:52:15,666] {generic_transfer.py:54} INFO - Executing:
SELECT a,b,c,cast(d as CHAR),e,f FROM mysql.prueba_final2
[2016-09-03 16:52:15,668] {base_hook.py:53} INFO - Using connection to: jdbc:mysql://192.168.1.63:5029
[2016-09-03 16:52:15,947] {base_hook.py:53} INFO - Using connection to: jdbc:mysql://192.168.1.63:5029
[2016-09-03 16:52:15,989] {base_hook.py:53} INFO - Using connection to: jdbc:teradata://192.168.1.64/database=dbc,dbs_port=1025
[2016-09-03 16:52:15,989] {generic_transfer.py:63} INFO - Inserting rows into Teradata
[2016-09-03 16:52:15,991] {base_hook.py:53} INFO - Using connection to: jdbc:teradata://192.168.1.64/database=dbc,dbs_port=1025
[2016-09-03 16:52:15,992] {models.py:1286} ERROR - java.lang.RuntimeException: Class com.teradata.jdbc.TeraDriver not found
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/airflow/models.py", line 1245, in run
    result = task_copy.execute(context=context)
  File "/usr/local/lib/python2.7/dist-packages/airflow/operators/generic_transfer.py", line 64, in execute
    destination_hook.insert_rows(table=self.destination_table, rows=results)
  File "/usr/local/lib/python2.7/dist-packages/airflow/hooks/dbapi_hook.py", line 182, in insert_rows
    conn = self.get_conn()
  File "/usr/local/lib/python2.7/dist-packages/airflow/hooks/jdbc_hook.py", line 55, in get_conn
    jdbc_driver_loc,)
  File "/usr/local/lib/python2.7/dist-packages/jaydebeapi/__init__.py", line 359, in connect
    jconn = _jdbc_connect(jclassname, jars, libs, *driver_args)
  File "/usr/local/lib/python2.7/dist-packages/jaydebeapi/__init__.py", line 182, in _jdbc_connect_jpype
    jpype.JClass(jclassname)
  File "/usr/local/lib/python2.7/dist-packages/jpype/_jclass.py", line 55, in JClass
    raise _RUNTIMEEXCEPTION.PYEXC("Class %s not found" % name)
java.lang.RuntimeExceptionPyRaisable: java.lang.RuntimeException: Class com.teradata.jdbc.TeraDriver not found
[2016-09-03 16:52:15,993] {models.py:1298} INFO - Marking task as UP_FOR_RETRY
[2016-09-03 16:52:15,993] {models.py:1327} ERROR - java.lang.RuntimeException: Class com.teradata.jdbc.TeraDriver not found
Traceback (most recent call last):
  File "/usr/local/bin/airflow", line 15, in <module>
    args.func(args)
  File "/usr/local/lib/python2.7/dist-packages/airflow/bin/cli.py", line 352, in test
    ti.run(force=True, ignore_dependencies=True, test_mode=True)
  File "/usr/local/lib/python2.7/dist-packages/airflow/utils/db.py", line 53, in wrapper
    result = func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/airflow/models.py", line 1245, in run
    result = task_copy.execute(context=context)
  File "/usr/local/lib/python2.7/dist-packages/airflow/operators/generic_transfer.py", line 64, in execute
    destination_hook.insert_rows(table=self.destination_table, rows=results)
  File "/usr/local/lib/python2.7/dist-packages/airflow/hooks/dbapi_hook.py", line 182, in insert_rows
    conn = self.get_conn()
  File "/usr/local/lib/python2.7/dist-packages/airflow/hooks/jdbc_hook.py", line 55, in get_conn
    jdbc_driver_loc,)
  File "/usr/local/lib/python2.7/dist-packages/jaydebeapi/__init__.py", line 359, in connect
    jconn = _jdbc_connect(jclassname, jars, libs, *driver_args)
  File "/usr/local/lib/python2.7/dist-packages/jaydebeapi/__init__.py", line 182, in _jdbc_connect_jpype
    jpype.JClass(jclassname)
  File "/usr/local/lib/python2.7/dist-packages/jpype/_jclass.py", line 55, in JClass
    raise _RUNTIMEEXCEPTION.PYEXC("Class %s not found" % name)
jpype._jexception.RuntimeExceptionPyRaisable: java.lang.RuntimeException: Class com.teradata.jdbc.TeraDriver not found



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)