question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Presto jdbc interface error "QueryError: JavaObject object is not an iterator"

See original GitHub issue

Is the issue already present in https://github.com/cloudera/hue/issues or discussed in the forum https://discourse.gethue.com?

  • No

What is the Hue version or source? (e.g. open source 4.5, CDH 5.16, CDP 1.0…)

  • open source 4.6

Is there a way to help reproduce it?

  • Use jdbc interface in Hue 4.6.0 with conf like following
[[[presto]]]
      interface = jdbc
      name = Presto
      options = '{"url": "jdbc:presto://...:8889/hive/default", "driver": "com.facebook.presto.jdbc.PrestoDriver", "user":"root","password":""}'

When opening the editor, the page shows “JavaObject object is not an iterator” on the left upper corner. Error log:

[05/Mar/2020 14:49:14 -0800] decorators   ERROR    Error running autocomplete
Traceback (most recent call last):
  File "/usr/lib/hue/desktop/libs/notebook/src/notebook/decorators.py", line 111, in wrapper
    return f(*args, **kwargs)
  File "/usr/lib/hue/desktop/libs/notebook/src/notebook/api.py", line 694, in autocomplete
    autocomplete_data = get_api(request, snippet).autocomplete(snippet, database, table, column, nested)
  File "/usr/lib/hue/desktop/libs/notebook/src/notebook/connectors/jdbc.py", line 41, in decorator
    return func(*args, **kwargs)
  File "/usr/lib/hue/desktop/libs/notebook/src/notebook/connectors/jdbc.py", line 153, in autocomplete
    response['databases'] = assist.get_databases()
  File "/usr/lib/hue/desktop/libs/notebook/src/notebook/connectors/jdbc.py", line 204, in get_databases
    dbs, description = query_and_fetch(self.db, 'SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA')
  File "/usr/lib/hue/desktop/libs/librdbms/src/librdbms/jdbc.py", line 45, in query_and_fetch
    data = curs.fetchmany(n)
  File "/usr/lib/hue/desktop/libs/librdbms/src/librdbms/jdbc.py", line 135, in fetchmany
    while next(self.rs) and (n is None or n > 0):
QueryError: JavaObject object is not an iterator

Seems like this commit for HUE-8737 changes python2 .next() to python3 next() is the cause.

I do find sqlalchemy is the recommended interface by Hue and it works when I switched, but just would like to know if this is a common issue for jdbc interface or I miss something in my configurations or patchs.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
luyuanhaocommented, Apr 23, 2020

@alanlyh would you have time to send a PR?

Sure. I can work on a PR. Should be a quick fix.

0reactions
romainrcommented, Apr 24, 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

Error executing query in Java code to connect to Presto
It is quite old question but it might be still relevant. You are trying connect to trino with presto jdbc driver. PrestoSQL was...
Read more >
Solved: config presto on hue ,can not create session
[notebook] [[interpreters]] [[[presto]]] name=Presto JDBC interface=jdbc options='{"url": "jdbc:presto://172.31.17.252:9080/", ...
Read more >
vocab.txt - Hugging Face
... ##per do object dict ##ace ##atch ##pon ur ##oun ##ifi sc option kwar ##ase inf np ##ly kwargs ##ore up ##orm ##iv...
Read more >
2021年08月_weixin_39747568的博客_CSDN博客
2021-01-11. Presto jdbc interface error "QueryError: JavaObject object is not an iterator". 2021-01-11. Correct the SparkSQL hiveserver2 fix in PR-1287.
Read more >
Data Science 2015 | PDF | Machine Learning | Statistics - Scribd
In putting visual analysis to work on big data, it is not obvious what ... a mttip implementation or a “hand-coded” projection on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found