Quantcast

Re: Mysql JDBC Driver : Parameter Metadata exceptions

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Mysql JDBC Driver : Parameter Metadata exceptions

Yago Díaz
I am seeing the same error when trying to use the jdbcbc with MySQL:

[#|2008-09-02T12:49:31.441+0200|WARNING|sun-appserver9.1|sun-jdbc-binding.com.sun.jbi.jdbcbc.JDBCDenormalizer|_ThreadID=47;_ThreadName=pool-5-thread-1;_RequestID=a32ddeb8-3ffe-4cb8-8c5e-c747b83c33d6;|Driver Does not support getting the Parameter Metadata
java.sql.SQLException: Parameter metadata not available for the given statement
   at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1056)
   at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:957)
   at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927)
   at com.mysql.jdbc.MysqlParameterMetadata.checkAvailable(MysqlParameterMetadata.java:68)
   at com.mysql.jdbc.MysqlParameterMetadata.getParameterType(MysqlParameterMetadata.java:117)
   at com.sun.jbi.jdbcbc.JDBCDenormalizer.populatePreparedStatement(JDBCDenormalizer.java:332)
   at com.sun.jbi.jdbcbc.JDBCDenormalizer.denormalizeOutbound(JDBCDenormalizer.java:112)
   at com.sun.jbi.jdbcbc.OutboundMessageProcessor.executeOutboundSQL(OutboundMessageProcessor.java:997)
   at com.sun.jbi.jdbcbc.OutboundMessageProcessor.processInOut(OutboundMessageProcessor.java:467)
   at com.sun.jbi.jdbcbc.OutboundMessageProcessor.execute(OutboundMessageProcessor.java:247)
   at com.sun.jbi.jdbcbc.OutboundMessageProcessor.run(OutboundMessageProcessor.java:155)
   at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
   at java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:573)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:570)
   at java.lang.Thread.run(Thread.java:637)
|#]

In my scenario:
MySQL-5.1.26
JDBC Driver: mysql-connector 5.1.5 (5.1.6 has a bug that prevents from using it with Mural)

And my table:

mysql> desc javaonepolls;
+------------------------+---------------+------+-----+---------+----------------+
| Field                  | Type          | Null | Key | Default | Extra          |
+------------------------+---------------+------+-----+---------+----------------+
| REC_ID                 | int(5)        | NO   | PRI | NULL    | auto_increment | 
| USERNAME               | varchar(50)   | NO   |     | NULL    |                | 
| USER_CONTINENT         | varchar(50)   | NO   |     | NULL    |                | 
| USER_INDUSTRY          | varchar(50)   | YES  |     | NULL    |                | 
| USER_TECH              | varchar(50)   | YES  |     | NULL    |                | 
| USER_SOA_EXP           | varchar(50)   | YES  |     | NULL    |                | 
| JAVAONE_TECH_INTEREST  | varchar(1000) | YES  |     | NULL    |                | 
| JAVAONE_TECH_RATING    | varchar(20)   | YES  |     | NULL    |                | 
| JAVAONE_VENUE_RATING   | varchar(50)   | YES  |     | NULL    |                | 
| JAVAONE_WEATHER_RATING | varchar(50)   | YES  |     | NULL    |                | 
| JAVAONE_PREF_VENUE     | varchar(100)  | YES  |     | NULL    |                | 
+------------------------+---------------+------+-----+---------+----------------+



I get a warning for every column on the table, the app still works, but you get the warning.

I can provide more testing if needed.
Thanks,
.y



El 24/08/2008, a las 17:29, Narayana Rallabandi escribió:

Hi,

I could successfully use the MySQL with JDBC BC/ SQL SE,

I used the following setup:
  • MySQL Server 6.0
  • mysql-connector-java-5.1.5
Preparestatement metadata is supported by MySQL connector for java and incidentally they also support JDBC 4.0 and xml syntax for queries.

Thanks,
--Narayanaa

Andy Knight wrote:
Have you used an older driver? Did the same thing happen? What is the column type for KEY?

Andy Knight
Principal Engineer, Field Assist Support Team
Sun Microsystems, Inc.
Java House, Guillemont Park, Minley Road, Blackwater
Camberley, Surrey GU17 9QG United Kingdom
Home office: +44 1494 462438
Mobile: +44 7775 583415
Skype: aprknight
Email: [hidden email]

On 24 Aug 2008, at 11:51, Sébastien Stormacq wrote:

Hello,

I am using the latest MySQL JDBC driver together with  JDBC BC
For each parametrized statement I use (like select * from TABLE where KEY = ?) I receive an exception in the Glassfish log file

[#|2008-08-24T12:43:24.130+0200|WARNING|sun-appserver9.1|sun-jdbc-binding.com.sun.jbi.jdbcbc.JDBCDenormalizer|_ThreadID=48;_ThreadName=pool-5-thread-3;Context=context;_RequestID=aedba79e-3f4b-455d-a4da-b1a2bc53aeef;|Driver Does not support getting the Parameter Metadata
java.sql.SQLException: Parameter metadata not available for the given statement
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1056)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:957)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927)
at com.mysql.jdbc.MysqlParameterMetadata.checkAvailable(MysqlParameterMetadata.java:68)
at com.mysql.jdbc.MysqlParameterMetadata.getParameterType(MysqlParameterMetadata.java:117)
at com.sun.jbi.jdbcbc.JDBCDenormalizer.populatePreparedStatement(JDBCDenormalizer.java:332)
at com.sun.jbi.jdbcbc.JDBCDenormalizer.denormalizeOutbound(JDBCDenormalizer.java:112)
at com.sun.jbi.jdbcbc.OutboundMessageProcessor.executeOutboundSQL(OutboundMessageProcessor.java:997)
at com.sun.jbi.jdbcbc.OutboundMessageProcessor.processInOnly(OutboundMessageProcessor.java:890)
at com.sun.jbi.jdbcbc.OutboundMessageProcessor.execute(OutboundMessageProcessor.java:264)
at com.sun.jbi.jdbcbc.OutboundMessageProcessor.run(OutboundMessageProcessor.java:155)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:573)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:570)
at java.lang.Thread.run(Thread.java:637)

There is no error, all the process is working correctly, this is just a annoying warning that clutters my log file

I traced this down to the method populatePreparedStatement of class com.sun.jbi.jdbcbc.JDBCDenormalizer
Should this really be a warning (as everything seems to work normally) ?  Or should I use another MySQL JDBC driver ?

Thanks

Seb

---
Sébastien Stormacq
Senior Software Architect
GSS Software Practice,
Sun Microsystems Luxembourg




Loading...