java.util.ServiceConfigurationError: java.nio.charset.spi.CharsetProvider: Provider sun.nio.cs.ext.ExtendedCharsets not found in JBoss EAP 6

Solution Verified - Updated -

Issue

  • We need to load a custom character set and for this purpose we are using the Java java.util.ServiceLoader to load the class java.nio.charset.spi.CharsetProvider but the call
ServiceLoader.load(CharsetProvider.class)
~~

It throws this exception:

Caused by: java.util.ServiceConfigurationError: java.nio.charset.spi.CharsetProvider: Provider sun.nio.cs.ext.ExtendedCharsets not found
at java.util.ServiceLoader.fail(ServiceLoader.java:214) [rt.jar:1.6.0_24]
at java.util.ServiceLoader.access$400(ServiceLoader.java:164) [rt.jar:1.6.0_24]
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:350) [rt.jar:1.6.0_24]
at java.util.ServiceLoader$1.next(ServiceLoader.java:421) [rt.jar:1.6.0_24]
~~~

Environment

  • JBoss Enterprise Application Platform (EAP)
    • 6.0.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content