First I want to say that you guys at Vaadin did a great job with this integration into OSGi. It really simplifies things a lot and this improvement is of equal scale to me as the the new features of Grid in 8.1.0. Keep up the fantastic work.
Generally the order of installing bundles should not matter. But it seems it does in this case.
bundle:install -s mvn:org.jsoup/jsoup/1.8.3
bundle:install -s mvn:com.vaadin.external/gentyref/1.2.0.vaadin1
bundle:install -s mvn:com.vaadin/vaadin-shared/8.1.0
bundle:install -s mvn:com.vaadin/vaadin-server/8.1.0
bundle:install -s mvn:com.vaadin/vaadin-osgi-integration/8.1.0
bundle:install -s mvn:com.vaadin/vaadin-client-compiled/8.1.0
bundle:install -s mvn:com.vaadin/vaadin-themes/8.1.0
I also installed the features http and http-whiteboard before installing the bundles:
feature:install http http-whiteboard
But the documentation states it works for Apache Karaf 4.0.8. But the version 4.0.8 of Karaf doesn’t have Declarative Services installed out-of-the-box. So you also need to install this feature:
feature:install scr
You don’t have that problem with Apache Karaf 4.1.1 as it has the feature
scr installed initially.
The documentation doesn’t list the atmosphere bundle to be installed. Is it still needed for server side push?
And though push generally seems to work (at least in my little example), there are some error messages in the log which let one assume that no everything works as expected: https://pastebin.com/nhftipP1
Especially this seems odd:
2017-08-02T09:02:53,420 | ERROR | Atmosphere-Shared-10 | PushHandler | 102 - com.vaadin.server - 8.1.0 | Could not get resource. This should never happen.
2017-08-02T09:02:53,440 | WARN | qtp1091316422-117 | DefaultBroadcaster | 106 - com.vaadin.external.org.slf4j - 1.6.1 | Duplicate resource 1cfed68c-2888-441b-bd8c-5c4acd855f99. Could be caused by a dead connection not detected by your server. Replacing the old one with the fresh one
I’m quite in the same situation:
Everything was running fine using Karaf 4.0.9, Vaadin 8.0.9 and Charts 4.0.
As I now switched to Karaf 4.1.2, Vaadin 8.1.3 and Charts 4.0 I’m getting the same errors:
2017-09-12T09:26:02,249 | ERROR | Atmosphere-Shared-4 | PushHandler | 78 - com.vaadin.server - 8.1.3 | Could not get resource. This should never happen.
2017-09-12T09:26:02,280 | WARN | qtp1236621876-2040 | DefaultBroadcaster | 75 - com.vaadin.external.org.slf4j - 1.6.1 | Duplicate resource 7f9494d1-3f99-41e4-a43d-b3e95554404a. Could be caused by a dead connection not detected by your server. Replacing the old one with the fresh one
Push seems to work though…
We’re using Vaadin 8.1.5, with Karaf 4.1.2.
This is the error we’re receiving:
2017-10-17 13:01:26,938 | ERROR | 106 - n.external.org.slf4j | AtmosphereFramework | Failed to initialize Atmosphere Framework
java.util.ServiceConfigurationError: org.atmosphere.inject.Injectable: Provider org.atmosphere.inject.AtmosphereConfigInjectable not found
(The complete stacktrace: https://pastebin.com/J0JHq9LG)
It’s the same error Mihael Schmidt mentions in his first Pastbin post. By the way, it is the only resource on the Internet with this excact same error…
No matter what I’ve tried, it won’t work.
Thanks for the suggestion, but unfortunately it did not help. We’ve still the same problem.
Your situation is the same? Same Karaf, etc?
In that case We’re probably overlooking something else…
I fixed it for now, by adding “ServiceLoader.load(AtmosphereConfigInjectable.class);” to our BundleActivator.
Now Atmosphere loads correctly and I get the same two errors:
2017-10-24 12:15:47,490 | ERROR | 67 - com.vaadin.server | PushHandler | Could not get resource. This should never happen.
2017-10-24 12:15:48,862 | WARN | 64 - n.external.org.slf4j | DefaultBroadcaster | Duplicate resource 79d00d9c-beb9-4172-9c4d-fd744fc96429. Could be caused by a dead connection not detected by your server. Replacing the old one with the fresh one
Hey did you solve the atmosphere problem? I also have error that " org.atmosphere.inject.Injectable: Provider org.atmosphere.inject.AtmosphereConfigInjectable not found", how to solve this problem?
2017-11-28 15:43:29,229 | DEBUG | tures-1-thread-1 | ServletHolder | 359 - org.eclipse.jetty.util - 9.3.14.v20161028 | Servlet.init fi.xaxis.akseli.wristband.printer.WristbandPrinterServlet@5343e2e0 for org.ops4j.pax.web.service.spi.model.ServletModel-94
2017-11-28 15:43:29,229 | WARN | tures-1-thread-1 | DefaultDeploymentConfiguration | 88 - com.vaadin.server - 8.1.4 |
=================================================================
Vaadin is running in DEBUG MODE.
Add productionMode=true to web.xml to disable debug features.
To show debug window, add ?debug to your application URL.
=================================================================
2017-11-28 15:43:29,230 | DEBUG | tures-1-thread-1 | PushRequestHandler | 88 - com.vaadin.server - 8.1.4 | Initializing Atmosphere for servlet org.ops4j.pax.web.service.spi.model.ServletModel-94
2017-11-28 15:43:29,231 | INFO | tures-1-thread-1 | AtmosphereFramework | 84 - com.vaadin.external.org.slf4j - 1.6.1 | Installed AtmosphereHandler com.vaadin.server.communication.PushAtmosphereHandler mapped to context-path: /*
2017-11-28 15:43:29,231 | INFO | tures-1-thread-1 | AtmosphereFramework | 84 - com.vaadin.external.org.slf4j - 1.6.1 | Installed the following AtmosphereInterceptor mapped to AtmosphereHandler com.vaadin.server.communication.PushAtmosphereHandler
2017-11-28 15:43:29,235 | ERROR | tures-1-thread-1 | AtmosphereFramework | 84 - com.vaadin.external.org.slf4j - 1.6.1 | Failed to initialize Atmosphere Framework
java.util.ServiceConfigurationError: org.atmosphere.inject.Injectable: Provider org.atmosphere.inject.AtmosphereConfigInjectable not found
at java.util.ServiceLoader.fail(ServiceLoader.java:239) ~[?:?]
at java.util.ServiceLoader.access$300(ServiceLoader.java:185) ~[?:?]
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:372) ~[?:?]
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404) ~[?:?]
at java.util.ServiceLoader$1.next(ServiceLoader.java:480) ~[?:?]
at org.atmosphere.inject.InjectableObjectFactory.configure(InjectableObjectFactory.java:86) ~[82:com.vaadin.external.atmosphere.