You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@aries.apache.org by David Bosschaert <da...@gmail.com> on 2016/10/04 07:23:39 UTC

Re: Apache Aries: how to make Osgi work with ServiceLoader

Hi Alex,

Sorry it took so long to respond, for some reason this message ended up in
my spam folder.

You also need to add some configuration in the form of manifest headers to
instruct SPI Fly what to do. Have a look for some documentation and
instructions here: http://aries.apache.org/modules/spi-fly.html

Best regards,

David

On 29 September 2016 at 13:54, Alex Sviridov <oo...@mail.ru> wrote:

> Hi all
>
> I use jetty 9.3.11 and websockets on osgi. Jetty uses ServiceLoader to get
> websocket configuration.
> After some research I installed and started two additional bundles:
>
> org.apache.aries.util-1.1.1.jar
> org.apache.aries.spifly.dynamic.bundle-1.0.1.jar
>
> However, it didn't help because I still get the exception (see below).
> What else should I do to make ServiceLoader work on Osgi (I use felix
> 5.4.0)?
>
> java.lang.RuntimeException:Cannot load platform configurator
>     at javax.websocket.server.ServerEndpointConfig$Configurator.fetchContainerDefaultConfigurator(ServerEndpointConfig.java:123)
>     at javax.websocket.server.ServerEndpointConfig$Configurator.getContainerDefaultConfigurator(ServerEndpointConfig.java:128)
>     at javax.websocket.server.ServerEndpointConfig$Configurator.checkOrigin(ServerEndpointConfig.java:192)
>     at org.eclipse.jetty.websocket.jsr356.server.JsrCreator.createWebSocket(JsrCreator.java:88)
>     at org.eclipse.jetty.websocket.server.WebSocketServerFactory.acceptWebSocket(WebSocketServerFactory.java:187)
>     at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:207)
>     at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1676)
>     at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
>
>
>

Re[2]: Apache Aries: how to make Osgi work with ServiceLoader

Posted by Alex Sviridov <oo...@mail.ru>.
Hi David

Thank you for your answer. The problem was in javax.websocket-api bundle.
See here for details  http://stackoverflow.com/questions/39740531/jetty-websocket-java-lang-runtimeexception-cannot-load-platform-configurator

Best regards, Alex


>Вторник,  4 октября 2016, 10:23 +03:00 от David Bosschaert <da...@gmail.com>:
>
>Hi Alex,
>
>Sorry it took so long to respond, for some reason this message ended up in my spam folder.
>
>You also need to add some configuration in the form of manifest headers to instruct SPI Fly what to do. Have a look for some documentation and instructions here:  http://aries.apache.org/modules/spi-fly.html
>
>Best regards,
>
>David
>
>On 29 September 2016 at 13:54, Alex Sviridov  < ooo_saturn7@mail.ru > wrote:
>>Hi all
>>
>>I use jetty 9.3.11 and websockets on osgi. Jetty uses ServiceLoader to get websocket configuration. 
>>After some research I installed and started two additional bundles:
>>org.apache.aries.util-1.1.1.jar
org.apache.aries.spifly.dynamic.bundle-1.0.1.jar
>>However, it didn't help because I still get the exception (see below). 
>>What else should I do to make ServiceLoader work on Osgi (I use felix 5.4.0)?
>>java.lang.RuntimeException:Cannot load platform configurator
    at javax.websocket.server.ServerEndpointConfig$Configurator.fetchContainerDefaultConfigurator(ServerEndpointConfig.java:123)
    at javax.websocket.server.ServerEndpointConfig$Configurator.getContainerDefaultConfigurator(ServerEndpointConfig.java:128)
    at javax.websocket.server.ServerEndpointConfig$Configurator.checkOrigin(ServerEndpointConfig.java:192)
    at org.eclipse.jetty.websocket.jsr356.server.JsrCreator.createWebSocket(JsrCreator.java:88)
    at org.eclipse.jetty.websocket.server.WebSocketServerFactory.acceptWebSocket(WebSocketServerFactory.java:187)
    at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:207)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1676)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
>


-- 
Alex Sviridov