cancel
Showing results for 
Search instead for 
Did you mean: 

Exception getting while connecting to MySQL DB

Former Member
0 Kudos

Hi,

I am working in a migration J2ee project. The project uses MySQL as backend. I have registered the JDBC driver for MySQL DB to SAP WAS using Visual Administration Console. I have created the Datasource also with the registered driver and deployed. But when i connect to the DB, I am getting SQL Exception as given below,

<b>"com.sap.engine.services.dbpool.exceptions.BaseResourceException: SQLException thrown by the physical connection: com.sap.sql.log.OpenSQLException: Porting factory for MYSQL database not defined."</b>

The driver details in Datasource configuration file is defined as follows,

<b><jdbc-1.x>

<driver-class-name>com.mysql.jdbc.Driver</driver-class-name>

<url>jdbc:mysql://localhost:3306/TestDB</url>

<user-name>test</user-name>

<password>**********</password>

</jdbc-1.x></b>

I am using the JDBC Driver found in <b>"mysql-connector-java-3.1.8-bin.jar"(Which is downloaded from MySQL site)</b>

Could you please share your knowledge in this regard? If I am using the wrong JAR, Then which is the suitable jar and where can i found it?

Kindly help,

Sudheesh...

Accepted Solutions (0)

Answers (1)

Answers (1)

Benny
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Sudeesh,

You cannot use OpenSQL with MySQL as this is SAP proprietary persistence level. Please set the SQL Engine to "Vendor" mode, that means it won't use OpenSQL. Maybe that Native also works.

See the manuals at http://help.sap.com/saphelp_nw04/helpdata/en/b0/6e62f30cbe9e44977c78dbdc7a6b27/frameset.htm

for details.

Regards,

Benny

Former Member
0 Kudos

Hi,

Just to explain a bit as to what Benny has said

In Visual Administrator select the Datasource that you have created, on the right you should able to see 4 Panes (Main, Additional, DB Initialization, Monitoring) Goto Additional Tab and in the SQL Engine Panel select the default is set to 'Open SQL', select 'Vendor SQL' or 'Native SQL' and then save the changes and restart the server.

Now you connection should be through.

Benny can you provide as to how do we decide on 'Vendor SQL' or 'Native SQL'

Regards,

S.Divakar

Benny
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Divakar,

"vendor" means it completely passes by OpenSQL and works as you were using usual JDBC. With "native" you can use a couple of features, like table buffers.

Details are here:

http://help.sap.com/saphelp_nw04/helpdata/en/45/ef362dc57b1e46aa6f445ec6247103/frameset.htm

Regards,

Benny