- Newest
- Most votes
- Most comments
You're not alone,this issue has been popping up recently for many using Glue connections to SQL Server. The stack trace tells the core story:
java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter
What's going on in the background? This class (DatatypeConverter) is part of the javax.xml.bind module that was deprecated and then removed in Java 11+. AWS Glue has recently migrated to a Java 11 runtime (especially for Glue version 4.0+ and for test connection logic), and this is causing unexpected compatibility issues when using JDBC drivers that rely on those older Java 8 packages.
Why do Glue Jobs still work? Glue Jobs often run in a different context (e.g., using older Glue versions or having different classpath/jar handling). The test connection and Crawler logic, however, seems to rely on newer Java 11–based runtimes.
Options to Fix or Work Around: 1)Switch to a compatible JDBC driver a) Use the latest SQL Server JDBC driver from Microsoft (e.g., version 12.x+), which no longer depends on javax.xml.bind. b) Upload it to S3 and configure the Glue connection or job with a custom .jar file.
-
Use Glue Version 3.0 for Crawlers and Jobs a) you're using Glue 4.0, try reverting to Glue 3.0, which still uses Java 8 and has the javax.xml.bind classes.
-
Modify connection behavior (advanced): a) If you're managing connections at runtime in your job script, you could add a shaded jar or include JAXB via dependency if needed (but this won’t help test connection or Crawler GUI unless AWS changes backend logic).
4).Raise a support case with AWS a) Since this seems tied to a backend update, raising a support ticket may help push for a hotfix or rollback if it's unintentional.
Additionally: Yes, this is due to the recent Java 11 runtime shift in AWS Glue components. To fix it: Use the latest SQL Server JDBC driver that’s Java 11 compatible. If needed, stick with Glue 3.0 for now to avoid the JAXB class issue. And yes, this isn’t something you broke; it’s an AWS-side change surfacing new runtime incompatibilities.
The error you're experiencing with your AWS Glue JDBC connections to SQL Server databases appears to be related to a compatibility issue with the JDBC driver and the Java runtime environment used by AWS Glue.
The specific error java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter indicates that the SQL Server JDBC driver is trying to use a Java class that's not available in the current Java runtime. This typically happens when there's a mismatch between the Java version the driver was built for and the one being used to run it.
Here are some troubleshooting steps you can take:
-
Check for AWS Glue updates or changes: Since this happened suddenly without you making any changes, it's possible that AWS updated the Glue environment or Java runtime version. This could have created an incompatibility with the SQL Server JDBC driver.
-
Use the AWSSupport-TroubleshootGlueConnection runbook: This automated tool in AWS Systems Manager can help identify common connection issues between Glue and your data source. It performs various checks including network connectivity, IAM roles, and database credentials.
-
Try a different JDBC driver version: Although you mentioned testing connections with custom drivers isn't supported, you can still use a custom driver with your Glue Crawler. Try using a different version of the SQL Server JDBC driver that's compatible with newer Java versions (Java 11+).
-
Check security group configurations: Verify that the security groups associated with your RDS instance allow inbound traffic on the appropriate port from the security group used by Glue. Also ensure there's a self-referencing inbound rule to allow connectivity between Glue workers.
-
Verify network configuration: If your Glue job is running in a private subnet, ensure you have a NAT Gateway or VPC endpoints configured correctly. Check that route tables for your private subnets are correctly configured.
-
Review IAM permissions: Ensure the IAM role associated with your Glue connection has the necessary permissions to access both the Glue service and the RDS instance.
-
Check database authentication: Verify that the credentials used in the JDBC connection are still valid and have the necessary permissions.
It's interesting that your Glue Jobs using the same connection are still working while the Test Connection and Crawlers are failing. This suggests that the jobs might be using a different runtime environment or driver configuration than what's used for testing connections and crawlers.
If these steps don't resolve the issue, you may need to contact AWS Support for further assistance, as there could be an account-specific issue or a temporary service problem affecting your connections.
Sources
AWS Glue Connection to RDS SQL Server Fails – "Failed status due to failed connection" | AWS re:Post
AWS Glue Test Connection: Failed with ''InvalidInputException: Unable to resolve any valid connection" | AWS re:Post
Troublehsoot AWS Glue connection to a JDBC data source | AWS re:Post
Relevant content
- asked a year ago
- AWS OFFICIALUpdated a year ago

Many thanks Manvitha. The issue seems to have resolved (broken connections + crawlers are now working). Maybe a patch was pushed or AWS reverted the upgrade? I opened a support ticket w/ AWS on Friday - have asked them to confirm that a JRE upgrade was at root, as well as:
Will accept your answer once AWS support confirms.