cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot establish connection with the registered driver. com.mysql.jdbc.Driver returns: com.mysql.jdbc.Driver

former_member208396
Participant
0 Kudos

Hi Experts,

I have developed fresh Soap to JDBC scenario in SAP PI 7.4[dual stack]. I have taken help from below link.

SAPTechnical.COM - Implementation of SOAP to JDBC Synchronous scenario

While testing the scenario with Alto as sender and MS SQL 2012 server as receiver I am getting below error.

com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error when attempting to get processing resources: com.sap.aii.af.lib.util.concurrent.ResourcePoolException: Unable to create new pooled resource: DriverManagerException: Cannot establish connection with the registered driver. com.mysql.jdbc.Driver returns: com.mysql.jdbc.Driver. : SAPClassNotFoundException: com.mysql.jdbc.Driver

I have installed required driver in PO.

I have provided usename and password in JDBC CC  of receiver.

Please help..!!

Regards,

Vishnu Srivastava

Accepted Solutions (1)

Accepted Solutions (1)

former_member208396
Participant
0 Kudos

Hello Everyone,

Thanks all for your valuable comments. It helped a lot. Issue is resolved by following below steps.

1. Installing JDBC driver on correct path with correct version matching with installed JAVA version.

for version details please refer to-- https://msdn.microsoft.com/en-us/library/ms378422(v=sql.110).aspx

2. By changing the authentication mode of MS SQL sever from 'Windows Auth' Mode to SQL Server & Windows Auth' Mode.

Adapter settings:

JDBC Driver: com.microsoft.sqlserver.jdbc.SQLServerDriver

Connection : jdbc:sqlserver://<host>:1433;databaseName=<DB Name>

Thanks,

Vishnu Srivastava

iaki_vila
Active Contributor
0 Kudos

Hi Vishnu,

I'm glad your issue is solved and thank you very much to share your last adjustments, they will be very helpful for the SCN community.

Regards.

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Srivastava,

Glad to hear that your issue has finally resolved..

Also thanks for sharing the resolution, sure this could help us our fellow mates.

Regards

Vishnu

SudheerJ
Participant
0 Kudos

Thanks, this solved my issue.

Answers (2)

Answers (2)

former_member208396
Participant
0 Kudos

Hi Inaki/Pavan/Vishnu,

Our Basis team had installed the driver and I just want to check the connectivity to DataBase.

Can you please let me know the fields which needs to be filled in attached screenshot?

PS: Database resides in my system only[localhost]

Regards,

Vishnu

former_member183908
Active Contributor
0 Kudos

option 1 :please try to connect using SQL server management studio by giving localhost and username and password

for your screen shot please try with below options

Driver Class : com.microsoft.sqlserver.jdbc.SQLServerDriver

JDBC URL :     jdbc:sqlserver://hostname/IP:1433;databaseName=DBname

Username and password to access DB in your localhost

Thanks

former_member208396
Participant
0 Kudos

Hi Pavan,

I tried with above option but same error again.

Error:

Type Time Stamp Message ID Explanation

03.07.2015 11:25:42 Europe/Paris  Error during database connection to the database URL 'jdbc:microsoft:sqlserver://***.**.***.**:1433;databaseName=Employee' using the JDBC driver 'com.microsoftt.jdbc.sqlserver.SQLServerDriver': 'com.sap.aii.adapter.jdbc.sql.DriverManagerException: Cannot establish connection with the registered driver. com.microsoftt.jdbc.sqlserver.SQLServerDriver returns: com.microsoftt.jdbc.sqlserver.SQLServerDriver. : SAPClassNotFoundException: com.microsoftt.jdbc.sqlserver.SQLServerDriver'

Have checked with Basis team- they said latest version of driver is installed in correct place.

Have checked with Firewall team- No issues in that

I am not sure which step I am missing after driver installation and before comm channel configuration..?/

Please help..!!

Regards,

Vsihnu

former_member183908
Active Contributor
0 Kudos

please correct the spelling of Microsoft and try again i can see there is a typo.there are two t's

Thanks

iaki_vila
Active Contributor
0 Kudos

Hi Vishnu,

Please talk with your basis team to test the jdbc connection with the program attached in this note 1085539 - XI JDBC/FTP connection Test and XML Validation Application

Regards,

former_member208396
Participant
0 Kudos

Hi Pavan,

Thanks for correcting it.But again same issue

Type Time Stamp Message ID Explanation

03.07.2015 11:50:40 Europe/Paris  Error during database connection to the database URL 'jdbc:microsoft:sqlserver://***.**.*.***:1433;databaseName=Employee' using the JDBC driver 'com.microsoft.jdbc.sqlserver.SQLServerDriver': 'com.sap.aii.adapter.jdbc.sql.DriverManagerException: Cannot establish connection with the registered driver. com.microsoft.jdbc.sqlserver.SQLServerDriver returns: com.microsoft.jdbc.sqlserver.SQLServerDriver. : SAPClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver'

Regards,

Vishnu

former_member208396
Participant
0 Kudos

Hi Inaki,

They already tested the connection. Same error.

ClassNotFoundException Occurred : Driver Class Could not ...ClassNotFoundException Occurred : Driver Class Could not be found.Driver: com.microsoft.jdbc.sqlserver.SQLServerDriver

---------------------------------------------------------------

Exception Stack Trace : java.lang.ClassNotFoundException: Driver: com.microsoft.jdbc.sqlserver.SQLServerDriver

------------------------- Loader Info -------------------------

ClassLoader name: [sap.com/testconnectionsEAR]

Loader hash code: 3de8826e

Living status: alive

Direct parent loaders:

   [system:Frame]

   [interface:webservices]

   [interface:cross]

   [interface:security]

   [interface:transactionext]

   [library:webservices_lib]

   [library:opensql]

   [library:jms]

   [library:ejb20]

   [service:p4]

   [service:ejb]

   [service:servlet_jsp]

Resources:

   D:\usr\sap\PI4\DVEBMGS00\j2ee\cluster\apps\sap.com\testconnectionsEAR\servlet_jsp\ftpjdbc\root\WEB-INF\classes

---------------------------------------------------------------

Regards,

Vishnu

former_member183908
Active Contributor
0 Kudos
jdbc:microsoft:sqlserver://***.**.*.***:1433;databaseName=Employee' using the JDBC driver 'com.microsoft.jdbc.sqlserver.SQLServerDriver':

can you remove the microsoft in the connection string and just use as below and give try

jdbc:sqlserver://hostname:1433;databaseName=Test1

Thanks

former_member183908
Active Contributor
0 Kudos

did the basis update the reference of drivers in the XML file?As suggested by Inka did they follow the above links to update?

Thanks

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Srivastava,

Can you refer the below documents.

Note 941317 - known incompatibilities

Regards

Vishnu

iaki_vila
Active Contributor
0 Kudos

Hi Vishnu,

Please the several ways to set the connection URL:

Building the Connection URL

I'm just thinking that the drivers are wrong or the installation process has not been followed properly.

Ask your basis team if they have downloaded the drivers from here Microsoft JDBC Driver for SQL Server and if the have follow the SAP note 1138877 - How to Deploy External Drivers JDBC/JMS Adapters

Regards.

former_member208396
Participant
0 Kudos

Please find details of receiver JDBC adapter as attachment

iaki_vila
Active Contributor
0 Kudos

Hi Vishnu,

Try to use this name in the JDBC driver com.microsoft.sqlserver.jdbc.SQLServerDriver

Regards.

former_member208396
Participant
0 Kudos

Hi Inaki,

Thanks for your reply. Tried with above suggestion but no luck.

Regards,

Vishnu

iaki_vila
Active Contributor
0 Kudos

Hi Vishnu,

With the last JDBC driver name, try to change the connection with

:jdbc:sqlserver://<db_Server>:port;databaseName=< db_name>

In question 20 here 831162 - FAQ: XI 3.0 / PI 7.0 / PI 7.1 / PI 7.3 JDBC Adapter

It is for SQL Server 2005, but you can try with your version

Regards.

former_member208396
Participant
0 Kudos

Hi Inaki,

Have tried with this also but no luck again. Now trying to test JDBC connection mentioned in above link. Lets see

Regards,

Vishnu

former_member183908
Active Contributor
0 Kudos

Try with below configurations.

JDBC Driver : com.microsoft.sqlserver.jdbc.SQLServerDriver

Connection :     jdbc:sqlserver://hostname/IP:1433;databaseName=DBname

Thanks

former_member208396
Participant
0 Kudos

Hi Pavan,

Have already tried with this. No luck.

Can you please let me know which driver needs to be installed for PI 7.4[dual stack] and MS SQL 2012 server and to which location or AL11 path ..??

I have installed sqljdbc4-2.0 driver. Is that correct?

Regards,
Vishnu

former_member183908
Active Contributor
0 Kudos

drivers are not separate for dual stack or PO.your drivers looks good however did you deploy in the server level?It should not be in AL11.

Thanks

iaki_vila
Active Contributor
pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Srivastava,

Since JDBC adapter resides on AAE, you need to deploy the drivers on java stack I guess.

Regarding the driver information, check with the DB team, get the required driver using which PI system can establish the connectivity.

Also, as Inaki said, check the snotes, whether the driver has been deployed in the PI java stack or not. For any issues, check with your basis team.

Regards

Vishnu