You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use @RoutingPath and @RoutingName extensively in my application to map the jax-rs applications context roots and contexts because I do the good 12-factor thing and put my admin services and metrics on a separate port, but now I have a web socket use case, where I have a private socket that ingests and processes information that is consumed externally by my end users, so I need to be able to re-map it's context route to match the patterns, as well as be able to bind them to different ports.
and all it ever spits out is this fancy exception:
Exception in thread "main" java.lang.ExceptionInInitializerError
at io.helidon.microprofile.cdi.ContainerInstanceHolder.fromBuildTimeInitializer(ContainerInstanceHolder.java:65)
at io.helidon.microprofile.cdi.ContainerInstanceHolder.lambda$get$1(ContainerInstanceHolder.java:56)
at io.helidon.microprofile.cdi.ContainerInstanceHolder.access(ContainerInstanceHolder.java:91)
at io.helidon.microprofile.cdi.ContainerInstanceHolder.get(ContainerInstanceHolder.java:53)
at io.helidon.microprofile.cdi.HelidonContainer.instance(HelidonContainer.java:48)
at io.helidon.microprofile.server.Server$Builder.build(Server.java:190)
at fsgbu.ohi.saas.applogs.cli.ServeCommand.run(ServeCommand.java:20)
at picocli.CommandLine.executeUserObject(CommandLine.java:2026)
at picocli.CommandLine.access$1500(CommandLine.java:148)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
at picocli.CommandLine.execute(CommandLine.java:2170)
at fsgbu.ohi.saas.applogs.AppLogsMain.main(AppLogsMain.java:20)
at fsgbu.ohi.saas.applogs.MainDemo.main(MainDemo.java:44)
Caused by: org.jboss.weld.exceptions.DefinitionException: Exception List with 1 exceptions:
Exception 0 :
java.lang.IllegalStateException: At most one subclass of ServerApplicationConfig is permitted
at io.helidon.microprofile.tyrus.WebSocketApplication$Builder.applicationClass(WebSocketApplication.java:123)
at io.helidon.microprofile.tyrus.WebSocketCdiExtension.applicationClass(WebSocketCdiExtension.java:83)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:577)
at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:95)
at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:85)
at org.jboss.weld.injection.MethodInvocationStrategy$SimpleMethodInvocationStrategy.invoke(MethodInvocationStrategy.java:168)
at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:330)
at org.jboss.weld.event.ExtensionObserverMethodImpl.sendEvent(ExtensionObserverMethodImpl.java:123)
at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:308)
at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:286)
at org.jboss.weld.bootstrap.events.ContainerLifecycleEvents.fireProcessAnnotatedType(ContainerLifecycleEvents.java:207)
There should be a way to accomplish the desired configuration of having endpoints listening on different ports in a single component.
Steps to reproduce
Do The above
Enjoy the exception
The text was updated successfully, but these errors were encountered:
… to be registered on different ports. Due to a restriction in Tyrus, you cannot share the same path even if registered on different ports, so this is a restriction on this enhancement. WebSocket unit tests re-structured to use @HelidonTest. For more info see issue helidon-io#5643 and WebSocketEndpointAppTest.
…ent ports (#6004)
* Port to Nima of enhancement to allow different WebSocket applications to be registered on different ports. Due to a restriction in Tyrus, you cannot share the same path even if registered on different ports, so this is a restriction on this enhancement. WebSocket unit tests re-structured to use @HelidonTest. For more info see issue #5643 and WebSocketEndpointAppTest.
* Updated docs describing enhancement to bind Websocket applications on different ports.
* Copyright year changed to 2023.
* Removed old comment.
Environment Details
Problem Description
I have a URL Pattern for my services
Such that a “real” customer it might look like:
I use @RoutingPath and @RoutingName extensively in my application to map the jax-rs applications context roots and contexts because I do the good 12-factor thing and put my admin services and metrics on a separate port, but now I have a web socket use case, where I have a private socket that ingests and processes information that is consumed externally by my end users, so I need to be able to re-map it's context route to match the patterns, as well as be able to bind them to different ports.
Then set up my ServerApplicationConfigs like so:
and like so:
And set up my application yaml like so:
and all it ever spits out is this fancy exception:
There should be a way to accomplish the desired configuration of having endpoints listening on different ports in a single component.
Steps to reproduce
The text was updated successfully, but these errors were encountered: