MySQL and JDBC Driver

What is the proper IS 6.1 directory to place the MySQL JDBC driver? What is the proper way to add the MySQL jar file to the CLASSPATH - is it done automatically? For both of these questions, how should it be done to prevent any configuration impact to the built-in JDBC driver?

Third-party jars are added to the IS classpath by copying them to the webm_home\IntegrationServer\lib\jars folder and restarting the server. If a jar is only needed within the scope of a single package it can be copied into that package’s code\jars folder.

See the IS Administrator’s Guide for additional details.

Mark

Hi Mark, Which jars did you add?

I tryed this one : mysql-connector-java-3.0.17-ga-bin.jar ( IntegrationServer\lib\jars ) and did not work…

Thanks

Can you provide more specifics of how it “did not work?”

Error :
The JDBC DataSource class "com.mysql.jdbc.Driver " cannot be located. com/mysql/jdbc/Driver

I also tried the folder IntegrationServer\packages\WmJDBCAdapter

And I tried to just copy the subfolders com/org to this ones…

I was a linux developer, and I don´t know how to install this driver on win…:confused: At least the connector to MSSQL is working… :kiss:

Is it necessary to have the Java SEDevelopment installed?

Thks

When you click on the “About” link in the Integration Server Administrator, do you see the file “mysql-connector-java-3.0.17-ga-bin.jar” listed in the classpath? If not, confirm that the file is indeed present in the \IntegrationServer\lib\jars folder and restart your IS.

Mark

Yeah, I see this file in the Classpath, but I still have the same error message…

Looks like you have a trailing space in your driver class name. Probably from a cut-and-paste.

"com.mysql.jdbc.Driver "

Mark

OK, I removed the space and now I get another error message :

[ART.118.5042] Adapter Runtime (Connection): Unable to enable connection resource Mysql:Mysql.
[ART.118.5036] Adapter Runtime (Connection): Unable to configure connection manager.
null

What is that… “null” ?

I still don´t know why…

But I solved this problem by changing the DataSource Class from com.mysql.jdbc.Driver to com.mysql.jdbc.jdbc2.optional.MysqlDataSource

Thanks !!

1 Like

The wm ART looks for a class which can provide a poolable connection object .
And that is the reason to provide this class ,
Driver class usually is not able to handle pooling, transactions etc
earlier if you remember driver class was sufficient not anymore.

similiar for Oracle and MSSQL and other databases.
oracle on the same lines isoracle.jdbc.pool.OracleDataSource

1 Like

The wm ART looks for a class which can provide a poolable connection object .
And that is the reason to provide this class ,
Driver class usually is not able to handle pooling, transactions etc
earlier if you remember driver class was sufficient not anymore.

similiar for Oracle and MSSQL and other databases.
oracle on the same lines isoracle.jdbc.pool.OracleDataSource

Similar problem but with webMethods7. I have installed mysql5.1 connector under IS/lib/jars. I am seeing it in the classpath. But I get the following error:

Cannot connect to the database with DataSource class “com.mysql.jdbc.jdbc2.optional.MysqlDataSource”. Communication failure during handshake. Is there a MySQL server running on mysql-host:3306?

mysql-host:3306??

Did you make sure the mysql server connection above is up and running??

HTH,
RMG

yup, its running alright. Should the Datasource class be different?or is the connector of the correct version? the mysql server is 4.1.

Thanks

Did you extract the correct dirver jar file from the binary distribution Zip file? You need a file named mysql-connector-java-[version]-bin.jar.

From the connector-j.html page in the MySQL /docs folder:

Update: The com.mysql.jdbc.Driver did not work with connection pooling enabled but the com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource driver does work (see below)

Connection Properties
Transaction Type: LOCAL_TRANSACTION        
DataSource Class:  com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
serverName    localhost    
user              root
password          <password>    
Retype password   <password>
databaseName      <MySQL database name>
portNumber        3306
networkProtocol   <empty>
Other Properties  <empty>

Mark

Yes. It works now. I had to install mysql connector driver version 5.0.8 and data source class as com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource

Thanks for the help.

For getting MySQL Database name, try this at command-line:
“mysql -u your_mysql_username -p”

or

“mysql -u your_mysql_username@your_host -p”

(e.g. mysql -u root -p)

and it ask you the password. Provide password, and it will login. Then type
“show databases;”

mysql> show databases;

You may get output such as this:
±-------------------+
| Database |
±-------------------+
| information_schema |
| mysql |
| test |
±-------------------+

Thanks to David Bolt for this information at this link:
http://help.lockergnome.com/linux/Mysql-database–ftopict488138.html

Regards,
Hemanth

Thanks a lot Vivian! That solved my issue which was similar. I got the following error message:

BR,
Marcus