Message: [Guice/ErrorInCustomProvider]: JsonException: Provider JsonProviderImpl could not be instantiated: ClassCastException: JsonProviderImpl cannot be cast to JsonProvider
Stacktrace:
```
[INFO tini (1)] Spawned child process 'java' with pid '7'
06:49:41,103 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
06:49:41,103 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [jar:file:/home/apprunner/build/dependencies/sailor-jvm-4.0.0.jar!/logback.xml]
06:49:41,120 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@3b088d51 - URL [jar:file:/home/apprunner/build/dependencies/sailor-jvm-4.0.0.jar!/logback.xml] is not of type file
06:49:41,218 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
06:49:41,239 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
06:49:41,294 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
06:49:41,307 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@6:22 - no applicable action for [pattern], current ElementPath is [[configuration][appender][encoder][pattern]]
06:49:41,825 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO
06:49:41,825 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT]
06:49:41,826 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
06:49:41,827 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@1786dec2 - Registering current configuration as safe fallback point
{"level":30,"thread":"main","logger":"io.elastic.sailor.Service","context":"default","level_str":"INFO","time":"2023-06-27T06:49:42.412+0000","msg":"Starting execution of verifyCredentials","hostname":"649a86846ed360001363bf5e.verifycredentials"}
Exception in thread "main" com.google.inject.ProvisionException: Unable to provision, see the following errors:
1) [Guice/ErrorInCustomProvider]: JsonException: Provider JsonProviderImpl could not be instantiated: ClassCastException: JsonProviderImpl cannot be cast to JsonProvider
at ServiceModule.provideConfiguration(ServiceModule.java:22)
at Service.setConfiguration(Service.java:134)
\_ for 1st parameter
while locating Service
Learn more:
https://github.com/google/guice/wiki/ERROR_IN_CUSTOM_PROVIDER
1 error
======================
Full classname legend:
======================
JsonException: "jakarta.json.JsonException"
JsonProvider: "jakarta.json.spi.JsonProvider"
JsonProviderImpl: "org.glassfish.json.JsonProviderImpl"
Service: "io.elastic.sailor.Service"
ServiceModule: "io.elastic.sailor.ServiceModule"
========================
End of classname legend:
========================
at com.google.inject.internal.InternalProvisionException.toProvisionException(InternalProvisionException.java:251)
at com.google.inject.internal.InjectorImpl$1.get(InjectorImpl.java:1104)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1139)
at io.elastic.sailor.Service.getServiceInstanceAndExecute(Service.java:70)
at io.elastic.sailor.Service.createServiceInstanceAndExecute(Service.java:64)
at io.elastic.sailor.Service.main(Service.java:49)
Caused by: jakarta.json.JsonException: Provider org.glassfish.json.JsonProviderImpl could not be instantiated: java.lang.ClassCastException: org.glassfish.json.JsonProviderImpl cannot be cast to jakarta.json.spi.JsonProvider
at jakarta.json.spi.JsonProvider.provider(JsonProvider.java:78)
at jakarta.json.Json.createReader(Json.java:201)
at io.elastic.api.JSON.createReader(JSON.java:83)
at io.elastic.api.JSON.parseObject(JSON.java:24)
at io.elastic.sailor.ServiceModule.provideConfiguration(ServiceModule.java:22)
at io.elastic.sailor.ServiceModule$$FastClassByGuice$$621126.GUICE$TRAMPOLINE()
at io.elastic.sailor.ServiceModule$$FastClassByGuice$$621126.apply()
at com.google.inject.internal.ProviderMethod$FastClassProviderMethod.doProvision(ProviderMethod.java:260)
at com.google.inject.internal.ProviderMethod.doProvision(ProviderMethod.java:171)
at com.google.inject.internal.InternalProviderInstanceBindingImpl$CyclicFactory.provision(InternalProviderInstanceBindingImpl.java:185)
at com.google.inject.internal.InternalProviderInstanceBindingImpl$CyclicFactory.get(InternalProviderInstanceBindingImpl.java:162)
at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:40)
at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:60)
at com.google.inject.internal.SingleMethodInjector.inject(SingleMethodInjector.java:84)
at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:146)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:124)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:91)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:300)
at com.google.inject.internal.InjectorImpl$1.get(InjectorImpl.java:1101)
... 4 more
Caused by: java.lang.ClassCastException: org.glassfish.json.JsonProviderImpl cannot be cast to jakarta.json.spi.JsonProvider
at jakarta.json.spi.JsonProvider.provider(JsonProvider.java:73)
... 22 more
[INFO tini (1)] Main child exited normally (with status '1')
```
Message:
[Guice/ErrorInCustomProvider]: JsonException: Provider JsonProviderImpl could not be instantiated: ClassCastException: JsonProviderImpl cannot be cast to JsonProvider
Stacktrace:
``` [INFO tini (1)] Spawned child process 'java' with pid '7' 06:49:41,103 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml] 06:49:41,103 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [jar:file:/home/apprunner/build/dependencies/sailor-jvm-4.0.0.jar!/logback.xml] 06:49:41,120 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@3b088d51 - URL [jar:file:/home/apprunner/build/dependencies/sailor-jvm-4.0.0.jar!/logback.xml] is not of type file 06:49:41,218 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set 06:49:41,239 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender] 06:49:41,294 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT] 06:49:41,307 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@6:22 - no applicable action for [pattern], current ElementPath is [[configuration][appender][encoder][pattern]] 06:49:41,825 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO 06:49:41,825 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT] 06:49:41,826 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration. 06:49:41,827 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@1786dec2 - Registering current configuration as safe fallback point {"level":30,"thread":"main","logger":"io.elastic.sailor.Service","context":"default","level_str":"INFO","time":"2023-06-27T06:49:42.412+0000","msg":"Starting execution of verifyCredentials","hostname":"649a86846ed360001363bf5e.verifycredentials"} Exception in thread "main" com.google.inject.ProvisionException: Unable to provision, see the following errors: 1) [Guice/ErrorInCustomProvider]: JsonException: Provider JsonProviderImpl could not be instantiated: ClassCastException: JsonProviderImpl cannot be cast to JsonProvider at ServiceModule.provideConfiguration(ServiceModule.java:22) at Service.setConfiguration(Service.java:134) \_ for 1st parameter while locating Service Learn more: https://github.com/google/guice/wiki/ERROR_IN_CUSTOM_PROVIDER 1 error ====================== Full classname legend: ====================== JsonException: "jakarta.json.JsonException" JsonProvider: "jakarta.json.spi.JsonProvider" JsonProviderImpl: "org.glassfish.json.JsonProviderImpl" Service: "io.elastic.sailor.Service" ServiceModule: "io.elastic.sailor.ServiceModule" ======================== End of classname legend: ======================== at com.google.inject.internal.InternalProvisionException.toProvisionException(InternalProvisionException.java:251) at com.google.inject.internal.InjectorImpl$1.get(InjectorImpl.java:1104) at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1139) at io.elastic.sailor.Service.getServiceInstanceAndExecute(Service.java:70) at io.elastic.sailor.Service.createServiceInstanceAndExecute(Service.java:64) at io.elastic.sailor.Service.main(Service.java:49) Caused by: jakarta.json.JsonException: Provider org.glassfish.json.JsonProviderImpl could not be instantiated: java.lang.ClassCastException: org.glassfish.json.JsonProviderImpl cannot be cast to jakarta.json.spi.JsonProvider at jakarta.json.spi.JsonProvider.provider(JsonProvider.java:78) at jakarta.json.Json.createReader(Json.java:201) at io.elastic.api.JSON.createReader(JSON.java:83) at io.elastic.api.JSON.parseObject(JSON.java:24) at io.elastic.sailor.ServiceModule.provideConfiguration(ServiceModule.java:22) at io.elastic.sailor.ServiceModule$$FastClassByGuice$$621126.GUICE$TRAMPOLINE(Solution in this branch: https://github.com/elasticio/sailor-jvm/tree/eclipse-parsson
Is published as
Sailor 4.0.1-SNAPSHOT
. This version can be tested in the components