You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2018/07/12 23:41:02 UTC

[GitHub] GlobularMass opened a new issue #5386: java.lang.RuntimeException: Class com.amazonaws.athena.jdbc.AthenaDriver not found

GlobularMass opened a new issue #5386: java.lang.RuntimeException: Class com.amazonaws.athena.jdbc.AthenaDriver not found
URL: https://github.com/apache/incubator-superset/issues/5386
 
 
   Make sure these boxes are checked before submitting your issue - thank you!
   
   - [x] I have checked the superset logs for python stacktraces and included it here as text if any
   - [x] I have reproduced the issue with at least the latest released version of superset
   - [x] I have checked the issue tracker for the same issue and I haven't found one similar
   Similar to issue  #5166 but happening on test connection and all the time, not intermittently
   
   ### Superset version
   0.26.3
   
   ### Python version
   Python 3.6.4
   
   ### Mac OS version
   10.13.4
   
   ### Java version
   1.8.0_172
   
   ### Expected results
   Trying to successfully add an Athena database source on Mac OS 10.13.4.  Followed instructions at https://superset.incubator.apache.org/installation.html for setup.
   
   ### Actual results
   On clicking Test Connection I get an error that the jdbc AthenaDriver is not found:
   
   > 2018-07-12 15:57:33,065:ERROR:root:java.lang.RuntimeException: Class com.amazonaws.athena.jdbc.AthenaDriver not found
   Traceback (most recent call last):
     File "\~/VirtualPy/superset/lib/python3.6/site-packages/superset/views/core.py", line 1683, in testconn
       engine.connect()
     File "\~/VirtualPy/superset/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 2102, in connect
       return self._connection_cls(self, **kwargs)
     File "\~/VirtualPy/superset/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 90, in \_\_init\_\_
       if connection is not None else engine.raw_connection()
     File "\~/VirtualPy/superset/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 2188, in raw_connection
       self.pool.unique_connection, \_connection)
     File "\~/VirtualPy/superset/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 2158, in \_wrap\_pool\_connect
       return fn()
     File "\~/VirtualPy/superset/lib/python3.6/site-packages/sqlalchemy/pool.py", line 345, in unique\_connection
       return \_ConnectionFairy.\_checkout(self)
     File "\~/VirtualPy/superset/lib/python3.6/site-packages/sqlalchemy/pool.py", line 791, in \_checkout
       fairy = \_ConnectionRecord.checkout(pool)
     File "\~/VirtualPy/superset/lib/python3.6/site-packages/sqlalchemy/pool.py", line 532, in checkout
       rec = pool.\_do\_get()
     File "\~/VirtualPy/superset/lib/python3.6/site-packages/sqlalchemy/pool.py", line 1196, in \_do\_get
       self.\_dec\_overflow()
     File "\~/VirtualPy/superset/lib/python3.6/site-packages/sqlalchemy/util/langhelpers.py", line 66, in \_\_exit\_\_
       compat.reraise(exc\_type, exc\_value, exc\_tb)
     File "\~/VirtualPy/superset/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 249, in reraise
       raise value
     File "\~/VirtualPy/superset/lib/python3.6/site-packages/sqlalchemy/pool.py", line 1193, in \_do\_get
       return self.\_create\_connection()
     File "\~/VirtualPy/superset/lib/python3.6/site-packages/sqlalchemy/pool.py", line 350, in \_create\_connection
       return \_ConnectionRecord(self)
     File "\~/VirtualPy/superset/lib/python3.6/site-packages/sqlalchemy/pool.py", line 477, in \_\_init\_\_
       self.\_\_connect(first\_connect\_check=True)
     File "\~/VirtualPy/superset/lib/python3.6/site-packages/sqlalchemy/pool.py", line 674, in \_\_connect
       connection = pool.\_invoke\_creator(self)
     File "\~/VirtualPy/superset/lib/python3.6/site-packages/sqlalchemy/engine/strategies.py", line 106, in connect
       return dialect.connect(*cargs, **cparams)
     File "\~/VirtualPy/superset/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 412, in connect
       return self.dbapi.connect(*cargs, **cparams)
     File "\~/VirtualPy/superset/lib/python3.6/site-packages/pyathenajdbc/\_\_init\_\_.py", line 66, in connect
       driver\_path, **kwargs)
     File "\~/VirtualPy/superset/lib/python3.6/site-packages/pyathenajdbc/connection.py", line 71, in \_\_init\_\_
       jpype.JClass(ATHENA\_DRIVER\_CLASS\_NAME)
     File "\~/VirtualPy/superset/lib/python3.6/site-packages/jpype/\_jclass.py", line 73, in JClass
       raise _RUNTIMEEXCEPTION.PYEXC("Class %s not found" % name)
   jpype.\_jexception.java.lang.RuntimeExceptionPyRaisable: java.lang.RuntimeException: Class com.amazonaws.athena.jdbc.AthenaDriver not found
   
   
   ### Steps to reproduce
   
   1. Create a virtual python environment: `python3 -m venv \~/VirtualPy/superset`
   2. Activate virtual env: `source \~/VirtualPy/superset/bin/activate`
   3. Upgrade pip: `pip install --upgrade setuptools pip`
   4. Install superset: `pip install superset`
   5. Create admin user: `fabmanager create-admin --app superset`
   6. Initialize the database: `superset db upgrade`
   7. Create default roles: `superset init`
   8. Install Postgres driver: `pip install psycopg2`
   9. Install Athena driver: `pip install "PyAthenaJDBC>1.0.9"`
   10. Start the webserver: `superset runserver -d`
   11. In Chrome I navigate to http://localhost:8088/databaseview/add and set the SqlAlchemy URI to (sensitive values redacted): `awsathena+jdbc://****:****@athena.us-east-1.amazonaws.com/my_database?s3_staging_dir=s3%3A//my_bucket/athena`
   12. Click the Test Connection link
   
   ### Note
   The superset runserver log prior to the error shows:
   > (superset) Justins-MBP:superset myuser\$ superset runserver -d
   \~/VirtualPy/superset/lib/python3.6/site-packages/psycopg2/\_\_init\_\_.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>.
     """)
   -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
   Starting Superset server in DEBUG mode
   -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
   
   > 2018-07-12 16:14:13,789:INFO:werkzeug: * Running on http://0.0.0.0:8088/ (Press CTRL+C to quit)
   2018-07-12 16:14:13,790:INFO:werkzeug: * Restarting with stat
   \~/VirtualPy/superset/lib/python3.6/site-packages/psycopg2/\_\_init\_\_.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>.
     """)
   -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
   Starting Superset server in DEBUG mode
   -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
   
   > 2018-07-12 16:14:16,348:WARNING:werkzeug: * Debugger is active!
   2018-07-12 16:14:16,365:INFO:werkzeug: * Debugger PIN: 297-285-360
   2018-07-12 16:14:37,258:DEBUG:botocore.session:Setting config variable for region to 'us-east-1'
   2018-07-12 16:14:37,258:DEBUG:botocore.session:Loading variable profile from defaults.
   2018-07-12 16:14:37,258:DEBUG:botocore.session:Loading variable region from instance vars with value 'us-east-1'.
   2018-07-12 16:14:37,289:DEBUG:pyathenajdbc.connection:JVM path: /System/Library/Frameworks/JavaVM.framework/JavaVM
   2018-07-12 16:14:37,289:DEBUG:pyathenajdbc.connection:JVM args: ['-server', '-Djava.class.path=\~/VirtualPy/superset/lib/python3.6/site-packages/pyathenajdbc/AthenaJDBC41-1.1.0.jar']
   
   And the results of `ls -l \~/VirtualPy/superset/lib/python3.6/site-packages/pyathenajdbc/AthenaJDBC41-1.1.0.jar`
   -rw-r--r--  1 myuser  staff  11074334 Jul 11 21:09 \~/VirtualPy/superset/lib/python3.6/site-packages/pyathenajdbc/AthenaJDBC41-1.1.0.jar
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org