I think that the issue is that this service needs to be discovered and loaded by the jvm.
So I think it should be defined as a global module:
Try to modify /bin/standalone.conf, /search for JBOSS_MODULES_SYSTEM_PKGS and modify it accordingly.
if [ "x$JBOSS_MODULES_SYSTEM_PKGS" = "x" ]; then
JBOSS_MODULES_SYSTEM_PKGS="org.jboss.byteman,net.freeutils.charset"
fi
and create a net.freeutils.charset module
Le 27/06/2023 à 16:58, Olivier Masseau a écrit :
> By the way I already tried to create a module containing the jar and declare a dependency on it in jboss-deployment-structure.xml :
> <module name="com.mymodule" services="import"/>
> But the charset provider implementation declared in jcharset META-INF/services is still ignored.
> Le mardi 27 juin 2023 à 16:41:31 UTC+2, Olivier Masseau a écrit :
>
> Hello,
>
> Thanks but the jcharset dependency is not a module but a simple jar embedded in our war libs folder.
> As I understand manifest entries are only valid for module dependencies right ?
>
> Le mardi 27 juin 2023 à 14:50:20 UTC+2, Scott Marlow a écrit :
>
> Hello,
>
> Please see "services" under documentation link
https://docs.wildfly.org/28/Developer_Guide.html#dependencies-manifest-entries
> which describes adding a jboss-deployment-structure.xml file to your deployment.
>
> Scott
>
> On 6/27/23 8:32 AM, Olivier Masseau wrote:
>> Hello,
>>
>> My webapp (running on Wildfly 23) needs to support the utf-7 charset.
>> So I added jcharset.jar (
https://www.freeutils.net/source/jcharset/) in my war libs folder next to all the other dependencies my
>> app needs.
>>
>> Problem:
>> The charset provider declared in *jcharset.jar/META-INF/services/java.nio.charset.spi.CharsetProvider* seems to be ignored by the
>> classloader and I don't understand why.
>>
>> Is there anything more I need to do to have it processed ?
>>
>> JCharset doc says :
>> /The Java Charset package is written in pure Java, runs on JDK 1.5 or later, and requires no special installation - just add the
>> jar file to your classpath./
>> <
https://groups.google.com/d/msgid/wildfly/c9152bd5-eb07-49c4-b2bb-1229debd1f12n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google Groups "WildFly" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
wildfly+u...@googlegroups.com.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/wildfly/c18cbdc2-ce08-487d-8de4-55c9ffd13a2an%40googlegroups.com
> <
https://groups.google.com/d/msgid/wildfly/c18cbdc2-ce08-487d-8de4-55c9ffd13a2an%40googlegroups.com?utm_medium=email&utm_source=footer>.