Thursday, March 28, 2013

Re: Issues with prepared statements using driver jar

On Wed, Mar 27, 2013 at 11:11 AM, Diwaker Gupta <diwaker@maginatics.com> wrote:
I'm using the instructions from: https://developers.google.com/cloud-sql/docs/external

I've already run the cmd line tool so there shouldn't be an authentication issue here. We have an application that runs fine against vanilla MySQL, AWS RDS and other MySQL variants. I'm trying to see if we can run into against Google Cloud SQL. As part of the initialization, we create a database and tables. This process fails against GC SQL with the following error:

java.sql.SQLException: This command is not supported in the prepared statement protocol yet


Do you have a mysqldump file?  You can upload that and import it.
 
Are there known gaps in the SQL Driver for prepared statements? Are these documented anywhere?

 
Finally, there are several usability issues with the SQL jar when using in other applications:

* It is not available in Maven Central. This will be an issue for almost any production JVM app out there.
* It bundles in various dependencies like jackson, apache commons codec etc. Without a proper pom.xml, this results in conflicts when bundling with applications that already use these dependencies. Worse when the conflicts are from multiple versions of the same dependency.
* Does not provide a META-INF/services/java.sql.Driver file in the jar. This necessitates old-school explicit registration via DriverManager.registerDriver instead of auto-loading supported by services.


Yes, we are aware that the jar file is difficult to use.  We're working hard to fix that.  Sorry for the difficulty in the meantime.

Ken
 

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment