Quarkus JMapper error in mapper constructor - quarkus

We are creating new Rest Api using Quarkus, postgresql, JMapper and lombok. Jmapper throwing below error while calling api not sure why. Added lombok, jmapper-core details of the pom.xml and added detail error message. please let me know if any more details is required. I am new too JAVA and quarkus. thanks in advance.
Pom.xml:
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.22</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.googlecode.jmapper-framework</groupId>
<artifactId>jmapper-core</artifactId>
<version>1.6.1.CR2</version>
</dependency>
Error:
2021-10-10 17:45:24,349 INFO [io.quarkus] (Quarkus Main Thread) cana-codelessautomation-api 1.0.0-SNAPSHOT on JVM (powered by Quarkus 2.3.0.Final) started in 2.677s. Listening on: http://localhost:8080
2021-10-10 17:45:24,351 INFO [io.quarkus] (Quarkus Main Thread) Profile dev activated. Live Coding activated.
2021-10-10 17:45:24,351 INFO [io.quarkus] (Quarkus Main Thread) Installed features: [agroal, cdi, hibernate-orm, hibernate-orm-panache, hibernate-validator, jdbc-postgresql, narayana-jta, rest-client, resteasy, resteasy-jackson, smallrye-context-propagation, smallrye-openapi, swagger-ui, vertx]
2021-10-10 17:46:01,884 WARN [org.ref.Reflections] (executor-thread-0) given scan urls are empty. set urls in the configuration
2021-10-10 17:46:01,928 ERROR [com.goo.jma.JMapper] (executor-thread-0) ConversionBodyIllegalCodeException: There is an error in the generated method. Additional information: [source error] no such class: cana.codelessautomation.api.resources.environment.models.CreateEnvironmentModel
2021-10-10 17:46:01,932 ERROR [io.qua.ver.htt.run.QuarkusErrorHandler] (executor-thread-0) HTTP Request to /api/environments?userId=2680912425326220290 failed, error id: 892c8f38-3a3e-49cd-a44e-6fe439307cf3-1: org.jboss.resteasy.spi.UnhandledException: java.lang.RuntimeException: Error injecting cana.codelessautomation.api.resources.environment.mappers.EnvironmentResourceMapper cana.codelessautomation.api.resources.environment.EnvironmentResource.environmentResourceMapper
at org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandler.java:381)
at org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:218)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:519)
at org.jboss.resteasy.core.SynchronousDispatcher.lambda$invoke$4(SynchronousDispatcher.java:261)
at org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:161)
at org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:364)
at org.jboss.resteasy.core.SynchronousDispatcher.preprocess(SynchronousDispatcher.java:164)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:247)
at io.quarkus.resteasy.runtime.standalone.RequestDispatcher.service(RequestDispatcher.java:73)
at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler.dispatch(VertxRequestHandler.java:135)
at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler$1.run(VertxRequestHandler.java:90)
at io.quarkus.vertx.core.runtime.VertxCoreRecorder$13.runWith(VertxCoreRecorder.java:543)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: java.lang.RuntimeException: Error injecting cana.codelessautomation.api.resources.environment.mappers.EnvironmentResourceMapper cana.codelessautomation.api.resources.environment.EnvironmentResource.environmentResourceMapper
at cana.codelessautomation.api.resources.environment.EnvironmentResource_Bean.create(EnvironmentResource_Bean.zig:197)
at cana.codelessautomation.api.resources.environment.EnvironmentResource_Bean.create(EnvironmentResource_Bean.zig:263)
at io.quarkus.arc.impl.AbstractSharedContext.createInstanceHandle(AbstractSharedContext.java:96)
at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:29)
at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:26)
at io.quarkus.arc.impl.LazyValue.get(LazyValue.java:26)
at io.quarkus.arc.impl.ComputingCache.computeIfAbsent(ComputingCache.java:69)
at io.quarkus.arc.impl.AbstractSharedContext.get(AbstractSharedContext.java:26)
at cana.codelessautomation.api.resources.environment.EnvironmentResource_Bean.get(EnvironmentResource_Bean.zig:295)
at cana.codelessautomation.api.resources.environment.EnvironmentResource_Bean.get(EnvironmentResource_Bean.zig:311)
at io.quarkus.arc.impl.ArcContainerImpl.beanInstanceHandle(ArcContainerImpl.java:440)
at io.quarkus.arc.impl.ArcContainerImpl.beanInstanceHandle(ArcContainerImpl.java:453)
at io.quarkus.arc.impl.ArcContainerImpl$1.get(ArcContainerImpl.java:276)
at io.quarkus.arc.impl.ArcContainerImpl$1.get(ArcContainerImpl.java:273)
at io.quarkus.resteasy.common.runtime.QuarkusConstructorInjector.construct(QuarkusConstructorInjector.java:52)
at org.jboss.resteasy.plugins.server.resourcefactory.POJOResourceFactory.createResource(POJOResourceFactory.java:71)
at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:401)
at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:69)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:492)
... 15 more
Caused by: com.googlecode.jmapper.exceptions.JMapperException: com.googlecode.jmapper.exceptions.ConversionBodyIllegalCodeException: There is an error in the generated method. Additional information: [source error] no such class: cana.codelessautomation.api.resources.environment.models.CreateEnvironmentModel
at com.googlecode.jmapper.config.JmapperLog.error(JmapperLog.java:46)
at com.googlecode.jmapper.JMapper.<init>(JMapper.java:437)
at com.googlecode.jmapper.JMapper.<init>(JMapper.java:373)
at com.googlecode.jmapper.JMapper.<init>(JMapper.java:360)
at cana.codelessautomation.api.resources.environment.mappers.EnvironmentResourceMapperImpl.<init>(EnvironmentResourceMapperImpl.java:23)
at cana.codelessautomation.api.resources.environment.mappers.EnvironmentResourceMapperImpl_ClientProxy.<init>(EnvironmentResourceMapperImpl_ClientProxy.zig:24)
at cana.codelessautomation.api.resources.environment.mappers.EnvironmentResourceMapperImpl_Bean.proxy(EnvironmentResourceMapperImpl_Bean.zig:40)
at cana.codelessautomation.api.resources.environment.mappers.EnvironmentResourceMapperImpl_Bean.get(EnvironmentResourceMapperImpl_Bean.zig:198)
at cana.codelessautomation.api.resources.environment.mappers.EnvironmentResourceMapperImpl_Bean.get(EnvironmentResourceMapperImpl_Bean.zig:214)
at cana.codelessautomation.api.resources.environment.EnvironmentResource_Bean.create(EnvironmentResource_Bean.zig:180)
... 33 more
Caused by: com.googlecode.jmapper.exceptions.ConversionBodyIllegalCodeException: There is an error in the generated method. Additional information: [source error] no such class: cana.codelessautomation.api.resources.environment.models.CreateEnvironmentModel
at com.googlecode.jmapper.config.Error.bodyContainsIllegalCode(Error.java:186)
at com.googlecode.jmapper.generation.JavassistGenerator.generate(JavassistGenerator.java:85)
at com.googlecode.jmapper.generation.MapperGenerator.generateMapperClass(MapperGenerator.java:75)
at com.googlecode.jmapper.generation.MapperBuilder.generate(MapperBuilder.java:90)
at com.googlecode.jmapper.JMapper.createMapper(JMapper.java:450)
at com.googlecode.jmapper.JMapper.<init>(JMapper.java:432)
... 41 more
2021-10-10 17:45:24,349 INFO [io.quarkus] (Quarkus Main Thread) cana-codelessautomation-api 1.0.0-SNAPSHOT on JVM (powered by Quarkus 2.3.0.Final) started in 2.677s. Listening on: http://localhost:8080
2021-10-10 17:45:24,351 INFO [io.quarkus] (Quarkus Main Thread) Profile dev activated. Live Coding activated.
2021-10-10 17:45:24,351 INFO [io.quarkus] (Quarkus Main Thread) Installed features: [agroal, cdi, hibernate-orm, hibernate-orm-panache, hibernate-validator, jdbc-postgresql, narayana-jta, rest-client, resteasy, resteasy-jackson, smallrye-context-propagation, smallrye-openapi, swagger-ui, vertx]
2021-10-10 17:46:01,884 WARN [org.ref.Reflections] (executor-thread-0) given scan urls are empty. set urls in the configuration
2021-10-10 17:46:01,928 ERROR [com.goo.jma.JMapper] (executor-thread-0) ConversionBodyIllegalCodeException: There is an error in the generated method. Additional information: [source error] no such class: cana.codelessautomation.api.resources.environment.models.CreateEnvironmentModel
2021-10-10 17:46:01,932 ERROR [io.qua.ver.htt.run.QuarkusErrorHandler] (executor-thread-0) HTTP Request to /api/environments?userId=2680912425326220290 failed, error id: 892c8f38-3a3e-49cd-a44e-6fe439307cf3-1: org.jboss.resteasy.spi.UnhandledException: java.lang.RuntimeException: Error injecting cana.codelessautomation.api.resources.environment.mappers.EnvironmentResourceMapper cana.codelessautomation.api.resources.environment.EnvironmentResource.environmentResourceMapper
at org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandler.java:381)
at org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:218)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:519)
at org.jboss.resteasy.core.SynchronousDispatcher.lambda$invoke$4(SynchronousDispatcher.java:261)
at org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:161)
at org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:364)
at org.jboss.resteasy.core.SynchronousDispatcher.preprocess(SynchronousDispatcher.java:164)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:247)
at io.quarkus.resteasy.runtime.standalone.RequestDispatcher.service(RequestDispatcher.java:73)
at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler.dispatch(VertxRequestHandler.java:135)
at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler$1.run(VertxRequestHandler.java:90)
at io.quarkus.vertx.core.runtime.VertxCoreRecorder$13.runWith(VertxCoreRecorder.java:543)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: java.lang.RuntimeException: Error injecting cana.codelessautomation.api.resources.environment.mappers.EnvironmentResourceMapper cana.codelessautomation.api.resources.environment.EnvironmentResource.environmentResourceMapper
at cana.codelessautomation.api.resources.environment.EnvironmentResource_Bean.create(EnvironmentResource_Bean.zig:197)
at cana.codelessautomation.api.resources.environment.EnvironmentResource_Bean.create(EnvironmentResource_Bean.zig:263)
at io.quarkus.arc.impl.AbstractSharedContext.createInstanceHandle(AbstractSharedContext.java:96)
at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:29)
at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:26)
at io.quarkus.arc.impl.LazyValue.get(LazyValue.java:26)
at io.quarkus.arc.impl.ComputingCache.computeIfAbsent(ComputingCache.java:69)
at io.quarkus.arc.impl.AbstractSharedContext.get(AbstractSharedContext.java:26)
at cana.codelessautomation.api.resources.environment.EnvironmentResource_Bean.get(EnvironmentResource_Bean.zig:295)
at cana.codelessautomation.api.resources.environment.EnvironmentResource_Bean.get(EnvironmentResource_Bean.zig:311)
at io.quarkus.arc.impl.ArcContainerImpl.beanInstanceHandle(ArcContainerImpl.java:440)
at io.quarkus.arc.impl.ArcContainerImpl.beanInstanceHandle(ArcContainerImpl.java:453)
at io.quarkus.arc.impl.ArcContainerImpl$1.get(ArcContainerImpl.java:276)
at io.quarkus.arc.impl.ArcContainerImpl$1.get(ArcContainerImpl.java:273)
at io.quarkus.resteasy.common.runtime.QuarkusConstructorInjector.construct(QuarkusConstructorInjector.java:52)
at org.jboss.resteasy.plugins.server.resourcefactory.POJOResourceFactory.createResource(POJOResourceFactory.java:71)
at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:401)
at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:69)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:492)
... 15 more
Caused by: com.googlecode.jmapper.exceptions.JMapperException: com.googlecode.jmapper.exceptions.ConversionBodyIllegalCodeException: There is an error in the generated method. Additional information: [source error] no such class: cana.codelessautomation.api.resources.environment.models.CreateEnvironmentModel
at com.googlecode.jmapper.config.JmapperLog.error(JmapperLog.java:46)
at com.googlecode.jmapper.JMapper.<init>(JMapper.java:437)
at com.googlecode.jmapper.JMapper.<init>(JMapper.java:373)
at com.googlecode.jmapper.JMapper.<init>(JMapper.java:360)
at cana.codelessautomation.api.resources.environment.mappers.EnvironmentResourceMapperImpl.<init>(EnvironmentResourceMapperImpl.java:23)
at cana.codelessautomation.api.resources.environment.mappers.EnvironmentResourceMapperImpl_ClientProxy.<init>(EnvironmentResourceMapperImpl_ClientProxy.zig:24)
at cana.codelessautomation.api.resources.environment.mappers.EnvironmentResourceMapperImpl_Bean.proxy(EnvironmentResourceMapperImpl_Bean.zig:40)
at cana.codelessautomation.api.resources.environment.mappers.EnvironmentResourceMapperImpl_Bean.get(EnvironmentResourceMapperImpl_Bean.zig:198)
at cana.codelessautomation.api.resources.environment.mappers.EnvironmentResourceMapperImpl_Bean.get(EnvironmentResourceMapperImpl_Bean.zig:214)
at cana.codelessautomation.api.resources.environment.EnvironmentResource_Bean.create(EnvironmentResource_Bean.zig:180)
... 33 more
Caused by: com.googlecode.jmapper.exceptions.ConversionBodyIllegalCodeException: There is an error in the generated method. Additional information: [source error] no such class: cana.codelessautomation.api.resources.environment.models.CreateEnvironmentModel
at com.googlecode.jmapper.config.Error.bodyContainsIllegalCode(Error.java:186)
at com.googlecode.jmapper.generation.JavassistGenerator.generate(JavassistGenerator.java:85)
at com.googlecode.jmapper.generation.MapperGenerator.generateMapperClass(MapperGenerator.java:75)
at com.googlecode.jmapper.generation.MapperBuilder.generate(MapperBuilder.java:90)
at com.googlecode.jmapper.JMapper.createMapper(JMapper.java:450)
at com.googlecode.jmapper.JMapper.<init>(JMapper.java:432)
... 41 more

Related

Quarkus build native with graalvm polyglot embed script language runtime error

Quarkus and Graalvm version
quarkusPluginId=io.quarkus
quarkusPluginVersion=2.15.3.Final
quarkusPlatformGroupId=io.quarkus.platform
quarkusPlatformArtifactId=quarkus-bom
quarkusPlatformVersion=2.15.3.Final
graalVmVersion=22.3.0
I want use Quarkus with Graalvm embed script language and native image
dependencies
dependencies {
implementation enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}")
implementation 'io.quarkus:quarkus-resteasy-reactive'
implementation 'io.quarkus:quarkus-config-yaml'
implementation 'io.quarkus:quarkus-arc'
implementation 'org.graalvm.sdk:graal-sdk:${graalVmVersion}'
implementation 'org.graalvm.js:js:${graalVmVersion}'
implementation 'org.graalvm.truffle:truffle-api:${graalVmVersion}'
testImplementation 'io.quarkus:quarkus-junit5'
testImplementation 'io.rest-assured:rest-assured'
}
build script
./gradlew build -Dquarkus.package.type=native -Dquarkus.native.additional-build-args="--language:js"
When I use these dependencies, everything just work.
But when I add hibernate dependency
implementation 'io.quarkus:quarkus-hibernate-orm'
implementation 'io.quarkus:quarkus-hibernate-orm-panache'
implementation 'io.quarkus:quarkus-jdbc-h2'
Run the build script will show me this error
> Task :quarkusBuild
[2/7] Performing analysis... [**] (29.6s # 3.50GB)
27,299 (94.12%) of 29,005 classes reachable
45,307 (64.02%) of 70,775 fields reachable
144,092 (65.40%) of 220,308 methods reachable
700 classes, 125 fields, and 3,347 methods registered for reflection
1 native library: -framework CoreServices
Error: Classes that should be initialized at run time got initialized during image building:
Error: Classes that should be initialized at run time got initialized during image building:
com.ibm.icu.impl.ICUDebug the class was requested to be initialized at run time (from language option 'icu4j#file:///Users/d/.sdkman/candidates/java/22.3.r17-grl/languages/icu4j/' with 'com.ibm.icu' and from language option 'js#file:///Users/d/.sdkman/candidates/java/22.3.r17-grl/languages/js/' with 'com.ibm.icu'). To see why com.ibm.icu.impl.ICUDebug got initialized use --trace-class-initialization=com.ibm.icu.impl.ICUDebug
com.ibm.icu.text.Collator the class was requested to be initialized at run time (from language option 'icu4j#file:///Users/d/.sdkman/candidates/java/22.3.r17-grl/languages/icu4j/' with 'com.ibm.icu' and from language option 'js#file:///Users/d/.sdkman/candidates/java/22.3.r17-grl/languages/js/' with 'com.ibm.icu'). To see why com.ibm.icu.text.Collator got initialized use --trace-class-initialization=com.ibm.icu.text.Collator
------------------------------------------------------------------------------------------------------------------------
To see how the classes got initialized, use --trace-class-initialization=com.ibm.icu.impl.ICUDebug,com.ibm.icu.text.Collator
com.oracle.svm.core.util.UserError$UserException: Classes that should be initialized at run time got initialized during image building:
com.ibm.icu.impl.ICUDebug the class was requested to be initialized at run time (from language option 'icu4j#file:///Users/d/.sdkman/candidates/java/22.3.r17-grl/languages/icu4j/' with 'com.ibm.icu' and from language option 'js#file:///Users/d/.sdkman/candidates/java/22.3.r17-grl/languages/js/' with 'com.ibm.icu'). To see why com.ibm.icu.impl.ICUDebug got initialized use --trace-class-initialization=com.ibm.icu.impl.ICUDebug
com.ibm.icu.text.Collator the class was requested to be initialized at run time (from language option 'icu4j#file:///Users/d/.sdkman/candidates/java/22.3.r17-grl/languages/icu4j/' with 'com.ibm.icu' and from language option 'js#file:///Users/d/.sdkman/candidates/java/22.3.r17-grl/languages/js/' with 'com.ibm.icu'). To see why com.ibm.icu.text.Collator got initialized use --trace-class-initialization=com.ibm.icu.text.Collator
To see how the classes got initialized, use --trace-class-initialization=com.ibm.icu.impl.ICUDebug,com.ibm.icu.text.Collator
at com.oracle.svm.core.util.UserError.abort(UserError.java:73)
at com.oracle.svm.hosted.classinitialization.ProvenSafeClassInitializationSupport.checkDelayedInitialization(ProvenSafeClassInitializationSupport.java:273)
at com.oracle.svm.hosted.classinitialization.ClassInitializationFeature.duringAnalysis(ClassInitializationFeature.java:164)
at com.oracle.svm.hosted.NativeImageGenerator.lambda$runPointsToAnalysis$10(NativeImageGenerator.java:748)
at com.oracle.svm.hosted.FeatureHandler.forEachFeature(FeatureHandler.java:85)
at com.oracle.svm.hosted.NativeImageGenerator.lambda$runPointsToAnalysis$11(NativeImageGenerator.java:748)
at com.oracle.graal.pointsto.AbstractAnalysisEngine.runAnalysis(AbstractAnalysisEngine.java:162)
at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:745)
at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:578)
at com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:535)
at com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:403)
at com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:580)
at com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:128)
at com.oracle.svm.hosted.NativeImageGeneratorRunner$JDK9Plus.main(NativeImageGeneratorRunner.java:610)
3.8s (9.3% of total time) in 26 GCs | Peak RSS: 6.03GB | CPU load: 3.93
========================================================================================================================
Failed generating 'demo-1.0-SNAPSHOT-runner' after 40.3s.
Error: Image build request failed with exit status 1
Error: Image build request failed with exit status 1
> Task :quarkusBuild FAILED
Execution failed for task ':quarkusBuild'.
> io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[error]: Build step io.quarkus.deployment.pkg.steps.NativeImageBuildStep#build threw an exception: io.quarkus.deployment.pkg.steps.NativeImageBuildStep$ImageGenerationFailureException: Image generation failed. Exit code: 1
at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.imageGenerationFailed(NativeImageBuildStep.java:421)
at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:262)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:909)
at io.quarkus.builder.BuildContext.run(BuildContext.java:281)
at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
at java.base/java.lang.Thread.run(Thread.java:833)
at org.jboss.threads.JBossThread.run(JBossThread.java:501)
So I add a arguments in build command
./gradlew build -Dquarkus.package.type=native -Dquarkus.native.additional-build-args="--language:js" -Dquarkus.native.additional-build-args="--initialize-at-build-time=com.ibm.icu"
And this build command just work, but when I run the built binary and access api that use graalvm polyglot sdk, in runtime will show error
2023-01-14 13:17:10,847 ERROR [io.qua.ver.htt.run.QuarkusErrorHandler] (executor-thread-0) HTTP Request to /hello failed, error id: 36b4f719-2397-4766-ac15-c221327bf2c4-1: java.lang.IllegalStateException: No language and polyglot implementation was found on the classpath. Make sure a language is added to the classpath (e.g., native-image --language:js).
at org.graalvm.sdk/org.graalvm.polyglot.Engine$PolyglotInvalid.noPolyglotImplementationFound(Engine.java:1014)
at org.graalvm.sdk/org.graalvm.polyglot.Engine$PolyglotInvalid.createHostAccess(Engine.java:1004)
at org.graalvm.sdk/org.graalvm.polyglot.Engine$Builder.build(Engine.java:626)
at org.graalvm.sdk/org.graalvm.polyglot.Context$Builder.build(Context.java:1851)
at org.graalvm.sdk/org.graalvm.polyglot.Context.create(Context.java:976)
at com.example.ExampleResource.hello(ExampleResource.java:16)
at com.example.ExampleResource$quarkusrestinvoker$hello_e747664148511e1e5212d3e0f4b40d45c56ab8a1.invoke(Unknown Source)
at org.jboss.resteasy.reactive.server.handlers.InvocationHandler.handle(InvocationHandler.java:29)
at io.quarkus.resteasy.reactive.server.runtime.QuarkusResteasyReactiveRequestContext.invokeHandler(QuarkusResteasyReactiveRequestContext.java:114)
at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:145)
at io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:576)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base#17.0.5/java.lang.Thread.run(Thread.java:833)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:775)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:203)
2023-01-14 13:17:10,876 ERROR [org.jbo.res.rea.com.cor.AbstractResteasyReactiveContext] (executor-thread-0) Request failed: java.lang.IllegalStateException: No language and polyglot implementation was found on the classpath. Make sure a language is added to the classpath (e.g., native-image --language:js).
at org.graalvm.sdk/org.graalvm.polyglot.Engine$PolyglotInvalid.noPolyglotImplementationFound(Engine.java:1014)
at org.graalvm.sdk/org.graalvm.polyglot.Engine$PolyglotInvalid.createHostAccess(Engine.java:1004)
at org.graalvm.sdk/org.graalvm.polyglot.Engine$Builder.build(Engine.java:626)
at org.graalvm.sdk/org.graalvm.polyglot.Context$Builder.build(Context.java:1851)
at org.graalvm.sdk/org.graalvm.polyglot.Context.create(Context.java:976)
at com.example.ExampleResource.hello(ExampleResource.java:16)
at com.example.ExampleResource$quarkusrestinvoker$hello_e747664148511e1e5212d3e0f4b40d45c56ab8a1.invoke(Unknown Source)
at org.jboss.resteasy.reactive.server.handlers.InvocationHandler.handle(InvocationHandler.java:29)
at io.quarkus.resteasy.reactive.server.runtime.QuarkusResteasyReactiveRequestContext.invokeHandler(QuarkusResteasyReactiveRequestContext.java:114)
at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:145)
at io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:576)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base#17.0.5/java.lang.Thread.run(Thread.java:833)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:775)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:203)
2023-01-14 13:17:11,056 ERROR [io.qua.ver.htt.run.QuarkusErrorHandler] (executor-thread-0) HTTP Request to /hello failed, error id: 36b4f719-2397-4766-ac15-c221327bf2c4-2: java.lang.IllegalStateException: No language and polyglot implementation was found on the classpath. Make sure a language is added to the classpath (e.g., native-image --language:js).
at org.graalvm.sdk/org.graalvm.polyglot.Engine$PolyglotInvalid.noPolyglotImplementationFound(Engine.java:1014)
at org.graalvm.sdk/org.graalvm.polyglot.Engine$PolyglotInvalid.createHostAccess(Engine.java:1004)
at org.graalvm.sdk/org.graalvm.polyglot.Engine$Builder.build(Engine.java:626)
at org.graalvm.sdk/org.graalvm.polyglot.Context$Builder.build(Context.java:1851)
at org.graalvm.sdk/org.graalvm.polyglot.Context.create(Context.java:976)
at com.example.ExampleResource.hello(ExampleResource.java:16)
at com.example.ExampleResource$quarkusrestinvoker$hello_e747664148511e1e5212d3e0f4b40d45c56ab8a1.invoke(Unknown Source)
at org.jboss.resteasy.reactive.server.handlers.InvocationHandler.handle(InvocationHandler.java:29)
at io.quarkus.resteasy.reactive.server.runtime.QuarkusResteasyReactiveRequestContext.invokeHandler(QuarkusResteasyReactiveRequestContext.java:114)
at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:145)
at io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:576)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base#17.0.5/java.lang.Thread.run(Thread.java:833)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:775)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:203)
2023-01-14 13:17:11,058 ERROR [org.jbo.res.rea.com.cor.AbstractResteasyReactiveContext] (executor-thread-0) Request failed: java.lang.IllegalStateException: No language and polyglot implementation was found on the classpath. Make sure a language is added to the classpath (e.g., native-image --language:js).
at org.graalvm.sdk/org.graalvm.polyglot.Engine$PolyglotInvalid.noPolyglotImplementationFound(Engine.java:1014)
at org.graalvm.sdk/org.graalvm.polyglot.Engine$PolyglotInvalid.createHostAccess(Engine.java:1004)
at org.graalvm.sdk/org.graalvm.polyglot.Engine$Builder.build(Engine.java:626)
at org.graalvm.sdk/org.graalvm.polyglot.Context$Builder.build(Context.java:1851)
at org.graalvm.sdk/org.graalvm.polyglot.Context.create(Context.java:976)
at com.example.ExampleResource.hello(ExampleResource.java:16)
at com.example.ExampleResource$quarkusrestinvoker$hello_e747664148511e1e5212d3e0f4b40d45c56ab8a1.invoke(Unknown Source)
at org.jboss.resteasy.reactive.server.handlers.InvocationHandler.handle(InvocationHandler.java:29)
at io.quarkus.resteasy.reactive.server.runtime.QuarkusResteasyReactiveRequestContext.invokeHandler(QuarkusResteasyReactiveRequestContext.java:114)
at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:145)
at io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:576)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base#17.0.5/java.lang.Thread.run(Thread.java:833)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:775)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:203)
It make me confused and how to resolve this problem
Use graalvm embed sciprt language in quarkus
As explained here, using GraalVM plolyglot is not something Quarkus supports

Tomcat 9 java.lang.IllegalArgumentException: Invalid character found in the request target

I can deploy my older version of the application to Tomcat, on Google Cloud, but for the newer version now I have a different front-end template, that's the only difference, and when I wish to deploy it now, I have a connection error page, and I end up at this URL: manager/html/upload?org.apache.Catalina.filters.CSRF_NONCE=982F861CA67920658BC340994D5B7A32
I checked the catalina.log file for that day:
03-Mar-2022 11:25:07.066 INFO [http-nio-8080-exec-36] org.apache.coyote.http11.Http11Processor.service Error parsing the HTTP request header
Note: further occurrences of HTTP request parsing errors will be logged at DEBUG level.
java.lang.IllegalArgumentException: Invalid character found in the request target [/index.php?s=/Index/\think\app/invokefunction&function=call_user_func_array&vars[0]=md5&vars[1][]=HelloThinkPHP21 ]. The valid characters are defined in R$
at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:494)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:269)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:895)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1732)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:829)
03-Mar-2022 20:54:29.088 WARNING [http-nio-8080-exec-34] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] appears to have started a thread named [mysql-cj-abandoned-connection-cleanup] but has fa$
java.base#11.0.13/java.lang.Object.wait(Native Method)
java.base#11.0.13/java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:155)
com.mysql.cj.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:91)
java.base#11.0.13/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
java.base#11.0.13/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
java.base#11.0.13/java.lang.Thread.run(Thread.java:829)
03-Mar-2022 20:54:29.088 WARNING [http-nio-8080-exec-34] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] appears to have started a thread named [logback-1] but has failed to stop it. This is ver$
java.base#11.0.13/jdk.internal.misc.Unsafe.park(Native Method)
java.base#11.0.13/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
java.base#11.0.13/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2081)
java.base#11.0.13/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1170)
java.base#11.0.13/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:899)
java.base#11.0.13/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054)
java.base#11.0.13/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
java.base#11.0.13/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
java.base#11.0.13/java.lang.Thread.run(Thread.java:829)
03-Mar-2022 20:54:29.089 WARNING [http-nio-8080-exec-34] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] appears to have started a thread named [logback-2] but has failed to stop it. This is ver$
java.base#11.0.13/jdk.internal.misc.Unsafe.park(Native Method)
java.base#11.0.13/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
java.base#11.0.13/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2081)
java.base#11.0.13/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1170)
java.base#11.0.13/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:899)
java.base#11.0.13/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054)
java.base#11.0.13/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
java.base#11.0.13/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
java.base#11.0.13/java.lang.Thread.run(Thread.java:829)
03-Mar-2022 20:54:29.089 WARNING [http-nio-8080-exec-34] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] appears to have started a thread named [logback-3] but has failed to stop it. This is ver$
java.base#11.0.13/jdk.internal.misc.Unsafe.park(Native Method)
java.base#11.0.13/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
java.base#11.0.13/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2081)
java.base#11.0.13/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1170)
java.base#11.0.13/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:899)
java.base#11.0.13/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054)
java.base#11.0.13/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
java.base#11.0.13/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
java.base#11.0.13/java.lang.Thread.run(Thread.java:829)
03-Mar-2022 20:54:29.090 WARNING [http-nio-8080-exec-34] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] appears to have started a thread named [logback-4] but has failed to stop it. This is ver$
java.base#11.0.13/jdk.internal.misc.Unsafe.park(Native Method)
java.base#11.0.13/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
java.base#11.0.13/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2081)
java.base#11.0.13/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1170)
java.base#11.0.13/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:899)
java.base#11.0.13/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054)
java.base#11.0.13/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
java.base#11.0.13/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
java.base#11.0.13/java.lang.Thread.run(Thread.java:829)
java.base#11.0.13/jdk.internal.misc.Unsafe.park(Native Method)
java.base#11.0.13/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
java.base#11.0.13/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2081)
java.base#11.0.13/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1170)
java.base#11.0.13/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:899)
java.base#11.0.13/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054)
java.base#11.0.13/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
java.base#11.0.13/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
java.base#11.0.13/java.lang.Thread.run(Thread.java:829)
03-Mar-2022 20:54:29.089 WARNING [http-nio-8080-exec-34] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] appears to have started a thread named [logback-3] but has failed to stop it. This is ver$
java.base#11.0.13/jdk.internal.misc.Unsafe.park(Native Method)
java.base#11.0.13/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
java.base#11.0.13/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2081)
java.base#11.0.13/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1170)
java.base#11.0.13/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:899)
java.base#11.0.13/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054)
java.base#11.0.13/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
java.base#11.0.13/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
java.base#11.0.13/java.lang.Thread.run(Thread.java:829)
03-Mar-2022 20:54:29.090 WARNING [http-nio-8080-exec-34] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] appears to have started a thread named [logback-4] but has failed to stop it. This is ver$
java.base#11.0.13/jdk.internal.misc.Unsafe.park(Native Method)
java.base#11.0.13/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
java.base#11.0.13/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2081)
java.base#11.0.13/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1170)
java.base#11.0.13/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:899)
java.base#11.0.13/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054)
java.base#11.0.13/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
java.base#11.0.13/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
java.base#11.0.13/java.lang.Thread.run(Thread.java:829)
03-Mar-2022 20:54:29.090 WARNING [http-nio-8080-exec-34] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] appears to have started a thread named [logback-5] but has failed to stop it. This is ver$
java.base#11.0.13/jdk.internal.misc.Unsafe.park(Native Method)
java.base#11.0.13/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
java.base#11.0.13/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2081)
java.base#11.0.13/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1170)
java.base#11.0.13/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:899)
java.base#11.0.13/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054)
java.base#11.0.13/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
java.base#11.0.13/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
java.base#11.0.13/java.lang.Thread.run(Thread.java:829)
03-Mar-2022 20:54:29.090 WARNING [http-nio-8080-exec-34] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] appears to have started a thread named [logback-6] but has failed to stop it. This is ver$
java.base#11.0.13/jdk.internal.misc.Unsafe.park(Native Method)
java.base#11.0.13/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
java.base#11.0.13/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2081)
java.base#11.0.13/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1170)
java.base#11.0.13/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:899)
java.base#11.0.13/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054)
java.base#11.0.13/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
java.base#11.0.13/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
java.base#11.0.13/java.lang.Thread.run(Thread.java:829)
03-Mar-2022 20:54:30.022 INFO [http-nio-8080-exec-36] org.apache.catalina.util.LifecycleBase.stop The stop() method was called on component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]] after stop() had already been called$
03-Mar-2022 20:54:30.557 INFO [http-nio-8080-exec-36] org.apache.catalina.startup.HostConfig.undeploy Undeploying context []
03-Mar-2022 20:54:34.062 INFO [mysql-cj-abandoned-connection-cleanup] org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instance has been stopped already. Could not load []. The fo$
java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load []. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which ca$
at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1427)
at org.apache.catalina.loader.WebappClassLoaderBase.getResource(WebappClassLoaderBase.java:1052)
at com.mysql.cj.jdbc.AbandonedConnectionCleanupThread.checkThreadContextClassLoader(AbandonedConnectionCleanupThread.java:123)
at com.mysql.cj.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:90)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
The only difference is that I'm using different templates for UI. catalina.log mentioned "Invalid character found in the request-target", but I don't understand which character? Could that be a problem?
I'm using Spring Boot
I've discovered this topic: Tomcat: java.lang.IllegalArgumentException: Invalid character found in method name. HTTP method names must be tokens
I wonder do I have the same problem? But I don't wish to provide an SSL key for my Tomcat.
I have Apache on port 43, it's using https protocol. Then Apache redirects to port 8080 Tomcat.
When I access http mydomain:8080/manager, I wish to deploy my Spring Boot app.
As I already mentioned, my older app can be deployed. But I can't deploy the same app (with the same back-end) but with new templates. Could it be that some code from the front end is making a problem?
UPDATE 2:
It seems my app is working if I upload the war file directly via Google Cloud SSH and then move to webapps. But I can't upload it via Tomcat's Manager page.
I discovered this article, is this related to my issue?
https://github.com/FusionAuth/fusionauth-issues/issues/635

Why is spring-boot-starter-jdbc breaking my REST endpoints?

I'm implementing two plugins for DB access to a springboot project in order to run simple SQL commands (they're the last two dependencies in my pom.xml file). I've developed several REST endpoints up to this point with no problem. The generated war file is hosted in Tomcat on a linux box.
This is an excerpt from my pom.xml file:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.2.RELEASE</version>
<relativePath/>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>3.11.0</version>
</dependency>
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>
<version>0.1.55</version>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
</dependencies>
This is the Tomcat version:
Using CATALINA_BASE: /apps/tomcat/apache-tomcat-9.0.34
Using CATALINA_HOME: /apps/tomcat/apache-tomcat-9.0.34
Using CATALINA_TMPDIR: /apps/tomcat/apache-tomcat-9.0.34/temp
Using JRE_HOME: /usr
Using CLASSPATH: /apps/tomcat/apache-tomcat-9.0.34/bin/bootstrap.jar:/apps/tomcat/apache-tomcat-9.0.34/bin/tomcat-juli.jar
Server version: Apache Tomcat/9.0.34
Server built: Apr 3 2020 12:02:52 UTC
Server number: 9.0.34.0
OS Name: Linux
OS Version: 3.10.0-1160.24.1.el7.x86_64
Architecture: amd64
JVM Version: 1.8.0_275-b01
JVM Vendor: Red Hat, Inc.
Apache Maven version 3.6.3
After compiling (with Maven), all looks good, no build errors, builds the war file and all is fine, like any other previous build. Only now any end point I attempt to hit returns a 404, if I remove the 'spring-boot-starter-jdbc' dependency all returns to normal.
This is the walkthrough I'm following:
https://www.codejava.net/frameworks/spring-boot/connect-to-microsoft-sql-server-examples
These are the logs while deploying with and without the dependency.
Logs without the dependency:
==> catalina.2021-04-25.log <==
25-Apr-2021 01:09:51.912 INFO [Catalina-utility-2] org.apache.catalina.startup.HostConfig.undeploy Undeploying context [/ciamdev]
==> localhost.2021-04-25.log <==
25-Apr-2021 01:09:51.917 INFO [Catalina-utility-2] org.apache.catalina.core.ApplicationContext.log Destroying Spring FrameworkServlet 'dispatcherServlet'
25-Apr-2021 01:09:51.940 INFO [Catalina-utility-2] org.apache.catalina.core.ApplicationContext.log Closing Spring root WebApplicationContext
==> catalina.2021-04-25.log <==
25-Apr-2021 01:09:52.079 INFO [Catalina-utility-2] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/apps/tomcat/apache-tomcat-9.0.34/webapps/ciamdev.war]
25-Apr-2021 01:09:54.783 INFO [Catalina-utility-2] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
==> localhost.2021-04-25.log <==
25-Apr-2021 01:09:55.017 INFO [Catalina-utility-2] org.apache.catalina.core.ApplicationContext.log 2 Spring WebApplicationInitializers detected on classpath
25-Apr-2021 01:09:58.028 INFO [Catalina-utility-2] org.apache.catalina.core.ApplicationContext.log Initializing Spring embedded WebApplicationContext
==> catalina.2021-04-25.log <==
25-Apr-2021 01:09:59.704 INFO [Catalina-utility-2] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/apps/tomcat/apache-tomcat-9.0.34/webapps/ciamdev.war] has finished in [7,625] ms
Logs with dependency:
==> catalina.2021-04-25.log <==
25-Apr-2021 01:12:59.805 INFO [Catalina-utility-1] org.apache.catalina.startup.HostConfig.undeploy Undeploying context [/ciamdev]
==> localhost.2021-04-25.log <==
25-Apr-2021 01:12:59.841 INFO [Catalina-utility-1] org.apache.catalina.core.ApplicationContext.log Closing Spring root WebApplicationContext
==> catalina.2021-04-25.log <==
25-Apr-2021 01:12:59.923 INFO [Catalina-utility-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/apps/tomcat/apache-tomcat-9.0.34/webapps/ciamdev.war]
25-Apr-2021 01:13:03.342 INFO [Catalina-utility-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
==> localhost.2021-04-25.log <==
25-Apr-2021 01:13:03.536 INFO [Catalina-utility-1] org.apache.catalina.core.ApplicationContext.log 2 Spring WebApplicationInitializers detected on classpath
25-Apr-2021 01:13:07.432 INFO [Catalina-utility-1] org.apache.catalina.core.ApplicationContext.log Initializing Spring embedded WebApplicationContext
==> catalina.2021-04-25.log <==
25-Apr-2021 01:13:09.189 SEVERE [Catalina-utility-1] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive [/apps/tomcat/apache-tomcat-9.0.34/webapps/ciamdev.war]
java.lang.IllegalStateException: Error starting child
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:720)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:978)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1849)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:773)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1620)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:305)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1151)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1353)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1357)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1335)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/ciamdev]]
at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)
... 25 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Failed to determine a suitable driver class
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:656)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:636)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:879)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:878)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:152)
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:132)
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:92)
at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:172)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5140)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
... 26 more
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Failed to determine a suitable driver class
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:651)
... 48 more
Caused by: org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Failed to determine a suitable driver class
at org.springframework.boot.autoconfigure.jdbc.DataSourceProperties.determineDriverClassName(DataSourceProperties.java:233)
at org.springframework.boot.autoconfigure.jdbc.DataSourceProperties.initializeDataSourceBuilder(DataSourceProperties.java:174)
at org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration.createDataSource(DataSourceConfiguration.java:43)
at org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration$Hikari.dataSource(DataSourceConfiguration.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
... 49 more
25-Apr-2021 01:13:09.190 INFO [Catalina-utility-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/apps/tomcat/apache-tomcat-9.0.34/webapps/ciamdev.war] has finished in [9,267] ms
I see 'dataSource' mentioned in the logs, this is what I have on the application.properites file:
spring.datasource.url=jdbc:sqlserver://some-server.net;databaseName=somedbname
spring.datasource.username=serverusername
spring.datasource.password=1346794613
The walkthrough provides to was of connecting to a db
3. Connect to SQL Server with Spring JDBC
4. Connect to SQL Server with Spring Data JPA
I'm attempting #3 as it's only basic SQL commands I need to execute.
I haven't found a similar issue while searching for a fix.
Has anyone else experienced this? What could be the issue?
Thanks in advance.
Spring MVC (Springboot) and many other MVC frameworks share the same concept, where Controller (C) is strictly separated from Model (M). Thus, it is very unlikely that any persistence module, JDBC, interfares with your controller. In your question,
Only now any end point I attempt to hit returns a 404
I can only assume that the application did not even get started in this scenario.
You can post the stact trace when you are trying to get the app up and running.
There is another thing to notice though, which might not be relevant to your question. In the walkthrough you are following, you might want to add #Repository,
package net.codejava;
import org.springframework.data.jpa.repository.JpaRepository;
#Repository
public interface CustomerRepository extends JpaRepository<Customer, Long> {
}
So this is turned into a Spring Bean which you can further autowire it somewhere.
UPDATE: After checking the stacktrace you just posted, I noticed that the driver class is the problem here.
Failed to instantiate [com.zaxxer.hikari.HikariDataSource]:
Factory method 'dataSource' threw exception; nested exception is
org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException:
Failed to determine a suitable driver class
See the Failed to determine a suitable driver class? It is advising you to define a driver class.
For Microsoft sqlserver, try defining the driver class name in your .properties configuration file. For example, it could be:
spring.datasource.driver-class-name=com.microsoft.sqlserver.jdbc.SQLServerDriver
# or
# spring.datasource.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
See also https://springframework.guru/configuring-spring-boot-for-microsoft-sql-server/
Notice that the driver class name may change from version to version.
I found the solution in this post:
https://stackoverflow.com/a/31199853/3247471
Which was adding this line
#EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class})
in the springboot application class like so:
#SpringBootApplication
#EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class})
public class HealthcheckApiApplication extends SpringBootServletInitializer {
...}
Thanks #justthink for pointing me in the right direction.

NiFi registry failed to run

I am trying to set up a Secure Apache NiFi Registry on Windows machine, following below link: https://community.cloudera.com/t5/Community-Articles/Setting-Up-a-Secure-Apache-NiFi-Registry/ta-p/247753
Unfortunately, to start the server when I am executing the command: run-nifi-registry.bat start
following error comes up:
Failed to start web server: java.lang.IllegalStateException: Error processing condition on org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration.propertySourcesPlaceholderConfigurer
Shutting down...
I am unable to understand the problem, please explain and provide the solution. Thank You in advance!
Solution: Change the JAVA_HOME to JAVA 1.8
Your JDK may be on higher version and new JDK does not come with JAXB classes
The
Below is sample error log message if JDK is higher version
2020-07-30 13:19:54,998 ERROR [main] o.springframework.boot.SpringApplication Application run failed
java.lang.IllegalStateException: Error processing condition on org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration.propertySourcesPlaceholderConfigurer
at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:60)
at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:108)
Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3167)
at java.base/java.lang.Class.getDeclaredMethods(Class.java:2310)
at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:489)
... 63 common frames omitted
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:602)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:555)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 67 common frames omitted
2020-07-30 13:19:57,811 INFO [Thread-0] org.apache.nifi.registry.NiFiRegistry Initiating shutdown of Jetty web server...
2020-07-30 13:19:57,823 INFO [Thread-0] o.eclipse.jetty.server.AbstractConnector Stopped ServerConnector#5223e5ee{HTTP/1.1,[http/1.1]}{0.0.0.0:18080}
2020-07-30 13:19:57,823 INFO [Thread-0] org.eclipse.jetty.server.session node0 Stopped scavenging

While deploying war File into tomcat getting below error

When i try to deploy war file into tomcat which hosted on AWS, I am getting below error. Before it was working fine, recently facing this issue, Please help me in resolving this issue.
Thanks.
20-Nov-2019 05:11:41.728 INFO [Catalina-utility-2] org.apache.catalina.startup.HostConfig.undeploy Undeploying context [/apis]
20-Nov-2019 05:11:41.779 WARNING [Catalina-utility-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [apis] registered the JDBC driver [org.postgresql.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
20-Nov-2019 05:12:11.843 INFO [Catalina-utility-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/u01/tomcat/webapps/apis.war]
20-Nov-2019 05:12:13.962 SEVERE [Catalina-utility-1] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive [/u01/tomcat/webapps/apis.war]
java.lang.IllegalStateException: Error starting child
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:720)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:978)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1849)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:773)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1620)
20-Nov-2019 05:24:35.542 INFO [Catalina-utility-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
20-Nov-2019 05:24:35.564 INFO [Catalina-utility-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/u01/tomcat/webapps/apis.war] has finished in [43,926] ms
20-Nov-2019 05:25:11.560 SEVERE [ajp-nio-8009-exec-143] org.apache.coyote.ajp.AjpMessage.processHeader Invalid message received with signature [18245]
20-Nov-2019 05:25:11.850 SEVERE [ajp-nio-8009-exec-146] org.apache.coyote.ajp.AjpMessage.processHeader Invalid message received with signature [5635]
20-Nov-2019 13:22:01.921 INFO [http-nio-80-exec-173] org.apache.coyote.http11.Http11Processor.service Error parsing HTTP request header
Note: further occurrences of HTTP request parsing errors will be logged at DEBUG level.
java.lang.IllegalArgumentException: Invalid character found in method name. HTTP method names must be tokens
at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:415)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:292)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:860)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1587)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
20-Nov-2019 13:44:16.665 SEVERE [https-jsse-nio-443-exec-531] org.apache.coyote.AbstractProtocol$ConnectionHandler.process Error reading request, ignored
java.lang.NullPointerException
20-Nov-2019 13:44:16.672 SEVERE [https-jsse-nio-443-exec-532] org.apache.coyote.AbstractProtocol$ConnectionHandler.process Error reading request, ignored
java.lang.NullPointerException
20-Nov-2019 13:44:16.678 SEVERE [https-jsse-nio-443-exec-533] org.apache.coyote.AbstractProtocol$ConnectionHandler.process Error reading request, ignored
java.lang.NullPointerException
20-Nov-2019 13:44:16.684 SEVERE [https-jsse-nio-443-exec-535] org.apache.coyote.AbstractProtocol$ConnectionHandler.process Error reading request, ignored
java.lang.NullPointerException
20-Nov-2019 13:44:16.691 SEVERE [https-jsse-nio-443-exec-529] org.apache.coyote.AbstractProtocol$ConnectionHandler.process Error reading request, ignored
java.lang.NullPointerException
20-Nov-2019 13:44:16.699 SEVERE [https-jsse-nio-443-exec-538] org.apache.coyote.AbstractProtocol$ConnectionHandler.process Error reading request, ignored
java.lang.NullPointerException
20-Nov-2019 13:44:16.705 SEVERE [https-jsse-nio-443-exec-537] org.apache.coyote.AbstractProtocol$ConnectionHandler.process Error reading request, ignored
java.lang.NullPointerException
20-Nov-2019 13:44:16.711 SEVERE [https-jsse-nio-443-exec-534] org.apache.coyote.AbstractProtocol$ConnectionHandler.process Error reading request, ignored
java.lang.NullPointerException
20-Nov-2019 13:44:16.717 SEVERE [https-jsse-nio-443-exec-536] org.apache.coyote.AbstractProtocol$ConnectionHandler.process Error reading request, ignored
java.lang.NullPointerException
20-Nov-2019 13:44:16.723 SEVERE [https-jsse-nio-443-exec-530] org.apache.coyote.AbstractProtocol$ConnectionHandler.process Error reading request, ignored
java.lang.NullPointerException
20-Nov-2019 13:44:16.729 SEVERE [https-jsse-nio-443-exec-531] org.apache.coyote.AbstractProtocol$ConnectionHandler.process Error reading request, ignored
java.lang.NullPointerException
20-Nov-2019 13:44:16.735 SEVERE [https-jsse-nio-443-exec-532] org.apache.coyote.AbstractProtocol$ConnectionHandler.process Error reading request, ignored
java.lang.NullPointerException
20-Nov-2019 13:44:16.741 SEVERE [https-jsse-nio-443-exec-533] org.apache.coyote.AbstractProtocol$ConnectionHandler.process Error reading request, ignored
java.lang.NullPointerException
20-Nov-2019 13:44:16.746 SEVERE [https-jsse-nio-443-exec-535] org.apache.coyote.AbstractProtocol$ConnectionHandler.process Error reading request, ignored
java.lang.NullPointerException
I think your problem is here:
java.lang.IllegalArgumentException: Invalid character found in method name. HTTP method names must be tokens
This may occurr when requests are made between two different application protocols (HTTP and HTTPs). Try using HTTP everywhere to see if this was the source of the problem then properly configure all your servers to work with HTTPs if that is what you want

Resources