Loading
Feature Disruption - Service Cloud VoiceRead More
Feature degradation | Gmail Email delivery failureRead More

SAP HANA JDBC Driver Fails with NoClassDefFoundError on Java 17 in CloudHub 2.0

Publish Date: May 25, 2026
Description

Users may observe one or more of the following errors:

  • java.sql.SQLException: No suitable driver found for jdbc:sap://<host>:30015
  • Error loading driver: Error trying to load driver: com.sap.db.jdbc.Driver
    Class 'com.sap.db.jdbc.Driver' not found in classloader

    
    
     

Runtime exception:
java.lang.NoClassDefFoundError: jdk/net/ExtendedSocketOptions


 

Mule error:
 DB:CONNECTIVITY

This issue is caused by a compatibility problem between Java 17 and the SAP HANA JDBC driver (ngdbc).

Specifically:

  • The SAP HANA JDBC driver attempts to reference jdk.net.ExtendedSocketOptions
  • In the CloudHub 2.0 Java 17 runtime (OpenJDK Temurin 17.0.8+7), this module/class is not accessible in the expected manner
  • As a result, the driver fails during class loading or runtime initialization

Contributing Factors

  • The ngdbc dependency is incorrectly scoped as <scope>provided</scope> in some environments, preventing it from being packaged in the deployable JAR
  • Multiple or conflicting versions of ngdbc exist in the pom.xml
    • Example: 2.8.14 and 2.24.7 declared together


Resolution

Step 1: Fix Maven Dependency Scope

Ensure the SAP HANA JDBC driver is included in the application artifact by removing provided scope.

 
<dependency>
<groupId>com.sap.cloud.db.jdbc</groupId>
<artifactId>ngdbc</artifactId>
<version>2.24.7</version>
</dependency>


Step 2: Remove Duplicate Dependencies

  • Ensure only one version of ngdbc is declared in pom.xml
  • Align all environments (dev, test, prod) to the same version

 Run:mvndependency:tree , to identify conflicts

 

Step 3: Use Java 8 for Local Development (Temporary Workaround)

Until SAP provides a Java 17–compatible driver:

  • Configure Anypoint Studio to use JDK 8
  • Validate application behavior locally under Java 8 runtime

Step 4: Upgrade or Contact SAP

  • Check for updated versions of ngdbc that explicitly support Java 17
  • If unavailable, raise a support request with SAP:
    • Report incompatibility with jdk.net.ExtendedSocketOptions
    •  Request Java 17 compatibility fix 
Workaround: Until a compatible driver is released:
  • Deploy Mule applications on Java 8 runtime in CloudHub 2.0
  • Avoid using Java 17 for workloads requiring SAP HANA JDBC connectivity

Affected Components:

MuleSoft Connector: Database Connector
JDBC Driver: SAP HANA ngdbc
Runtime: CloudHub 2.0
Java Version: Java 17 (Temurin 17.0.8+7)


Knowledge Article Number

005385414

 
Loading
Salesforce Help | Article