Skip to main content
rosejo
Bronze ⭐️⭐️⭐️
February 28, 2025
Solved

Exception IllegalStateException: nested jar URLs not supported ..MalformedURLException

Running Spring Boot application running in Docker where the application is having a jive jdbc connection and writing to hive db.
The application is working fine in standalone. The issue happens in the docker container. The docker container starts , gets connected to the hive db but throws exception
executing query with Exception IllegalStateException: nested jar URLs not supported ..MalformedURLException..on the Hive driver

Shmoo
ShmooAnswer
Gold ⭐️
March 4, 2025

Hi @rosejo , the IllegalStateException accompanied by MalformedURLException related to nested JAR URLs indicates a problem with handling specific URL formats, typically within a Java environment. This issue often arises when an application classloader does not support the nested structure of JAR files directly referenced within a JAR URL, which is relatively common in environments using frameworks or libraries that dynamically load classes from JAR files.

Could you tell us if you are using the Cloudera JDBC Hive driver connector?
You can download the driver from here:
https://www.cloudera.com/downloads/connectors/hive/jdbc/2-6-26.html

In case you are using, please check if it's the latest version and the below points to fix the issue:

  • Ensure the classloader being used supports the JAR URL format required by the application. Some environments or containers may need specific configuration or a different classloader to handle nested JARs.
  • Check if unpacking the nested JAR files into a single structure helps resolve the issue, as some environments work better with flat directory structures rather than nested JAR files.
  • Verify if there’s an update or configuration option available in the framework or library being used that can handle nested JARs properly.

Please let us know if this answer your question?

Regards,

Cristian Barrueco

3 replies

DianaTorres
Community Manager
Community Manager
February 28, 2025

@rosejo Welcome to the Cloudera Community!

To help you get the best possible solution, I have tagged our Hive experts @smruti @Shmoo  who may be able to assist you further.

Please keep us updated on your post, and we hope you find a satisfactory solution to your query.

Translate
Regards, Diana Torres, Senior Community Moderator
Shmoo
Gold ⭐️
ShmooAnswer
Gold ⭐️
March 4, 2025

Hi @rosejo , the IllegalStateException accompanied by MalformedURLException related to nested JAR URLs indicates a problem with handling specific URL formats, typically within a Java environment. This issue often arises when an application classloader does not support the nested structure of JAR files directly referenced within a JAR URL, which is relatively common in environments using frameworks or libraries that dynamically load classes from JAR files.

Could you tell us if you are using the Cloudera JDBC Hive driver connector?
You can download the driver from here:
https://www.cloudera.com/downloads/connectors/hive/jdbc/2-6-26.html

In case you are using, please check if it's the latest version and the below points to fix the issue:

  • Ensure the classloader being used supports the JAR URL format required by the application. Some environments or containers may need specific configuration or a different classloader to handle nested JARs.
  • Check if unpacking the nested JAR files into a single structure helps resolve the issue, as some environments work better with flat directory structures rather than nested JAR files.
  • Verify if there’s an update or configuration option available in the framework or library being used that can handle nested JARs properly.

Please let us know if this answer your question?

Regards,

Cristian Barrueco

Translate
DianaTorres
Community Manager
Community Manager
March 12, 2025

@rosejo Has the reply helped resolve your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future.  Thanks.

Translate
Regards, Diana Torres, Senior Community Moderator