SAPClassNotFoundException when using SQL Driver


The JDBC channel connecting to SQL server fails with one of these errors:
Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Error when attempting to get processing resources: com.sap.aii.af.service.util.concurrent.ResourcePoolException: Unable to create new pooled resource: DriverManagerException: Cannot establish connection to URL 'jdbc:sqlserver://**************;databaseName=***************;user=sa;password=****************;': SAPClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver

Message processing failed. Cause: 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: Can not establish connection:: SAPClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver

The class names for drivers are different for SQL Server 2000 and SQL Server 2005. Ensure that the driver that you have installed has a class name of "com.microsoft.sqlserver.jdbc. SQLServerDriver" for SQL Server 2005 and "com.microsoft.jdbc.sqlserver" for SQL Server 2000.

The URL naming convention is also different.
Use "jdbc:sqlserver://<db_Server>:port;databaseName=< db_name>" for 2005 and jdbc:microsoft:sqlserver://<db_server>:port; databaseName=<db_name> for 2000.

Comments

Popular posts from this blog

OS/DB Migration - CMD. STR, TOC, EXT, R3load, DDLDBS.TPL and more

Fixing Inconsistent Table - Table activation fails due to inconsistency between DD and DB

301 Redirect Using SAP Web Dispatcher