LCHCAPITALHUMAIN / starschema-bigquery-jdbc

Automatically exported from code.google.com/p/starschema-bigquery-jdbc
0 stars 0 forks source link

Not implemented.clearWarnings or Parameters are not set error #12

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem ?

I am trying to access BigQuery using JDBC Driver bqjdbc-1.4.jar from Data 
Virtualization technology that supports Generic JDBC to use any third-party 
JDBC drivers but getting below errors when i try to run any queries.

1. Caused by: net.starschema.clouddb.jdbc.BQSQLException: Not 
implemented.clearWarnings()
    at net.starschema.clouddb.jdbc.BQStatementRoot.clearWarnings(BQStatementRoot.java:139)
    at org.jboss.resource.adapter.jdbc.WrappedStatement.clearWarnings(WrappedStatement.java:208)
    at org.teiid.translator.jdbc.JDBCBaseExecution.addStatementWarnings(JDBCBaseExecution.java:212)
    at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:88)

2.  Caused by: net.starschema.clouddb.jdbc.BQSQLException: Parameters are not 
set
     at net.starschema.clouddb.jdbc.BQPreparedStatement.executeQuery(BQPreparedStatement.java:241)
     at  org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:342)
    at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:86)

The OS is RHEL 6.3.  Is there any other specific settings / configuration that 
need to be done to use this JDBC Driver bqjdbc-1.4.jar ?

Original issue reported on code.google.com by m...@gene.com on 21 Aug 2014 at 7:30

GoogleCodeExporter commented 9 years ago
Not every program uses JDBC the same way. Could you be a bit more specific 
please?

I'd like to know 
 the program name you used
 the SQl that you've tried to run (there should be a bunch of ? in it)

Regarding the errors:
1st: clearWarnings() is because it wasn't implemented nor any of the warnings
2nd: for this we really need to see / understand how was it called, it seems 
that it tries to create a preparedStatment instead of a normal statement, or 
your query has a ? somewhere. (Maybe you've tried to do something like WHERE 
columnA = ? AND columnB LIKE '%Hello?%' )

Original comment by gunic...@gmail.com on 21 Aug 2014 at 8:30

GoogleCodeExporter commented 9 years ago
Thanks for the quick reply.   I am using RedHat JBoss Enterprise Data Services 
(EDS) platform and running really simple SQL statement without any where clause 
or without using ? in any part of SQL statement.

SELECT * FROM [schemaname.gplus_user] LIMIT 1000;

I tried with both preparedStatment or normal statement by setting "Use Bind 
Variables" property for connection to false / true.

Original comment by m...@gene.com on 21 Aug 2014 at 8:56

GoogleCodeExporter commented 9 years ago
UseBindVariables:   true to indicate that PreparedStatements should be used and 
that literal values in the source query should be replace with bind variables. 
If false only LOB values will trigger the use of PreparedStatements.

Original comment by m...@gene.com on 21 Aug 2014 at 9:02