[
https://issues.jboss.org/browse/JBTM-3161?page=com.atlassian.jira.plugin....
]
Matej Kralik commented on JBTM-3161:
------------------------------------
Today, I was trying to add Narayana filters explicitly to the JerseyConfig in the
attachment flight service.
{code:java}
public JerseyConfig() {
register(WadlResource.class);
register(FlightParticipant.class);
register(io.narayana.lra.filter.ClientLRARequestFilter.class);
register(io.narayana.lra.filter.ClientLRAResponseFilter.class);
register(io.narayana.lra.filter.FilterRegistration.class);
register(io.narayana.lra.filter.ServerLRAFilter.class);
}
{code}
It works\[1\] on the version _5.9.6-Final_ (build locally from tag 5.9.6.FINAL with
microprofile.lra.api 1.0-SNAPSHOT) and the filter was triggered before endpoint.
However, when I am trying to do it with the _5.9.8-Final version_, I get the following
error when some flight service endpoint is called:
{code:java}
2019-09-28 12:52:51.763 INFO 16936 --- [ main]
o.m.testing.flight.FlightApplication : Started FlightApplication in 1.557 seconds (JVM
running for 1.9)
2019-09-28 12:52:56.568 WARN 16936 --- [nio-8083-exec-1]
o.g.jersey.internal.inject.Providers : A provider
io.narayana.lra.filter.ClientLRAResponseFilter registered in SERVER runtime does not
implement any provider interfaces applicable in the SERVER runtime. Due to constraint
configuration problems the provider io.narayana.lra.filter.ClientLRAResponseFilter will be
ignored.
2019-09-28 12:52:56.568 WARN 16936 --- [nio-8083-exec-1]
o.g.jersey.internal.inject.Providers : A provider
io.narayana.lra.filter.ClientLRARequestFilter registered in SERVER runtime does not
implement any provider interfaces applicable in the SERVER runtime. Due to constraint
configuration problems the provider io.narayana.lra.filter.ClientLRARequestFilter will be
ignored.
2019-09-28 12:52:56.638 WARN 16936 --- [nio-8083-exec-1]
org.glassfish.jersey.internal.Errors : The following warnings have been detected:
WARNING: Unknown HK2 failure detected:
MultiException stack 1 of 3
org.glassfish.hk2.api.UnsatisfiedDependencyException: There was no object available for
injection at
SystemInjecteeImpl(requiredType=LRAParticipantRegistry,parent=ServerLRAFilter,qualifiers={},position=-1,optional=false,self=false,unqualified=null,2118055490)
at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:75)
at org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:212)
at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:235)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:358)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:487)
at org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:83)
at org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:71)
at org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture$1.call(Cache.java:97)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture.run(Cache.java:154)
at org.glassfish.hk2.utilities.cache.Cache.compute(Cache.java:199)
at org.jvnet.hk2.internal.SingletonContext.findOrCreate(SingletonContext.java:122)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2126)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:116)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:90)
at
org.glassfish.jersey.inject.hk2.AbstractHk2InjectionManager.lambda$getAllServiceHolders$0(AbstractHk2InjectionManager.java:160)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.LinkedList$LLSpliterator.forEachRemaining(LinkedList.java:1235)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566)
at
org.glassfish.jersey.inject.hk2.AbstractHk2InjectionManager.getAllServiceHolders(AbstractHk2InjectionManager.java:164)
at
org.glassfish.jersey.inject.hk2.ImmediateHk2InjectionManager.getAllServiceHolders(ImmediateHk2InjectionManager.java:54)
at org.glassfish.jersey.internal.inject.Providers.getServiceHolders(Providers.java:329)
at
org.glassfish.jersey.internal.inject.Providers.getAllRankedProviders(Providers.java:206)
at
org.glassfish.jersey.server.ProcessingProvidersConfigurator.postInit(ProcessingProvidersConfigurator.java:113)
at
org.glassfish.jersey.server.ApplicationHandler.lambda$initialize$2(ApplicationHandler.java:372)
at java.util.Arrays$ArrayList.forEach(Arrays.java:3880)
at
org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:372)
at
org.glassfish.jersey.server.ApplicationHandler.lambda$initialize$1(ApplicationHandler.java:316)
at org.glassfish.jersey.internal.Errors.process(Errors.java:316)
at org.glassfish.jersey.internal.Errors.process(Errors.java:298)
at org.glassfish.jersey.internal.Errors.processWithException(Errors.java:256)
at
org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:315)
at
org.glassfish.jersey.server.ApplicationHandler.<init>(ApplicationHandler.java:282)
at org.glassfish.jersey.servlet.WebComponent.<init>(WebComponent.java:335)
at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:178)
at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:370)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1122)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:777)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:135)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:853)
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)
MultiException stack 2 of 3
java.lang.IllegalArgumentException: While attempting to resolve the dependencies of
io.narayana.lra.filter.ServerLRAFilter errors were found
at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:247)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:358)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:487)
at org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:83)
at org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:71)
at org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture$1.call(Cache.java:97)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture.run(Cache.java:154)
at org.glassfish.hk2.utilities.cache.Cache.compute(Cache.java:199)
at org.jvnet.hk2.internal.SingletonContext.findOrCreate(SingletonContext.java:122)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2126)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:116)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:90)
at
org.glassfish.jersey.inject.hk2.AbstractHk2InjectionManager.lambda$getAllServiceHolders$0(AbstractHk2InjectionManager.java:160)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.LinkedList$LLSpliterator.forEachRemaining(LinkedList.java:1235)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566)
at
org.glassfish.jersey.inject.hk2.AbstractHk2InjectionManager.getAllServiceHolders(AbstractHk2InjectionManager.java:164)
at
org.glassfish.jersey.inject.hk2.ImmediateHk2InjectionManager.getAllServiceHolders(ImmediateHk2InjectionManager.java:54)
at org.glassfish.jersey.internal.inject.Providers.getServiceHolders(Providers.java:329)
at
org.glassfish.jersey.internal.inject.Providers.getAllRankedProviders(Providers.java:206)
at
org.glassfish.jersey.server.ProcessingProvidersConfigurator.postInit(ProcessingProvidersConfigurator.java:113)
at
org.glassfish.jersey.server.ApplicationHandler.lambda$initialize$2(ApplicationHandler.java:372)
at java.util.Arrays$ArrayList.forEach(Arrays.java:3880)
at
org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:372)
at
org.glassfish.jersey.server.ApplicationHandler.lambda$initialize$1(ApplicationHandler.java:316)
at org.glassfish.jersey.internal.Errors.process(Errors.java:316)
at org.glassfish.jersey.internal.Errors.process(Errors.java:298)
at org.glassfish.jersey.internal.Errors.processWithException(Errors.java:256)
at
org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:315)
at
org.glassfish.jersey.server.ApplicationHandler.<init>(ApplicationHandler.java:282)
at org.glassfish.jersey.servlet.WebComponent.<init>(WebComponent.java:335)
at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:178)
at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:370)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1122)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:777)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:135)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:853)
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)
MultiException stack 3 of 3
java.lang.IllegalStateException: Unable to perform operation: resolve on
io.narayana.lra.filter.ServerLRAFilter
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:387)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:487)
at org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:83)
at org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:71)
at org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture$1.call(Cache.java:97)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture.run(Cache.java:154)
at org.glassfish.hk2.utilities.cache.Cache.compute(Cache.java:199)
at org.jvnet.hk2.internal.SingletonContext.findOrCreate(SingletonContext.java:122)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2126)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:116)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:90)
at
org.glassfish.jersey.inject.hk2.AbstractHk2InjectionManager.lambda$getAllServiceHolders$0(AbstractHk2InjectionManager.java:160)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.LinkedList$LLSpliterator.forEachRemaining(LinkedList.java:1235)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566)
at
org.glassfish.jersey.inject.hk2.AbstractHk2InjectionManager.getAllServiceHolders(AbstractHk2InjectionManager.java:164)
at
org.glassfish.jersey.inject.hk2.ImmediateHk2InjectionManager.getAllServiceHolders(ImmediateHk2InjectionManager.java:54)
at org.glassfish.jersey.internal.inject.Providers.getServiceHolders(Providers.java:329)
at
org.glassfish.jersey.internal.inject.Providers.getAllRankedProviders(Providers.java:206)
at
org.glassfish.jersey.server.ProcessingProvidersConfigurator.postInit(ProcessingProvidersConfigurator.java:113)
at
org.glassfish.jersey.server.ApplicationHandler.lambda$initialize$2(ApplicationHandler.java:372)
at java.util.Arrays$ArrayList.forEach(Arrays.java:3880)
at
org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:372)
at
org.glassfish.jersey.server.ApplicationHandler.lambda$initialize$1(ApplicationHandler.java:316)
at org.glassfish.jersey.internal.Errors.process(Errors.java:316)
at org.glassfish.jersey.internal.Errors.process(Errors.java:298)
at org.glassfish.jersey.internal.Errors.processWithException(Errors.java:256)
at
org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:315)
at
org.glassfish.jersey.server.ApplicationHandler.<init>(ApplicationHandler.java:282)
at org.glassfish.jersey.servlet.WebComponent.<init>(WebComponent.java:335)
at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:178)
at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:370)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1122)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:777)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:135)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:853)
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)
2019-09-28 12:52:56.640 ERROR 16936 --- [nio-8083-exec-1]
o.a.c.c.C.[Tomcat].[localhost].[/] : Servlet.init() for servlet
[org.mkralik.testing.flight.JerseyConfig] threw exception
org.glassfish.hk2.api.MultiException: A MultiException has 3 exceptions. They are:
1. org.glassfish.hk2.api.UnsatisfiedDependencyException: There was no object available for
injection at
SystemInjecteeImpl(requiredType=LRAParticipantRegistry,parent=ServerLRAFilter,qualifiers={},position=-1,optional=false,self=false,unqualified=null,2118055490)
2. java.lang.IllegalArgumentException: While attempting to resolve the dependencies of
io.narayana.lra.filter.ServerLRAFilter errors were found
3. java.lang.IllegalStateException: Unable to perform operation: resolve on
io.narayana.lra.filter.ServerLRAFilter
at org.jvnet.hk2.internal.Collector.throwIfErrors(Collector.java:89)
~[hk2-locator-2.5.0-b42.jar:na]
at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:250)
~[hk2-locator-2.5.0-b42.jar:na]
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:358)
~[hk2-locator-2.5.0-b42.jar:na]
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:487)
~[hk2-locator-2.5.0-b42.jar:na]
at org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:83)
~[hk2-locator-2.5.0-b42.jar:na]
at org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:71)
~[hk2-locator-2.5.0-b42.jar:na]
at org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture$1.call(Cache.java:97)
~[hk2-utils-2.5.0-b42.jar:na]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_222]
at org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture.run(Cache.java:154)
~[hk2-utils-2.5.0-b42.jar:na]
at org.glassfish.hk2.utilities.cache.Cache.compute(Cache.java:199)
~[hk2-utils-2.5.0-b42.jar:na]
at org.jvnet.hk2.internal.SingletonContext.findOrCreate(SingletonContext.java:122)
~[hk2-locator-2.5.0-b42.jar:na]
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2126)
~[hk2-locator-2.5.0-b42.jar:na]
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:116)
~[hk2-locator-2.5.0-b42.jar:na]
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:90)
~[hk2-locator-2.5.0-b42.jar:na]
at
org.glassfish.jersey.inject.hk2.AbstractHk2InjectionManager.lambda$getAllServiceHolders$0(AbstractHk2InjectionManager.java:160)
~[jersey-hk2-2.27.jar:na]
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
~[na:1.8.0_222]
at java.util.LinkedList$LLSpliterator.forEachRemaining(LinkedList.java:1235)
~[na:1.8.0_222]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[na:1.8.0_222]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
~[na:1.8.0_222]
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
~[na:1.8.0_222]
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:1.8.0_222]
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566)
~[na:1.8.0_222]
at
org.glassfish.jersey.inject.hk2.AbstractHk2InjectionManager.getAllServiceHolders(AbstractHk2InjectionManager.java:164)
~[jersey-hk2-2.27.jar:na]
at
org.glassfish.jersey.inject.hk2.ImmediateHk2InjectionManager.getAllServiceHolders(ImmediateHk2InjectionManager.java:54)
~[jersey-hk2-2.27.jar:na]
at org.glassfish.jersey.internal.inject.Providers.getServiceHolders(Providers.java:329)
~[jersey-common-2.27.jar:na]
at
org.glassfish.jersey.internal.inject.Providers.getAllRankedProviders(Providers.java:206)
~[jersey-common-2.27.jar:na]
at
org.glassfish.jersey.server.ProcessingProvidersConfigurator.postInit(ProcessingProvidersConfigurator.java:113)
~[jersey-server-2.27.jar:na]
at
org.glassfish.jersey.server.ApplicationHandler.lambda$initialize$2(ApplicationHandler.java:372)
~[jersey-server-2.27.jar:na]
at java.util.Arrays$ArrayList.forEach(Arrays.java:3880) ~[na:1.8.0_222]
at org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:372)
~[jersey-server-2.27.jar:na]
at
org.glassfish.jersey.server.ApplicationHandler.lambda$initialize$1(ApplicationHandler.java:316)
~[jersey-server-2.27.jar:na]
at org.glassfish.jersey.internal.Errors.process(Errors.java:316)
~[jersey-common-2.27.jar:na]
at org.glassfish.jersey.internal.Errors.process(Errors.java:298)
~[jersey-common-2.27.jar:na]
at org.glassfish.jersey.internal.Errors.processWithException(Errors.java:256)
~[jersey-common-2.27.jar:na]
at org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:315)
~[jersey-server-2.27.jar:na]
at
org.glassfish.jersey.server.ApplicationHandler.<init>(ApplicationHandler.java:282)
~[jersey-server-2.27.jar:na]
at org.glassfish.jersey.servlet.WebComponent.<init>(WebComponent.java:335)
~[jersey-container-servlet-core-2.27.jar:na]
at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:178)
~[jersey-container-servlet-core-2.27.jar:na]
at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:370)
~[jersey-container-servlet-core-2.27.jar:na]
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
~[tomcat-embed-core-9.0.21.jar:9.0.21]
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1122)
[tomcat-embed-core-9.0.21.jar:9.0.21]
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:777)
[tomcat-embed-core-9.0.21.jar:9.0.21]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:135)
[tomcat-embed-core-9.0.21.jar:9.0.21]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
[tomcat-embed-core-9.0.21.jar:9.0.21]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
[tomcat-embed-core-9.0.21.jar:9.0.21]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
[tomcat-embed-core-9.0.21.jar:9.0.21]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
[tomcat-embed-core-9.0.21.jar:9.0.21]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
[tomcat-embed-core-9.0.21.jar:9.0.21]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
[tomcat-embed-core-9.0.21.jar:9.0.21]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
[tomcat-embed-core-9.0.21.jar:9.0.21]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
[tomcat-embed-core-9.0.21.jar:9.0.21]
at
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:853)
[tomcat-embed-core-9.0.21.jar:9.0.21]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1587)
[tomcat-embed-core-9.0.21.jar:9.0.21]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
[tomcat-embed-core-9.0.21.jar:9.0.21]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[na:1.8.0_222]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[na:1.8.0_222]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
[tomcat-embed-core-9.0.21.jar:9.0.21]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_222]
Caused by: org.glassfish.hk2.api.UnsatisfiedDependencyException: There was no object
available for injection at
SystemInjecteeImpl(requiredType=LRAParticipantRegistry,parent=ServerLRAFilter,qualifiers={},position=-1,optional=false,self=false,unqualified=null,2118055490)
at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:75)
~[hk2-locator-2.5.0-b42.jar:na]
at org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:212)
~[hk2-locator-2.5.0-b42.jar:na]
at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:235)
~[hk2-locator-2.5.0-b42.jar:na]
... 56 common frames omitted
2019-09-28 12:52:56.641 ERROR 16936 --- [nio-8083-exec-1]
o.a.c.c.C.[.[.[.[.m.t.f.JerseyConfig] : Allocate exception for servlet
[org.mkralik.testing.flight.JerseyConfig]
org.glassfish.hk2.api.UnsatisfiedDependencyException: There was no object available for
injection at
SystemInjecteeImpl(requiredType=LRAParticipantRegistry,parent=ServerLRAFilter,qualifiers={},position=-1,optional=false,self=false,unqualified=null,2118055490)
at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:75)
~[hk2-locator-2.5.0-b42.jar:na]
at org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:212)
~[hk2-locator-2.5.0-b42.jar:na]
at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:235)
~[hk2-locator-2.5.0-b42.jar:na]
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:358)
~[hk2-locator-2.5.0-b42.jar:na]
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:487)
~[hk2-locator-2.5.0-b42.jar:na]
at org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:83)
~[hk2-locator-2.5.0-b42.jar:na]
at org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:71)
~[hk2-locator-2.5.0-b42.jar:na]
at org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture$1.call(Cache.java:97)
~[hk2-utils-2.5.0-b42.jar:na]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_222]
at org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture.run(Cache.java:154)
~[hk2-utils-2.5.0-b42.jar:na]
at org.glassfish.hk2.utilities.cache.Cache.compute(Cache.java:199)
~[hk2-utils-2.5.0-b42.jar:na]
at org.jvnet.hk2.internal.SingletonContext.findOrCreate(SingletonContext.java:122)
~[hk2-locator-2.5.0-b42.jar:na]
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2126)
~[hk2-locator-2.5.0-b42.jar:na]
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:116)
~[hk2-locator-2.5.0-b42.jar:na]
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:90)
~[hk2-locator-2.5.0-b42.jar:na]
at
org.glassfish.jersey.inject.hk2.AbstractHk2InjectionManager.lambda$getAllServiceHolders$0(AbstractHk2InjectionManager.java:160)
~[jersey-hk2-2.27.jar:na]
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
~[na:1.8.0_222]
at java.util.LinkedList$LLSpliterator.forEachRemaining(LinkedList.java:1235)
~[na:1.8.0_222]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[na:1.8.0_222]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
~[na:1.8.0_222]
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
~[na:1.8.0_222]
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:1.8.0_222]
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566)
~[na:1.8.0_222]
at
org.glassfish.jersey.inject.hk2.AbstractHk2InjectionManager.getAllServiceHolders(AbstractHk2InjectionManager.java:164)
~[jersey-hk2-2.27.jar:na]
at
org.glassfish.jersey.inject.hk2.ImmediateHk2InjectionManager.getAllServiceHolders(ImmediateHk2InjectionManager.java:54)
~[jersey-hk2-2.27.jar:na]
at org.glassfish.jersey.internal.inject.Providers.getServiceHolders(Providers.java:329)
~[jersey-common-2.27.jar:na]
at
org.glassfish.jersey.internal.inject.Providers.getAllRankedProviders(Providers.java:206)
~[jersey-common-2.27.jar:na]
at
org.glassfish.jersey.server.ProcessingProvidersConfigurator.postInit(ProcessingProvidersConfigurator.java:113)
~[jersey-server-2.27.jar:na]
at
org.glassfish.jersey.server.ApplicationHandler.lambda$initialize$2(ApplicationHandler.java:372)
~[jersey-server-2.27.jar:na]
at java.util.Arrays$ArrayList.forEach(Arrays.java:3880) ~[na:1.8.0_222]
at org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:372)
~[jersey-server-2.27.jar:na]
at
org.glassfish.jersey.server.ApplicationHandler.lambda$initialize$1(ApplicationHandler.java:316)
~[jersey-server-2.27.jar:na]
at org.glassfish.jersey.internal.Errors.process(Errors.java:316)
~[jersey-common-2.27.jar:na]
at org.glassfish.jersey.internal.Errors.process(Errors.java:298)
~[jersey-common-2.27.jar:na]
at org.glassfish.jersey.internal.Errors.processWithException(Errors.java:256)
~[jersey-common-2.27.jar:na]
at org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:315)
~[jersey-server-2.27.jar:na]
at
org.glassfish.jersey.server.ApplicationHandler.<init>(ApplicationHandler.java:282)
~[jersey-server-2.27.jar:na]
at org.glassfish.jersey.servlet.WebComponent.<init>(WebComponent.java:335)
~[jersey-container-servlet-core-2.27.jar:na]
at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:178)
~[jersey-container-servlet-core-2.27.jar:na]
at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:370)
~[jersey-container-servlet-core-2.27.jar:na]
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
~[tomcat-embed-core-9.0.21.jar:9.0.21]
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1122)
~[tomcat-embed-core-9.0.21.jar:9.0.21]
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:777)
~[tomcat-embed-core-9.0.21.jar:9.0.21]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:135)
~[tomcat-embed-core-9.0.21.jar:9.0.21]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
[tomcat-embed-core-9.0.21.jar:9.0.21]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
[tomcat-embed-core-9.0.21.jar:9.0.21]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
[tomcat-embed-core-9.0.21.jar:9.0.21]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
[tomcat-embed-core-9.0.21.jar:9.0.21]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
[tomcat-embed-core-9.0.21.jar:9.0.21]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
[tomcat-embed-core-9.0.21.jar:9.0.21]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
[tomcat-embed-core-9.0.21.jar:9.0.21]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
[tomcat-embed-core-9.0.21.jar:9.0.21]
at
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:853)
[tomcat-embed-core-9.0.21.jar:9.0.21]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1587)
[tomcat-embed-core-9.0.21.jar:9.0.21]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
[tomcat-embed-core-9.0.21.jar:9.0.21]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[na:1.8.0_222]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[na:1.8.0_222]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
[tomcat-embed-core-9.0.21.jar:9.0.21]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_222]
{code}
\[1\] the filter is triggered (which is this issue about). However, the
_StringIndexOutOfBoundsException_ exception was thrown from
_NarayanaLRAClient.getTerminationUris_ because for some reason, the
_containerRequestContext.getUriInfo().getPath()_ returns an empty string in the SpringBoot
flight service (which is in the Attachments). In the original Thorntail flight service
from quickstarts, method getPat() returns "/". However, this is not related to
this issue.
Nested LRA doesn't start in the Spring Boot + JAX-RS application
----------------------------------------------------------------
Key: JBTM-3161
URL:
https://issues.jboss.org/browse/JBTM-3161
Project: JBoss Transaction Manager
Issue Type: Bug
Components: LRA
Reporter: Matej Kralik
Priority: Critical
Attachments: flight.zip
For demonstrating purpose, I migrated flight service from [narayana
quickstart|https://github.com/jbosstm/quickstart/tree/master/rts/lra/flig...] to
the Spring Boot application and uploaded it to the attachment.
When I stop debugger in the original swarm flight service (FlightParticipant [line
64|https://github.com/jbosstm/quickstart/blob/3b848517086c2abc32bff6895b2...]),
the *_@HeaderParam(LRA_HTTP_CONTEXT_HEADER) String lraId_*, is new for that service. When
I stop debugger in the SpringBoot+JAX-RS, the lraId is the same as for a parent. It looks
that the _ServerLRAFilter_ doesn't start the new LRA.
I add a breakpoint to the *_ServerLRAFilter.filter(...)_* to see when the filter is
applied and create new LRA before the JAX-RS method. When I call original swarm flight
service, the filter is used however when I call SpringBoot flight service, the filter is
not used so it looks that the filter is not used at all in the SpringBoot+JAX-RS
application.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)