Hi Tim,
thanks for the feedback and opening the issue :)
Thomas
------ Originalnachricht ------
Von: "Tim Ward" <tim.w...@paremus.com>
An: "Thomas Driessen" <thomas.driessen...@gmail.com>
Cc: "Paul F Fraser" <pa...@a2zliving.com>; "OSGi Developer Mail List"
<osgi-dev@mail.osgi.org>
Gesendet: 16.01.2019 12:51:24
Betreff: Re: [osgi-dev] Vaadin flow works in bnd workspace, fails in
enRoute project
Hi Thomas,
I'm not sure if this can be done in a better way.
The resource registration could definitely be changed to use the Http
Service Whiteboard relatively easily. The effective result is that
Vaadin would offer a service advertising the resources at the correct
locations with the relevant mappings provided by a ServletContextHelper
(much like the current “Delegate” does). Overall it may be the case
that Vaadin wishes to migrate away from this model as it does seem to
mirror the resource registration model from the Http Service
Whiteboard.
The only other place that would need to change is in the tests
<https://github.com/vaadin/flow/blob/031d9fe8b7fe951658e0369f2a382a67198e3bef/flow-tests/test-root-context/src/main/java/com/vaadin/flow/osgi/Activator.java>
and that seems to be a relatively simple swap to register the servlets
as services rather than using a service tracker.
Regarding the packaging bug of felix.jetty: Is there an older version
of the bundle where this bug is not included, because I remember
successfully using felix.jetty for Vaadin once?
The requirement from Vaadin is “effective active” and so won’t prevent
the bundles from resolving in an OSGi framework (i.e. this would
probably work fine at runtime). The requirement is almost certainly
generated automatically by bnd because there is a DS component injected
with the service.
Is there a bug repot filed for this bug? Otherwise we should do that.
https://issues.apache.org/jira/browse/FELIX-6029
Tim
On 16 Jan 2019, at 11:34, Thomas Driessen
<thomas.driessen...@gmail.com> wrote:
Hi Tim, hi Paul,
I think they had some trouble with resources in Vaadin in OSGi (Vaadin
makes some specific assumptions oabout the file layout I think) and
therefore implemented their own ResourceTracker
(https://github.com/vaadin/flow/blob/master/flow-osgi/src/main/java/com/vaadin/flow/osgi/support/VaadinResourceTrackerComponent.java).
I'm not sure if this can be done in a better way.
Regarding the packaging bug of felix.jetty: Is there an older version
of the bundle where this bug is not included, because I remember
successfully using felix.jetty for Vaadin once?
Is there a bug repot filed for this bug? Otherwise we should do that.
Kind regards,
Thomas
------ Originalnachricht ------
Von: "Tim Ward via osgi-dev" <osgi-dev@mail.osgi.org>
An: "Paul F Fraser" <pa...@a2zliving.com>; "OSGi Developer Mail List"
<osgi-dev@mail.osgi.org>
Gesendet: 16.01.2019 12:20:46
Betreff: Re: [osgi-dev] Vaadin flow works in bnd workspace, fails in
enRoute project
Hi Paul,
The error you’re seeing is a resolution failure because the
"com.vaadin.flow.osgi version=1.2.3” bundle has a requirement in the
“osgi.service” namespace for the service with interface
“org.osgi.service.http.HttpService”. This basically says that the
Vaadin flow bundle is trying to use the HttpService in some way, and
therefore the exported application needs to include a bundle which
provides the HttpService.
Now in fact the Felix Http Jetty implementation used in OSGi enRoute
*does* provide this service, however it is missing the metadata from
the manifest saying that it provides this service. This is a
packaging bug in the Felix Jetty bundle, and is why the resolve
fails.
There is a further question, which is why on earth the Vaadin Flow
bundle is using the HttpService? It would be better and easier for
them to use the Http Whiteboard than to use the old HttpService to
provide content…
Best Regards,
Tim
On 16 Jan 2019, at 04:45, Paul F Fraser via osgi-dev
<osgi-dev@mail.osgi.org> wrote:
Hi,
Following the process below I have sucessfully managed to run a
vaadin flow bundle in OSGi.
Create vaadin flow bundle in enroute maven project.
https://github.com/QNENet/enRouteQNEFlow-0.0.1Use flow bundle in bnd
workspace and export as jar, which of course contains all necessary
dependencies.java -jar flow.jar works at localhost:8080
https://s3-ap-southeast-2.amazonaws.com/qnenet/vaadinFlow/flow.jar
create application from enRoute archetypeAdd all dependencies as
used in exported bnd workspace flow.jarenRoute app fails.
[ERROR] Failed to execute goal
biz.aQute.bnd:bnd-export-maven-plugin:4.1.0:export (default) on
project flow-app: Unable to resolve <<INITIAL>>: missing requirement
osgi.identity;filter:='(osgi.identity=com.vaadin.flow.osgi)' [caused
by: Unable to resolve com.vaadin.flow.osgi version=1.2.3: missing
requirement
osgi.service;filter:='(objectClass=org.osgi.service.http.HttpService)';effective:='active']
-> [Help 1]
Any assistance to solve this last (?) hurdle to having an OSGi work
environment for vaadin flow development would be most appreciated.
Thanks
Paul Fraser
_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev